	DEFINE	CUBES_BORDER	#8011

//-----------------------------------------------------------------------------
// NOISE HEAD
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;---
	LD	B,30
LDW1	EI
	HALT
	DJNZ	LDW1
	;---------
	LD	A,NOISEHEAD_EXE_PG
	CALL	PAGER
	LD	HL,NOISEHEAD_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;---------
	LD	A,#14
	CALL	PAGER
	LD	LX,8*3-1
	CALL	LOADMUS_PLAY

	LD	HL,0
	LD	(MUSPOS),HL
	CALL	MUSIC_ON
	
	CALL	BLINK_ON
	CALL	#8000	


	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	;run_fx
	DB	T_FX_RUN
	DW	416-1

	DB	T_BLINK_ON
	DB	T_BLINK_ON

	DB	T_FX_RUN
	DW	832-26+4+4+4+4

//-----------------------------------------------------------------------------
// ROMBS GRID
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;---------
	LD	HL,IM2CALL_RET
	LD	(IM2CALL),HL
	;---------	
	CALL	CLEAR_RGB
	;---------
	LD	A,ROMBSGRID_EXE_PG
	CALL	PAGER
	LD	HL,ROMBSGRID_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;---------
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	DB	T_FX_INI
	;DB	2
	;include "debug_getstat.asm" 830
	DB	T_FX_NOP
	DW	832-2

	DB	T_FX_RUN
	DW	1664-26

//-----------------------------------------------------------------------------
// COLOR ROMBS
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;----
	CALL	CLEAR_RGB
	;----
	LD	A,ROMBS_EXE_PG
	CALL	PAGER
	LD	HL,ROMBS_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;----
	LD	A,ROMBS_PG0_PG
	CALL	PAGER
	LD	HL,ROMBS_PG0
	LD	DE,#A000
	LD	BC,ROMBS_PG0_END - ROMBS_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#A000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;----
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	DB	T_FX_INI
	
	;DB	2
	;include "debug_getstat.asm" ;1662
	
	DB	T_FX_NOP
	DW	1664 - 1

	DB	T_FX_RUN
	DW	2496 - 26-1

//-----------------------------------------------------------------------------
// MAPPING - VORONKA
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	
	LD	HL,IM2CALL_RET
	LD	(IM2CALL),HL
	;---
	CALL	CLEAR_ATTR_5
	;---
	LD	A,INTOR_PG0_PG
	CALL	PAGER
	LD	HL,INTOR_PG0
	LD	DE,#8000
	LD	BC,INTOR_PG0_END - INTOR_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,VORONKA_EXE_PG
	CALL	PAGER
	LD	HL,VORONKA_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;---
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	
	DB	T_FX_INI
	;DB	2
	;include "debug_getstat.asm"
	DB	T_FX_NOP
	DW	2496 - 1

	DB	T_FX_RUN
	DW	2893 - 1	;2912 - 26
	
//-----------------------------------------------------------------------------
// MAPPING - TUNNEL
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM

	CALL	CLEAR_ATTR_5
	
	LD	A,TUNNEL_PG0_PG
	CALL	PAGER
	LD	HL,TUNNEL_PG0
	LD	DE,#8000
	LD	BC,TUNNEL_PG0_END - TUNNEL_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,TUNNEL_EXE_PG
	CALL	PAGER
	LD	HL,TUNNEL_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5

	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	
	DB	T_FX_INI
	DB	T_FX_NOP
	DW	2912 - 1

	DB	T_FX_RUN
	DW	3328 - 26+4+4
	
//-----------------------------------------------------------------------------
// MAPPING - INTOR
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM

	CALL	CLEAR_RGB
	
	LD	A,INTOR_PG0_PG
	CALL	PAGER
	LD	HL,INTOR_PG0
	LD	DE,#8000
	LD	BC,INTOR_PG0_END - INTOR_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,INTOR_EXE_PG
	CALL	PAGER
	LD	HL,INTOR_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	
	DB	T_FX_INI
	;DB	2
	;include "debug_getstat.asm"
	DB	T_FX_NOP
	DW	3328 - 1

	DB	T_FX_RUN
	DW	3744-26	;+12

//-----------------------------------------------------------------------------
// BABEGRID
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;---------
	CALL	CLEAR_RGB
	;---------
	LD	A,BABEPIX1_PG
	CALL	PAGER
	LD	HL,BABEPIX1
	LD	DE,#4000
	LD	BC,BABEPIX1_END - BABEPIX1
	LDIR
	;---------
	LD	A,#17
	CALL	PAGER
	LD	HL,#4000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,BABEPIX2_PG
	CALL	PAGER
	LD	HL,BABEPIX2
	LD	DE,#4000
	CALL	DEPACK_PL5
	;---------
	LD	A,BABEGRID_EXE_PG
	CALL	PAGER
	LD	HL,BABEGRID_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5

	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	DB	T_FX_NOP
	DW	3744 - 1

	DB	T_BLINK_ON
	DB	T_BLINK_ON

	DB	T_FX_RUN
	DW	3952-26

//-----------------------------------------------------------------------------
// MOVING SQUAD
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;---------
	CALL	CLEAR_RGB
	;---------
	LD	A,MOVESQUAD_PG0_PG
	CALL	PAGER
	LD	HL,MOVESQUAD_PG0
	LD	DE,#8000
	LD	BC,MOVESQUAD_PG0_END - MOVESQUAD_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,MOVESQUAD_EXE_PG
	CALL	PAGER
	LD	HL,MOVESQUAD_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;---------
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	
	DB	T_FX_INI
	DB	T_FX_NOP
	DW	3952 - 1

	DB	T_BLINK_ON
	DB	T_BLINK_ON
	
	DB	T_FX_RUN
	DW	4160 - 1
	DB	T_BLINK_ON
	DB	T_BLINK_ON
	DB	2
	LD	A,7
	LD	(CUBES_BORDER),A
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	DB	T_FX_RUN
	DW	4368 - 1

	DB	T_BLINK_ON
	DB	T_BLINK_ON
	DB	2
	LD	A,7
	LD	(CUBES_BORDER),A
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	
	DB	T_FX_RUN
	DW	4576 - 1
	DB	T_BLINK_ON
	DB	T_BLINK_ON
	DB	2
	LD	A,7
	LD	(CUBES_BORDER),A
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	DB	T_FX_RUN
	DW	4784 - 26

//-----------------------------------------------------------------------------
// FLY2D
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;---
	CALL	CLEAR_RGB
	;---
	LD	A,FLY2D_PG0_PG
	CALL	PAGER
	LD	HL,FLY2D_PG0
	LD	DE,#8000
	LD	BC,FLY2D_PG0_END - FLY2D_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,FLY2D_EXE_PG
	CALL	PAGER
	LD	HL,FLY2D_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;---
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	;---
	DB	T_FX_INI
	DB	T_FX_NOP
	DW	4784-1

	DB	T_FX_RUN
	DW	6006-1-4-20

	DB	T_BLINK_ON
	DB	T_BLINK_ON
	IF MACHINE_TYPE = MT_PENTAGON
	  DB	T_BLINK_ON
	  DB	T_BLINK_ON
	ENDIF
	DB	T_BLINK_OFF

//-----------------------------------------------------------------------------
// STEPPING CUBE
//-----------------------------------------------------------------------------
	DB	2 ;COMM_ASM
	;---------
	LD	HL,IM2CALL_RET
	LD	(IM2CALL),HL
	;---------
	LD	A,CUBE_PG0_PG
	CALL	PAGER
	LD	HL,CUBE_PG0
	LD	DE,#8000
	LD	BC,CUBE_PG0_END - CUBE_PG0
	LDIR
	LD	A,#10
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,CUBE_PG1_PG
	CALL	PAGER
	LD	HL,CUBE_PG1
	LD	DE,#8000
	LD	BC,CUBE_PG1_END - CUBE_PG1
	LDIR
	LD	A,#11
	CALL	PAGER
	LD	HL,#8000
	LD	DE,#C000
	CALL	DEPACK_PL5
	;---------
	LD	A,CUBE_EXE_PG
	CALL	PAGER
	LD	HL,CUBE_EXE
	LD	DE,#8000
	CALL	DEPACK_PL5
	;---
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	DB	T_FX_INI
	DB	T_FX_NOP
	DW	6032-1

	DB	T_BLINK_ON
	DB	T_BLINK_ON
	DB	T_BLINK_ON
	DB	T_BLINK_ON

	DB	T_FX_RUN
	DW	6864-1-2

	DB	T_BLINK_ON
	DB	2
	;include "debug_getstat.asm"
	LD	HL,IM2CALL_RET
	LD	(IM2CALL),HL
	LD	B,3
WWW1	EI:HALT
	DJNZ	WWW1
	
	LD	A,TK_END_PG
	CALL	PAGER
	CALL	TK_END

	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET
	
	
	DB	T_FX_NOP
	DW	6980-4-4*8-32

	DB	2 ;COMM_ASM
	LD	A,TK_END_PG
	CALL	PAGER
	CALL	TK_END2	
	LD	IY,$+5 - EFFTABLE2 + EFFTABLE
	RET

	;--- demo end
	DB	T_FX_NOP
	DW	6980-4
	DB	2 ;COMM_ASM
	DI
	CALL	MUSIC_OFF
	
XENDER	DEC	A
	JR	XENDER
