;@xkas
header
lorom

!FREESPACE	=	$2CC6BB ; (was 2cf300)

org $0096E9

JSL MAIN
NOP #2

org $009759
JSL MAIN2

org !FREESPACE

db "STAR"				;\
dw MainEnd-MainStart-$01		; |Write RATS tag #1 to protect main code
dw MainEnd-MainStart-$01^$FFFF		;/

MainStart:
MAIN:
	STZ $420C	; Delete HDMA
	STZ $0D9F	; Delete HDMA

	STZ $13D5	; \
	STZ $13D9	; / Restore hijacked code

	RTL

MAIN2:
	STZ $420C	; Delete HDMA
	STZ $0D9F	; Delete HDMA

	JSL $7F8000	; Restore hijacked code

	RTL

MainEnd: