SPRITE		EQU 	keys+6			;size 1
FRAME		EQU 	SPRITE+1		;size 1
MMIVAR		EQU		FRAME  + 1		;size 1
BINGBONG	EQU		MMIVAR+1		;DEFB 0
INTRO_TIMER	EQU		BINGBONG+1		;1 byte
FORCE_SPR	EQU		INTRO_TIMER+1	;1 byte

ALIENBULL	EQU		FORCE_SPR+1		;DEFB 0
ALIENACT	EQU		ALIENBULL+1		;DEFB 0

EXBYTE		EQU		ALIENACT+1	;DEFB 0
SHIPX		EQU		EXBYTE+1	;DEFB 0
SHIPY		EQU		SHIPX+1	 	;DEFB 0
ATTATCH		EQU		SHIPY+1		;DEFB 0
SHIP		EQU		ATTATCH+1	;DEFB 0
PILL1		EQU		SHIP+1		;DEFB 0
PILL2		EQU		PILL1+1		;DEFB 0
BALL1		EQU		PILL2+1		;DEFB 0
BALL1X		EQU		BALL1+1		;DEFB 0
BALL1Y		EQU		BALL1X+1	;DEFB 0
BALL2		EQU		BALL1Y+1	;DEFB 0
BALL2X		EQU		BALL2+1		;DEFB 0
BALL2Y		EQU		BALL2X+1	;DEFB 0
BALL3		EQU		BALL2Y+1	;DEFB 0
BALL3X		EQU		BALL3+1		;DEFB 0
BALL3Y		EQU		BALL3X+1	;DEFB 0
PILL1X		EQU		BALL3Y+1	;DEFB 0
PILL1Y		EQU		PILL1X+1	;DEFB 0
PILL2X		EQU		PILL1Y+1	;DEFB 0
PILL2Y		EQU		PILL2X+1	;DEFB 0
BALL1P		EQU		PILL2Y+1	;DEFB 0
BALL2P		EQU		BALL1P+1	;DEFB 0
BALL3P		EQU		BALL2P+1	;DEFB 0
PILL1P		EQU		BALL3P+1	;DEFB 0
PILL2P		EQU		PILL1P+1	;DEFB 0
PLASP		EQU		PILL2P+1	;DEFB 0
LASERP		EQU		PLASP+1		;DEFB 0
BLOBP		EQU		LASERP+1	;DEFB 0
BALLPOW		EQU 	BLOBP+1		;DEFB 0
BALLTYPE	EQU 	BALLPOW+1	;DEFB 0

PLASCOUNT	EQU	BALLTYPE+1		;DEFB 0
PLASPOWER	EQU	PLASCOUNT+1	;DEFB 0

SHOOTON		EQU PLASPOWER+1	;DEFB 0

SYNCOFF		EQU SHOOTON+1	;DEFB 0
SYNCHOLD	EQU SYNCOFF+1	;DEFW 0000
BONUS		EQU SYNCHOLD+2	;DEFB 0

CASUAL_RespawnWeapon		EQU BONUS+1
CASUAL_RespawnImmediate		EQU CASUAL_RespawnWeapon+1
PLAYER_Immortal				EQU CASUAL_RespawnImmediate+1

TILESCROLL	EQU PLAYER_Immortal+1			;DEFB 0
TILEPOS		EQU TILESCROLL+1	;DEFB 0
TILENO		EQU TILEPOS+1		;DEFB 0
TILETEMP	EQU TILENO+1		;DEFW 0
TILEHL		EQU TILETEMP+2		;DEFW 0000

MISSCOUNT	EQU	TILEHL+2		;DEFB 0
MISSILE		EQU MISSCOUNT+1		;DEFB 0
FORCESEQ	EQU MISSILE+1		;DEFB 0
LEVELEND	EQU FORCESEQ+1		;DEFB 0
NOSCROLL	EQU LEVELEND+1		;DEFB 0
PLASPRINT	EQU NOSCROLL+1		;DEFB 0
DEADMAN		EQU PLASPRINT+1		;DEFB 0
LVL_Run		EQU DEADMAN+1		;1 byte
LVL_NextMusik	EQU LVL_Run+1	;next music 1 byte
LVL_FadeVolume	EQU LVL_NextMusik+1	;1 byte

BIGEXPLO_State	EQU LVL_FadeVolume+1	;state 1 byte
BIGEXPLO_X		EQU	BIGEXPLO_State+1	;x 1 byte
BIGEXPLO_Y		EQU	BIGEXPLO_X+1		;y 1 byte

SOFT_END_State	EQU BIGEXPLO_Y+1		;state 1 byte
SOFT_END_Pos	EQU SOFT_END_State+1	;position (x/y) for clean screen effet

LVL_End			EQU SOFT_END_Pos+1		;end level , 1 byte	
LVL_EndDigit	EQU LVL_End+1
LVL_DigitCount	EQU LVL_EndDigit+1
LVL_EndCount	EQU LVL_DigitCount+1

L4_array		EQU LVL_DigitCount+1	;keep level 4 array address 2 bytes 

ForcePlayerMove	EQU L4_array+2			;take control of player 1 byte

SEED		EQU ForcePlayerMove+1		;DEFW 0000
CIRCHOLD1	EQU SEED+2			;DEFW 0000
CIRCHOLD2	EQU CIRCHOLD1+2		;DEFW 0000
CIRCHOLD3	EQU CIRCHOLD2+2		;DEFW 0000

JEW1		EQU CIRCHOLD3+2		;DEFB 0		state
JEW1P		EQU	JEW1+1			;DEFB 0		type
JEW1X		EQU	JEW1P+1			;DEFW 0000	pos
JEW2		EQU JEW1X+2			;DEFB 0
JEW2P		EQU JEW2+1			;DEFB 0
JEW2X		EQU	JEW2P+1			;DEFW 0000

SCR_SPEC1	EQU JEW2X+2			;DEFB 0  special value 1
SCR_SPEC2	EQU SCR_SPEC1+1		;DEFB 0  special value 2
SCR_FORPOS	EQU SCR_SPEC2+1		;DEFW 0 address for nesting
SCR_FORCNT	EQU SCR_FORPOS+2	;DEFB 0 FOR next/for
SCR_FORTIL	EQU SCR_FORCNT+1	;DEFB 0 TILENO for next/for

WAVE_COUNTER	EQU SCR_FORTIL+1	;counter for wave weapon

BALLTIME	EQU WAVE_COUNTER+1	;DEFB 0
MASTER		EQU BALLTIME+1		;DEFB 0
MOD_ONSHIP	EQU	MASTER+1		;DEFB 0

;reserved colors , must follow !
BG_COLOR	EQU	MOD_ONSHIP+1	;DEFB 0
BG_COLOR1	EQU BG_COLOR+1		;1 bytes
BG_COLOR2	EQU BG_COLOR1+1		;1 bytes
BG_COLOR3	EQU BG_COLOR2+1		;1 bytes


FL_COLOR	EQU BG_COLOR3+1		;floating color 1 byte 

level_fade	EQU	FL_COLOR+1		;1 byte, fade level , #FF = off

current_laser	EQU level_fade+1	;DEFB 0  current laser segment	max = 32
Current_Score	EQU	current_laser+1	;DEFB 6,0 player score 6 digits
Current_Lives	EQU Current_Score+6		;DEFB 0 player lives
Current_Tries	EQU Current_Lives+1	
Supdate			EQU Current_Tries+1		;DEFB 0
Stack_Save		EQU Supdate+1			;stack save 2 bytes
END_COUNT		EQU Stack_Save+2		;count 1 byte
END_JUMP		EQU END_COUNT+1			;return to , 2 bytes

;saving stuff for restoring when restarting game
save_TILESCROLL		EQU END_JUMP+2			;DEFB 0
save_TILEPOS		EQU save_TILESCROLL+1		;DEFB 0
save_TILENO			EQU save_TILEPOS+1			;DEFB 0
save_SYNCHOLD		EQU save_TILENO+1			;DEFW 0
save_BG_COLOR		EQU save_SYNCHOLD+2
save_FL_COLOR		EQU save_BG_COLOR+1

save_PILL1			EQU	save_FL_COLOR+1		;DEFB 0
save_PILL2			EQU	save_PILL1+1		;DEFB 0
save_MISSILE		EQU	save_PILL2+1		;DEFB 0
save_BALL1			EQU	save_MISSILE+1		;DEFB 0
save_BALL2			EQU	save_BALL1+1		;DEFB 0
save_BALL3			EQU	save_BALL2+1		;DEFB 0
save_BALLPOW		EQU save_BALL3+1		;DEFB 0
save_BG_CurrentEffect	EQU save_BALLPOW+1	;1 byte
save_BG_StopCommand 	EQU save_BG_CurrentEffect+1 ;1 byte
save_BG_Counter			EQU save_BG_StopCommand+1		;1 byte
save_BG_Effect_Addr		EQU save_BG_Counter+1			;2 bytes
no_hud					EQU save_BG_Effect_Addr+2		;1 byte

missleA					EQU no_hud+1		;state,x,y,orientation,targetoffset,change count,up/dn opcode,search timer,previous pos
missleB					EQU missleA+10
missleTimer				EQU missleB+10

hi_score_table			EQU missleTimer+1		;14*10 bytes

level_list				EQU hi_score_table+140	;2 bytes , 1 bit for each finished level (11 + 5 for extra features)
												;+1 bit 7 = cybernoid 2 level
												;+1 bit 6 = gold logo
												;+1 bit 5 = cheats unlocked

arcade_played			EQU level_list+2		;played count in arcade mode
casual_played			EQU arcade_played+1		;same in casual mode



