dk.asm
FujiNetWIFI_fujinet-high-scores/atari-game-ports/dkong/dk.asm
ZP_00	equ $00
ZP_09	equ $09
ZP_0A	equ $0A
ZP_0B	equ $0B
ZP_0C	equ $0C
ZP_0D	equ $0D
ZP_10	equ $10
ZP_13	equ $13
ZP_14	equ $14

; 19 bytes from $20 is reserved for rmt player

rmt_effect0	equ $3a
rmt_effect1	equ $3b
rmt_effect2	equ $3c
rmt_effect3	equ $3d
ZP_X		equ $3e
ZP_Y		equ $3f
rmt_flag	equ $40
rmt_timer	equ $41

ZP_4D	equ $4D
ZP_4E	equ $4E
ZP_4F	equ $4F
ZP_50	equ $50
ZP_51	equ $51
ZP_52	equ $52
ZP_53	equ $53
ZP_54	equ $54
ZP_55	equ $55
ZP_56	equ $56
ZP_57	equ $57
ZP_58	equ $58
ZP_5A	equ $5A
ZP_5B	equ $5B
ZP_5C	equ $5C
ZP_5D	equ $5D
ZP_5E	equ $5E
ZP_5F	equ $5F
ZP_60	equ $60
ZP_61	equ $61
ZP_62	equ $62
ZP_66	equ $66
ZP_67	equ $67
ZP_68	equ $68
ZP_69	equ $69
ZP_6A	equ $6A
ZP_6B	equ $6B
ZP_6C	equ $6C
ZP_6D	equ $6D
ZP_6E	equ $6E
ZP_6F	equ $6F
ZP_70	equ $70
ZP_71	equ $71
ZP_72	equ $72
ZP_73	equ $73
ZP_74	equ $74
ZP_75	equ $75
ZP_76	equ $76
ZP_77	equ $77
ZP_78	equ $78
ZP_79	equ $79
ZP_7A	equ $7A
ZP_7B	equ $7B
ZP_7C	equ $7C
ZP_7D	equ $7D
ZP_7E	equ $7E
ZP_7F	equ $7F
ZP_80	equ $80
ZP_81	equ $81
ZP_82	equ $82
ZP_83	equ $83
ZP_84	equ $84
ZP_85	equ $85
ZP_86	equ $86
ZP_87	equ $87
ZP_88	equ $88
ZP_89	equ $89
ZP_8A	equ $8A
ZP_8B	equ $8B
ZP_8C	equ $8C
ZP_8D	equ $8D
ZP_8E	equ $8E
ZP_8F	equ $8F
ZP_90	equ $90
ZP_91	equ $91
ZP_92	equ $92
ZP_93	equ $93
ZP_94	equ $94
ZP_95	equ $95
ZP_96	equ $96
ZP_97	equ $97
ZP_98	equ $98
ZP_99	equ $99
ZP_9A	equ $9A
ZP_9B	equ $9B
ZP_9C	equ $9C
ZP_9D	equ $9D
ZP_9E	equ $9E
ZP_9F	equ $9F
ZP_A0	equ $A0
ZP_A1	equ $A1
ZP_A2	equ $A2
ZP_A3	equ $A3
ZP_A4	equ $A4
ZP_A5	equ $A5
ZP_A6	equ $A6
ZP_A7	equ $A7
ZP_A8	equ $A8
ZP_AA	equ $AA
ZP_AB	equ $AB
ZP_AC	equ $AC
ZP_AD	equ $AD
ZP_AE	equ $AE
ZP_B0	equ $B0
ZP_B2	equ $B2
ZP_B3	equ $B3
ZP_B4	equ $B4
ZP_B5	equ $B5
ZP_B6	equ $B6
ZP_B7	equ $B7
ZP_B8	equ $B8
ZP_B9	equ $B9
ZP_BA	equ $BA
ZP_BB	equ $BB
ZP_BC	equ $BC
ZP_BD	equ $BD
ZP_BE	equ $BE
ZP_BF	equ $BF
ZP_C0	equ $C0
ZP_C1	equ $C1
ZP_C2	equ $C2
ZP_C3	equ $C3
ZP_C4	equ $C4
ZP_C5	equ $C5
ZP_C8	equ $C8
ZP_C9	equ $C9
ZP_CA	equ $CA
ZP_CB	equ $CB
ZP_CC	equ $CC
ZP_CD	equ $CD
ZP_CE	equ $CE
ZP_CF	equ $CF
ZP_D0	equ $D0
ZP_D1	equ $D1
ZP_D2	equ $D2
ZP_D3	equ $D3 ; score
ZP_D9	equ $D9
ZP_DF	equ $DF
L_0200	equ $0200
L_0201	equ $0201
L_0208	equ $0208
L_0209	equ $0209
L_022F	equ $022F
L_0230	equ $0230
L_0231	equ $0231
L_0232	equ $0232
L_0244	equ $0244
L_026F	equ $026F
L_0278	equ $0278
L_0279	equ $0279
L_0284	equ $0284
L_0285	equ $0285
L_02C0	equ $02C0
L_02C4	equ $02C4
L_02C6	equ $02C6
L_0340	equ $0340
L_0350	equ $0350
L_0360	equ $0360
L_0370	equ $0370
L_0380	equ $0380
L_0390	equ $0390
L_03A0	equ $03A0
L_03B0	equ $03B0
L_0400	equ $0400
L_0401	equ $0401
L_0402	equ $0402
L_0D00	equ $0D00
L_0E00	equ $0E00
L_0E01	equ $0E01
L_0E02	equ $0E02
L_0E06	equ $0E06
L_0E07	equ $0E07
L_0E08	equ $0E08
L_0E09	equ $0E09
L_0E0A	equ $0E0A
L_0E0B	equ $0E0B
L_0E0C	equ $0E0C
L_0E0D	equ $0E0D
L_0E0F	equ $0E0F
L_0E10	equ $0E10
L_0E17	equ $0E17
L_0E18	equ $0E18
L_0E1A	equ $0E1A
L_0E1E	equ $0E1E
L_0E1F	equ $0E1F
L_0E20	equ $0E20
L_0E21	equ $0E21
L_0E23	equ $0E23
L_0E24	equ $0E24
L_0E27	equ $0E27
L_0E28	equ $0E28
L_0E29	equ $0E29
L_0E2A	equ $0E2A
L_0E2B	equ $0E2B
L_0E2C	equ $0E2C
L_0E2D	equ $0E2D
L_0E2E	equ $0E2E
L_0E2F	equ $0E2F
L_0E30	equ $0E30
L_0E31	equ $0E31
L_0E32	equ $0E32
L_0E33	equ $0E33
L_0E34	equ $0E34
L_0E35	equ $0E35
L_0E36	equ $0E36
L_0E37	equ $0E37
L_0E38	equ $0E38
L_0E39	equ $0E39
L_0E3A	equ $0E3A
L_0E3B	equ $0E3B
L_0E4B	equ $0E4B
L_0E5B	equ $0E5B
L_0E6B	equ $0E6B
L_0E7B	equ $0E7B
L_0E8B	equ $0E8B
L_0E9B	equ $0E9B
L_0EAB	equ $0EAB
L_0EBB	equ $0EBB
L_0EBC	equ $0EBC
L_0EBD	equ $0EBD
L_0EBE	equ $0EBE
L_0EBF	equ $0EBF
L_0EC0	equ $0EC0
L_0EC1	equ $0EC1
L_0EC2	equ $0EC2
L_0EC3	equ $0EC3
L_0EC4	equ $0EC4
L_0EC5	equ $0EC5
L_0EC6	equ $0EC6
L_0EC7	equ $0EC7
L_0EC8	equ $0EC8
L_0EC9	equ $0EC9
L_0ECA	equ $0ECA
L_0ECB	equ $0ECB
L_0ECC	equ $0ECC
L_0ECD	equ $0ECD
L_0ECE	equ $0ECE
L_0ECF	equ $0ECF
L_0ED0	equ $0ED0
L_0ED2	equ $0ED2
L_0ED5	equ $0ED5
L_0ED6	equ $0ED6
L_0ED7	equ $0ED7
L_0ED8	equ $0ED8
L_1000	equ $1000
L_1100	equ $1100
L_1200	equ $1200
L_1201	equ $1201
L_1202	equ $1202
L_1262	equ $1262
L_1263	equ $1263
L_1264	equ $1264
L_12CA	equ $12CA
L_12CB	equ $12CB
L_12CC	equ $12CC
L_1300	equ $1300
L_1303	equ $1303
L_1400	equ $1400
L_1500	equ $1500
L_1600	equ $1600
L_1700	equ $1700
L_1800	equ $1800
L_1802	equ $1802
L_1803	equ $1803
L_1804	equ $1804
L_1805	equ $1805
L_1806	equ $1806
L_1808	equ $1808
L_180A	equ $180A
L_180B	equ $180B
L_180C	equ $180C
L_180D	equ $180D
L_180F	equ $180F
L_1812	equ $1812
L_1815	equ $1815
L_1818	equ $1818
L_1819	equ $1819
L_181A	equ $181A
L_181B	equ $181B
L_181C	equ $181C
L_181D	equ $181D
L_181E	equ $181E
L_181F	equ $181F
L_1820	equ $1820
L_1821	equ $1821
L_1822	equ $1822
L_1823	equ $1823
L_1824	equ $1824
L_1825	equ $1825
L_1826	equ $1826
L_1827	equ $1827
L_1828	equ $1828
L_1829	equ $1829
L_182A	equ $182A
L_182B	equ $182B
L_182C	equ $182C
L_1855	equ $1855
L_186F	equ $186F
L_18C7	equ $18C7
L_18C8	equ $18C8
L_18CB	equ $18CB
L_18CC	equ $18CC
L_18D3	equ $18D3
L_18D4	equ $18D4
L_1963	equ $1963
L_19FE	equ $19FE
L_19FF	equ $19FF
L_1B00	equ $1B00
L_1C17	equ $1C17
L_1C1D	equ $1C1D
L_1C23	equ $1C23
L_1C3D	equ $1C3D
L_1DA7	equ $1DA7
L_1FDB	equ $1FDB

		icl 'hiscore.asm'

		icl 'rmtplayer.a65'	
		
		org $7000
	
rmt_music	
		ins 'dk_strip.rmt'
		
		org $7b00		
		
my_start
		jsr hiscore_store_vectors
	        lda #0
		sta rmt_flag ; default = no music
		lda #$ff
		sta rmt_effect0 ; default = no sfx
		sta rmt_effect1
		sta rmt_effect2
		sta rmt_effect3
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$17
		jsr RASTERMUSICTRACKER ; module init
		lda $d014
		and #14
		beq pal_machine
		lda #$7b
		sta set_wait1+1
		lda #$a8
		sta set_wait2+1
		lda #12
		sta set_wait3+1
		lda #36
		sta set_wait4+1
		bne wait_set
pal_machine		
		lda #$3c
		sta set_wait1+1
		lda #$8c
		sta set_wait2+1
		lda #10
		sta set_wait3+1
		lda #30
		sta set_wait4+1
wait_set
		jmp L_7FDA	
		
my_vbi	
		lda rmt_flag
		beq rmt_disabled
		lda $d014 ; NTSC or PAL?
		and #14
		beq rmt_enabled
		inc rmt_timer
		lda rmt_timer
		cmp #6
		bne rmt_enabled
		lda #0
		sta rmt_timer
		beq rmt_disabled
rmt_enabled
		lda rmt_effect0 ; any effect to initialise in channel 0?
		bmi no_instrument0
		asl @
		tay	; instrument
		ldx #0 ; channel 0
		lda #0
		jsr RASTERMUSICTRACKER+15
		lda #$ff
		sta rmt_effect0 ; reinit value
no_instrument0
		lda rmt_effect1 ; any effect to initialise in channel 1?
		bmi no_instrument1
		asl @
		tay	; instrument
		ldx #1 ; channel 1
		lda #0
		jsr RASTERMUSICTRACKER+15
		lda #$ff
		sta rmt_effect1 ; reinit value
no_instrument1		
		lda rmt_effect2 ; any effect to initialise in channel 2?
		bmi no_instrument2
		asl @
		tay	; instrument
		ldx #2 ; channel 2
		lda #0
		jsr RASTERMUSICTRACKER+15
		lda #$ff
		sta rmt_effect2 ; reinit value
no_instrument2		
		lda rmt_effect3 ; any effect to initialise in channel 3?
		bmi call_rmt_player
		asl @
		tay	; instrument
		ldx #3 ; channel 3
		lda #0
		jsr RASTERMUSICTRACKER+15
		lda #$ff
		sta rmt_effect3 ; reinit value		
call_rmt_player
		jsr RASTERMUSICTRACKER+3
rmt_disabled
		jmp L_E462
		
rmt_bending
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #2
		jsr RASTERMUSICTRACKER
		lda #0
		sta ZP_13
		sta ZP_14
		lda #1
		sta rmt_flag
wait_bending1
		lda ZP_13
		beq wait_bending1		
wait_bending2
		lda ZP_14
set_wait1
		cmp #$3c
		bne wait_bending2
		lda #0
		sta rmt_flag
		inc ZP_66
		ldx ZP_X
		ldy ZP_Y		
		jmp L_9440
		
rmt_how_high
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #0
		jsr RASTERMUSICTRACKER
		lda #0
		sta ZP_14
		lda #1
		sta rmt_flag
wait_how_high
		jsr L_B183 ; select or option pressed?
		and #$06
		cmp #$06
		bne rmt_how_high_end
		lda ZP_14
set_wait2
		cmp #$8c
		bne wait_how_high
rmt_how_high_end		
		lda #0
		sta rmt_flag
		jsr RASTERMUSICTRACKER+9 ; silence
		ldx ZP_X
		ldy ZP_Y		
		jmp L_8CAD
		
rmt_title_music
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$0e
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag
		ldx ZP_X
		ldy ZP_Y		
		jmp L_86DB
		
title_quit
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		jsr RASTERMUSICTRACKER+9 ; silence
		ldx ZP_X
		ldy ZP_Y		
		jsr L_88A0
		jmp L_86AB	
		
rmt_growl_title
		ldy #$17
rmt_growl
		stx ZP_X
		ldx #2
		lda #1
		sta rmt_flag
play_growl	
		lda #0
		sta ZP_14
		lda #7
		sta rmt_effect0 ; brawl		
growl_wait1
		lda ZP_14
set_wait3
		cmp #10
		bne growl_wait1
		lda #7
		sta rmt_effect0
		lda #0
		sta ZP_14
growl_wait2
		lda ZP_14
set_wait4
		cmp #30
		bne growl_wait2
		dex
		bpl play_growl
		ldx ZP_X
		lda #$ff-3*(10+30)	; for wait procedure		
		rts
		
rmt_select
		sta L_0EBD		
		lda #$11
		sta rmt_effect2
		jmp L_86BB
		
rmt_bending_sfx
		sta L_0EBC
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$17
		jsr RASTERMUSICTRACKER ; no music
		lda #1		
		sta rmt_flag
		lda #$0a
		sta rmt_effect0
		ldx ZP_X
		ldy ZP_Y		
		jmp L_945B
		
type_of_level ; which ingame music?
		dta $04,$06,$17,$15 ; barrels, girders, elevators, cement
		
rmt_ingame_music
		stx ZP_X
		sty ZP_Y		
		lda #$8C
		sta ZP_53
		lda #0
		sta rmt_flag
		ldx ZP_D0 ; type of level
		lda type_of_level,x		
		ldx #<rmt_music
		ldy #>rmt_music
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag		
		ldx ZP_X
		ldy ZP_Y				
		jmp L_8975
		
rmt_death_sfx
		lda #$FF
		sta ZP_69
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$17
		jsr RASTERMUSICTRACKER ; no music
		lda #$0a		
		sta rmt_effect0
		sta rmt_flag
		ldx ZP_X
		ldy ZP_Y
		jmp L_A046
		
rmt_jump
		lda #$00
		sta ZP_77		
		lda #$06
		sta rmt_effect0
		jmp L_A13A
		
rmt_points
		lda #$0d
		sta rmt_effect1
		rts

rmt_hammer
		lda ZP_8B
		sta ZP_C3
		lda #$0c
		sta rmt_effect0
		jmp L_98B6
		
rmt_barrel_hit
		lda #$0a		
		sta rmt_effect2
		jmp L_9A09
		
rmt_death_msx
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag		
		ldx #<rmt_music
		ldy #>rmt_music
		lda #8
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag		
		ldx ZP_X
		ldy ZP_Y						
		jmp L_9FAB
		
rmt_death_msx_off
		lda #0
		sta rmt_flag
		jsr RASTERMUSICTRACKER+9 ; silence
		ldx #$28
		ldy #$3B
		jmp L_8CF2
		
rmt_hammer_msx
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag		
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$0a
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag		
		ldx ZP_X
		ldy ZP_Y
		clc
		lda ZP_6E
		jmp L_A5E6
		
rmt_hammer_msx_off
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx ZP_D0 ; type of level
		lda type_of_level,x		
		ldx #<rmt_music
		ldy #>rmt_music
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag		
		ldx ZP_X
		ldy ZP_Y
		lda #$00
		sta L_0E33
		jmp L_A22F
		
rmt_ladder
		lda #$13 ; lo walk replaced by no sound for ladder
		sta rmt_walk_lo_number+1
		bne rmt_walk_go 		
rmt_walk
		lda #$0f
		sta rmt_walk_lo_number+1
rmt_walk_go
		lda L_0EC8
		bne rmt_walk_end
		lda ZP_7B
		cmp #3
		beq rmt_walk_lo
		cmp #7
		beq rmt_walk_hi
		inc ZP_7B
		bne rmt_walk_end
rmt_walk_lo
		inc ZP_7B		
rmt_walk_lo_number
		lda #$0f
		sta rmt_effect0
		lda #$05		;A303 A9 0A
		sta L_0EC8		;A305 8D C8 0E
		bne rmt_walk_end
rmt_walk_hi
		lda #0
		sta ZP_7B		
		lda #$10
		sta rmt_effect0
		lda #$05		;A303 A9 0A
		sta L_0EC8		;A305 8D C8 0E
rmt_walk_end
		rts
		
rmt_save
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$0c
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag		
		ldx ZP_X
		ldy ZP_Y		
		lda L_9539,X
		jmp L_94A5
		
rtm_hero_fall
		lda #$0e
		sta rmt_effect0
		jmp L_A436
		
rmt_trampoline_fall
		sta L_0EC0		
		lda #$0e
		sta rmt_effect3
		jmp L_9EC8
		
rmt_trampoline_fall_end
		sta L_0EC0
		lda #$13
		sta rmt_effect3
		jmp L_9376
		
rmt_chest_ingame
		lda #$0a
		sta rmt_effect2
		jmp L_8EFB
		
rmt_girders
		sta L_0E09
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$13
		jsr RASTERMUSICTRACKER
		lda #1
		sta rmt_flag		
		ldx ZP_X
		ldy ZP_Y
		jmp L_9553
		
chest_lo_hi
		dta $09,$08
		
rmt_chest_lo_hi
		jsr L_8E1B		
		stx ZP_X
		sty ZP_Y
		lda #0
		sta rmt_flag
		ldx #<rmt_music
		ldy #>rmt_music
		lda #$17
		jsr RASTERMUSICTRACKER ; no music
		ldx ZP_52
		lda chest_lo_hi,x
		sta rmt_effect0
		sta rmt_flag
		ldx ZP_X
		ldy ZP_Y
		jmp L_95C0
		
rmt_fall_donkey
		stx L_0EC0
		lda #$0e
		sta rmt_effect3
		jmp L_962C
		
rmt_fall_donkey_end
		sta L_0EBC
		lda #$0a		
		sta rmt_effect3
		jmp L_9635

rmt_spring
		sta L_0EBD
		lda #$11
		sta rmt_effect2
		jmp L_9EE9
		
collision_fix
		adc L_84E9,X
		sec
		sbc #4
		jmp L_A94B

		org $7FAB

L_7FAB	dta $00			;7FAB 00    

L_7FAC	lda L_7FAB		;7FAC AD AB 7F
		beq L_7FC4		;7FAF F0 13
		clc				;7FB1 18
		lda ZP_CD		;7FB2 A5 CD
		adc L_7FAB		;7FB4 6D AB 7F
		cmp #$02		;7FB7 C9 02
		bne L_7FC4		;7FB9 D0 09
		dec L_7FAB		;7FBB CE AB 7F
		jsr L_AFEE		;7FBE 20 EE AF
		jsr L_9407		;7FC1 20 07 94
L_7FC4	jsr L_8C3C		;7FC4 20 3C 8C
		rts				;7FC7 60
L_7FC8	ldx #$11		;7FC8 A2 11
L_7FCA	lda ZP_CD,X		;7FCA B5 CD
		sta ZP_DF,X		;7FCC 95 DF
		dex				;7FCE CA
		bpl L_7FCA		;7FCF 10 F9
		dec ZP_CD		;7FD1 C6 CD
		lda #$02		;7FD3 A9 02
		sta L_7FAB		;7FD5 8D AB 7F
		rts				;7FD8 60
		
		dta $FF			;7FD9 FF    
		
L_7FDA	lda #$07		;7FDA A9 07
		sta ZP_80		;7FDC 85 80
		lda #$00		;7FDE A9 00
		sta ZP_7F		;7FE0 85 7F
L_7FE2	ldy #$00		;7FE2 A0 00
L_7FE4	sta (ZP_7F),Y	;7FE4 91 7F
		iny				;7FE6 C8
		bne L_7FE4		;7FE7 D0 FB
		inc ZP_80		;7FE9 E6 80
		ldx ZP_80		;7FEB A6 80
		cpx #$20		;7FED E0 20
		bne L_7FE2		;7FEF D0 F1
		lda #$77		;7FF1 A9 77
		sta ZP_0A		;7FF3 85 0A
		sta ZP_0C		;7FF5 85 0C
		lda #$E4		;7FF7 A9 E4
		sta ZP_0B		;7FF9 85 0B
		sta ZP_0D		;7FFB 85 0D
		jmp L_8513		;7FFD 4C 13 85
		
L_8000	dta $02,$BB,$5A,$30,$5F,$EE,$3D,$A8
L_8008	dta $99,$63,$FA,$40
L_800C	dta $80,$81,$82,$82
L_8010	dta $98,$22,$2D,$73
L_8014	dta $99,$9C,$9F,$9E
L_8018	dta $B7,$85,$04,$EC,$94,$BA,$36,$5F,$DA
L_8021	dta $BF,$BF,$BF,$BE,$BD,$BD,$BD,$BD,$BD
L_802A	dta $6E,$70,$E6,$8C,$9A,$6E
L_8030	dta $B5,$B5,$B5,$B5,$B5,$B5
L_8036	dta $6E,$7E,$E6,$8C,$9A,$6E
L_803C	dta $B5,$B5,$B5,$B5,$B5,$B5
L_8042	dta $00,$1A,$34,$4E,$68,$82,$9C
L_8049	dta $04
L_804A	dta $0A,$10,$16,$1C,$22,$28,$2E,$34,$3A,$40,$46,$4C,$52,$58,$5E,$64
		dta $6A,$70,$76,$7C,$82,$88,$8E,$94,$9A
L_8063	dta $05,$05,$01,$01
L_8067	dta $00,$00,$07,$00,$00,$00
L_806D	dta $05,$06,$07,$08,$08
L_8072	dta $01,$03,$05,$08,$00
L_8077	dta $81,$82,$83,$83,$83
L_807C	dta $C8,$10,$A0,$98
DLIST   dta $70,$70,$60,$01,$00,$12,$41,$86,$80
L_8089	dta $04,$07,$0A,$0D,$3F,$A2,$FF,$2C,$A0,$FF,$4A,$60,$FF,$52,$7A,$FF
		dta $2B,$01,$03,$7C,$88,$86,$45,$17,$8A,$94,$AE,$96,$91,$00,$00,$00
		dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$C2,$B5,$CC,$B5,$D0,$B5,$6A
		dta $3D,$00,$05,$FF,$4C,$06,$7C,$1D,$04,$13,$10,$9F,$8A,$01,$02,$29
		dta $01,$89,$01,$02,$21,$01,$83,$01,$84,$01,$81,$21,$85,$01,$03,$19
		dta $01,$21,$87,$01,$06,$81,$11,$01,$01,$00,$00,$05,$00,$00,$01,$01
		dta $11,$82,$01,$08,$29,$01,$01,$01,$01,$11,$01,$21,$86,$01,$81,$21
		dta $84,$01,$84,$01,$81,$21,$05,$01,$01,$19,$01,$29,$84,$01,$0C,$11
		dta $01,$01,$01,$29,$01,$01,$11,$81,$01,$00,$00,$82,$00,$82,$01,$81
		dta $11,$84,$01,$03,$19,$01,$21,$86,$01,$81,$19,$87,$01,$8B,$00,$02
		dta $11,$01,$84,$01,$89,$00,$9A,$B8,$9A,$97,$9A,$76,$9A,$55,$9A,$3D
		dta $9A,$20,$9A,$01,$8A,$02,$03,$00,$02,$02,$8D,$00,$87,$01,$85,$03
		dta $82,$01,$8C,$03,$87,$04,$03,$02,$02,$04,$88,$02,$02,$04,$02,$86
		dta $02,$8B,$03,$81,$05,$8E,$03,$9A,$04,$00,$2B,$02,$03,$0C,$4C,$59
		dta $33,$17,$8A,$17,$8A,$B0,$91,$4C,$C4,$82,$3F,$B1,$D5,$00,$1E,$14
		dta $04,$01,$00,$D4,$B5,$DE,$B5,$E2,$B5,$00,$00,$00,$FF,$FF,$60,$0F
		dta $48,$09,$04,$0B,$00,$00,$02,$03,$23,$87,$03,$02,$23,$03,$86,$03
		dta $02,$23,$03,$85,$03,$02,$23,$03,$03,$00,$13,$23,$83,$03,$04,$42
		dta $03,$03,$13,$10,$03,$03,$03,$23,$03,$03,$03,$13,$03,$42,$03,$03
		dta $03,$23,$13,$00,$08,$00,$80,$13,$23,$03,$03,$42,$23,$85,$03,$02
		dta $13,$03,$83,$03,$08,$23,$42,$03,$03,$23,$13,$00,$00,$83,$00,$06
		dta $13,$23,$03,$42,$13,$23,$83,$03,$01,$83,$84,$03,$09,$23,$13,$42
		dta $03,$23,$13,$00,$00,$00,$84,$00,$05,$13,$03,$42,$03,$13,$88,$03
		dta $05,$13,$03,$42,$03,$13,$84,$00,$9A,$00,$9A,$BF,$9A,$9B,$9A,$75
		dta $9A,$4F,$B4,$29,$9A,$01,$03,$00,$00,$02,$8A,$00,$84,$02,$86,$00
		dta $03,$02,$00,$00,$03,$01,$01,$01,$8A,$03,$85,$01,$85,$03,$03,$01
		dta $01,$01,$84,$02,$04,$04,$04,$04,$02,$8A,$04,$08,$02,$02,$02,$04
		dta $02,$00,$00,$00,$B4,$03,$00,$2B,$01,$02,$4C,$0C,$7F,$59,$A8,$AF
		dta $17,$8A,$B0,$91,$A0,$5E,$82,$65,$8B,$D5,$0A,$00,$1E,$03,$02,$00
		dta $C2,$B5,$CC,$B5,$D0,$B5,$28,$29,$06,$04,$FF,$6C,$0F,$48,$09,$FF
		dta $FF,$48,$3F,$03,$01,$01,$21,$85,$01,$81,$21,$87,$01,$81,$21,$86
		dta $01,$03,$21,$01,$01,$03,$04,$04,$14,$84,$04,$02,$24,$14,$83,$04
		dta $81,$84,$83,$04,$02,$14,$24,$85,$04,$03,$14,$04,$04,$09,$00,$81
		dta $01,$21,$01,$00,$00,$11,$21,$87,$01,$0A,$21,$11,$00,$00,$01,$01
		dta $21,$01,$01,$00,$04,$04,$04,$24,$14,$84,$04,$09,$14,$04,$04,$00
		dta $00,$04,$04,$04,$14,$85,$04,$04,$14,$24,$04,$04,$03,$04,$04,$14
		dta $94,$04,$03,$14,$04,$04,$9A,$00,$9A,$BF,$9A,$9B,$9A,$75,$9A,$4F
		dta $B4,$29,$9A,$01,$87,$00,$81,$02,$89,$00,$86,$02,$83,$00,$87,$03
		dta $81,$01,$89,$03,$85,$01,$84,$03,$83,$04,$94,$02,$83,$04,$B4,$03
		dta $00,$2B,$00,$00,$A1,$A1,$C6,$C6,$22,$AF,$99,$AF,$B0,$91,$CA,$3A
		dta $6A,$5D,$73,$B8,$0A,$00,$1E,$03,$02,$00,$C2,$B5,$CC,$B5,$D0,$B5
		dta $1C,$38,$18,$04,$05,$3C,$03,$04,$18,$03,$00,$00,$00,$1A,$01,$21
		dta $01,$00,$05,$05,$00,$00,$21,$01,$21,$00,$05,$05,$00,$01,$01,$00
		dta $01,$01,$00,$01,$01,$00,$21,$01,$06,$01,$11,$21,$00,$05,$05,$86
		dta $00,$0E,$05,$05,$00,$00,$01,$21,$01,$00,$01,$21,$00,$01,$11,$01
		dta $1A,$01,$01,$11,$00,$05,$05,$00,$01,$11,$01,$11,$00,$05,$05,$00
		dta $00,$01,$11,$00,$21,$00,$11,$01,$01,$01,$21,$8B,$01,$01,$21,$87
		dta $01,$07,$11,$00,$01,$01,$00,$01,$11,$87,$00,$84,$01,$01,$11,$8E
		dta $00,$9A,$01,$84,$B2,$83,$BE,$85,$A2,$83,$BE,$83,$B2,$83,$AB,$83
		dta $A4,$82,$9D,$84,$8D,$8C,$93,$83,$7A,$84,$80,$83,$86,$84,$5D,$82
		dta $68,$86,$5D,$83,$68,$84,$59,$81,$53,$86,$68,$95,$38,$82,$4D,$83
		dta $47,$9A,$1D,$9A,$BF,$88,$01,$90,$02,$82,$01,$82,$00,$96,$02,$82
		dta $00,$88,$01,$89,$00,$82,$01,$82,$03,$84,$01,$01,$03,$93,$04,$87
		dta $02,$9A,$03,$9A,$00,$00
L_83DF	dta $19,$33,$4C,$4C,$59
L_83E4	dta $0C,$19,$33,$4C,$59
L_83E9	dta $78,$64,$5A,$50,$3C
L_83EE	dta $06,$07,$08,$08,$08
L_83F3	dta $05,$04,$03,$02,$02
L_83F8	dta $4C,$66,$66,$73,$7F
L_83FD	dta $19,$33,$66,$7F,$99
L_8402	dta $F0,$96,$82,$73,$64
L_8407	dta $04,$05,$05,$05
L_840B	dta $05,$78,$6E,$64,$5A
L_8410	dta $04,$05
L_8412	dta $06,$07,$96,$82,$78
L_8417	dta $32,$86,$2A,$86,$34,$88,$2A,$0A,$00
L_8420	dta $EC
L_8421	dta $BE,$18,$07,$3B,$07,$5E,$07,$04,$BF,$81,$07,$A4,$07,$C7,$07,$66
		dta $0C,$EA,$07,$0D,$08,$30,$08,$7E,$0C,$53,$08,$76,$08,$99,$08,$1C
		dta $BF,$BC,$08,$EA,$08,$18,$09,$3F,$BF,$46,$09,$74,$09,$A2,$09,$62
		dta $BF,$D0,$09,$FE,$09,$2C,$0A,$1C,$BF,$5A,$0A,$88,$0A,$B6,$0A,$85
		dta $BF,$00,$04,$42,$04,$84,$04,$B7,$BF,$C6,$04,$08,$05,$4A,$05,$96
		dta $0C,$8C,$05,$CE,$05,$10,$06,$C8,$0C,$52,$06,$94,$06,$D6,$06,$3E
		dta $B7,$18,$07,$5A,$07,$9C,$07,$3E,$B7,$DE,$07,$20,$08,$62,$08,$3E
		dta $B7,$A4,$08,$E6,$08,$28,$09,$3E,$B7,$6A,$09,$AC,$09,$EE,$09,$94
		dta $B8,$18,$07,$4A,$07,$7C,$07,$B6,$B8,$AE,$07,$E0,$07,$12,$08,$B6
		dta $B8,$44,$08,$76,$08,$A8,$08,$B6,$B8,$DA,$08,$0C,$09,$3E,$09
L_84C0	dta $01
L_84C1	dta $01,$01,$01,$01,$01,$01,$01,$00,$01,$00,$01,$00,$01,$00,$01,$01
		dta $05,$01,$05,$01,$05,$01,$05,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dta $00,$00,$00,$00,$00,$00,$00
L_84E8	dta $06
L_84E9	dta $09,$06,$09,$06,$09,$06,$09,$0A,$09,$0A,$09,$0A,$09,$0A,$09,$0A
		dta $0A,$08,$09,$0A,$0A,$08,$09,$0A,$08,$0A,$08,$0A,$08,$0A,$08,$07
		dta $06,$07,$06,$07,$06,$07,$06,$FC,$25,$71
		
L_8513	lda #$03		;8513 A9 03
		sta L_D20F		;8515 8D 0F D2
		sta L_0232		;8518 8D 32 02
		lda #$00		;851B A9 00
		sta L_D208		;851D 8D 08 D2
		sta L_0244		;8520 8D 44 02
		ldx #$50		;8523 A2 50
L_8525	sta ZP_00,X		;8525 95 00
		inx				;8527 E8
		bne L_8525		;8528 D0 FB
		jsr L_B1E8		;852A 20 E8 B1
		dec ZP_7D		;852D C6 7D
		lda #$80		;852F A9 86
		sta L_0230		;8531 8D 30 02
		lda #$80		;8534 A9 80
		sta L_0231		;8536 8D 31 02
		lda #$3E		;8539 A9 3E
		sta L_022F		;853B 8D 2F 02
		sta L_D400		;853E 8D 00 D4
		lda #$03		;8541 A9 03
		sta L_D01D		;8543 8D 1D D0
		lda #$01		;8546 A9 01
		sta L_026F		;8548 8D 6F 02
		sta L_D01B		;854B 8D 1B D0
		lda #$10		;854E A9 10
		sta L_D407		;8550 8D 07 D4
		lda #$01		;8553 A9 01
		sta L_D00C		;8555 8D 0C D0
		lda #$C0		;8558 A9 C0
		sta ZP_7E		;855A 85 7E
		lda #$40		;855C A9 40
		sta ZP_10		;855E 85 10
		sta L_D20E		;8560 8D 0E D2
		lda #$76		;8563 A9 76
		sta L_0208		;8565 8D 08 02
		lda #$B1		;8568 A9 B1
		sta L_0209		;856A 8D 09 02
		lda #$08		;856D A9 08
		sta ZP_7F		;856F 85 7F
		lda #$88		;8571 A9 88
		sta ZP_80		;8573 85 80
		ldx #$08		;8575 A2 08
L_8577	lda L_8417,X	;8577 BD 17 84
		sta L_02C0,X	;857A 9D C0 02
		dex				;857D CA
		bpl L_8577		;857E 10 F7
		lda #$00		;8580 A9 00
		sta ZP_50		;8582 85 50
		lda #$21		;8584 A9 21
		sta ZP_51		;8586 85 51
		ldx #$00		;8588 A2 00
L_858A	lda ZP_50		;858A A5 50
		sta L_1000,X	;858C 9D 00 10
		lda ZP_51		;858F A5 51
		sta L_1100,X	;8591 9D 00 11
		clc				;8594 18
		lda #$28		;8595 A9 28
		adc ZP_50		;8597 65 50
		sta ZP_50		;8599 85 50
		lda #$00		;859B A9 00
		adc ZP_51		;859D 65 51
		sta ZP_51		;859F 85 51
		inx				;85A1 E8
		cpx #$C6		;85A2 E0 C6
		bcc L_858A		;85A4 90 E4
L_85A6	lda #$80		;85A6 A9 80
		sta L_1000,X	;85A8 9D 00 10
		lda #$96		;85AB A9 96
		sta L_1100,X	;85AD 9D 00 11
		inx				;85B0 E8
		bne L_85A6		;85B1 D0 F3
L_85B3	txa				;85B3 8A
		asl @			;85B4 0A
		and #$AA		;85B5 29 AA
		sta ZP_50		;85B7 85 50
		txa				;85B9 8A
		lsr @			;85BA 4A
		and #$55		;85BB 29 55
		ora ZP_50		;85BD 05 50
		sta ZP_50		;85BF 85 50
		txa				;85C1 8A
		ora ZP_50		;85C2 05 50
		eor #$FF		;85C4 49 FF
		sta L_1B00,X	;85C6 9D 00 1B
		dex				;85C9 CA
		bne L_85B3		;85CA D0 E7
L_85CC	txa				;85CC 8A
		ldy #$07		;85CD A0 07
L_85CF	lsr @			;85CF 4A
		rol ZP_50		;85D0 26 50
		dey				;85D2 88
		bpl L_85CF		;85D3 10 FA
		lda ZP_50		;85D5 A5 50
		sta L_0D00,X	;85D7 9D 00 0D
		dex				;85DA CA
		bne L_85CC		;85DB D0 EF
		lda #$00		;85DD A9 00
		sta ZP_94		;85DF 85 94
		lda #$0B		;85E1 A9 0B
		sta ZP_95		;85E3 85 95
		lda #$08		;85E5 A9 08
		sta ZP_56		;85E7 85 56
L_85E9	ldx ZP_56		;85E9 A6 56
		lda L_8018,X	;85EB BD 18 80
		sta ZP_96		;85EE 85 96
		lda L_8021,X	;85F0 BD 21 80
		jsr L_B128		;85F3 20 28 B1
		dec ZP_56		;85F6 C6 56
		bpl L_85E9		;85F8 10 EF
		lda #$06		;85FA A9 06
		ldx #$91		;85FC A2 91
		ldy #$C3		;85FE A0 C3
		jsr L_E45C		;8600 20 5C E4
L_8603	jsr L_87B7		;8603 20 B7 87
		lda #$44		;8606 A9 44
		sta L_1825		;8608 8D 25 18
		lda #$53		;860B A9 53
		sta L_1826		;860D 8D 26 18
		lda #$EF		;8610 A9 EF
		jsr L_8E1B		;8612 20 1B 8E
		ldy #$3A		;8615 A0 3A
		lda #$88		;8617 A9 88
		jsr L_ABB8		;8619 20 B8 AB
		lda ZP_D2		;861C A5 D2
		and L_0E01		;861E 2D 01 0E
		and L_0E02		;8621 2D 02 0E
		and ZP_CB		;8624 25 CB
		and L_0E31		;8626 2D 31 0E
		cmp #$03		;8629 C9 03
		bne L_8634		;862B D0 07
		ldy #$3E		;862D A0 3E
		lda #$8D		;862F A9 8D
		jsr L_ABB8		;8631 20 B8 AB
L_8634	jsr L_AE7C		;8634 20 7C AE
		lda #$99		;8637 A9 99
		sta ZP_50		;8639 85 50
		lda #$80		;863B A9 80
		sta ZP_51		;863D 85 51
		jsr rmt_growl_title
		nop
		;ldy #$17		;863F A0 17
		ldx #$E0		;8641 A2 E0
		;lda #$FF		;8643 A9 FF		
		jsr L_B1E0		;8645 20 E0 B1
L_8648	jsr L_B000		;8648 20 00 B0
L_8649	equ *-2			;!
L_864B	jsr L_87B7		;864B 20 B7 87
		ldy #$4A		;864E A0 4A
		lda #$87		;8650 A9 87
		jsr L_ABB8		;8652 20 B8 AB
		lda ZP_CD		;8655 A5 CD
		beq L_865C		;8657 F0 03
		jsr L_B1A3		;8659 20 A3 B1
L_865C	lda #$D3		;865C A9 D3
		sta ZP_52		;865E 85 52
		lda #$00		;8660 A9 00
		ldx #$04		;8662 A2 04
		ldy #$07		;8664 A0 07
		jsr L_8B1E		;8666 20 1E 8B
		lda #$00		;8669 A9 00
		sta ZP_52		;866B 85 52
		lda #$0E		;866D A9 0E
		ldx #$44		;866F A2 44
		ldy #$07		;8671 A0 07
		jsr L_8B1E		;8673 20 1E 8B
		jsr L_870C		;8676 20 0C 87
		jsr L_AE7C		;8679 20 7C AE
		jmp rmt_title_music
		;jmp L_86DB		;867C 4C DB 86
L_867F	jsr L_AFF4		;867F 20 F4 AF
		lda ZP_13		;8682 A5 13
		adc #$11		;8684 69 11
		tay				;8686 A8
		lda #$00		;8687 A9 00
		sta L_0E20		;8689 8D 20 0E
L_868C	cpy ZP_13		;868C C4 13
		;beq L_86FC		;868E F0 6C ; title quit by timer
		nop
		nop
		lda L_0284		;8690 AD 84 02
		and L_0285		;8693 2D 85 02
		beq L_86A6		;8696 F0 0E
		jsr L_B18E		;8698 20 8E B1
		cmp #$07		;869B C9 07
		beq L_868C		;869D F0 ED
		sta ZP_4D		;869F 85 4D
		tay				;86A1 A8
		and #$01		;86A2 29 01
		bne L_86B6		;86A4 D0 10
L_86A6	sta ZP_4D		;86A6 85 4D
		jmp title_quit
		;jsr L_88A0		;86A8 20 A0 88
L_86AB	jsr L_B183		;86AB 20 83 B1
		and #$01		;86AE 29 01
		beq L_86A6		;86B0 F0 F4
		sta ZP_4D		;86B2 85 4D
		bne L_864B		;86B4 D0 95
L_86B6	lda #$0F		;86B6 A9 0F
		jmp rmt_select
		;sta L_0EBD		;86B8 8D BD 0E
L_86BB	tya				;86BB 98
		and #$04		;86BC 29 04
		bne L_86D5		;86BE D0 15		
		jsr L_870C		;86C0 20 0C 87
		inc ZP_CB		;86C3 E6 CB
		lda ZP_CB		;86C5 A5 CB
		cmp #$05		;86C7 C9 05
		bcc L_86CF		;86C9 90 04
		lda #$00		;86CB A9 00
		sta ZP_CB		;86CD 85 CB
L_86CF	jsr L_870C		;86CF 20 0C 87
		jmp L_867F		;86D2 4C 7F 86
L_86D5	lda ZP_CC		;86D5 A5 CC
		eor #$01		;86D7 49 01
		sta ZP_CC		;86D9 85 CC
L_86DB	lda ZP_CC		;86DB A5 CC
		bne L_86E5		;86DD D0 06
		ldy #$27		;86DF A0 27
		lda #$87		;86E1 A9 87
		bne L_86F6		;86E3 D0 11
L_86E5	lda #$E5		;86E5 A9 E5
		sta ZP_52		;86E7 85 52
		lda #$00		;86E9 A9 00
		ldx #$84		;86EB A2 84
		ldy #$07		;86ED A0 07
		jsr L_8B1E		;86EF 20 1E 8B
		ldy #$3D		;86F2 A0 3D
		lda #$87		;86F4 A9 87
L_86F6	jsr L_ABB8		;86F6 20 B8 AB
		jmp L_867F		;86F9 4C 7F 86
L_86FC	jsr L_AFEE		;86FC 20 EE AF
		jsr L_9407		;86FF 20 07 94
		;lda #$7D		;8702 A9 7D ; attract
		lda #$00
		sta ZP_4D		;8704 85 4D
		jsr L_AFF4		;8706 20 F4 AF
		jmp L_8603		;8709 4C 03 86
L_870C	ldx ZP_CB		;870C A6 CB
		lda L_871D,X	;870E BD 1D 87
		sta ZP_A3		;8711 85 A3
		lda L_8722,X	;8713 BD 22 87
		ldx #$4A		;8716 A2 4A
		ldy #$69		;8718 A0 69
		jmp L_AAB7		;871A 4C B7 AA
		
L_871D	dta $EC,$94,$3E,$85,$A8
L_8722	dta $BE,$B8,$B7,$BF,$B5,$FE,$8C,$00,$0A,$0A,$0A,$FE,$84,$07,$0A,$0A
		dta $0A,$0A,$0A,$0A,$FE,$54,$5A,$1E,$21,$19,$FF,$FE,$8C,$00,$02,$1F
		dta $1A,$FE,$54,$5A,$19,$18,$0F,$FF,$FE,$10,$00,$01,$1F,$1A,$FE,$40
		dta $00,$12,$13,$0A,$1D,$0D,$19,$1C,$0F,$FE,$10,$5A,$1A,$1C,$0F,$1D
		dta $1D,$0A,$1D,$0F,$16,$0F,$0D,$1E,$0A,$10,$19,$1C,$0A,$0A,$0A,$0A
		dta $0A,$1A,$16,$0B,$23,$0F,$1C,$0A,$11,$0B,$17,$0F,$FE,$12,$82,$1A
		dta $1C,$0F,$1D,$1D,$0A,$19,$1A,$1E,$13,$19,$18,$0A,$1E,$19,$0A,$1A
		dta $13,$0D,$15,$0A,$0E,$13,$10,$10,$13,$0D,$1F,$16,$1E,$23,$FE,$2A
		dta $91,$1A,$1C,$0F,$1D,$1D,$0A,$1D,$1E,$0B,$1C,$1E,$0A,$1E,$19,$0A
		dta $1A,$16,$0B,$23,$FF
		
L_87B7	jsr L_AE39		;87B7 20 39 AE
		lda #$34		;87BA A9 34
		sta ZP_96		;87BC 85 96
		lda #$88		;87BE A9 88
		sta ZP_97		;87C0 85 97
		lda #$00		;87C2 A9 00
		sta ZP_54		;87C4 85 54
		lda #$0A		;87C6 A9 0A
		sta ZP_52		;87C8 85 52
		lda #$19		;87CA A9 19
		sta ZP_56		;87CC 85 56
L_87CE	lda #$03		;87CE A9 03
		sta ZP_53		;87D0 85 53
		lda #$1E		;87D2 A9 1E
		sta ZP_55		;87D4 85 55
L_87D6	lda #$07		;87D6 A9 07
		sta ZP_57		;87D8 85 57
		ldy ZP_54		;87DA A4 54
		lda (ZP_7F),Y	;87DC B1 7F
		sta ZP_58		;87DE 85 58
		inc ZP_54		;87E0 E6 54
L_87E2	asl ZP_58		;87E2 06 58
		bcc L_87ED		;87E4 90 07
		ldx ZP_55		;87E6 A6 55
		ldy ZP_56		;87E8 A4 56
		jsr L_A97B		;87EA 20 7B A9
L_87ED	clc				;87ED 18
		lda ZP_55		;87EE A5 55
		adc #$04		;87F0 69 04
		sta ZP_55		;87F2 85 55
		dec ZP_57		;87F4 C6 57
		bpl L_87E2		;87F6 10 EA
		dec ZP_53		;87F8 C6 53
		bpl L_87D6		;87FA 10 DA
		clc				;87FC 18
		lda ZP_56		;87FD A5 56
		adc #$04		;87FF 69 04
		sta ZP_56		;8801 85 56
		dec ZP_52		;8803 C6 52
		bpl L_87CE		;8805 10 C7
		rts				;8807 60
		
		dta $CE,$94,$BA,$80,$AA,$D5,$22,$80,$AA,$F7,$3B,$80,$AA,$B5,$21,$00
		dta $CE,$94,$B9,$00,$00,$00,$00,$00,$1A,$F4,$9C,$00,$1E,$D6,$B0,$00
		dta $1C,$D7,$B0,$00,$1A,$D5,$B4,$00,$1A,$F4,$9C,$00,$01,$04,$FF,$82
		dta $82,$AA,$FE,$30,$A0,$01,$09,$08,$01,$0A,$01,$09,$08,$03,$0A,$18
		dta $13,$18,$1E,$0F,$18,$0E,$19,$FE,$28,$A0,$88,$63,$FE,$3A,$8C,$0C
		dta $23,$0A,$18,$13,$18,$1E,$0F,$18,$0E,$19,$FF,$02,$07,$05,$40,$10
		dta $10,$4A,$84,$48,$04,$4A,$84,$10,$10,$05,$40
L_8873	dta $00
L_8874	dta $01,$80,$02,$01,$80,$03,$02,$01,$80,$03,$00,$02,$01,$80,$03,$00
		dta $02,$00,$01
L_8887	dta $00,$02,$05,$09
L_888B	dta $0E
L_888C	dta $00,$01,$00,$01,$02,$00,$01,$02,$03,$00,$01,$02,$03,$04,$00,$01
		dta $02,$03,$04,$05
		
L_88A0	ldx ZP_CB		;88A0 A6 CB
		stx ZP_CF		;88A2 86 CF
		stx ZP_CE		;88A4 86 CE
		ldy L_8887,X	;88A6 BC 87 88
		sty ZP_D1		;88A9 84 D1
		lda L_8873,Y	;88AB B9 73 88
		and #$7F		;88AE 29 7F
		sta ZP_D0		;88B0 85 D0
		ldy #$02		;88B2 A0 02
		sty ZP_D2		;88B4 84 D2
		dey				;88B6 88
		sty ZP_CD		;88B7 84 CD
		ldx #$05		;88B9 A2 05
L_88BB	lda #$00		;88BB A9 00
		sta ZP_D3,X		;88BD 95 D3
		lda L_8067,X	;88BF BD 67 80
		sta ZP_D9,X		;88C2 95 D9
		dex				;88C4 CA
		bpl L_88BB		;88C5 10 F4
		sta L_0E20		;88C7 8D 20 0E
		jsr L_7FC8		;88CA 20 C8 7F
		nop				;88CD EA
		nop				;88CE EA
		nop				;88CF EA
		nop				;88D0 EA
		nop				;88D1 EA
		nop				;88D2 EA
		nop				;88D3 EA
		nop				;88D4 EA
L_88D5	jsr L_7FAC		;88D5 20 AC 7F
		jsr L_B183		;88D8 20 83 B1
		bne L_8901		;88DB D0 24
		jsr L_AFF4		;88DD 20 F4 AF
		jsr L_8911		;88E0 20 11 89
		tay				;88E3 A8
		jsr L_B1E8		;88E4 20 E8 B1
		jsr L_B183		;88E7 20 83 B1
		bne L_8901		;88EA D0 15
		tya				;88EC 98
		beq L_88D5		;88ED F0 E6
		dec ZP_D2		;88EF C6 D2
		bpl L_8904		;88F1 10 11
		jsr L_8CEE		;88F3 20 EE 8C
		lda ZP_CC		;88F6 A5 CC
		beq L_8901		;88F8 F0 07
L_88FA	jsr L_B1A3		;88FA 20 A3 B1
		lda ZP_D2		;88FD A5 D2
		bpl L_88D5		;88FF 10 D4
L_8901	jmp hiscore		;8901 4C E8 B1
L_8904	lda ZP_CC		;8904 A5 CC
		beq L_88D5		;8906 F0 CD
		jsr L_B1A3		;8908 20 A3 B1
		lda ZP_D2		;890B A5 D2
		bpl L_88D5		;890D 10 C6
		bmi L_88FA		;890F 30 E9
L_8911	lda #$00		;8911 A9 00
		ldx #$2C		;8913 A2 2C
L_8915	sta L_0E1E,X	;8915 9D 1E 0E
		dex				;8918 CA
		bne L_8915		;8919 D0 FA
		ldx #$9C		;891B A2 9C
L_891D	sta L_19FE,X	;891D 9D FE 19
		dex				;8920 CA
		bne L_891D		;8921 D0 FA
		ldx #$03		;8923 A2 03
L_8925	sta L_0E23,X	;8925 9D 23 0E
		dex				;8928 CA
		bpl L_8925		;8929 10 FA
		ldx ZP_CE		;892B A6 CE
		lda L_806D,X	;892D BD 6D 80
		sta L_0E23		;8930 8D 23 0E
		lda #$08		;8933 A9 08
		sta ZP_C5		;8935 85 C5
		lda #$0F		;8937 A9 0F
		sta ZP_84		;8939 85 84
		lda ZP_09		;893B A5 09
		sta ZP_69		;893D 85 69
		lda #$78		;893F A9 78
		sta ZP_7C		;8941 85 7C
		ldy ZP_D0		;8943 A4 D0
		lda L_8063,Y	;8945 B9 63 80
		sta ZP_6F		;8948 85 6F
		tax				;894A AA
		lda L_8049,X	;894B BD 49 80
		sta ZP_6B		;894E 85 6B
		tya				;8950 98
		jsr L_AC31		;8951 20 31 AC
		ldy #$F3		;8954 A0 F3
		lda #$8D		;8956 A9 8D
		jsr L_ABB8		;8958 20 B8 AB
		ldy ZP_CF		;895B A4 CF
		iny				;895D C8
		tya				;895E 98
		ldx #$04		;895F A2 04
		ldy #$10		;8961 A0 10
		jsr L_ABFD		;8963 20 FD AB
		ldy ZP_CD		;8966 A4 CD
		iny				;8968 C8
		tya				;8969 98
		ldx #$8C		;896A A2 8C
		ldy #$00		;896C A0 00
		jsr L_ABFD		;896E 20 FD AB
		jmp rmt_ingame_music
		nop
		;lda #$8C		;8971 A9 8C
		;sta ZP_53		;8973 85 53
L_8975	lda ZP_D2		;8975 A5 D2
		sta ZP_52		;8977 85 52 ; any lives left?
		beq L_8994		;8979 F0 19
		lda #$30		;897B A9 30
		sta ZP_96		;897D 85 96
		lda #$B8		;897F A9 B8
		sta ZP_97		;8981 85 97
L_8983	lda ZP_53		;8983 A5 53
		clc				;8985 18
		adc #$04		;8986 69 04
		sta ZP_53		;8988 85 53
		tax				;898A AA
		ldy #$0E		;898B A0 0E
		jsr L_A97B		;898D 20 7B A9
		dec ZP_52		;8990 C6 52
		bne L_8983		;8992 D0 EF
L_8994	lda ZP_CC		;8994 A5 CC
		beq L_89A9		;8996 F0 11
		ldx ZP_DF		;8998 A6 DF
		inx				;899A E8
		txa				;899B 8A
		ldx #$04		;899C A2 04
		ldy #$00		;899E A0 00
		jsr L_ABFD		;89A0 20 FD AB
		ldy #$E5		;89A3 A0 E5
		ldx #$00		;89A5 A2 00
		beq L_89BA		;89A7 F0 11
L_89A9	ldx #$04		;89A9 A2 04
		ldy #$00		;89AB A0 00
		lda #$EA		;89AD A9 EA
		sta ZP_52		;89AF 85 52
		lda #$8D		;89B1 A9 8D
		jsr L_ABBA		;89B3 20 BA AB
		ldy #$00		;89B6 A0 00
		ldx #$0E		;89B8 A2 0E
L_89BA	sty ZP_52		;89BA 84 52
		txa				;89BC 8A
		ldx #$26		;89BD A2 26
		ldy #$00		;89BF A0 00
		jsr L_8B1E		;89C1 20 1E 8B
		jsr L_8B24		;89C4 20 24 8B
		lda #$04		;89C7 A9 04
		jsr L_8B93		;89C9 20 93 8B
		inc ZP_82		;89CC E6 82
		inc ZP_67		;89CE E6 67
		inc ZP_66		;89D0 E6 66
L_89D2	jsr L_B183		;89D2 20 83 B1
		bne L_8A13		;89D5 D0 3C
		lda ZP_69		;89D7 A5 69
		beq L_8A18		;89D9 F0 3D
		ldx L_0E35		;89DB AE 35 0E
		bne L_8A18		;89DE D0 38
		lda L_D20A		;89E0 AD 0A D2
		and #$BF		;89E3 29 BF
		lda #$E4		;89E5 A9 E4
		sta ZP_B8		;89E7 85 B8
L_89E9	lda ZP_83		;89E9 A5 83
		beq L_89E9		;89EB F0 FC
		stx ZP_83		;89ED 86 83
		lda L_0E20		;89EF AD 20 0E
		bne L_89D2		;89F2 D0 DE
		lda ZP_68		;89F4 A5 68
		beq L_89FE		;89F6 F0 06
		jsr L_A8A8		;89F8 20 A8 A8
		jmp L_89E9		;89FB 4C E9 89
L_89FE	jsr L_8A61		;89FE 20 61 8A
		jsr L_901D		;8A01 20 1D 90
		jsr L_8ED2		;8A04 20 D2 8E
		jsr L_8D45		;8A07 20 45 8D
		jsr L_8DB0		;8A0A 20 B0 8D
		jsr L_96FA		;8A0D 20 FA 96
		jmp L_89D2		;8A10 4C D2 89
L_8A13	dec ZP_67		;8A13 C6 67
		dec ZP_66		;8A15 C6 66
		rts				;8A17 60
L_8A18	jsr L_B1E8		;8A18 20 E8 B1
		dec ZP_66		;8A1B C6 66
		dec ZP_67		;8A1D C6 67
		lda L_0E35		;8A1F AD 35 0E
		beq L_8A5E		;8A22 F0 3A
		ldx ZP_D0		;8A24 A6 D0
		cpx #$01		;8A26 E0 01
		bne L_8A30		;8A28 D0 06
		jsr L_9548		;8A2A 20 48 95
		jmp L_8A33		;8A2D 4C 33 8A
L_8A30	jsr L_949A		;8A30 20 9A 94
L_8A33	ldx ZP_D1		;8A33 A6 D1
		cpx #$13		;8A35 E0 13
		beq L_8A4A		;8A37 F0 11
		lda L_8874,X	;8A39 BD 74 88
		bpl L_8A44		;8A3C 10 06
		and #$7F		;8A3E 29 7F
		inc ZP_CE		;8A40 E6 CE
		inc ZP_CF		;8A42 E6 CF
L_8A44	sta ZP_D0		;8A44 85 D0
		inc ZP_D1		;8A46 E6 D1
		bne L_8A5B		;8A48 D0 11
L_8A4A	lda L_888B		;8A4A AD 8B 88
		sta ZP_D1		;8A4D 85 D1
		lda #$00		;8A4F A9 00
		sta ZP_D0		;8A51 85 D0
		ldx ZP_CF		;8A53 A6 CF
		cpx #$09		;8A55 E0 09
		bcs L_8A5B		;8A57 B0 02
		inc ZP_CF		;8A59 E6 CF
L_8A5B	lda #$00		;8A5B A9 00
		rts				;8A5D 60
L_8A5E	lda ZP_09		;8A5E A5 09
		rts				;8A60 60
L_8A61	dec ZP_7C		;8A61 C6 7C
		bne L_8A84		;8A63 D0 1F
		lda #$78		;8A65 A9 78
		sta ZP_7C		;8A67 85 7C
		inc ZP_BA		;8A69 E6 BA
		dec L_0E24		;8A6B CE 24 0E
		bpl L_8A81		;8A6E 10 11
		dec L_0E23		;8A70 CE 23 0E
		bpl L_8A7C		;8A73 10 07
		lda #$00		;8A75 A9 00
		sta L_0E23		;8A77 8D 23 0E
		beq L_8A7E		;8A7A F0 02
L_8A7C	lda #$09		;8A7C A9 09
L_8A7E	sta L_0E24		;8A7E 8D 24 0E
L_8A81	jsr L_8B24		;8A81 20 24 8B
L_8A84	lda L_0E36		;8A84 AD 36 0E
		beq L_8AA8		;8A87 F0 1F
		bpl L_8A92		;8A89 10 07
		and #$7F		;8A8B 29 7F
		sta L_0E36		;8A8D 8D 36 0E
		bne L_8A97		;8A90 D0 05
L_8A92	dec L_0E36		;8A92 CE 36 0E
		bne L_8AA8		;8A95 D0 11
L_8A97	ldx ZP_B6		;8A97 A6 B6
		lda L_B83C,X	;8A99 BD 3C B8
		sta ZP_A3		;8A9C 85 A3
		lda L_B840,X	;8A9E BD 40 B8
		ldx ZP_B4		;8AA1 A6 B4
		ldy ZP_B5		;8AA3 A4 B5
		jsr L_AAB7		;8AA5 20 B7 AA
L_8AA8	lda L_D00C		;8AA8 AD 0C D0
		and #$08		;8AAB 29 08
		beq L_8ADA		;8AAD F0 2B
		lda L_0E31		;8AAF AD 31 0E
		cmp #$01		;8AB2 C9 01
		bne L_8ADA		;8AB4 D0 24
		ldy #$02		;8AB6 A0 02
		lda L_0E32		;8AB8 AD 32 0E
L_8ABB	cmp L_1815,Y	;8ABB D9 15 18
		beq L_8AC5		;8ABE F0 05
		dey				;8AC0 88
		bpl L_8ABB		;8AC1 10 F8
		bmi L_8ADA		;8AC3 30 15
L_8AC5	lda #$FF		;8AC5 A9 FF
		sta L_1815,Y	;8AC7 99 15 18
		sta L_180C,Y	;8ACA 99 0C 18
		ldy ZP_CE		;8ACD A4 CE
		lda L_8077,Y	;8ACF B9 77 80
		jsr L_8B5C		;8AD2 20 5C 8B
		lda #$2D		;8AD5 A9 2D
		jsr rmt_points
		;sta L_0EBB		;8AD7 8D BB 0E
L_8ADA	sta L_D01E		;8ADA 8D 1E D0
		lda ZP_BE		;8ADD A5 BE
		cmp ZP_BA		;8ADF C5 BA
		bne L_8AF2		;8AE1 D0 0F
		lda ZP_BF		;8AE3 A5 BF
		eor #$FF		;8AE5 49 FF
		adc #$00		;8AE7 69 00
		sta ZP_BF		;8AE9 85 BF
		clc				;8AEB 18
		lda ZP_BA		;8AEC A5 BA
		adc #$05		;8AEE 69 05
		sta ZP_BE		;8AF0 85 BE
L_8AF2	jsr L_9F95		;8AF2 20 95 9F
		lda ZP_69		;8AF5 A5 69
		bmi L_8B1D		;8AF7 30 24
		lda ZP_B9		;8AF9 A5 B9
		cmp #$00		;8AFB C9 00
		bne L_8B0B		;8AFD D0 0C
		lda L_0EC4		;8AFF AD C4 0E
		bne L_8B1D		;8B02 D0 19
		lda #$4A		;8B04 A9 4A
		sta L_0EC4		;8B06 8D C4 0E
		bne L_8B1D		;8B09 D0 12
L_8B0B	cmp #$01		;8B0B C9 01
		beq L_8B13		;8B0D F0 04
		cmp #$03		;8B0F C9 03
		bne L_8B1D		;8B11 D0 0A
L_8B13	lda L_0EC3		;8B13 AD C3 0E
		bne L_8B1D		;8B16 D0 05
		lda #$1D		;8B18 A9 1D
		sta L_0EC3		;8B1A 8D C3 0E
L_8B1D	rts				;8B1D 60
L_8B1E	sta ZP_53		;8B1E 85 53
		lda #$06		;8B20 A9 06
		bne L_8B32		;8B22 D0 0E
L_8B24	ldx #$10		;8B24 A2 10
		ldy #$11		;8B26 A0 11
		lda #$23		;8B28 A9 23
		sta ZP_52		;8B2A 85 52
		lda #$0E		;8B2C A9 0E
		sta ZP_53		;8B2E 85 53
		lda #$04		;8B30 A9 04
L_8B32	sta ZP_56		;8B32 85 56
		sty ZP_57		;8B34 84 57
		lda #$00		;8B36 A9 00
		sta ZP_58		;8B38 85 58
L_8B3A	dec ZP_56		;8B3A C6 56
		bmi L_8B5B		;8B3C 30 1D
		ldy #$00		;8B3E A0 00
		lda (ZP_52),Y	;8B40 B1 52
		bne L_8B48		;8B42 D0 04
		ldy ZP_58		;8B44 A4 58
		beq L_8B4C		;8B46 F0 04
L_8B48	inc ZP_58		;8B48 E6 58
		bne L_8B4E		;8B4A D0 02
L_8B4C	lda #$0A		;8B4C A9 0A
L_8B4E	ldy ZP_57		;8B4E A4 57
		jsr L_ABFD		;8B50 20 FD AB
		inc ZP_52		;8B53 E6 52
		bne L_8B3A		;8B55 D0 E3
		inc ZP_53		;8B57 E6 53
		bne L_8B3A		;8B59 D0 DF
L_8B5B	rts				;8B5B 60
L_8B5C	pha				;8B5C 48
		ldx ZP_6F		;8B5D A6 6F
		dex				;8B5F CA
		bpl L_8B64		;8B60 10 02
		ldx #$02		;8B62 A2 02
L_8B64	clc				;8B64 18
		ldy L_0E32		;8B65 AC 32 0E
		txa				;8B68 8A
		adc L_8042,Y	;8B69 79 42 80
		tay				;8B6C A8
		lda L_182B,Y	;8B6D B9 2B 18
		and #$38		;8B70 29 38
		beq L_8B7D		;8B72 F0 09
		inx				;8B74 E8
		cpx #$1A		;8B75 E0 1A
		bcc L_8B89		;8B77 90 10
		ldx #$18		;8B79 A2 18
		bne L_8B89		;8B7B D0 0C
L_8B7D	lda L_182C,Y	;8B7D B9 2C 18
		and #$38		;8B80 29 38
		beq L_8B89		;8B82 F0 05
		dex				;8B84 CA
		bpl L_8B89		;8B85 10 02
		ldx #$02		;8B87 A2 02
L_8B89	lda ZP_6D		;8B89 A5 6D
		adc #$05		;8B8B 69 05
		tay				;8B8D A8
		lda L_8049,X	;8B8E BD 49 80
		tax				;8B91 AA
		pla				;8B92 68
L_8B93	sty ZP_62		;8B93 84 62
		tay				;8B95 A8
		bpl L_8BAD		;8B96 10 15
		and #$7F		;8B98 29 7F
		tay				;8B9A A8
		lda L_0E36		;8B9B AD 36 0E
		bne L_8BAD		;8B9E D0 0D
		lda ZP_62		;8BA0 A5 62
		sta ZP_B5		;8BA2 85 B5
		stx ZP_B4		;8BA4 86 B4
		sty ZP_B6		;8BA6 84 B6
		lda #$9E		;8BA8 A9 9E
		sta L_0E36		;8BAA 8D 36 0E
L_8BAD	ldx #$03		;8BAD A2 03
		cpy #$05		;8BAF C0 05
		beq L_8BCA		;8BB1 F0 17
		lda L_8072,Y	;8BB3 B9 72 80
L_8BB6	clc				;8BB6 18
		adc ZP_D3,X		;8BB7 75 D3 ; zapis do skore
		sta ZP_D3,X		;8BB9 95 D3
		cmp #$0A		;8BBB C9 0A
		bcc L_8BE1		;8BBD 90 22
		sbc #$0A		;8BBF E9 0A
		sta ZP_D3,X		;8BC1 95 D3
		dex				;8BC3 CA
		bmi L_8BE1		;8BC4 30 1B
		lda #$01		;8BC6 A9 01
		bne L_8BB6		;8BC8 D0 EC
L_8BCA	lda #$00		;8BCA A9 00
L_8BCC	clc				;8BCC 18
		adc L_0E21,X	;8BCD 7D 21 0E
		adc ZP_D3,X		;8BD0 75 D3
		ldy #$00		;8BD2 A0 00
		cmp #$0A		;8BD4 C9 0A
		bcc L_8BDB		;8BD6 90 03
		sbc #$0A		;8BD8 E9 0A
		iny				;8BDA C8
L_8BDB	sta ZP_D3,X		;8BDB 95 D3
		tya				;8BDD 98
		dex				;8BDE CA
		bpl L_8BCC		;8BDF 10 EB
L_8BE1	ldx #$88		;8BE1 A2 88
		ldy #$07		;8BE3 A0 07
		lda #$D3		;8BE5 A9 D3
		sta ZP_52		;8BE7 85 52
		lda #$00		;8BE9 A9 00
		jsr L_8B1E		;8BEB 20 1E 8B
		ldx #$00		;8BEE A2 00
L_8BF0	lda ZP_D3,X		;8BF0 B5 D3
		cmp ZP_D9,X		;8BF2 D5 D9
		bcc L_8C10		;8BF4 90 1A
		bne L_8BFD		;8BF6 D0 05
		inx				;8BF8 E8
		cpx #$04		;8BF9 E0 04
		bcc L_8BF0		;8BFB 90 F3
L_8BFD	inc ZP_D2		;8BFD E6 D2
		lda #$0A		;8BFF A9 0A
		sta ZP_D9		;8C01 85 D9
		ldx #$8C		;8C03 A2 8C
		ldy #$0E		;8C05 A0 0E
		lda #$30		;8C07 A9 30
		sta ZP_A3		;8C09 85 A3
		lda #$B8		;8C0B A9 B8
		jsr L_AAB7		;8C0D 20 B7 AA
L_8C10	ldx #$00		;8C10 A2 00
L_8C12	lda ZP_D3,X		;8C12 B5 D3
		cmp L_0E00,X	;8C14 DD 00 0E
		bcc L_8C3B		;8C17 90 22
		bne L_8C20		;8C19 D0 05
		inx				;8C1B E8
		cpx #$04		;8C1C E0 04
		bcc L_8C12		;8C1E 90 F2
L_8C20	ldx #$03		;8C20 A2 03
L_8C22	lda ZP_D3,X		;8C22 B5 D3
		sta L_0E00,X	;8C24 9D 00 0E
		dex				;8C27 CA
		bpl L_8C22		;8C28 10 F8
		lda ZP_CC		;8C2A A5 CC
		bne L_8C3B		;8C2C D0 0D
		lda #$00		;8C2E A9 00
		sta ZP_52		;8C30 85 52
		lda #$0E		;8C32 A9 0E
		ldx #$26		;8C34 A2 26
		ldy #$00		;8C36 A0 00
		jmp L_8B1E		;8C38 4C 1E 8B
L_8C3B	rts				;8C3B 60
L_8C3C	jsr L_AE39		;8C3C 20 39 AE
		lda #$8C		;8C3F A9 8C
		ldy #$B0		;8C41 A0 B0
		jsr L_ABB8		;8C43 20 B8 AB
		ldx ZP_CD		;8C46 A6 CD
		inx				;8C48 E8
		txa				;8C49 8A
		ldx #$78		;8C4A A2 78
		ldy #$57		;8C4C A0 57
		jsr L_ABFD		;8C4E 20 FD AB
		lda #$A6		;8C51 A9 A6
		sta L_1826		;8C53 8D 26 18
		lda #$40		;8C56 A9 40
		sta L_1825		;8C58 8D 25 18
		ldx ZP_D1		;8C5B A6 D1
		lda L_888C,X	;8C5D BD 8C 88
		sta ZP_52		;8C60 85 52
L_8C62	jsr L_8E14		;8C62 20 14 8E
		dec ZP_52		;8C65 C6 52
		bmi L_8C74		;8C67 30 0B
		sec				;8C69 38
		lda L_1826		;8C6A AD 26 18
		sbc #$20		;8C6D E9 20
		sta L_1826		;8C6F 8D 26 18
		bne L_8C62		;8C72 D0 EE
L_8C74	ldx ZP_D1		;8C74 A6 D1
		lda L_888C,X	;8C76 BD 8C 88
		asl @			;8C79 0A
		asl @			;8C7A 0A
		adc L_888C,X	;8C7B 7D 8C 88
		adc #$D0		;8C7E 69 D0
		sta ZP_52		;8C80 85 52
		lda #$00		;8C82 A9 00
		adc #$8C		;8C84 69 8C
		ldy L_1826		;8C86 AC 26 18
		ldx #$28		;8C89 A2 28
		jsr L_ABBA		;8C8B 20 BA AB
		jsr L_AE7C		;8C8E 20 7C AE
		jsr L_AFEE		;8C91 20 EE AF
		jmp rmt_how_high
		lda #$0C		;8C94 A9 0C
		;sta L_0EC9		;8C96 8D C9 0E
		sta L_0E07		;8C99 8D 07 0E
		sta L_0E09		;8C9C 8D 09 0E
L_8C9F	lda L_0EC9		;8C9F AD C9 0E
		beq L_8CAD		;8CA2 F0 09
		jsr L_B183		;8CA4 20 83 B1
		and #$06		;8CA7 29 06
		cmp #$06		;8CA9 C9 06
		beq L_8C9F		;8CAB F0 F2
L_8CAD	jmp L_B1E8		;8CAD 4C E8 B1

		dta $FE,$68,$63,$12,$19,$21,$0A,$12,$13,$11,$12,$0A,$0D,$0B,$18,$FE
		dta $70,$6B,$23,$19,$1F,$0A,$11,$0F,$1E,$1B,$FE,$7C,$57,$1F,$1A,$FF
		dta $02,$05,$17,$FF,$00,$05,$00,$17,$FF,$00,$07,$05,$17,$FF,$00,$01
		dta $00,$00,$17,$FF,$01,$02,$05,$17,$FF,$01,$05,$00,$17,$FF
		
L_8CEE	jmp rmt_death_msx_off
		nop
		;ldx #$28		;8CEE A2 28
		;ldy #$3B		;8CF0 A0 3B
L_8CF2	lda #$25		;8CF2 A9 25
		sta ZP_96		;8CF4 85 96
		lda #$8D		;8CF6 A9 8D
		jsr L_A9F8		;8CF8 20 F8 A9
		ldy #$31		;8CFB A0 31
		lda #$8D		;8CFD A9 8D
		jsr L_ABB8		;8CFF 20 B8 AB
		lda ZP_CC		;8D02 A5 CC
		beq L_8D18		;8D04 F0 12
		ldy #$27		;8D06 A0 27
		lda #$8D		;8D08 A9 8D
		jsr L_ABB8		;8D0A 20 B8 AB
		ldx #$4E		;8D0D A2 4E
		ldy ZP_CD		;8D0F A4 CD
		iny				;8D11 C8
		tya				;8D12 98
		ldy #$6F		;8D13 A0 6F
		jsr L_ABFD		;8D15 20 FD AB
L_8D18	ldx ZP_14		;8D18 A6 14
		dex				;8D1A CA
L_8D1B	cpx ZP_14		;8D1B E4 14
		beq L_8D24		;8D1D F0 05
		jsr L_B183		;8D1F 20 83 B1
		beq L_8D1B		;8D22 F0 F7
L_8D24	rts				;8D24 60

		dta $14,$50,$FE,$44,$68,$1A,$16,$0B,$23,$0F,$1C,$FF,$FE,$3E,$59,$11
		dta $0B,$17,$0F,$0A,$19,$20,$0F,$1C,$FF,$FE,$50,$BC,$16,$17,$0E,$FF
		
L_8D45	lda L_0E37		;8D45 AD 37 0E
		beq L_8D54		;8D48 F0 0A
L_8D4A	dec L_0E37		;8D4A CE 37 0E
		beq L_8D5F		;8D4D F0 10
		lda ZP_69		;8D4F A5 69
		bmi L_8D4A		;8D51 30 F7
L_8D53	rts				;8D53 60
L_8D54	lda ZP_B7		;8D54 A5 B7
		cmp #$85		;8D56 C9 85
		bne L_8D72		;8D58 D0 18
		lda #$20		;8D5A A9 20
		sta L_0E37		;8D5C 8D 37 0E
L_8D5F	clc				;8D5F 18
		lda L_1823		;8D60 AD 23 18
		adc #$0C		;8D63 69 0C
		tax				;8D65 AA
		ldy L_1824		;8D66 AC 24 18
		lda #$1C		;8D69 A9 1C
		sta ZP_A3		;8D6B 85 A3
		lda #$B6		;8D6D A9 B6
		jmp L_AAB7		;8D6F 4C B7 AA
L_8D72	ldx ZP_B9		;8D72 A6 B9
		cpx #$01		;8D74 E0 01
		bne L_8D53		;8D76 D0 DB
		lda ZP_6D		;8D78 A5 6D
		cmp #$2F		;8D7A C9 2F
		bcs L_8D53		;8D7C B0 D5
		ldx L_1823		;8D7E AE 23 18
		lda ZP_6B		;8D81 A5 6B
		cmp L_1825		;8D83 CD 25 18
		bcs L_8D91		;8D86 B0 09
		cpx L_1825		;8D88 EC 25 18
		bcs L_8D53		;8D8B B0 C6
		lda #$60		;8D8D A9 60
		bne L_8D98		;8D8F D0 07
L_8D91	cpx L_1825		;8D91 EC 25 18
		bcc L_8D53		;8D94 90 BD
		lda #$2C		;8D96 A9 2C
L_8D98	pha				;8D98 48
		lda #$9C		;8D99 A9 9C
		sta ZP_A3		;8D9B 85 A3
		lda #$BE		;8D9D A9 BE
		ldy L_1824		;8D9F AC 24 18
		jsr L_AAB7		;8DA2 20 B7 AA
		pla				;8DA5 68
		tax				;8DA6 AA
		stx L_1823		;8DA7 8E 23 18
		ldy L_1824		;8DAA AC 24 18
		jmp L_AAB9		;8DAD 4C B9 AA
L_8DB0	ldx ZP_B9		;8DB0 A6 B9
		lda L_807C,X	;8DB2 BD 7C 80
		and #$08		;8DB5 29 08
		beq L_8DE9		;8DB7 F0 30
		dec ZP_BD		;8DB9 C6 BD
		bpl L_8DE9		;8DBB 10 2C
		lda L_D20A		;8DBD AD 0A D2
		and #$0F		;8DC0 29 0F
		ora #$07		;8DC2 09 07
		sta ZP_BD		;8DC4 85 BD
		jsr L_8DD1		;8DC6 20 D1 8D
		lda L_0E34		;8DC9 AD 34 0E
		eor #$01		;8DCC 49 01
		sta L_0E34		;8DCE 8D 34 0E
L_8DD1	ldy #$5C		;8DD1 A0 5C
		lda #$B9		;8DD3 A9 B9
		ldx L_0E34		;8DD5 AE 34 0E
		beq L_8DDE		;8DD8 F0 04
		ldy #$82		;8DDA A0 82
		lda #$B9		;8DDC A9 B9
L_8DDE	sty ZP_A3		;8DDE 84 A3
		ldx L_1829		;8DE0 AE 29 18
		ldy L_182A		;8DE3 AC 2A 18
		jmp L_AAB7		;8DE6 4C B7 AA
L_8DE9	rts				;8DE9 60

		dta $12,$13,$0A,$1D,$0D,$19,$1C,$0F,$FF,$FE,$90,$00,$1F,$1A,$FE,$0A
		dta $0C,$B6,$9E,$FE,$20,$0C,$B6,$B2,$FE,$0E,$09,$0C,$19,$18,$1F,$1D
		dta $FE,$04,$09,$16,$FE,$08,$00,$1F,$1A,$FF
		
L_8E14	lda #$A9		;8E14 A9 A9
		ldx #$00		;8E16 A2 00
		stx L_0E39		;8E18 8E 39 0E
L_8E1B	tax				;8E1B AA
		eor L_0E39		;8E1C 4D 39 0E
		sta L_0E39		;8E1F 8D 39 0E
		txa				;8E22 8A
		bpl L_8E3E		;8E23 10 19
		pha				;8E25 48
		ldx #$BC		;8E26 A2 BC
		ldy #$D2		;8E28 A0 D2
		and #$40		;8E2A 29 40
		beq L_8E32		;8E2C F0 04
		ldx #$BD		;8E2E A2 BD
		ldy #$04		;8E30 A0 04
L_8E32	stx ZP_A4		;8E32 86 A4
		sty ZP_A3		;8E34 84 A3
		ldx #$04		;8E36 A2 04
		ldy #$00		;8E38 A0 00
		jsr L_8EA3		;8E3A 20 A3 8E
		pla				;8E3D 68
L_8E3E	pha				;8E3E 48
		and #$30		;8E3F 29 30
		beq L_8E5E		;8E41 F0 1B
		and #$10		;8E43 29 10
		bne L_8E4F		;8E45 D0 08
		lda #$BD		;8E47 A9 BD
		ldx #$36		;8E49 A2 36
		ldy #$07		;8E4B A0 07
		bne L_8E55		;8E4D D0 06
L_8E4F	lda #$BD		;8E4F A9 BD
		ldx #$5F		;8E51 A2 5F
		ldy #$03		;8E53 A0 03
L_8E55	sta ZP_A4		;8E55 85 A4
		stx ZP_A3		;8E57 86 A3
		ldx #$0C		;8E59 A2 0C
		jsr L_8EA3		;8E5B 20 A3 8E
L_8E5E	pla				;8E5E 68
		pha				;8E5F 48
		and #$0C		;8E60 29 0C
		beq L_8E7F		;8E62 F0 1B
		and #$04		;8E64 29 04
		bne L_8E70		;8E66 D0 08
		lda #$0B		;8E68 A9 0B
		ldx #$F7		;8E6A A2 F7
		ldy #$07		;8E6C A0 07
		bne L_8E76		;8E6E D0 06
L_8E70	lda #$0B		;8E70 A9 0B
		ldx #$C2		;8E72 A2 C2
		ldy #$03		;8E74 A0 03
L_8E76	sta ZP_A4		;8E76 85 A4
		stx ZP_A3		;8E78 86 A3
		ldx #$00		;8E7A A2 00
		jsr L_8EA3		;8E7C 20 A3 8E
L_8E7F	pla				;8E7F 68
		and #$03		;8E80 29 03
		pha				;8E82 48
		tay				;8E83 A8
		lda L_8EC6,Y	;8E84 B9 C6 8E
		sta ZP_A4		;8E87 85 A4
		lda L_8EC2,Y	;8E89 B9 C2 8E
		sta ZP_A3		;8E8C 85 A3
		ldx #$0C		;8E8E A2 0C
		jsr L_8EA1		;8E90 20 A1 8E
		pla				;8E93 68
		tay				;8E94 A8
		lda L_8ECE,Y	;8E95 B9 CE 8E
		sta ZP_A4		;8E98 85 A4
		lda L_8ECA,Y	;8E9A B9 CA 8E
		sta ZP_A3		;8E9D 85 A3
		ldx #$00		;8E9F A2 00
L_8EA1	ldy #$14		;8EA1 A0 14
L_8EA3	clc				;8EA3 18
		txa				;8EA4 8A
		adc L_1825		;8EA5 6D 25 18
		tax				;8EA8 AA
		clc				;8EA9 18
		tya				;8EAA 98
		adc L_1826		;8EAB 6D 26 18
		tay				;8EAE A8
		lda L_0E1F		;8EAF AD 1F 0E
		bne L_8EB7		;8EB2 D0 03
		jmp L_AAB9		;8EB4 4C B9 AA
L_8EB7	lda ZP_A3		;8EB7 A5 A3
		sta ZP_96		;8EB9 85 96
		lda ZP_A4		;8EBB A5 A4
		sta ZP_97		;8EBD 85 97
		jmp L_A97B		;8EBF 4C 7B A9
		
L_8EC2	dta $6E,$94,$94,$BA
L_8EC6	dta $B5,$BD,$BD,$BD
L_8ECA	dta $6E,$40,$20,$40
L_8ECE	dta $B5,$0C,$0C,$0C

L_8ED2	lda ZP_69		;8ED2 A5 69
		bmi L_8EFB		;8ED4 30 25
		ldx L_0E38		;8ED6 AE 38 0E
		bpl L_8EFC		;8ED9 10 21
		dec ZP_C0		;8EDB C6 C0
		bpl L_8EFB		;8EDD 10 1C
		lda L_8F14,X	;8EDF BD 14 8F
		pha				;8EE2 48
		lda L_8F10,X	;8EE3 BD 10 8F
		jsr L_8E1B		;8EE6 20 1B 8E
		pla				;8EE9 68
		jsr L_8E1B		;8EEA 20 1B 8E
		inc L_0E38		;8EED EE 38 0E
		beq L_8EFB		;8EF0 F0 09
		lda #$14		;8EF2 A9 14
		sta ZP_C0		;8EF4 85 C0
		lda #$18		;8EF6 A9 18
		jmp rmt_chest_ingame
		;sta L_0EBC		;8EF8 8D BC 0E
L_8EFB	rts				;8EFB 60
L_8EFC	lda ZP_B9		;8EFC A5 B9
		beq L_8F10		;8EFE F0 10
		lda ZP_B7		;8F00 A5 B7
		cmp #$C8		;8F02 C9 C8
		bne L_8EFB		;8F04 D0 F5
L_8F06	lda #$FC		;8F06 A9 FC
		sta L_0E38		;8F08 8D 38 0E
		lda #$00		;8F0B A9 00
		sta ZP_C0		;8F0D 85 C0
		rts				;8F0F 60
L_8F10	txa				;8F10 8A
		bne L_8F72		;8F11 D0 5F
		lda L_0E2A		;8F13 AD 2A 0E
L_8F14	equ *-2			;!
		bne L_8F66		;8F16 D0 4E
		ldy ZP_CE		;8F18 A4 CE
		lda L_83E9,Y	;8F1A B9 E9 83
		sta L_0E2A		;8F1D 8D 2A 0E
		lda L_0E28		;8F20 AD 28 0E
		cmp L_83EE,Y	;8F23 D9 EE 83
		bcs L_8F66		;8F26 B0 3E
		ldx #$00		;8F28 A2 00
		stx ZP_C0		;8F2A 86 C0
		lda L_0E30		;8F2C AD 30 0E
		bne L_8F3B		;8F2F D0 0A
		ldx L_8F36,Y	;8F31 BE 36 8F
		bne L_8F5F		;8F34 D0 29
L_8F36	ora #$0D		;8F36 09 0D

		dta $0F,$4F,$4F
		
L_8F3B	lda L_D20A		;8F3B AD 0A D2
		cmp L_83E4,Y	;8F3E D9 E4 83
		bcs L_8F54		;8F41 B0 11
		lda L_D20A		;8F43 AD 0A D2
		and #$04		;8F46 29 04
		beq L_8F51		;8F48 F0 07
		lda L_D20A		;8F4A AD 0A D2
		and #$42		;8F4D 29 42
		ora #$04		;8F4F 09 04
L_8F51	ora #$01		;8F51 09 01
		tax				;8F53 AA
L_8F54	lda L_0E30		;8F54 AD 30 0E
		and #$07		;8F57 29 07
		bne L_8F5F		;8F59 D0 04
		txa				;8F5B 8A
		ora #$08		;8F5C 09 08
		tax				;8F5E AA
L_8F5F	stx L_0E3A		;8F5F 8E 3A 0E
		inc L_0E38		;8F62 EE 38 0E
L_8F65	rts				;8F65 60
L_8F66	lda L_0E30		;8F66 AD 30 0E
		and #$07		;8F69 29 07
		cmp #$06		;8F6B C9 06
		bne L_8F65		;8F6D D0 F6
		jmp L_8F06		;8F6F 4C 06 8F
L_8F72	dec ZP_C0		;8F72 C6 C0
		bpl L_8F65		;8F74 10 EF
		lda L_0E39		;8F76 AD 39 0E
		beq L_8F81		;8F79 F0 06
		jsr L_8E1B		;8F7B 20 1B 8E
		ldx L_0E38		;8F7E AE 38 0E
L_8F81	lda L_9013,X	;8F81 BD 13 90
		beq L_8F96		;8F84 F0 10
		sta ZP_A4		;8F86 85 A4
		lda L_9017,X	;8F88 BD 17 90
		sta ZP_A3		;8F8B 85 A3
		ldx L_1825		;8F8D AE 25 18
		ldy L_1826		;8F90 AC 26 18
		jsr L_AAB9		;8F93 20 B9 AA
L_8F96	ldx L_0E38		;8F96 AE 38 0E
		cpx #$03		;8F99 E0 03
		bne L_8FAA		;8F9B D0 0D
		lda L_0E3A		;8F9D AD 3A 0E
		and #$01		;8FA0 29 01
		beq L_8FAA		;8FA2 F0 06
		inc L_0E38		;8FA4 EE 38 0E
		jsr L_8FDF		;8FA7 20 DF 8F
L_8FAA	inc L_0E38		;8FAA EE 38 0E
		lda #$14		;8FAD A9 14
		sta ZP_C0		;8FAF 85 C0
		ldx L_0E38		;8FB1 AE 38 0E
		lda L_9017,X	;8FB4 BD 17 90
		ldy L_9013,X	;8FB7 BC 13 90
		bne L_8FC2		;8FBA D0 06
		jsr L_8E1B		;8FBC 20 1B 8E
		jmp L_8FCF		;8FBF 4C CF 8F
L_8FC2	sta ZP_A3		;8FC2 85 A3
		sty ZP_A4		;8FC4 84 A4
		ldx L_1825		;8FC6 AE 25 18
		ldy L_1826		;8FC9 AC 26 18
		jsr L_AAB9		;8FCC 20 B9 AA
L_8FCF	lda L_0E38		;8FCF AD 38 0E
		cmp #$04		;8FD2 C9 04
		beq L_8FDF		;8FD4 F0 09
		bcc L_8F65		;8FD6 90 8D
		lda #$00		;8FD8 A9 00
		sta L_0E38		;8FDA 8D 38 0E
		beq L_8F65		;8FDD F0 86
L_8FDF	jsr L_9189		;8FDF 20 89 91
		bcs L_8F65		;8FE2 B0 81
		ldy #$13		;8FE4 A0 13
		lda L_0E3A		;8FE6 AD 3A 0E
		and #$01		;8FE9 29 01
		beq L_8FEF		;8FEB F0 02
		ldy #$15		;8FED A0 15
L_8FEF	tya				;8FEF 98
		sta L_0340,X	;8FF0 9D 40 03
		lda #$04		;8FF3 A9 04
		sta L_0EAB,X	;8FF5 9D AB 0E
		lda #$00		;8FF8 A9 00
		sta L_0E8B,X	;8FFA 9D 8B 0E
		lda L_0E3A		;8FFD AD 3A 0E
		sta L_0E5B,X	;9000 9D 5B 0E
		inc L_0E28		;9003 EE 28 0E
		inc L_0E30		;9006 EE 30 0E
		jmp L_9177		;9009 4C 77 91
		
		dta $A1,$3A,$2F,$F2,$F2,$2F,$3A
L_9013	dta $A1,$00,$0B,$00
L_9017	dta $BD,$00,$00,$A9,$DA,$A9

L_901D	lda ZP_B9		;901D A5 B9
		cmp #$00		;901F C9 00
		bne L_903C		;9021 D0 19
		lda L_0E2F		;9023 AD 2F 0E
		bne L_902B		;9026 D0 03
L_9028	jmp L_90F0		;9028 4C F0 90
L_902B	lda #$00		;902B A9 00
		sta L_0E2F		;902D 8D 2F 0E
		sta ZP_52		;9030 85 52
		lda #$80		;9032 A9 80
		sta ZP_50		;9034 85 50
		lda #$03		;9036 A9 03
		sta ZP_53		;9038 85 53
		bne L_909C		;903A D0 60
L_903C	cmp #$01		;903C C9 01
		bne L_907D		;903E D0 3D
		lda L_0E2B		;9040 AD 2B 0E
		bne L_9028		;9043 D0 E3
		lda #$08		;9045 A9 08
		sta ZP_50		;9047 85 50
		lda L_D20A		;9049 AD 0A D2
		and #$07		;904C 29 07
		cmp #$05		;904E C9 05
		bcc L_9057		;9050 90 05
		lda L_D20A		;9052 AD 0A D2
		and #$03		;9055 29 03
L_9057	sta ZP_52		;9057 85 52
		tay				;9059 A8
		lda ZP_6F		;905A A5 6F
		cmp #$0D		;905C C9 0D
		bcs L_9068		;905E B0 08
		lda L_9077,Y	;9060 B9 77 90
		sta ZP_53		;9063 85 53
		jmp L_909C		;9065 4C 9C 90
L_9068	lda L_9070,Y	;9068 B9 70 90
		sta ZP_53		;906B 85 53
		jmp L_909C		;906D 4C 9C 90
		
L_9070	dta $00,$01,$02,$03,$04,$05,$06
L_9077	dta $19,$18,$17,$16,$15,$14

L_907D	cmp #$03		;907D C9 03
		bne L_90F0		;907F D0 6F
		lda L_0E2B		;9081 AD 2B 0E
		bne L_90F0		;9084 D0 6A
		lda #$00		;9086 A9 00
		sta ZP_50		;9088 85 50
		lda #$03		;908A A9 03
		sta ZP_52		;908C 85 52
		lda #$0B		;908E A9 0B
		sta ZP_53		;9090 85 53
		lda ZP_6F		;9092 A5 6F
		cmp #$0D		;9094 C9 0D
		bcc L_909C		;9096 90 04
		lda #$80		;9098 A9 80
		sta ZP_50		;909A 85 50
L_909C	ldy ZP_CE		;909C A4 CE
		lda L_8402,Y	;909E B9 02 84
		sta L_0E2B		;90A1 8D 2B 0E
		lda L_0E29		;90A4 AD 29 0E
		cmp L_8407,Y	;90A7 D9 07 84
		bcs L_90F0		;90AA B0 44
		lda L_D20A		;90AC AD 0A D2
		cmp L_83FD,Y	;90AF D9 FD 83
		bcs L_90BD		;90B2 B0 09
		lda L_D20A		;90B4 AD 0A D2
		and #$30		;90B7 29 30
		ora ZP_50		;90B9 05 50
		sta ZP_50		;90BB 85 50
L_90BD	jsr L_9189		;90BD 20 89 91
		bcs L_90F0		;90C0 B0 2E
		lda ZP_50		;90C2 A5 50
		sta L_0E5B,X	;90C4 9D 5B 0E
		lda ZP_53		;90C7 A5 53
		sta L_0340,X	;90C9 9D 40 03
		lda ZP_52		;90CC A5 52
		sta L_0EAB,X	;90CE 9D AB 0E
		lda #$01		;90D1 A9 01
		sta L_0E8B,X	;90D3 9D 8B 0E
		clc				;90D6 18
		ldy L_0EAB,X	;90D7 BC AB 0E
		lda L_8042,Y	;90DA B9 42 80
		adc L_0340,X	;90DD 7D 40 03
		tay				;90E0 A8
		lda L_18C7,Y	;90E1 B9 C7 18
		sec				;90E4 38
		sbc #$20		;90E5 E9 20
		sta L_0380,X	;90E7 9D 80 03
		jsr L_9177		;90EA 20 77 91
		inc L_0E29		;90ED EE 29 0E
L_90F0	lda ZP_B9		;90F0 A5 B9
		cmp #$02		;90F2 C9 02
		bne L_9139		;90F4 D0 43
		lda L_0E2C		;90F6 AD 2C 0E
		bne L_9139		;90F9 D0 3E
		jsr L_9189		;90FB 20 89 91
		bcs L_9139		;90FE B0 39
		ldy ZP_CE		;9100 A4 CE
		lda L_840B,Y	;9102 B9 0B 84
		sta L_0E2C		;9105 8D 2C 0E
		lda #$03		;9108 A9 03
		sta L_0EAB,X	;910A 9D AB 0E
		lda #$03		;910D A9 03
		sta L_0E8B,X	;910F 9D 8B 0E
		lda L_8049		;9112 AD 49 80
		sta L_0360,X	;9115 9D 60 03
		lda #$00		;9118 A9 00
		sta L_0340,X	;911A 9D 40 03
		lda #$30		;911D A9 30
		sta L_0380,X	;911F 9D 80 03
		lda #$80		;9122 A9 80
		sta L_0E5B,X	;9124 9D 5B 0E
		lda L_0E2E		;9127 AD 2E 0E
		and #$03		;912A 29 03
		tay				;912C A8
		lda L_8410,Y	;912D B9 10 84
		sta L_0E7B,X	;9130 9D 7B 0E
		inc L_0E2E		;9133 EE 2E 0E
		jsr L_9177		;9136 20 77 91
L_9139	ldx ZP_B9		;9139 A6 B9
		cpx #$03		;913B E0 03
		bne L_9176		;913D D0 37
		lda L_0E2D		;913F AD 2D 0E
		bne L_9176		;9142 D0 32
		lda L_8412,X	;9144 BD 12 84
		sta L_0E2D		;9147 8D 2D 0E
		jsr L_9189		;914A 20 89 91
		bcs L_9176		;914D B0 27
		lda #$02		;914F A9 02
		sta L_0E8B,X	;9151 9D 8B 0E
		lda L_D20A		;9154 AD 0A D2
		bpl L_9161		;9157 10 08
		ldy #$01		;9159 A0 01
		lda ZP_BF		;915B A5 BF
		bmi L_916A		;915D 30 0B
		bpl L_9166		;915F 10 05
L_9161	ldy #$03		;9161 A0 03
		asl @			;9163 0A
		bpl L_916A		;9164 10 04
L_9166	lda #$00		;9166 A9 00
		beq L_916C		;9168 F0 02
L_916A	lda #$19		;916A A9 19
L_916C	sta L_0340,X	;916C 9D 40 03
		tya				;916F 98
		sta L_0EAB,X	;9170 9D AB 0E
		jsr L_9177		;9173 20 77 91
L_9176	rts				;9176 60
L_9177	lda #$00		;9177 A9 00
		sta L_0E4B,X	;9179 9D 4B 0E
		lda ZP_B7		;917C A5 B7
		adc #$80		;917E 69 80
		sta L_0E9B,X	;9180 9D 9B 0E
		lda #$0D		;9183 A9 0D
		sta L_0E3B,X	;9185 9D 3B 0E
		rts				;9188 60
L_9189	clc				;9189 18
		ldx #$0F		;918A A2 0F
L_918C	lda L_0E3B,X	;918C BD 3B 0E
		beq L_9195		;918F F0 04
		dex				;9191 CA
		bne L_918C		;9192 D0 F8
		sec				;9194 38
L_9195	rts				;9195 60
L_9196	pha				;9196 48
		lda ZP_81		;9197 A5 81
		bmi L_91AE		;9199 30 13
		bne L_91A2		;919B D0 05
		lda L_02C4		;919D AD C4 02
		bne L_91A5		;91A0 D0 03
L_91A2	lda L_02C6		;91A2 AD C6 02
L_91A5	eor ZP_4F		;91A5 45 4F
		and ZP_4E		;91A7 25 4E
		inc ZP_81		;91A9 E6 81
		sta L_D018		;91AB 8D 18 D0
L_91AE	pla				;91AE 68
		rti				;91AF 40
L_91B0	pha				;91B0 48
		tya				;91B1 98
		pha				;91B2 48
		ldy ZP_81		;91B3 A4 81
		lda L_180D,Y	;91B5 B9 0D 18
		sta L_D003		;91B8 8D 03 D0
		inc ZP_81		;91BB E6 81
		sta (ZP_B7),Y	;91BD 91 B7
		pla				;91BF 68
		tay				;91C0 A8
		pla				;91C1 68
		rti				;91C2 40
L_91C3	ldx #$01		;91C3 A2 01
		stx ZP_83		;91C5 86 83
		dex				;91C7 CA
		stx ZP_81		;91C8 86 81
		lda ZP_7E		;91CA A5 7E
		sta L_D40E		;91CC 8D 0E D4
		lda L_180C		;91CF AD 0C 18
		sta L_D003		;91D2 8D 03 D0
		lda #$FE		;91D5 A9 FE
		inc ZP_14		;91D7 E6 14
		bne L_91E1		;91D9 D0 06
		inc ZP_13		;91DB E6 13
		;inc ZP_4D		;91DD E6 4D ; attract
		nop
		nop		
		bpl L_91EB		;91DF 10 0A
L_91E1	ldy ZP_4D		;91E1 A4 4D
		bpl L_91EB		;91E3 10 06
		lda #$00
		;lda #$F6		;91E5 A9 F6 ; attract
		sta ZP_4D		;91E7 85 4D
		ldx ZP_13		;91E9 A6 13
L_91EB	sta ZP_4E		;91EB 85 4E
		stx ZP_4F		;91ED 86 4F
		lda ZP_7D		;91EF A5 7D
		bmi L_9203		;91F1 30 10
		dec ZP_7D		;91F3 C6 7D
		bpl L_9203		;91F5 10 0C
		lda ZP_67		;91F7 A5 67
		beq L_9203		;91F9 F0 08
		lda L_0E20		;91FB AD 20 0E
		eor #$FF		;91FE 49 FF
		sta L_0E20		;9200 8D 20 0E
L_9203	ldx #$08		;9203 A2 08
L_9205	lda L_02C0,X	;9205 BD C0 02
		eor ZP_4F		;9208 45 4F
		and ZP_4E		;920A 25 4E
		sta L_D012,X	;920C 9D 12 D0
		dex				;920F CA
		bpl L_9205		;9210 10 F3
		lda L_0230		;9212 AD 30 02
		sta L_D402		;9215 8D 02 D4
		lda L_0231		;9218 AD 31 02
		sta L_D403		;921B 8D 03 D4
		lda ZP_7E		;921E A5 7E
		sta L_D40E		;9220 8D 0E D4
		lda L_D010		;9223 AD 10 D0
		sta L_0284		;9226 8D 84 02
		lda L_D011		;9229 AD 11 D0
		sta L_0285		;922C 8D 85 02
		lda ZP_82		;922F A5 82
		beq L_923E		;9231 F0 0B
		ldx ZP_CD		;9233 A6 CD
		lda L_0284,X	;9235 BD 84 02
		beq L_923E		;9238 F0 04
		lda #$00		;923A A9 00
		sta ZP_82		;923C 85 82
L_923E	lda L_D300		;923E AD 00 D3
		tax				;9241 AA
		and #$0F		;9242 29 0F
		sta L_0278		;9244 8D 78 02
		txa				;9247 8A
		lsr @			;9248 4A
		lsr @			;9249 4A
		lsr @			;924A 4A
		lsr @			;924B 4A
		sta L_0279		;924C 8D 79 02
		lda L_0E20		;924F AD 20 0E
		beq L_925A		;9252 F0 06
		jsr L_B1FA		;9254 20 FA B1 ; pause = no sounds		
		jmp L_E462		;9257 4C 62 E4
L_925A	dec ZP_66		;925A C6 66
		bmi L_9276		;925C 30 18
		ldy ZP_8B		;925E A4 8B
		lda (ZP_7F),Y	;9260 B1 7F
		ldx #$03		;9262 A2 03
		stx ZP_4D		;9264 86 4D
L_9266	lda L_0E2A,X	;9266 BD 2A 0E
		beq L_926E		;9269 F0 03
		dec L_0E2A,X	;926B DE 2A 0E
L_926E	dex				;926E CA
		bpl L_9266		;926F 10 F5
		inc ZP_B7		;9271 E6 B7
		jsr L_9640		;9273 20 40 96
L_9276	jsr L_927E		;9276 20 7E 92 ; original sounds
		inc ZP_66		;9279 E6 66
		jmp my_vbi
		;jmp L_E462		;927B 4C 62 E4
L_927E	lda #$00		;927E A9 00
		sta L_0ECC		;9280 8D CC 0E
		sta L_0ECE		;9283 8D CE 0E
		sta L_0ED0		;9286 8D D0 0E
		sta L_0ED2		;9289 8D D2 0E
		ldx #$0F		;928C A2 0F
		stx L_0E06		;928E 8E 06 0E
L_9291	ldx L_0E06		;9291 AE 06 0E
		lda L_0EBB,X	;9294 BD BB 0E
		beq L_929C		;9297 F0 03
		jsr L_92AD		;9299 20 AD 92
L_929C	dec L_0E06		;929C CE 06 0E
		bpl L_9291		;929F 10 F0
		rts
		ldx #$07		;92A1 A2 07
L_92A3	lda L_0ECB,X	;92A3 BD CB 0E
		sta L_D200,X	;92A6 9D 00 D2
		dex				;92A9 CA
		bpl L_92A3		;92AA 10 F7
		;rts				;92AC 60
L_92AD	clc				;92AD 18
		lda #$BE		;92AE A9 BE
		adc L_B50E,X	;92B0 7D 0E B5
		sta ZP_B2		;92B3 85 B2
		lda #$92		;92B5 A9 92
		adc #$00		;92B7 69 00
		sta ZP_B3		;92B9 85 B3
		jmp (ZP_B2)		;92BB 6C B2 00
L_92BE	lda #$A8		;92BE A9 A8
		sta L_0ECC		;92C0 8D CC 0E
		sta L_0ECE		;92C3 8D CE 0E
		dec L_0E18		;92C6 CE 18 0E
		bpl L_92DF		;92C9 10 14
		dec L_0ECA		;92CB CE CA 0E
		beq L_92F6		;92CE F0 26
		ldx L_0ECA		;92D0 AE CA 0E
		lda L_1C1D,X	;92D3 BD 1D 1C
		sta L_0E18		;92D6 8D 18 0E
		lda L_1C17,X	;92D9 BD 17 1C
		sta L_0ECB		;92DC 8D CB 0E
L_92DF	dec L_0E1A		;92DF CE 1A 0E
		bpl L_92F6		;92E2 10 12
		dec L_0ED6		;92E4 CE D6 0E
		ldx L_0ED6		;92E7 AE D6 0E
		lda L_1C3D,X	;92EA BD 3D 1C
		sta L_0E1A		;92ED 8D 1A 0E
		lda L_1C23,X	;92F0 BD 23 1C
		sta L_0ECD		;92F3 8D CD 0E
L_92F6	rts				;92F6 60
L_92F7	ldx #$00		;92F7 A2 00
		ldy #$DE		;92F9 A0 DE
		lda #$B4		;92FB A9 B4
		jsr L_93B7		;92FD 20 B7 93
		ldx #$02		;9300 A2 02
		ldy #$E6		;9302 A0 E6
		lda #$B4		;9304 A9 B4
		jsr L_93B7		;9306 20 B7 93
		sta L_0EC9		;9309 8D C9 0E
		rts				;930C 60
L_930D	ldx #$00		;930D A2 00
		ldy #$EE		;930F A0 EE
		lda #$B4		;9311 A9 B4
		jsr L_93B7		;9313 20 B7 93
		ldx #$02		;9316 A2 02
		ldy #$F6		;9318 A0 F6
		lda #$B4		;931A A9 B4
		jsr L_93B7		;931C 20 B7 93
		sta L_0EC6		;931F 8D C6 0E
		rts				;9322 60
L_9323	dec L_0EBB,X	;9323 DE BB 0E
		lda L_B52E,X	;9326 BD 2E B5
		sta ZP_AA		;9329 85 AA
		lda L_B51E,X	;932B BD 1E B5
		sta ZP_AB		;932E 85 AB
		lda L_B54E,X	;9330 BD 4E B5
		sta ZP_AC		;9333 85 AC
		lda L_B53E,X	;9335 BD 3E B5
		sta ZP_AD		;9338 85 AD
		ldy L_0EBB,X	;933A BC BB 0E
		lda L_B55E,X	;933D BD 5E B5
		tax				;9340 AA
		lda (ZP_AA),Y	;9341 B1 AA
		sta L_0ECB,X	;9343 9D CB 0E
		lda (ZP_AC),Y	;9346 B1 AC
		sta L_0ECC,X	;9348 9D CC 0E
		ldx L_0E06		;934B AE 06 0E
		rts				;934E 60
L_934F	lda L_0ED7		;934F AD D7 0E
		sta L_0ECF		;9352 8D CF 0E
		lda L_0ED8		;9355 AD D8 0E
		sta L_0ED0		;9358 8D D0 0E
		inc L_0ED5		;935B EE D5 0E
		lda L_0ED5		;935E AD D5 0E
		and #$07		;9361 29 07
		bne L_9368		;9363 D0 03
		inc L_0ED8		;9365 EE D8 0E
L_9368	inc L_0ED7		;9368 EE D7 0E
		sec				;936B 38
		lda L_0ED7		;936C AD D7 0E
		sbc #$66		;936F E9 66
		bne L_9376		;9371 D0 03		
		jmp rmt_trampoline_fall_end
		;sta L_0EC0		;9373 8D C0 0E
L_9376	rts				;9376 60
L_9377	ldx #$04		;9377 A2 04
		ldy #$FE		;9379 A0 FE
		lda #$B4		;937B A9 B4
		jsr L_93B7		;937D 20 B7 93
		ldx #$06		;9380 A2 06
		ldy #$06		;9382 A0 06
		lda #$B5		;9384 A9 B5
		jsr L_93B7		;9386 20 B7 93
		sta L_0EBE		;9389 8D BE 0E
		rts				;938C 60
L_938D	ldx #$02		;938D A2 02
L_938F	inc L_0E06,X	;938F FE 06 0E
		bmi L_93A7		;9392 30 13
		ldy L_0E06,X	;9394 BC 06 0E
		cpy #$45		;9397 C0 45
		bcs L_93AE		;9399 B0 13
		lda L_1FDB,Y	;939B B9 DB 1F
		sta L_0ECB,X	;939E 9D CB 0E
		lda L_1DA7,Y	;93A1 B9 A7 1D
		sta L_0ECC,X	;93A4 9D CC 0E
L_93A7	inx				;93A7 E8
		inx				;93A8 E8
		cpx #$08		;93A9 E0 08
		bcc L_938F		;93AB 90 E2
		rts				;93AD 60
L_93AE	txa				;93AE 8A
		sbc #$06		;93AF E9 06
		sta L_0EC1		;93B1 8D C1 0E
		jmp L_93A7		;93B4 4C A7 93
L_93B7	dec L_0E18,X	;93B7 DE 18 0E
		bpl L_93E6		;93BA 10 2A
		sty ZP_B2		;93BC 84 B2
		sta ZP_B3		;93BE 85 B3
		ldy #$07		;93C0 A0 07
L_93C2	lda (ZP_B2),Y	;93C2 B1 B2
		sta ZP_AA,Y		;93C4 99 AA 00
		dey				;93C7 88
		bpl L_93C2		;93C8 10 F8
		dec L_0E07,X	;93CA DE 07 0E
		bmi L_9404		;93CD 30 35
		ldy L_0E07,X	;93CF BC 07 0E
		lda (ZP_AA),Y	;93D2 B1 AA
		sta L_0E0F,X	;93D4 9D 0F 0E
		lda (ZP_AC),Y	;93D7 B1 AC
		sta L_0E10,X	;93D9 9D 10 0E
		lda (ZP_AE),Y	;93DC B1 AE
		sta L_0E18,X	;93DE 9D 18 0E
		lda (ZP_B0),Y	;93E1 B1 B0
		sta L_0E17,X	;93E3 9D 17 0E
L_93E6	dec L_0E17,X	;93E6 DE 17 0E
		bpl L_93F5		;93E9 10 0A
		lda L_0E10,X	;93EB BD 10 0E
		and #$0F		;93EE 29 0F
		beq L_93F5		;93F0 F0 03
		dec L_0E10,X	;93F2 DE 10 0E
L_93F5	lda L_0E0F,X	;93F5 BD 0F 0E
		sta L_0ECB,X	;93F8 9D CB 0E
		lda L_0E10,X	;93FB BD 10 0E
		sta L_0ECC,X	;93FE 9D CC 0E
		lda ZP_09		;9401 A5 09
		rts				;9403 60
L_9404	lda #$00		;9404 A9 00
		rts				;9406 60
L_9407	lda #$00		;9407 A9 00
		ldx #$00		;9409 A2 00
		jsr L_AC31		;940B 20 31 AC
		lda #$05		;940E A9 05
		sta ZP_53		;9410 85 53
		jsr L_96C8		;9412 20 C8 96
		lda #$9C		;9415 A9 9C
		sta ZP_96		;9417 85 96
		lda #$BE		;9419 A9 BE
		ldx #$88		;941B A2 88
		ldy #$23		;941D A0 23
		jsr L_A979		;941F 20 79 A9
		ldy #$1D		;9422 A0 1D
		sty L_1826		;9424 8C 26 18
		ldx #$18		;9427 A2 18
		stx L_1825		;9429 8E 25 18
		jsr L_8E14		;942C 20 14 8E		
		jmp rmt_bending	
		lda #$07		;942F A9 07		
		;sta L_0ECA		;9431 8D CA 0E
		lda #$1B		;9434 A9 1B
		sta L_0ED6		;9436 8D D6 0E
		inc ZP_66		;9439 E6 66
L_943B	lda L_0ECA		;943B AD CA 0E
		bne L_943B		;943E D0 FB
L_9440	jsr L_AFF4		;9440 20 F4 AF
		lda #$04		;9443 A9 04
		sta ZP_C9		;9445 85 C9
		lda #$04		;9447 A9 04
		sta ZP_53		;9449 85 53
L_944B	lda #$08		;944B A9 08
		sta ZP_C8		;944D 85 C8
		lda #$01		;944F A9 01
		ldx #$02		;9451 A2 02
		jsr L_953D		;9453 20 3D 95
		lda #$18		;9456 A9 18
		jmp rmt_bending_sfx
		;sta L_0EBC		;9458 8D BC 0E
L_945B	jsr L_96C8		;945B 20 C8 96
		ldx ZP_53		;945E A6 53
		jsr L_AEC7		;9460 20 C7 AE
		lda #$1A		;9463 A9 1A
		ldx #$00		;9465 A2 00
		ldy ZP_53		;9467 A4 53
		dec ZP_53		;9469 C6 53
		jsr L_ADF4		;946B 20 F4 AD
		dec ZP_C9		;946E C6 C9
		bpl L_944B		;9470 10 D9
		lda #$21		;9472 A9 21
		jsr L_B1E0		;9474 20 E0 B1
		lda #$80		;9477 A9 80
		jsr L_8E1B		;9479 20 1B 8E
		lda #$C0		;947C A9 C0
		jsr L_8E1B		;947E 20 1B 8E
L_9481	jsr rmt_growl
		;lda #$03		;9481 A9 03
		;sta ZP_C9		;9483 85 C9
		jmp L_9493
L_9485	lda #$11		;9485 A9 11
		sta L_0EBF		;9487 8D BF 0E
		;lda #$2E		;948A A9 2E
		jsr L_B1E0		;948C 20 E0 B1
		dec ZP_C9		;948F C6 C9
		bne L_9485		;9491 D0 F2
L_9493	lda #$00		;9493 A9 00
		sta ZP_66		;9495 85 66
		jmp L_B1E8		;9497 4C E8 B1
L_949A	cpx #$03		;949A E0 03
		bne L_94A2		;949C D0 04
		lda #$7C		;949E A9 7C
		sta ZP_6B		;94A0 85 6B
L_94A2	jmp rmt_save
		;lda L_9539,X	;94A2 BD 39 95
L_94A5	jsr L_A6B1		;94A5 20 B1 A6
		dec ZP_69		;94A8 C6 69
		jsr L_8D45		;94AA 20 45 8D
		lda #$5E		;94AD A9 5E
		sta ZP_96		;94AF 85 96
		lda #$B6		;94B1 A9 B6
		ldx ZP_6B		;94B3 A6 6B
		ldy #$00		;94B5 A0 00
		jsr L_A979		;94B7 20 79 A9
		lda ZP_B9		;94BA A5 B9
		cmp #$03		;94BC C9 03
		beq L_94C3		;94BE F0 03
		jsr L_951C		;94C0 20 1C 95
L_94C3	lda ZP_B9		;94C3 A5 B9
		bne L_94D7		;94C5 D0 10
		lda #$9C		;94C7 A9 9C
		sta ZP_96		;94C9 85 96
		lda #$BE		;94CB A9 BE
		ldy #$2B		;94CD A0 2B
		ldx #$18		;94CF A2 18
		jsr L_B124		;94D1 20 24 B1
		jsr L_952B		;94D4 20 2B 95
L_94D7	ldx #$01		;94D7 A2 01
L_94D9	lda #$04		;94D9 A9 04
		sta L_0EBE		;94DB 8D BE 0E
		sta L_0E0B		;94DE 8D 0B 0E
		sta L_0E0D		;94E1 8D 0D 0E
		lda #$2D		;94E4 A9 2D
		jsr L_B1E0		;94E6 20 E0 B1
		dex				;94E9 CA
		bpl L_94D9		;94EA 10 ED
		lda ZP_B9		;94EC A5 B9
		bne L_94F6		;94EE D0 06
		jsr L_952B		;94F0 20 2B 95
		jmp L_94FD		;94F3 4C FD 94
L_94F6	cmp #$03		;94F6 C9 03
		bne L_94FD		;94F8 D0 03
		jsr L_951C		;94FA 20 1C 95
L_94FD	lda #$72		;94FD A9 72
		sta ZP_96		;94FF 85 96
		lda #$B6		;9501 A9 B6
		sta ZP_97		;9503 85 97
		ldx ZP_6B		;9505 A6 6B
		ldy #$00		;9507 A0 00
		jsr L_A973		;9509 20 73 A9
		inc ZP_6E		;950C E6 6E
		jsr L_A6B3		;950E 20 B3 A6
		jsr L_96E1		;9511 20 E1 96
		lda #$E9		;9514 A9 E9
		jsr L_8E1B		;9516 20 1B 8E
		jmp L_9481		;9519 4C 81 94
L_951C	ldx L_1823		;951C AE 23 18
		ldy L_1824		;951F AC 24 18
		lda #$9C		;9522 A9 9C
		sta ZP_A3		;9524 85 A3
		lda #$BE		;9526 A9 BE
		jmp L_AAB7		;9528 4C B7 AA
L_952B	ldy L_1824		;952B AC 24 18
		ldx #$58		;952E A2 58
		lda #$2B		;9530 A9 2B
		sta ZP_A3		;9532 85 A3
		lda #$18		;9534 A9 18
		jmp L_AAB7		;9536 4C B7 AA
		
L_9539	dta $10,$10,$0D,$0D

L_953D	stx ZP_CA		;953D 86 CA
		sta L_0E1F		;953F 8D 1F 0E
L_9542	lda L_0E1F		;9542 AD 1F 0E
		bne L_9542		;9545 D0 FB
		rts				;9547 60
L_9548	lda #$14
		;lda #$0F		;9548 A9 0F
		sta L_0EC6		;954A 8D C6 0E
		sta L_0E07		;954D 8D 07 0E
		jmp rmt_girders
		;sta L_0E09		;9550 8D 09 0E
L_9553	lda #$F8		;9553 A9 F8
		sta ZP_96		;9555 85 96
		lda #$96		;9557 A9 96
		ldx #$28		;9559 A2 28
		ldy #$09		;955B A0 09
		jsr L_A9F8		;955D 20 F8 A9
		lda #$04		;9560 A9 04
		sta ZP_55		;9562 85 55
		lda #$BA		;9564 A9 BA
		sta ZP_54		;9566 85 54
		lda #$8C		;9568 A9 8C
		sta ZP_96		;956A 85 96
		lda #$B5		;956C A9 B5
		sta ZP_97		;956E 85 97
L_9570	ldx #$2E		;9570 A2 2E
		stx ZP_56		;9572 86 56
		ldx #$0C		;9574 A2 0C
		stx ZP_57		;9576 86 57
L_9578	ldx ZP_56		;9578 A6 56
		ldy ZP_54		;957A A4 54
		jsr L_A97B		;957C 20 7B A9
		clc				;957F 18
		lda ZP_56		;9580 A5 56
		adc #$06		;9582 69 06
		sta ZP_56		;9584 85 56
		dec ZP_57		;9586 C6 57
		bne L_9578		;9588 D0 EE
		sec				;958A 38
		lda ZP_54		;958B A5 54
		sbc #$06		;958D E9 06
		sta ZP_54		;958F 85 54
		dec ZP_55		;9591 C6 55
		bne L_9570		;9593 D0 DB
		lda #$00		;9595 A9 00
		sta L_0E39		;9597 8D 39 0E
		sta ZP_52		;959A 85 52
		lda #$EF		;959C A9 EF
		jsr L_8E1B		;959E 20 1B 8E
		lda #$1E		;95A1 A9 1E
		jsr L_B1E0		;95A3 20 E0 B1
		jmp L_95C0		;95A6 4C C0 95
L_95A9	ldx ZP_52		;95A9 A6 52
		lda L_963E,X	;95AB BD 3E 96
		dex				;95AE CA
		bpl L_95B3		;95AF 10 02
		ldx #$01		;95B1 A2 01
L_95B3	stx ZP_52		;95B3 86 52		
		jsr L_8E1B		;95B5 20 1B 8E
		ldx ZP_52		;95B8 A6 52
		lda L_963E,X	;95BA BD 3E 96
		jmp rmt_chest_lo_hi
		;jsr L_8E1B		;95BD 20 1B 8E
L_95C0	lda #$0F		;95C0 A9 0F
		jsr L_B1E0		;95C2 20 E0 B1
		lda L_0EC6		;95C5 AD C6 0E
		bne L_95A9		;95C8 D0 DF
		lda L_0E39		;95CA AD 39 0E
		jsr L_8E1B		;95CD 20 1B 8E
		lda #$A9		;95D0 A9 A9
		jsr L_8E1B		;95D2 20 1B 8E
		clc				;95D5 18
		lda L_1826		;95D6 AD 26 18
		adc #$3E		;95D9 69 3E
		sta ZP_8E		;95DB 85 8E
		lda #$1F		;95DD A9 1F
		sta ZP_91		;95DF 85 91
L_95E1	lda #$06		;95E1 A9 06
		sta ZP_92		;95E3 85 92
		ldy L_1826		;95E5 AC 26 18
		lda L_1100,Y	;95E8 B9 00 11
		sta ZP_97		;95EB 85 97
		lda L_1000,Y	;95ED B9 00 10
		sta ZP_96		;95F0 85 96
		ldy ZP_8E		;95F2 A4 8E
		lda L_1100,Y	;95F4 B9 00 11
		sta ZP_95		;95F7 85 95
		lda L_1000,Y	;95F9 B9 00 10
		sta ZP_94		;95FC 85 94
		ldy #$12		;95FE A0 12
L_9600	lda (ZP_96),Y	;9600 B1 96
		sta (ZP_94),Y	;9602 91 94
		lda #$00		;9604 A9 00
		sta (ZP_96),Y	;9606 91 96
		iny				;9608 C8
		dec ZP_92		;9609 C6 92
		bne L_9600		;960B D0 F3
		dec ZP_8E		;960D C6 8E
		inc L_1826		;960F EE 26 18
		dec ZP_91		;9612 C6 91
		bne L_95E1		;9614 D0 CB
		inc ZP_66		;9616 E6 66
		lda #$16		;9618 A9 16
		sta L_0ED7		;961A 8D D7 0E
		lda #$A3		;961D A9 A3
		sta L_0ED8		;961F 8D D8 0E
		ldx #$00		;9622 A2 00
		stx L_0ED5		;9624 8E D5 0E
		inx				;9627 E8
		inx				;9628 E8
		jmp rmt_fall_donkey
		;stx L_0EC0		;9629 8E C0 0E
L_962C	txa				;962C 8A
		jsr L_953D		;962D 20 3D 95
		lda #$18		;9630 A9 18
		jmp rmt_fall_donkey_end
		;sta L_0EBC		;9632 8D BC 0E
L_9635	lda #$3C		;9635 A9 3C
		jsr L_B1E0		;9637 20 E0 B1
		jmp L_9493		;963A 4C 93 94
L_963D	rts				;963D 60

L_963E	dta $2F,$3A

L_9640	ldx L_0E1F		;9640 AE 1F 0E
		beq L_963D		;9643 F0 F8
		dec ZP_CA		;9645 C6 CA
		bpl L_963D		;9647 10 F4
		dex				;9649 CA
		bne L_966B		;964A D0 1F
		dec ZP_C8		;964C C6 C8
		bmi L_9674		;964E 30 24
		jsr L_96E1		;9650 20 E1 96
		ldx ZP_C8		;9653 A6 C8
		ldy L_96F0,X	;9655 BC F0 96
		sty L_1826		;9658 8C 26 18
		ldx L_1825		;965B AE 25 18
		inx				;965E E8
		inx				;965F E8
		stx L_1825		;9660 8E 25 18
		jsr L_8E14		;9663 20 14 8E
		ldx #$02		;9666 A2 02
L_9668	stx ZP_CA		;9668 86 CA
		rts				;966A 60
L_966B	ldy L_1826		;966B AC 26 18
		iny				;966E C8
		iny				;966F C8
		cpy #$89		;9670 C0 89
		bcc L_967A		;9672 90 06
L_9674	lda #$00		;9674 A9 00
		sta L_0E1F		;9676 8D 1F 0E
		rts				;9679 60
L_967A	sty L_1826		;967A 8C 26 18
		tya				;967D 98
		adc #$1F		;967E 69 1F
		sta ZP_8E		;9680 85 8E
		tay				;9682 A8
		dey				;9683 88
		dey				;9684 88
		sty ZP_50		;9685 84 50
		lda #$20		;9687 A9 20
		sta ZP_91		;9689 85 91
L_968B	lda #$06		;968B A9 06
		sta ZP_92		;968D 85 92
		ldy ZP_50		;968F A4 50
		lda L_1100,Y	;9691 B9 00 11
		sta ZP_97		;9694 85 97
		lda L_1000,Y	;9696 B9 00 10
		sta ZP_96		;9699 85 96
		ldy ZP_8E		;969B A4 8E
		lda L_1100,Y	;969D B9 00 11
		sta ZP_95		;96A0 85 95
		lda L_1000,Y	;96A2 B9 00 10
		sta ZP_94		;96A5 85 94
		ldy #$12		;96A7 A0 12
L_96A9	lda (ZP_96),Y	;96A9 B1 96
		sta (ZP_94),Y	;96AB 91 94
		lda ZP_91		;96AD A5 91
		cmp #$03		;96AF C9 03
		bcs L_96B7		;96B1 B0 04
		lda #$00		;96B3 A9 00
		sta (ZP_96),Y	;96B5 91 96
L_96B7	iny				;96B7 C8
		dec ZP_92		;96B8 C6 92
		bne L_96A9		;96BA D0 ED
		dec ZP_8E		;96BC C6 8E
		dec ZP_50		;96BE C6 50
		dec ZP_91		;96C0 C6 91
		bne L_968B		;96C2 D0 C7
		ldx #$01		;96C4 A2 01
		bne L_9668		;96C6 D0 A0
L_96C8	lda #$28		;96C8 A9 28
		sta ZP_54		;96CA 85 54
		lda #$06		;96CC A9 06
		sta ZP_55		;96CE 85 55
		lda #$54		;96D0 A9 54
		sta ZP_96		;96D2 85 96
		ldy ZP_53		;96D4 A4 53
		ldx L_8042,Y	;96D6 BE 42 80
		ldy L_18C7,X	;96D9 BC C7 18
		lda #$00		;96DC A9 00
		tax				;96DE AA
		beq L_96ED		;96DF F0 0C
L_96E1	lda #$DA		;96E1 A9 DA
		sta ZP_96		;96E3 85 96
		lda #$BD		;96E5 A9 BD
		ldy L_1826		;96E7 AC 26 18
		ldx L_1825		;96EA AE 25 18
L_96ED	jmp L_A9F8		;96ED 4C F8 A9

L_96F0	dta $1D,$1A,$18,$17,$16,$17,$18,$1A,$15,$B6

L_96FA	ldx ZP_84		;96FA A6 84
		stx ZP_8D		;96FC 86 8D
		inx				;96FE E8
		cpx #$10		;96FF E0 10
		bcc L_9705		;9701 90 02
		ldx #$01		;9703 A2 01
L_9705	stx ZP_84		;9705 86 84
L_9707	lda ZP_83		;9707 A5 83
		beq L_9710		;9709 F0 05
L_970B	lda ZP_8D		;970B A5 8D
		sta ZP_84		;970D 85 84
		rts				;970F 60
L_9710	ldx ZP_8D		;9710 A6 8D
		cpx ZP_84		;9712 E4 84
		beq L_970B		;9714 F0 F5
		lda L_0E3B,X	;9716 BD 3B 0E
		and #$01		;9719 29 01
		bne L_9720		;971B D0 03
		jmp L_972A		;971D 4C 2A 97
L_9720	sec				;9720 38
		lda ZP_B7		;9721 A5 B7
		sbc L_0E9B,X	;9723 FD 9B 0E
		cmp #$02		;9726 C9 02
		bcs L_9735		;9728 B0 0B
L_972A	ldx ZP_8D		;972A A6 8D
		dex				;972C CA
		bne L_9731		;972D D0 02
		ldx #$0F		;972F A2 0F
L_9731	stx ZP_8D		;9731 86 8D
		bne L_9707		;9733 D0 D2
L_9735	lda L_0E3B,X	;9735 BD 3B 0E
		sta ZP_86		;9738 85 86
		lda L_0E5B,X	;973A BD 5B 0E
		sta ZP_85		;973D 85 85
		lda L_0E6B,X	;973F BD 6B 0E
		sta ZP_89		;9742 85 89
		lda L_0EAB,X	;9744 BD AB 0E
		sta ZP_88		;9747 85 88
		lda L_0380,X	;9749 BD 80 03
		sta ZP_8A		;974C 85 8A
		lda L_0360,X	;974E BD 60 03
		sta ZP_8B		;9751 85 8B
		lda L_0340,X	;9753 BD 40 03
		sta ZP_87		;9756 85 87
		lda L_0E4B,X	;9758 BD 4B 0E
		sta ZP_8C		;975B 85 8C
		lda ZP_B7		;975D A5 B7
		sta L_0E9B,X	;975F 9D 9B 0E
		clc				;9762 18
		ldy L_0EAB,X	;9763 BC AB 0E
		lda L_0340,X	;9766 BD 40 03
		adc L_8042,Y	;9769 79 42 80
		sta ZP_5A		;976C 85 5A
		tay				;976E A8
		lda #$00		;976F A9 00
		sta L_19FF,Y	;9771 99 FF 19
		ldy L_0E8B,X	;9774 BC 8B 0E
		jsr L_9811		;9777 20 11 98
		pha				;977A 48
		ldx ZP_8D		;977B A6 8D
		lda ZP_85		;977D A5 85
		sta L_0E5B,X	;977F 9D 5B 0E
		lda ZP_89		;9782 A5 89
		sta L_0E6B,X	;9784 9D 6B 0E
		lda ZP_88		;9787 A5 88
		sta L_0EAB,X	;9789 9D AB 0E
		lda ZP_8A		;978C A5 8A
		sta L_0380,X	;978E 9D 80 03
		lda ZP_8B		;9791 A5 8B
		sta L_0360,X	;9793 9D 60 03
		lda ZP_87		;9796 A5 87
		sta L_0340,X	;9798 9D 40 03
		lda ZP_8C		;979B A5 8C
		sta L_0E4B,X	;979D 9D 4B 0E
		lda ZP_86		;97A0 A5 86
		sta L_0E3B,X	;97A2 9D 3B 0E
		beq L_97B6		;97A5 F0 0F
		clc				;97A7 18
		ldy L_0EAB,X	;97A8 BC AB 0E
		lda L_0340,X	;97AB BD 40 03
		adc L_8042,Y	;97AE 79 42 80
		tay				;97B1 A8
		txa				;97B2 8A
		sta L_19FF,Y	;97B3 99 FF 19
L_97B6	pla				;97B6 68
		bne L_97BC		;97B7 D0 03
		jmp L_972A		;97B9 4C 2A 97
L_97BC	lda ZP_86		;97BC A5 86
		and #$04		;97BE 29 04
		bne L_97E0		;97C0 D0 1E
		lda L_03B0,X	;97C2 BD B0 03
		sta ZP_5C		;97C5 85 5C
		lda L_0390,X	;97C7 BD 90 03
		ldy L_03A0,X	;97CA BC A0 03
		jsr L_981A		;97CD 20 1A 98
		ldx ZP_8D		;97D0 A6 8D
		lda L_0E3B,X	;97D2 BD 3B 0E
		tay				;97D5 A8
		and #$08		;97D6 29 08
		beq L_97E0		;97D8 F0 06
		tya				;97DA 98
		ora #$04		;97DB 09 04
		sta L_0E3B,X	;97DD 9D 3B 0E
L_97E0	lda ZP_8B		;97E0 A5 8B
		sta L_0390,X	;97E2 9D 90 03
		lda ZP_8A		;97E5 A5 8A
		sta L_03A0,X	;97E7 9D A0 03
		lda ZP_89		;97EA A5 89
		sta L_03B0,X	;97EC 9D B0 03
		lda L_0E3B,X	;97EF BD 3B 0E
		tay				;97F2 A8
		and #$08		;97F3 29 08
		bne L_97FE		;97F5 D0 07
		tya				;97F7 98
		and #$F3		;97F8 29 F3
		sta L_0E3B,X	;97FA 9D 3B 0E
		tay				;97FD A8
L_97FE	tya				;97FE 98
		and #$08		;97FF 29 08
		bne L_980E		;9801 D0 0B
		lda ZP_89		;9803 A5 89
		sta ZP_5C		;9805 85 5C
		lda ZP_8B		;9807 A5 8B
		ldy ZP_8A		;9809 A4 8A
		jsr L_981A		;980B 20 1A 98
L_980E	jmp L_972A		;980E 4C 2A 97
L_9811	lda L_8014,Y	;9811 B9 14 80
		pha				;9814 48
		lda L_8010,Y	;9815 B9 10 80
		pha				;9818 48
		rts				;9819 60
L_981A	sta ZP_5B		;981A 85 5B
		sty ZP_A1		;981C 84 A1
		and #$03		;981E 29 03
		asl @			;9820 0A
		sta ZP_5A		;9821 85 5A
		lda ZP_5C		;9823 A5 5C
		asl @			;9825 0A
		asl @			;9826 0A
		asl @			;9827 0A
		ora ZP_5A		;9828 05 5A
		tay				;982A A8
		lda L_8420,Y	;982B B9 20 84
		sta ZP_A3		;982E 85 A3
		lda L_8421,Y	;9830 B9 21 84
		sta ZP_A4		;9833 85 A4
		ldx ZP_5B		;9835 A6 5B
		ldy ZP_A1		;9837 A4 A1
		jmp L_AAB9		;9839 4C B9 AA
L_983C	jmp (ZP_5C)		;983C 6C 5C 00
L_983F	ldx ZP_8D		;983F A6 8D
		lda ZP_8B		;9841 A5 8B
		cmp L_0390,X	;9843 DD 90 03
		bne L_9852		;9846 D0 0A
		lda ZP_8A		;9848 A5 8A
		cmp L_03A0,X	;984A DD A0 03
		bne L_9852		;984D D0 03
		lda #$00		;984F A9 00
		rts				;9851 60
L_9852	lda ZP_09		;9852 A5 09
		rts				;9854 60
L_9855	clc				;9855 18
		ldy ZP_5A		;9856 A4 5A
		adc L_18C7,Y	;9858 79 C7 18
		sta ZP_8A		;985B 85 8A
		ldy ZP_87		;985D A4 87
		lda L_8049,Y	;985F B9 49 80
		sta ZP_8B		;9862 85 8B
		lda ZP_86		;9864 A5 86
		and #$F7		;9866 29 F7
		sta ZP_86		;9868 85 86
		rts				;986A 60
L_986B	ldy ZP_5A		;986B A4 5A
		lda L_182B,Y	;986D B9 2B 18
		and #$38		;9870 29 38
		beq L_9882		;9872 F0 0E
		pha				;9874 48
		ldy ZP_87		;9875 A4 87
		lda ZP_8B		;9877 A5 8B
		sec				;9879 38
		sbc L_8049,Y	;987A F9 49 80
		cmp #$02		;987D C9 02
		pla				;987F 68
		bcc L_989A		;9880 90 18
L_9882	ldy ZP_5A		;9882 A4 5A
		lda L_182C,Y	;9884 B9 2C 18
		and #$38		;9887 29 38
		beq L_989B		;9889 F0 10
		pha				;988B 48
		sec				;988C 38
		ldy ZP_87		;988D A4 87
		iny				;988F C8
		lda L_8049,Y	;9890 B9 49 80
		sbc ZP_8B		;9893 E5 8B
		cmp #$02		;9895 C9 02
		pla				;9897 68
		bcs L_989B		;9898 B0 01
L_989A	rts				;989A 60
L_989B	sec				;989B 38
		rts				;989C 60
L_989D  lda ZP_86		;989D A5 86
		tay				;989F A8
		and #$04		;98A0 29 04
		beq L_98F5		;98A2 F0 51
		lda #$00		;98A4 A9 00
		sta ZP_86		;98A6 85 86
		dec L_0E27		;98A8 CE 27 0E
		tya				;98AB 98
		bpl L_98F2		;98AC 10 44
		lda ZP_68		;98AE A5 68
		bne L_98D6		;98B0 D0 24
		jmp rmt_hammer
		nop
		;lda ZP_8B		;98B2 A5 8B
		;sta ZP_C3		;98B4 85 C3
L_98B6	lda ZP_8A		;98B6 A5 8A
		sta ZP_C4		;98B8 85 C4
		lda #$0E		;98BA A9 0E
		sta ZP_C1		;98BC 85 C1
		lda #$00		;98BE A9 00
		sta ZP_C2		;98C0 85 C2
		inc ZP_68		;98C2 E6 68
		lda #$FF		;98C4 A9 FF
		sta L_0EC1		;98C6 8D C1 0E
		sta L_0E08		;98C9 8D 08 0E
		lda #$F4		;98CC A9 F4
		sta L_0E0A		;98CE 8D 0A 0E
		lda #$EF		;98D1 A9 EF
		sta L_0E0C		;98D3 8D 0C 0E
L_98D6	lda #$81		;98D6 A9 81
		ldy ZP_89		;98D8 A4 89
		bpl L_98EF		;98DA 10 13
		ldy L_0E8B,X	;98DC BC 8B 0E
		lda L_98FC,Y	;98DF B9 FC 98
		bmi L_98EF		;98E2 30 0B
		lda L_D20A		;98E4 AD 0A D2
		and #$03		;98E7 29 03
		bne L_98ED		;98E9 D0 02
		adc #$01		;98EB 69 01
L_98ED	ora #$80		;98ED 09 80
L_98EF	jsr L_8B5C		;98EF 20 5C 8B
L_98F2	lda #$00		;98F2 A9 00
		rts				;98F4 60
L_98F5	lda ZP_86		;98F5 A5 86
		ora #$08		;98F7 09 08
		sta ZP_86		;98F9 85 86
		rts				;98FB 60
		
L_98FC	dta $80,$00,$00,$00,$00

L_9901	sta ZP_5C		;9901 85 5C
		sty ZP_5D		;9903 84 5D
		lda ZP_85		;9905 A5 85
		bmi L_9921		;9907 30 18
		sec				;9909 38
		lda L_0350,X	;990A BD 50 03
		sbc ZP_5C		;990D E5 5C
		sta L_0350,X	;990F 9D 50 03
		lda ZP_8B		;9912 A5 8B
		sbc ZP_5D		;9914 E5 5D
		cmp #$A0		;9916 C9 A0
		bcc L_991C		;9918 90 02
		lda #$00		;991A A9 00
L_991C	sta ZP_8B		;991C 85 8B
		jmp L_9936		;991E 4C 36 99
L_9921	clc				;9921 18
		lda L_0350,X	;9922 BD 50 03
		adc ZP_5C		;9925 65 5C
		sta L_0350,X	;9927 9D 50 03
		lda ZP_8B		;992A A5 8B
		adc ZP_5D		;992C 65 5D
		cmp #$A0		;992E C9 A0
		bcc L_9934		;9930 90 02
		lda #$9F		;9932 A9 9F
L_9934	sta ZP_8B		;9934 85 8B
L_9936	ldy ZP_87		;9936 A4 87
		jsr L_994A		;9938 20 4A 99
		ldx ZP_8D		;993B A6 8D
		tya				;993D 98
		sta ZP_87		;993E 85 87
		clc				;9940 18
		ldy ZP_88		;9941 A4 88
		adc L_8042,Y	;9943 79 42 80
		sta ZP_5A		;9946 85 5A
		tay				;9948 A8
		rts				;9949 60
L_994A	cmp #$D0		;994A C9 D0
		bcs L_9974		;994C B0 26
		cmp #$A0		;994E C9 A0
		bcs L_9971		;9950 B0 1F
		tax				;9952 AA
L_9953	cpy #$9A		;9953 C0 9A
		bcs L_9974		;9955 B0 1D
		cpy #$1A		;9957 C0 1A
		bcs L_9971		;9959 B0 16
		txa				;995B 8A
		cmp L_8049,Y	;995C D9 49 80
		bcs L_9965		;995F B0 04
		dey				;9961 88
		jmp L_9953		;9962 4C 53 99
L_9965	sec				;9965 38
		sbc L_8049,Y	;9966 F9 49 80
		cmp #$06		;9969 C9 06
		bcc L_9973		;996B 90 06
		iny				;996D C8
		jmp L_9953		;996E 4C 53 99
L_9971	ldy #$19		;9971 A0 19
L_9973	rts				;9973 60
L_9974	ldy #$00		;9974 A0 00
		rts				;9976 60
L_9977	cpy #$03		;9977 C0 03
		beq L_9984		;9979 F0 09
		dey				;997B 88
L_997C	bne L_9996		;997C D0 18
		lda ZP_BF		;997E A5 BF
		bmi L_9991		;9980 30 0F
		bpl L_998C		;9982 10 08
L_9984	cmp #$D0		;9984 C9 D0
		bcs L_998C		;9986 B0 04
		cmp #$4C		;9988 C9 4C
		bcs L_9991		;998A B0 05
L_998C	lda #$60		;998C A9 60
		ldy #$00		;998E A0 00
		rts				;9990 60
L_9991	lda #$A0		;9991 A9 A0
		ldy #$FF		;9993 A0 FF
		rts				;9995 60
L_9996	lda #$00		;9996 A9 00
		rts				;9998 60
L_9999	lda ZP_8C		;9999 A5 8C
		cmp #$05		;999B C9 05
		beq L_99BD		;999D F0 1E
		lda ZP_86		;999F A5 86
		bmi L_99B0		;99A1 30 0D
		lda ZP_69		;99A3 A5 69
		bpl L_99BD		;99A5 10 16
		lda ZP_73		;99A7 A5 73
		cmp #$0F		;99A9 C9 0F
		bcc L_99B0		;99AB 90 03
		lda #$00		;99AD A9 00
		rts				;99AF 60
L_99B0	lda ZP_86		;99B0 A5 86
		ora #$08		;99B2 09 08
		sta ZP_86		;99B4 85 86
		lda #$05		;99B6 A9 05
		sta ZP_8C		;99B8 85 8C
		dec L_0E28		;99BA CE 28 0E
L_99BD	ldy ZP_8C		;99BD A4 8C
		lda L_99CE,Y	;99BF B9 CE 99
		pha				;99C2 48
		lda L_99C8,Y	;99C3 B9 C8 99
		pha				;99C6 48
		rts				;99C7 60
		
L_99C8	dta $D3,$F9,$CB,$A7,$02,$9C
L_99CE	dta $99,$99,$9B,$9A,$9B,$98

L_99D4	lda #$F5		;99D4 A9 F5
		jsr L_9855		;99D6 20 55 98
		ldy #$00		;99D9 A0 00
		lda ZP_85		;99DB A5 85
		and #$08		;99DD 29 08
		beq L_99E3		;99DF F0 02
		ldy #$80		;99E1 A0 80
L_99E3	lda ZP_85		;99E3 A5 85
		and #$01		;99E5 29 01
		beq L_99F2		;99E7 F0 09
		lda #$04		;99E9 A9 04
		sta ZP_8C		;99EB 85 8C
		tya				;99ED 98
		ora #$04		;99EE 09 04
		bne L_99F7		;99F0 D0 05
L_99F2	lda ZP_09		;99F2 A5 09
		sta ZP_8C		;99F4 85 8C
		tya				;99F6 98
L_99F7	sta ZP_89		;99F7 85 89
		rts				;99F9 60
L_99FA	lda ZP_88		;99FA A5 88
		bne L_9A1B		;99FC D0 1D
		lda ZP_87		;99FE A5 87
		cmp #$03		;9A00 C9 03
		bcs L_9A1B		;9A02 B0 17
		jmp rmt_barrel_hit		
		lda #$18		;9A04 A9 18
		;sta L_0EBC		;9A06 8D BC 0E
L_9A09	lda ZP_85		;9A09 A5 85
		and #$08		;9A0B 29 08
		beq L_9A12		;9A0D F0 03
		inc L_0E2F		;9A0F EE 2F 0E
L_9A12	lda #$05		;9A12 A9 05
		sta ZP_8C		;9A14 85 8C
		dec L_0E28		;9A16 CE 28 0E
		txa				;9A19 8A
		rts				;9A1A 60
L_9A1B	jsr L_986B		;9A1B 20 6B 98
		bcs L_9A4F		;9A1E B0 2F
		sty ZP_5E		;9A20 84 5E
		and #$20		;9A22 29 20
		bne L_9A4F		;9A24 D0 29
		lda ZP_88		;9A26 A5 88
		cmp L_0E32		;9A28 CD 32 0E
		bcc L_9A4F		;9A2B 90 22
		beq L_9A4F		;9A2D F0 20
		ldy ZP_CE		;9A2F A4 CE
		lda L_D20A		;9A31 AD 0A D2
		cmp L_83DF,Y	;9A34 D9 DF 83
		bcs L_9A4F		;9A37 B0 16
		lda ZP_5E		;9A39 A5 5E
		sta ZP_87		;9A3B 85 87
		tay				;9A3D A8
		lda L_8049,Y	;9A3E B9 49 80
		sec				;9A41 38
		sbc #$02		;9A42 E9 02
		sta ZP_8B		;9A44 85 8B
		lda #$02		;9A46 A9 02
		sta ZP_8C		;9A48 85 8C
		dec ZP_88		;9A4A C6 88
		jmp L_9C06		;9A4C 4C 06 9C
L_9A4F	lda #$C0		;9A4F A9 C0
		ldy #$01		;9A51 A0 01
		jsr L_9901		;9A53 20 01 99
		sec				;9A56 38
		lda L_18C7,Y	;9A57 B9 C7 18
		sbc #$0B		;9A5A E9 0B
		sta ZP_8A		;9A5C 85 8A
		dec L_0E7B,X	;9A5E DE 7B 0E
		bmi L_9A71		;9A61 30 0E
		lda L_0E7B,X	;9A63 BD 7B 0E
		and #$04		;9A66 29 04
		beq L_9A74		;9A68 F0 0A
		dec ZP_8A		;9A6A C6 8A
		dec ZP_8A		;9A6C C6 8A
		jmp L_9A74		;9A6E 4C 74 9A
L_9A71	inc L_0E7B,X	;9A71 FE 7B 0E
L_9A74	ldy ZP_5A		;9A74 A4 5A
		lda L_182B,Y	;9A76 B9 2B 18
		and #$07		;9A79 29 07
		bne L_9A95		;9A7B D0 18
		sec				;9A7D 38
		ldy ZP_87		;9A7E A4 87
		lda ZP_8B		;9A80 A5 8B
		sbc L_8049,Y	;9A82 F9 49 80
		cmp #$03		;9A85 C9 03
		bcs L_9A95		;9A87 B0 0C
		lda #$03		;9A89 A9 03
		sta ZP_8C		;9A8B 85 8C
		lda #$14		;9A8D A9 14
		sta L_0E7B,X	;9A8F 9D 7B 0E
		dec ZP_88		;9A92 C6 88
		rts				;9A94 60
L_9A95	lda ZP_89		;9A95 A5 89
		and #$FC		;9A97 29 FC
		sta ZP_5C		;9A99 85 5C
		lda ZP_8B		;9A9B A5 8B
		lsr @			;9A9D 4A
		lsr @			;9A9E 4A
		and #$03		;9A9F 29 03
		ora ZP_5C		;9AA1 05 5C
		sta ZP_89		;9AA3 85 89
		jmp L_983F		;9AA5 4C 3F 98
L_9AA8	sec				;9AA8 38
		ldy ZP_5A		;9AA9 A4 5A
		lda L_18C7,Y	;9AAB B9 C7 18
		sbc ZP_8A		;9AAE E5 8A
		cmp #$0E		;9AB0 C9 0E
		bcs L_9ADD		;9AB2 B0 29
		lda #$00		;9AB4 A9 00
		sta L_19FF,Y	;9AB6 99 FF 19
		lda ZP_88		;9AB9 A5 88
		cmp L_0E32		;9ABB CD 32 0E
		bcs L_9ACD		;9ABE B0 0D
		lda ZP_85		;9AC0 A5 85
		and #$08		;9AC2 29 08
		bne L_9ACD		;9AC4 D0 07
		dec L_0E28		;9AC6 CE 28 0E
		lda #$05		;9AC9 A9 05
		bne L_9ADA		;9ACB D0 0D
L_9ACD	lda #$18		;9ACD A9 18
		sta L_0E7B,X	;9ACF 9D 7B 0E
		lda ZP_85		;9AD2 A5 85
		eor #$80		;9AD4 49 80
		sta ZP_85		;9AD6 85 85
		lda #$01		;9AD8 A9 01
L_9ADA	sta ZP_8C		;9ADA 85 8C
		rts				;9ADC 60
L_9ADD	lda #$E0		;9ADD A9 E0
		ldy #$00		;9ADF A0 00
		jsr L_9901		;9AE1 20 01 99
		lda #$00		;9AE4 A9 00
		sta ZP_5C		;9AE6 85 5C
		clc				;9AE8 18
		lda L_0E7B,X	;9AE9 BD 7B 0E
		adc #$0A		;9AEC 69 0A
		sta L_0E7B,X	;9AEE 9D 7B 0E
		asl @			;9AF1 0A
		rol ZP_5C		;9AF2 26 5C
		adc L_0370,X	;9AF4 7D 70 03
		sta L_0370,X	;9AF7 9D 70 03
		lda ZP_8A		;9AFA A5 8A
		adc ZP_5C		;9AFC 65 5C
		sta ZP_8A		;9AFE 85 8A
		jmp L_9A95		;9B00 4C 95 9A
L_9B03	sec				;9B03 38
		ldy ZP_5A		;9B04 A4 5A
		lda L_18C7,Y	;9B06 B9 C7 18
		sbc ZP_8A		;9B09 E5 8A
		ldy ZP_88		;9B0B A4 88
		bne L_9B25		;9B0D D0 16
		cmp #$0B		;9B0F C9 0B
		bcs L_9B25		;9B11 B0 12
		lda #$0C		;9B13 A9 0C
		sta L_0E7B,X	;9B15 9D 7B 0E
		lda #$01		;9B18 A9 01
		sta ZP_8C		;9B1A 85 8C
		lda ZP_85		;9B1C A5 85
		and #$7F		;9B1E 29 7F
		sta ZP_85		;9B20 85 85
		jmp L_9BE2		;9B22 4C E2 9B
L_9B25	cmp #$0B		;9B25 C9 0B
		bcs L_9B30		;9B27 B0 07
		lda #$80		;9B29 A9 80
		ldy #$00		;9B2B A0 00
		jmp L_9B34		;9B2D 4C 34 9B
L_9B30	lda #$40		;9B30 A9 40
		ldy #$02		;9B32 A0 02
L_9B34	sta ZP_5C		;9B34 85 5C
		sty ZP_5D		;9B36 84 5D
		sec				;9B38 38
		ldy ZP_5A		;9B39 A4 5A
		lda L_18C7,Y	;9B3B B9 C7 18
		sbc ZP_8A		;9B3E E5 8A
		cmp #$06		;9B40 C9 06
		bcs L_9B7F		;9B42 B0 3B
		ldy ZP_5A		;9B44 A4 5A
		lda #$00		;9B46 A9 00
		sta L_19FF,Y	;9B48 99 FF 19
		dec ZP_88		;9B4B C6 88
		clc				;9B4D 18
		ldy ZP_88		;9B4E A4 88
		lda ZP_87		;9B50 A5 87
		adc L_8042,Y	;9B52 79 42 80
		sta ZP_5A		;9B55 85 5A
		lda ZP_85		;9B57 A5 85
		and #$04		;9B59 29 04
		beq L_9B6D		;9B5B F0 10
		ldy ZP_CE		;9B5D A4 CE
		lda L_D20A		;9B5F AD 0A D2
		cmp L_83DF,Y	;9B62 D9 DF 83
		bcs L_9B6D		;9B65 B0 06
		lda ZP_85		;9B67 A5 85
		eor #$80		;9B69 49 80
		sta ZP_85		;9B6B 85 85
L_9B6D	lda ZP_85		;9B6D A5 85
		and #$40		;9B6F 29 40
		beq L_9B7F		;9B71 F0 0C
		lda L_D20A		;9B73 AD 0A D2
		and #$02		;9B76 29 02
		eor ZP_85		;9B78 45 85
		sta ZP_85		;9B7A 85 85
		jmp L_9B7F		;9B7C 4C 7F 9B
L_9B7F	clc				;9B7F 18
		lda L_0370,X	;9B80 BD 70 03
		adc ZP_5C		;9B83 65 5C
		sta L_0370,X	;9B85 9D 70 03
		lda ZP_8A		;9B88 A5 8A
		adc ZP_5D		;9B8A 65 5D
		sta ZP_8A		;9B8C 85 8A
		lda ZP_85		;9B8E A5 85
		tay				;9B90 A8
		and #$04		;9B91 29 04
		beq L_9BB9		;9B93 F0 24
		lda ZP_8B		;9B95 A5 8B
		cmp L_8049		;9B97 CD 49 80
		bcc L_9BA0		;9B9A 90 04
		cmp #$96		;9B9C C9 96
		bcc L_9BA6		;9B9E 90 06
L_9BA0	lda ZP_85		;9BA0 A5 85
		eor #$80		;9BA2 49 80
		sta ZP_85		;9BA4 85 85
L_9BA6	tya				;9BA6 98
		and #$02		;9BA7 29 02
		bne L_9BB2		;9BA9 D0 07
		lda #$80		;9BAB A9 80
		ldy #$01		;9BAD A0 01
		jmp L_9BB6		;9BAF 4C B6 9B
L_9BB2	lda #$A0		;9BB2 A9 A0
		ldy #$00		;9BB4 A0 00
L_9BB6	jsr L_9901		;9BB6 20 01 99
L_9BB9	lda ZP_8A		;9BB9 A5 8A
		lsr @			;9BBB 4A
		lsr @			;9BBC 4A
		and #$03		;9BBD 29 03
		sta ZP_5C		;9BBF 85 5C
		lda ZP_89		;9BC1 A5 89
		and #$FC		;9BC3 29 FC
		ora ZP_5C		;9BC5 05 5C
		sta ZP_89		;9BC7 85 89
		jmp L_983F		;9BC9 4C 3F 98
L_9BCC	sec				;9BCC 38
		ldy ZP_5A		;9BCD A4 5A
		lda L_18C7,Y	;9BCF B9 C7 18
		sbc ZP_8A		;9BD2 E5 8A
		cmp #$0E		;9BD4 C9 0E
		bcs L_9BEA		;9BD6 B0 12
		lda #$01		;9BD8 A9 01
		sta ZP_8C		;9BDA 85 8C
		lda ZP_85		;9BDC A5 85
		eor #$80		;9BDE 49 80
		sta ZP_85		;9BE0 85 85
L_9BE2	lda ZP_89		;9BE2 A5 89
		and #$80		;9BE4 29 80
		sta ZP_89		;9BE6 85 89
		txa				;9BE8 8A
		rts				;9BE9 60
L_9BEA	ldy ZP_87		;9BEA A4 87
		lda L_8049,Y	;9BEC B9 49 80
		sec				;9BEF 38
		sbc #$02		;9BF0 E9 02
		sta ZP_8B		;9BF2 85 8B
		clc				;9BF4 18
		lda L_0370,X	;9BF5 BD 70 03
		adc #$C0		;9BF8 69 C0
		sta L_0370,X	;9BFA 9D 70 03
		lda ZP_8A		;9BFD A5 8A
		adc #$01		;9BFF 69 01
		sta ZP_8A		;9C01 85 8A
		jmp L_9BB9		;9C03 4C B9 9B
L_9C06	lda ZP_89		;9C06 A5 89
		and #$80		;9C08 29 80
		ora #$04		;9C0A 09 04
		sta ZP_89		;9C0C 85 89
		rts				;9C0E 60
		
L_9C0F	dta $C0
L_9C10	dta $00,$B0,$00,$D0,$00,$00,$01,$40,$01
L_9C19	dta $C0
L_9C1A	dta $00,$C0,$00,$D0,$00,$E0,$00,$F0,$00

L_9C23	lda ZP_8C		;9C23 A5 8C
		cmp #$04		;9C25 C9 04
		beq L_9C47		;9C27 F0 1E
		lda ZP_86		;9C29 A5 86
		bmi L_9C3A		;9C2B 30 0D
		lda ZP_69		;9C2D A5 69
		bpl L_9C47		;9C2F 10 16
		lda ZP_73		;9C31 A5 73
		cmp #$0F		;9C33 C9 0F
		bcc L_9C3A		;9C35 90 03
		lda #$00		;9C37 A9 00
		rts				;9C39 60
L_9C3A	lda ZP_86		;9C3A A5 86
		ora #$08		;9C3C 09 08
		sta ZP_86		;9C3E 85 86
		lda #$04		;9C40 A9 04
		sta ZP_8C		;9C42 85 8C
		dec L_0E29		;9C44 CE 29 0E
L_9C47	ldy ZP_8C		;9C47 A4 8C
		lda L_9C57,Y	;9C49 B9 57 9C
		pha				;9C4C 48
		lda L_9C52,Y	;9C4D B9 52 9C
		pha				;9C50 48
		rts				;9C51 60
		
L_9C52	dta $5B,$3B,$C8,$80,$9C
L_9C57	dta $9C,$9D,$9C,$9C,$98

L_9C5C	lda #$F0		;9C5C A9 F0
		jsr L_9855		;9C5E 20 55 98
		lda ZP_85		;9C61 A5 85
		and #$08		;9C63 29 08
		beq L_9C73		;9C65 F0 0C
		inc ZP_8C		;9C67 E6 8C
		lda ZP_BA		;9C69 A5 BA
		sta L_0E7B,X	;9C6B 9D 7B 0E
		lda #$08		;9C6E A9 08
		sta ZP_89		;9C70 85 89
		rts				;9C72 60
L_9C73	lda #$03		;9C73 A9 03
		sta ZP_8C		;9C75 85 8C
		lda #$13		;9C77 A9 13
		sta L_0E7B,X	;9C79 9D 7B 0E
		lda #$08		;9C7C A9 08
		sta ZP_89		;9C7E 85 89
		rts				;9C80 60
L_9C81	sec				;9C81 38
		ldy ZP_5A		;9C82 A4 5A
		lda L_18C7,Y	;9C84 B9 C7 18
		ldy L_0E7B,X	;9C87 BC 7B 0E
		sbc L_9CB5,Y	;9C8A F9 B5 9C
		sbc #$10		;9C8D E9 10
		sta ZP_8A		;9C8F 85 8A
		dec L_0E7B,X	;9C91 DE 7B 0E
		bpl L_9CA2		;9C94 10 0C
		lda #$01		;9C96 A9 01
		sta ZP_8C		;9C98 85 8C
		lda ZP_BA		;9C9A A5 BA
		sta L_0E7B,X	;9C9C 9D 7B 0E
		jmp L_9D3C		;9C9F 4C 3C 9D
L_9CA2	lda ZP_CE		;9CA2 A5 CE
		asl @			;9CA4 0A
		tay				;9CA5 A8
		lda L_9C0F,Y	;9CA6 B9 0F 9C
		pha				;9CA9 48
		lda L_9C10,Y	;9CAA B9 10 9C
		tay				;9CAD A8
		pla				;9CAE 68
		jsr L_9901		;9CAF 20 01 99
		jmp L_983F		;9CB2 4C 3F 98
		
L_9CB5	dta $02,$06,$08,$0A,$0B,$0C,$0D,$0E,$0E,$0F,$10,$10,$10,$10,$0F,$0E
		dta $0D,$0B,$08,$05
		
L_9CC9	sec				;9CC9 38
		ldy ZP_5A		;9CCA A4 5A
		lda L_18C7,Y	;9CCC B9 C7 18
		sbc ZP_8A		;9CCF E5 8A
		sbc #$10		;9CD1 E9 10
		cmp #$02		;9CD3 C9 02
		bcs L_9CF2		;9CD5 B0 1B
		lda L_D20A		;9CD7 AD 0A D2
		and #$80		;9CDA 29 80
		eor ZP_85		;9CDC 45 85
		ora #$40		;9CDE 09 40
		sta ZP_85		;9CE0 85 85
		clc				;9CE2 18
		ldy ZP_CE		;9CE3 A4 CE
		lda ZP_BA		;9CE5 A5 BA
		adc L_83F3,Y	;9CE7 79 F3 83
		sta L_0E7B,X	;9CEA 9D 7B 0E
		lda #$01		;9CED A9 01
		sta ZP_8C		;9CEF 85 8C
		rts				;9CF1 60
L_9CF2	lda ZP_CE		;9CF2 A5 CE
		asl @			;9CF4 0A
		tay				;9CF5 A8
		lda L_9C19,Y	;9CF6 B9 19 9C
		sta ZP_5C		;9CF9 85 5C
		lda L_9C1A,Y	;9CFB B9 1A 9C
		sta ZP_5D		;9CFE 85 5D
		lda ZP_85		;9D00 A5 85
		bpl L_9D19		;9D02 10 15
		asl ZP_5C		;9D04 06 5C
		rol ZP_5D		;9D06 26 5D
		lda ZP_5C		;9D08 A5 5C
		adc L_0370,X	;9D0A 7D 70 03
		sta L_0370,X	;9D0D 9D 70 03
		lda ZP_5D		;9D10 A5 5D
		adc ZP_8A		;9D12 65 8A
		sta ZP_8A		;9D14 85 8A
		jmp L_9D28		;9D16 4C 28 9D
L_9D19	sec				;9D19 38
		lda L_0370,X	;9D1A BD 70 03
		sbc ZP_5C		;9D1D E5 5C
		sta L_0370,X	;9D1F 9D 70 03
		lda ZP_8A		;9D22 A5 8A
		sbc ZP_5D		;9D24 E5 5D
		sta ZP_8A		;9D26 85 8A
L_9D28	clc				;9D28 18
		txa				;9D29 8A
		adc ZP_B7		;9D2A 65 B7
		and #$07		;9D2C 29 07
		cmp #$06		;9D2E C9 06
		bcc L_9D39		;9D30 90 07
		lda ZP_89		;9D32 A5 89
		eor #$01		;9D34 49 01
		sta ZP_89		;9D36 85 89
		rts				;9D38 60
L_9D39	jmp L_983F		;9D39 4C 3F 98
L_9D3C	lda L_0E7B,X	;9D3C BD 7B 0E
		cmp ZP_BA		;9D3F C5 BA
		bne L_9D85		;9D41 D0 42
		lda ZP_85		;9D43 A5 85
		and #$BF		;9D45 29 BF
		sta ZP_85		;9D47 85 85
		clc				;9D49 18
		ldy ZP_CE		;9D4A A4 CE
		lda ZP_BA		;9D4C A5 BA
		adc L_83F3,Y	;9D4E 79 F3 83
		sta L_0E7B,X	;9D51 9D 7B 0E
		lda ZP_88		;9D54 A5 88
		cmp L_0E32		;9D56 CD 32 0E
		bne L_9D74		;9D59 D0 19
		lda ZP_86		;9D5B A5 86
		and #$10		;9D5D 29 10
		beq L_9D74		;9D5F F0 13
		lda ZP_6F		;9D61 A5 6F
		cmp ZP_87		;9D63 C5 87
		lda ZP_85		;9D65 A5 85
		bcc L_9D6D		;9D67 90 04
		ora #$80		;9D69 09 80
		bne L_9D6F		;9D6B D0 02
L_9D6D	and #$7F		;9D6D 29 7F
L_9D6F	sta ZP_85		;9D6F 85 85
		jmp L_9D85		;9D71 4C 85 9D
L_9D74	lda L_D20A		;9D74 AD 0A D2
		cmp L_83F8		;9D77 CD F8 83
		bcs L_9D85		;9D7A B0 09
		lda L_D20A		;9D7C AD 0A D2
		and #$80		;9D7F 29 80
		ora ZP_85		;9D81 05 85
		sta ZP_85		;9D83 85 85
L_9D85	jsr L_986B		;9D85 20 6B 98
		beq L_9DF2		;9D88 F0 68
		sta ZP_5C		;9D8A 85 5C
		sty ZP_5D		;9D8C 84 5D
		lda ZP_85		;9D8E A5 85
		and #$20		;9D90 29 20
		beq L_9DAD		;9D92 F0 19
		lda L_0E32		;9D94 AD 32 0E
		cmp ZP_88		;9D97 C5 88
		beq L_9DF2		;9D99 F0 57
		bcc L_9DA5		;9D9B 90 08
		lda ZP_5C		;9D9D A5 5C
		and #$20		;9D9F 29 20
		bne L_9DC3		;9DA1 D0 20
		beq L_9DF2		;9DA3 F0 4D
L_9DA5	lda ZP_5C		;9DA5 A5 5C
		and #$20		;9DA7 29 20
		beq L_9DCA		;9DA9 F0 1F
		bne L_9DF2		;9DAB D0 45
L_9DAD	lda ZP_85		;9DAD A5 85
		and #$40		;9DAF 29 40
		bne L_9DF2		;9DB1 D0 3F
		ldy ZP_CE		;9DB3 A4 CE
		lda L_D20A		;9DB5 AD 0A D2
		cmp L_83F8,Y	;9DB8 D9 F8 83
		bcs L_9DF2		;9DBB B0 35
		lda ZP_5C		;9DBD A5 5C
		and #$20		;9DBF 29 20
		beq L_9DCA		;9DC1 F0 07
L_9DC3	lda ZP_85		;9DC3 A5 85
		and #$7F		;9DC5 29 7F
		jmp L_9DCE		;9DC7 4C CE 9D
L_9DCA	lda ZP_85		;9DCA A5 85
		ora #$80		;9DCC 09 80
L_9DCE	sta ZP_85		;9DCE 85 85
		lda ZP_5D		;9DD0 A5 5D
		sta ZP_87		;9DD2 85 87
		tay				;9DD4 A8
		sec				;9DD5 38
		lda L_8049,Y	;9DD6 B9 49 80
		sbc #$02		;9DD9 E9 02
		sta ZP_8B		;9DDB 85 8B
		clc				;9DDD 18
		ldy ZP_88		;9DDE A4 88
		lda L_8042,Y	;9DE0 B9 42 80
		adc ZP_87		;9DE3 65 87
		tay				;9DE5 A8
		lda L_1963,Y	;9DE6 B9 63 19
		sta ZP_88		;9DE9 85 88
		lda #$02		;9DEB A9 02
		sta ZP_8C		;9DED 85 8C
		jmp L_9D28		;9DEF 4C 28 9D
L_9DF2	ldy ZP_5A		;9DF2 A4 5A
		lda L_182B,Y	;9DF4 B9 2B 18
		and #$07		;9DF7 29 07
		bne L_9E01		;9DF9 D0 06
		lda ZP_85		;9DFB A5 85
		ora #$80		;9DFD 09 80
		bne L_9E0C		;9DFF D0 0B
L_9E01	lda L_182C,Y	;9E01 B9 2C 18
		and #$07		;9E04 29 07
		bne L_9E0E		;9E06 D0 06
		lda ZP_85		;9E08 A5 85
		and #$7F		;9E0A 29 7F
L_9E0C	sta ZP_85		;9E0C 85 85
L_9E0E	ldy ZP_85		;9E0E A4 85
		lda ZP_8B		;9E10 A5 8B
		cmp #$03		;9E12 C9 03
		bcc L_9E20		;9E14 90 0A
		cmp #$9D		;9E16 C9 9D
		bcc L_9E25		;9E18 90 0B
		tya				;9E1A 98
		and #$7F		;9E1B 29 7F
		jmp L_9E23		;9E1D 4C 23 9E
L_9E20	tya				;9E20 98
		ora #$80		;9E21 09 80
L_9E23	sta ZP_85		;9E23 85 85
L_9E25	lda ZP_CE		;9E25 A5 CE
		asl @			;9E27 0A
		tay				;9E28 A8
		lda L_9C0F,Y	;9E29 B9 0F 9C
		pha				;9E2C 48
		lda L_9C10,Y	;9E2D B9 10 9C
		tay				;9E30 A8
		pla				;9E31 68
		jsr L_9901		;9E32 20 01 99
		sec				;9E35 38
		ldy ZP_5A		;9E36 A4 5A
		lda L_18C7,Y	;9E38 B9 C7 18
		sbc #$10		;9E3B E9 10
		sta ZP_8A		;9E3D 85 8A
		lda ZP_B7		;9E3F A5 B7
		adc ZP_8D		;9E41 65 8D
		and #$10		;9E43 29 10
		beq L_9E49		;9E45 F0 02
		dec ZP_8A		;9E47 C6 8A
L_9E49	lda ZP_89		;9E49 A5 89
		ldy ZP_85		;9E4B A4 85
		bpl L_9E53		;9E4D 10 04
		ora #$02		;9E4F 09 02
		bne L_9E55		;9E51 D0 02
L_9E53	and #$FD		;9E53 29 FD
L_9E55	sta ZP_89		;9E55 85 89
		jmp L_9D28		;9E57 4C 28 9D
		
L_9E5A	dta $00,$00,$B0,$00,$00
L_9E5F	dta $04,$04,$01,$01,$01
L_9E64	dta $10,$11,$13,$15,$19,$1C,$22,$28,$2F,$29,$23,$1C,$19,$15,$13,$11

L_9E74	lda ZP_69		;9E74 A5 69
		bpl L_9E84		;9E76 10 0C
		lda ZP_73		;9E78 A5 73
		cmp #$0F		;9E7A C9 0F
		bcc L_9E81		;9E7C 90 03
		lda #$00		;9E7E A9 00
		rts				;9E80 60
L_9E81	jmp L_989D		;9E81 4C 9D 98
L_9E84	lda ZP_8A		;9E84 A5 8A
		cmp #$C6		;9E86 C9 C6
		bcs L_9E81		;9E88 B0 F7
		lda ZP_86		;9E8A A5 86
		and #$F7		;9E8C 29 F7
		sta ZP_86		;9E8E 85 86
		lda ZP_8C		;9E90 A5 8C
		bmi L_9EA7		;9E92 30 13
		lda ZP_87		;9E94 A5 87
		cmp #$14		;9E96 C9 14
		bcc L_9EC8		;9E98 90 2E
		lda L_0E7B,X	;9E9A BD 7B 0E
		cmp #$07		;9E9D C9 07
		bne L_9EB1		;9E9F D0 10
		lda #$FF		;9EA1 A9 FF
		sta ZP_8C		;9EA3 85 8C
		bne L_9EE9		;9EA5 D0 42
L_9EA7	clc				;9EA7 18
		lda ZP_8A		;9EA8 A5 8A
		adc #$07		;9EAA 69 07
		sta ZP_8A		;9EAC 85 8A
		jmp L_9EFB		;9EAE 4C FB 9E
L_9EB1	lda L_0EC0		;9EB1 AD C0 0E
		bne L_9EC8		;9EB4 D0 12
		lda #$00		;9EB6 A9 00
		sta L_0ED5		;9EB8 8D D5 0E
		lda #$16		;9EBB A9 16
		sta L_0ED7		;9EBD 8D D7 0E
		lda #$A3		;9EC0 A9 A3
		sta L_0ED8		;9EC2 8D D8 0E
		jmp rmt_trampoline_fall
		;sta L_0EC0		;9EC5 8D C0 0E
L_9EC8	ldy L_0E7B,X	;9EC8 BC 7B 0E
		lda L_9E64,Y	;9ECB B9 64 9E
		sta ZP_8A		;9ECE 85 8A
		iny				;9ED0 C8
		cpy #$10		;9ED1 C0 10
		bcc L_9ED7		;9ED3 90 02
		ldy #$00		;9ED5 A0 00
L_9ED7	tya				;9ED7 98
		sta L_0E7B,X	;9ED8 9D 7B 0E
		cpy #$08		;9EDB C0 08
		bne L_9EE9		;9EDD D0 0A
		lda L_0EBD		;9EDF AD BD 0E
		bne L_9EE9		;9EE2 D0 05
		lda #$0F		;9EE4 A9 0F
		jmp rmt_spring
		;sta L_0EBD		;9EE6 8D BD 0E
L_9EE9	ldy ZP_8C		;9EE9 A4 8C
		bmi L_9EFB		;9EEB 30 0E
		ldy ZP_CE		;9EED A4 CE
		lda L_9E5A,Y	;9EEF B9 5A 9E
		pha				;9EF2 48
		lda L_9E5F,Y	;9EF3 B9 5F 9E
		tay				;9EF6 A8
		pla				;9EF7 68
		jsr L_9901		;9EF8 20 01 99
L_9EFB	lda ZP_8C		;9EFB A5 8C
		bmi L_9F05		;9EFD 30 06
		lda ZP_87		;9EFF A5 87
		cmp #$14		;9F01 C9 14
		bcc L_9F0C		;9F03 90 07
L_9F05	lda #$10		;9F05 A9 10
		sta ZP_89		;9F07 85 89
		jmp L_983F		;9F09 4C 3F 98
L_9F0C	sec				;9F0C 38
		lda #$30		;9F0D A9 30
		sbc ZP_8A		;9F0F E5 8A
		bpl L_9F17		;9F11 10 04
		lda #$00		;9F13 A9 00
		beq L_9F1D		;9F15 F0 06
L_9F17	cmp #$08		;9F17 C9 08
		bcc L_9F1D		;9F19 90 02
		lda #$07		;9F1B A9 07
L_9F1D	tay				;9F1D A8
		lda L_9F26,Y	;9F1E B9 26 9F
		sta ZP_89		;9F21 85 89
		jmp L_983F		;9F23 4C 3F 98
		
L_9F26	dta $13,$13,$12,$12,$11,$11,$10,$10

L_9F2E	lda ZP_8C		;9F2E A5 8C
		bmi L_9F43		;9F30 30 11
		lda ZP_86		;9F32 A5 86
		bmi L_9F43		;9F34 30 0D
		lda ZP_69		;9F36 A5 69
		bpl L_9F4A		;9F38 10 10
		lda ZP_73		;9F3A A5 73
		cmp #$0F		;9F3C C9 0F
		bcc L_9F43		;9F3E 90 03
		lda #$00		;9F40 A9 00
		rts				;9F42 60
L_9F43	lda #$FF		;9F43 A9 FF
		sta ZP_8C		;9F45 85 8C
		jmp L_989D		;9F47 4C 9D 98
L_9F4A	lda ZP_8C		;9F4A A5 8C
		bne L_9F62		;9F4C D0 14
		lda #$F8		;9F4E A9 F8
		jsr L_9855		;9F50 20 55 98
		lda #$0C		;9F53 A9 0C
		sta ZP_89		;9F55 85 89
		lda ZP_87		;9F57 A5 87
		bne L_9F5F		;9F59 D0 04
		lda #$FA		;9F5B A9 FA
		sta ZP_8B		;9F5D 85 8B
L_9F5F	inc ZP_8C		;9F5F E6 8C
		rts				;9F61 60
L_9F62	lda ZP_8B		;9F62 A5 8B
		ldy ZP_88		;9F64 A4 88
		jsr L_9977		;9F66 20 77 99
		asl @			;9F69 0A
		pha				;9F6A 48
		tya				;9F6B 98
		rol @			;9F6C 2A
		tay				;9F6D A8
		pla				;9F6E 68
		clc				;9F6F 18
		adc L_0350,X	;9F70 7D 50 03
		sta L_0350,X	;9F73 9D 50 03
		tya				;9F76 98
		adc ZP_8B		;9F77 65 8B
		sta ZP_8B		;9F79 85 8B
		pha				;9F7B 48
		jsr L_9936		;9F7C 20 36 99
		pla				;9F7F 68
		cmp #$A0		;9F80 C9 A0
		bcc L_9F88		;9F82 90 04
		cmp #$F6		;9F84 C9 F6
		bcc L_9F43		;9F86 90 BB
L_9F88	cmp #$4C		;9F88 C9 4C
		bne L_9F92		;9F8A D0 06
		lda ZP_88		;9F8C A5 88
		cmp #$03		;9F8E C9 03
		beq L_9F43		;9F90 F0 B1
L_9F92	jmp L_983F		;9F92 4C 3F 98
L_9F95	lda ZP_69		;9F95 A5 69
		bpl L_9FD2		;9F97 10 39
		dec ZP_72		;9F99 C6 72
		bne L_9FB8		;9F9B D0 1B
		lda ZP_73		;9F9D A5 73
		cmp #$0F		;9F9F C9 0F
		bne L_9FAB		;9FA1 D0 08
		jsr L_AFE8		;9FA3 20 E8 AF
		jmp rmt_death_msx
		lda #$90		;9FA6 A9 90
		;sta L_0EC5		;9FA8 8D C5 0E
L_9FAB	dec ZP_73		;9FAB C6 73
		bpl L_9FB9		;9FAD 10 0A
		lda #$00		;9FAF A9 00
		sta ZP_69		;9FB1 85 69
		lda #$19		;9FB3 A9 19
		jsr L_A6B1		;9FB5 20 B1 A6
L_9FB8	rts				;9FB8 60
L_9FB9	bne L_9FC5		;9FB9 D0 0A
		lda #$0C		;9FBB A9 0C
		jsr L_A6B1		;9FBD 20 B1 A6
		lda #$4B		;9FC0 A9 4B
		sta ZP_72		;9FC2 85 72
		rts				;9FC4 60
L_9FC5	ldx ZP_6E		;9FC5 A6 6E
		lda L_A0CA,X	;9FC7 BD CA A0
		jsr L_A6B1		;9FCA 20 B1 A6
		lda #$06		;9FCD A9 06
		sta ZP_72		;9FCF 85 72
		rts				;9FD1 60
L_9FD2	lda L_0E32		;9FD2 AD 32 0E
		cmp L_1821		;9FD5 CD 21 18
		beq L_9FDE		;9FD8 F0 04
		lda ZP_C5		;9FDA A5 C5
		bne L_9FEA		;9FDC D0 0C
L_9FDE	lda #$00		;9FDE A9 00
		sta ZP_69		;9FE0 85 69
		inc L_0E35		;9FE2 EE 35 0E ; level finished
		lda #$05		;9FE5 A9 05
		jmp L_8B93		;9FE7 4C 93 8B
L_9FEA	ldx ZP_6D		;9FEA A6 6D
		lda ZP_B9		;9FEC A5 B9
		cmp #$02		;9FEE C9 02
		bne L_A00C		;9FF0 D0 1A
		lda ZP_6F		;9FF2 A5 6F
		cmp #$03		;9FF4 C9 03
		bcc L_A000		;9FF6 90 08
		cmp #$06		;9FF8 C9 06
		bcs L_A000		;9FFA B0 04
		cpx #$3B		;9FFC E0 3B
		bcc L_A042		;9FFE 90 42
L_A000	cmp #$0B		;A000 C9 0B
		bcc L_A00C		;A002 90 08
		cmp #$0E		;A004 C9 0E
		bcs L_A00C		;A006 B0 04
		cpx #$AD		;A008 E0 AD
		bcs L_A042		;A00A B0 36
L_A00C	lda L_0E32		;A00C AD 32 0E
		cmp L_1822		;A00F CD 22 18
		beq L_A042		;A012 F0 2E
		cmp L_1827		;A014 CD 27 18
		bne L_A026		;A017 D0 0D
		ldy L_1828		;A019 AC 28 18
		cpy ZP_6F		;A01C C4 6F
		beq L_A042		;A01E F0 22
		iny				;A020 C8
		iny				;A021 C8
		cpy ZP_6F		;A022 C4 6F
		beq L_A042		;A024 F0 1C
L_A026	lda #$06		;A026 A9 06
		sta ZP_5C		;A028 85 5C
		lda #$0C		;A02A A9 0C
		sta ZP_5D		;A02C 85 5D
		stx ZP_5B		;A02E 86 5B
		ldx ZP_6B		;A030 A6 6B
		inx				;A032 E8
		stx ZP_5A		;A033 86 5A
		jsr L_A91E		;A035 20 1E A9 ; collision detection routine
		bcs L_A042		;A038 B0 08		
		lda L_0E23		;A03A AD 23 0E
L_A03D	ora L_0E24		;A03D 0D 24 0E
		bne L_A060		;A040 D0 1E
L_A042	jmp rmt_death_sfx
		nop 
		;lda #$FF		;A042 A9 FF
		;sta ZP_69		;A044 85 69
L_A046	lda #$0F		;A046 A9 0F
		sta ZP_73		;A048 85 73
		lda #$2D		;A04A A9 2D
		sta ZP_72		;A04C 85 72
		lda #$08		;A04E A9 08
		sta ZP_6E		;A050 85 6E
		lda #$00		;A052 A9 00
		sta L_0E33		;A054 8D 33 0E
		jsr L_B1E8		;A057 20 E8 B1
		lda #$18		;A05A A9 18
		sta L_0EBC		;A05C 8D BC 0E
		rts				;A05F 60
L_A060	ldx ZP_6E		;A060 A6 6E
		cpx #$13		;A062 E0 13
		bcc L_A08E		;A064 90 28
		lda L_A0C3,X	;A066 BD C3 A0
		sta ZP_5C		;A069 85 5C
		lda L_A0C9,X	;A06B BD C9 A0
		sta ZP_5D		;A06E 85 5D
		clc				;A070 18
		lda ZP_6B		;A071 A5 6B
		adc L_A0CF,X	;A073 7D CF A0
		sta ZP_5A		;A076 85 5A
		clc				;A078 18
		lda ZP_6D		;A079 A5 6D
		adc L_A0D5,X	;A07B 7D D5 A0
		sta ZP_5B		;A07E 85 5B
		jsr L_A91E		;A080 20 1E A9
		bcc L_A08E		;A083 90 09
		tax				;A085 AA
		lda L_0E3B,X	;A086 BD 3B 0E
		ora #$80		;A089 09 80
		sta L_0E3B,X	;A08B 9D 3B 0E
L_A08E	lda ZP_D0		;A08E A5 D0
		cmp #$02		;A090 C9 02
		bne L_A097		;A092 D0 03
		jsr L_A7E9		;A094 20 E9 A7
L_A097	lda ZP_6F		;A097 A5 6F
		sta ZP_70		;A099 85 70
		clc				;A09B 18
		lda ZP_6F		;A09C A5 6F
		ldx L_0E32		;A09E AE 32 0E
		adc L_8042,X	;A0A1 7D 42 80
		sta ZP_5C		;A0A4 85 5C
		lda ZP_6D		;A0A6 A5 6D
		sta ZP_5B		;A0A8 85 5B
		lda ZP_6B		;A0AA A5 6B
		sta ZP_5A		;A0AC 85 5A
		sec				;A0AE 38
		ldx ZP_6F		;A0AF A6 6F
		sbc L_8049,X	;A0B1 FD 49 80
		cpx #$19		;A0B4 E0 19
		bne L_A0BA		;A0B6 D0 02
		lda #$00		;A0B8 A9 00
L_A0BA	sta ZP_5D		;A0BA 85 5D
		ldx L_0E31		;A0BC AE 31 0E
		lda L_A0CD,X	;A0BF BD CD A0
		pha				;A0C2 48
L_A0C3	lda L_A0C8,X	;A0C3 BD C8 A0
		pha				;A0C6 48
		rts				;A0C7 60
		
L_A0C8	dta $ED
L_A0C9	dta $01
L_A0CA	dta $0C,$35,$D9
L_A0CD	dta $A0,$A1
L_A0CF	dta $A3,$A4,$A4,$09,$0A,$0B
L_A0D5	dta $08,$06,$08,$06,$08,$08,$08,$0B,$07,$0B,$07,$07,$07,$F8,$00,$08
		dta $00,$00,$00,$06,$F8,$06,$F8,$F8,$F8
		
L_A0EE	inc L_0E31		;A0EE EE 31 0E
		lda #$19		;A0F1 A9 19
		sta ZP_7A		;A0F3 85 7A
		sec				;A0F5 38
		lda L_18C7,X	;A0F6 BD C7 18
		sbc #$10		;A0F9 E9 10
		sta ZP_6D		;A0FB 85 6D
		lda #$10		;A0FD A9 10
		jmp L_A6B1		;A0FF 4C B1 A6
L_A102	ldx ZP_5C		;A102 A6 5C
		lda L_182B,X	;A104 BD 2B 18
		and #$07		;A107 29 07
		bne L_A122		;A109 D0 17
		lda ZP_5D		;A10B A5 5D
		beq L_A117		;A10D F0 08
		inx				;A10F E8
		lda L_182B,X	;A110 BD 2B 18
		and #$07		;A113 29 07
		bne L_A122		;A115 D0 0B
L_A117	lda #$0C		;A117 A9 0C
		lda #$00		;A119 A9 00
		sta ZP_74		;A11B 85 74
		sta ZP_75		;A11D 85 75
		jmp L_A41D		;A11F 4C 1D A4
L_A122	sec				;A122 38
		lda L_18C7,X	;A123 BD C7 18
		sbc #$10		;A126 E9 10
		sta ZP_6D		;A128 85 6D
		ldx ZP_CD		;A12A A6 CD
		lda L_0284,X	;A12C BD 84 02
		ora ZP_82		;A12F 05 82
		ora L_0E33		;A131 0D 33 0E
		bne L_A168		;A134 D0 32
		jmp rmt_jump
		nop
		;lda #$00		;A136 A9 00
		;sta ZP_77		;A138 85 77
L_A13A	lda ZP_6D		;A13A A5 6D
		sta ZP_71		;A13C 85 71
		lda #$70		;A13E A9 70
		sta ZP_74		;A140 85 74
		lda #$FE		;A142 A9 FE
		sta ZP_75		;A144 85 75
		lda L_0278,X	;A146 BD 78 02
		eor #$0C		;A149 49 0C
		and #$0C		;A14B 29 0C
		sta ZP_76		;A14D 85 76
		lda #$30		;A14F A9 30
		sta L_0EC7		;A151 8D C7 0E
		lda #$04		;A154 A9 04
		sta L_0E31		;A156 8D 31 0E
		lda ZP_78		;A159 A5 78
		ldx #$06		;A15B A2 06
		and #$04		;A15D 29 04
		beq L_A163		;A15F F0 02
		ldx #$07		;A161 A2 07
L_A163	stx ZP_6E		;A163 86 6E
		jmp L_A4DA		;A165 4C DA A4
L_A168	lda L_0E33		;A168 AD 33 0E
		bne L_A1DE		;A16B D0 71
		ldy ZP_CD		;A16D A4 CD
		lda L_0278,Y	;A16F B9 78 02
		and #$03		;A172 29 03
		cmp #$03		;A174 C9 03
		beq L_A1DE		;A176 F0 66
		ldx ZP_5C		;A178 A6 5C
		lda L_182B,X	;A17A BD 2B 18
		and #$38		;A17D 29 38
		beq L_A18D		;A17F F0 0C
		sec				;A181 38
		lda ZP_6B		;A182 A5 6B
		ldy ZP_6F		;A184 A4 6F
		sbc L_8049,Y	;A186 F9 49 80
		cmp #$03		;A189 C9 03
		bcc L_A1A5		;A18B 90 18
L_A18D	lda ZP_5D		;A18D A5 5D
		beq L_A1DE		;A18F F0 4D
		inx				;A191 E8
		lda L_182B,X	;A192 BD 2B 18
		and #$38		;A195 29 38
		beq L_A1DE		;A197 F0 45
		sec				;A199 38
		ldy ZP_6F		;A19A A4 6F
		lda L_804A,Y	;A19C B9 4A 80
		sbc ZP_6B		;A19F E5 6B
		cmp #$03		;A1A1 C9 03
		bcs L_A1DE		;A1A3 B0 39
L_A1A5	ldy ZP_CD		;A1A5 A4 CD
		lda L_0278,Y	;A1A7 B9 78 02
		and #$01		;A1AA 29 01
		bne L_A1BA		;A1AC D0 0C
		lda L_182B,X	;A1AE BD 2B 18
		and #$20		;A1B1 29 20
		beq L_A1DE		;A1B3 F0 29
		dec ZP_6D		;A1B5 C6 6D
		jmp L_A1C3		;A1B7 4C C3 A1
L_A1BA	lda L_182B,X	;A1BA BD 2B 18
		and #$20		;A1BD 29 20
		bne L_A1DE		;A1BF D0 1D
		inc ZP_6D		;A1C1 E6 6D
L_A1C3	cpx ZP_5C		;A1C3 E4 5C
		beq L_A1C9		;A1C5 F0 02
		inc ZP_6F		;A1C7 E6 6F
L_A1C9	ldy ZP_6F		;A1C9 A4 6F
		lda L_8049,Y	;A1CB B9 49 80
		sta ZP_6B		;A1CE 85 6B
		lda #$02		;A1D0 A9 02
		sta L_0E31		;A1D2 8D 31 0E
		lda #$00		;A1D5 A9 00
		sta ZP_73		;A1D7 85 73
		lda #$01		;A1D9 A9 01
		jmp L_A6B1		;A1DB 4C B1 A6
L_A1DE	ldy ZP_CD		;A1DE A4 CD
		lda L_0278,Y	;A1E0 B9 78 02
		and #$04		;A1E3 29 04 ; walk to left
		bne L_A1FF		;A1E5 D0 18
		sec				;A1E7 38
		lda ZP_6A		;A1E8 A5 6A
		sbc #$A0		;A1EA E9 A0
		sta ZP_6A		;A1EC 85 6A
		lda ZP_6B		;A1EE A5 6B
		sbc #$00		;A1F0 E9 00
		cmp L_8049		;A1F2 CD 49 80
		bcs L_A1FA		;A1F5 B0 03
		lda L_8049		;A1F7 AD 49 80
L_A1FA	sta ZP_6B		;A1FA 85 6B
		jmp L_A21B		;A1FC 4C 1B A2
L_A1FF	lda L_0278,Y	;A1FF B9 78 02
		and #$08		;A202 29 08 ; walk to right
		bne L_A21B		;A204 D0 15
		clc				;A206 18
		lda ZP_6A		;A207 A5 6A
		adc #$A0		;A209 69 A0
		sta ZP_6A		;A20B 85 6A
		lda ZP_6B		;A20D A5 6B
		adc #$00		;A20F 69 00
		sta ZP_6B		;A211 85 6B
		cmp #$9C		;A213 C9 9C
		bcc L_A21B		;A215 90 04
		lda #$9B		;A217 A9 9B
		sta ZP_6B		;A219 85 6B
L_A21B	lda L_0E33		;A21B AD 33 0E
		beq L_A255		;A21E F0 35
		dec ZP_BC		;A220 C6 BC
		bpl L_A24B		;A222 10 27
		lda ZP_BB		;A224 A5 BB
		cmp ZP_BA		;A226 C5 BA
		bne L_A23D		;A228 D0 13
		jmp rmt_hammer_msx_off
		lda #$00		;A22A A9 00
		;sta L_0E33		;A22C 8D 33 0E
L_A22F	sta L_0EC2		;A22F 8D C2 0E
		inc ZP_82		;A232 E6 82
		ldx ZP_6E		;A234 A6 6E
		lda L_A2CB,X	;A236 BD CB A2
		sta ZP_6E		;A239 85 6E
		bne L_A255		;A23B D0 18
L_A23D	lda #$06		;A23D A9 06
		sta ZP_BC		;A23F 85 BC
		inc L_0E33		;A241 EE 33 0E
		ldx ZP_6E		;A244 A6 6E
		lda L_A2CF,X	;A246 BD CF A2
		sta ZP_6E		;A249 85 6E
L_A24B	lda L_0EC2		;A24B AD C2 0E
		bne L_A255		;A24E D0 05
		lda #$B6		;A250 A9 B6
		sta L_0EC2		;A252 8D C2 0E
L_A255	lda L_0278,Y	;A255 B9 78 02
		and #$0C		;A258 29 0C
		cmp #$0C		;A25A C9 0C
		beq L_A276		;A25C F0 18
		ldx ZP_6E		;A25E A6 6E
		cpx #$0D		;A260 E0 0D
		bcs L_A266		;A262 B0 02
		ldx #$0D		;A264 A2 0D
L_A266	sta ZP_78		;A266 85 78
		and #$04		;A268 29 04
		beq L_A271		;A26A F0 05
		lda L_A2E3,X	;A26C BD E3 A2
		bne L_A274		;A26F D0 03
L_A271	lda L_A2D9,X	;A271 BD D9 A2
L_A274	sta ZP_6E		;A274 85 6E
L_A276	lda ZP_6B		;A276 A5 6B
		cmp ZP_5A		;A278 C5 5A
		beq L_A28C		;A27A F0 10
		lda ZP_6B		;A27C A5 6B
		and #$02		;A27E 29 02
		beq L_A289		;A280 F0 07
		ldx ZP_6E		;A282 A6 6E
		lda L_A2C7,X	;A284 BD C7 A2
		sta ZP_6E		;A287 85 6E
L_A289	jsr rmt_walk
		;jsr L_A2FA		;A289 20 FA A2
L_A28C	lda ZP_B9		;A28C A5 B9
		cmp #$03		;A28E C9 03
		bne L_A2B8		;A290 D0 26
		lda ZP_6B		;A292 A5 6B
		ldy L_0E32		;A294 AC 32 0E
		jsr L_9977		;A297 20 77 99
		tax				;A29A AA
		beq L_A2B8		;A29B F0 1B
		clc				;A29D 18
		adc ZP_6A		;A29E 65 6A
		sta ZP_6A		;A2A0 85 6A
		tya				;A2A2 98
		adc ZP_6B		;A2A3 65 6B
		tax				;A2A5 AA
		cmp L_8049		;A2A6 CD 49 80
		bcs L_A2B0		;A2A9 B0 05
		ldx L_8049		;A2AB AE 49 80
		bne L_A2B6		;A2AE D0 06
L_A2B0	cmp #$9C		;A2B0 C9 9C
		bcc L_A2B6		;A2B2 90 02
		ldx #$9B		;A2B4 A2 9B
L_A2B6	stx ZP_6B		;A2B6 86 6B
L_A2B8	lda ZP_6B		;A2B8 A5 6B
		cmp ZP_5A		;A2BA C5 5A
		bne L_A2CB		;A2BC D0 0D
		lda ZP_6D		;A2BE A5 6D
		cmp ZP_5B		;A2C0 C5 5B
		bne L_A2CB		;A2C2 D0 07
		lda ZP_6E		;A2C4 A5 6E
		cmp ZP_7A		;A2C6 C5 7A
L_A2C7	equ *-1			;!
		bne L_A2CB		;A2C8 D0 01
		rts				;A2CA 60
L_A2CB	jsr L_A6A3		;A2CB 20 A3 A6
		jsr L_A783		;A2CE 20 83 A7
L_A2CF	equ *-2			;!
		jmp L_A6B3		;A2D1 4C B3 A6
		
		dta $0E,$0F,$0D,$11,$12
L_A2D9	dta $10,$13,$14,$15,$16,$0D,$0D,$10,$10,$14
L_A2E3	dta $13,$16,$15,$0D,$0E,$0F,$10,$0E,$0F,$13,$14,$13,$14,$10,$11,$12
		dta $10,$11,$12,$15,$16,$15,$16
		
L_A2FA	lda L_0EC8		;A2FA AD C8 0E
		bne L_A308		;A2FD D0 09
		dec ZP_7B		;A2FF C6 7B
		bpl L_A30C		;A301 10 09
		lda #$0A		;A303 A9 0A
		sta L_0EC8		;A305 8D C8 0E
L_A308	lda #$07		;A308 A9 07
		sta ZP_7B		;A30A 85 7B
L_A30C	rts				;A30C 60
L_A30D	clc				;A30D 18
		ldx ZP_5C		;A30E A6 5C
		ldy L_1963,X	;A310 BC 63 19
		lda L_8042,Y	;A313 B9 42 80
		adc ZP_6F		;A316 65 6F
		tay				;A318 A8
		lda L_18C7,Y	;A319 B9 C7 18
		sta ZP_5E		;A31C 85 5E
		clc				;A31E 18
		lda ZP_6D		;A31F A5 6D
		adc #$10		;A321 69 10
		sta ZP_62		;A323 85 62
		ldy ZP_CD		;A325 A4 CD
		lda L_0278,Y	;A327 B9 78 02
		tay				;A32A A8
		lda ZP_62		;A32B A5 62
		cmp L_18C7,X	;A32D DD C7 18
		bne L_A343		;A330 D0 11
		lda L_182B,X	;A332 BD 2B 18
		and #$20		;A335 29 20
		beq L_A33F		;A337 F0 06
		cpy #$0E		;A339 C0 0E
		bne L_A360		;A33B D0 23
		beq L_A343		;A33D F0 04
L_A33F	cpy #$0D		;A33F C0 0D
		bne L_A360		;A341 D0 1D
L_A343	lda ZP_5E		;A343 A5 5E
		cmp ZP_62		;A345 C5 62
		bne L_A370		;A347 D0 27
		lda L_182B,X	;A349 BD 2B 18
		and #$20		;A34C 29 20
		beq L_A356		;A34E F0 06
		cpy #$0D		;A350 C0 0D
		bne L_A35A		;A352 D0 06
		beq L_A370		;A354 F0 1A
L_A356	cpy #$0E		;A356 C0 0E
		beq L_A370		;A358 F0 16
L_A35A	lda L_1963,X	;A35A BD 63 19
		sta L_0E32		;A35D 8D 32 0E
L_A360	lda #$01		;A360 A9 01
		sta L_0E31		;A362 8D 31 0E
		inc ZP_82		;A365 E6 82
		lda #$00		;A367 A9 00
		sta ZP_78		;A369 85 78
		lda #$01		;A36B A9 01
		jmp L_A6B1		;A36D 4C B1 A6
L_A370	tya				;A370 98
		and #$01		;A371 29 01
		bne L_A385		;A373 D0 10
		sec				;A375 38
		lda ZP_6C		;A376 A5 6C
		sbc #$90		;A378 E9 90
		sta ZP_6C		;A37A 85 6C
		lda ZP_6D		;A37C A5 6D
		sbc #$00		;A37E E9 00
		sta ZP_6D		;A380 85 6D
		jmp L_A397		;A382 4C 97 A3
L_A385	tya				;A385 98
		and #$02		;A386 29 02
		bne L_A397		;A388 D0 0D
		clc				;A38A 18
		lda ZP_6C		;A38B A5 6C
		adc #$90		;A38D 69 90
		sta ZP_6C		;A38F 85 6C
		lda ZP_6D		;A391 A5 6D
		adc #$00		;A393 69 00
		sta ZP_6D		;A395 85 6D
L_A397	lda L_182B,X	;A397 BD 2B 18
		tay				;A39A A8
		and #$08		;A39B 29 08
		beq L_A3C1		;A39D F0 22
		tya				;A39F 98
		and #$20		;A3A0 29 20
		bne L_A3B3		;A3A2 D0 0F
		clc				;A3A4 18
		lda L_18C7,X	;A3A5 BD C7 18
		adc #$0B		;A3A8 69 0B
		cmp ZP_6D		;A3AA C5 6D
		bcs L_A3C1		;A3AC B0 13
		sta ZP_6D		;A3AE 85 6D
		jmp L_A3C1		;A3B0 4C C1 A3
L_A3B3	sec				;A3B3 38
		lda L_18C7,X	;A3B4 BD C7 18
		sbc #$15		;A3B7 E9 15
		cmp ZP_6D		;A3B9 C5 6D
		bcc L_A3C1		;A3BB 90 04
		tay				;A3BD A8
		dey				;A3BE 88
		sta ZP_6D		;A3BF 85 6D
L_A3C1	lda ZP_6B		;A3C1 A5 6B
		cmp ZP_5A		;A3C3 C5 5A
		bne L_A3CD		;A3C5 D0 06
		lda ZP_6D		;A3C7 A5 6D
		cmp ZP_5B		;A3C9 C5 5B
		beq L_A400		;A3CB F0 33
L_A3CD	ldy ZP_5C		;A3CD A4 5C
		ldx L_18C7,Y	;A3CF BE C7 18
		lda L_182B,Y	;A3D2 B9 2B 18
		and #$20		;A3D5 29 20
		beq L_A3DB		;A3D7 F0 02
		ldx ZP_5E		;A3D9 A6 5E
L_A3DB	txa				;A3DB 8A
		sec				;A3DC 38
		sbc ZP_6D		;A3DD E5 6D
		bmi L_A3EB		;A3DF 30 0A
		cmp #$03		;A3E1 C9 03
		bcc L_A3EB		;A3E3 90 06
		tax				;A3E5 AA
		lda L_A40C,X	;A3E6 BD 0C A4
		bne L_A3FA		;A3E9 D0 0F
L_A3EB	ldx ZP_73		;A3EB A6 73
		lda L_A401,X	;A3ED BD 01 A4
		bpl L_A3F7		;A3F0 10 05
		ldx #$00		;A3F2 A2 00
		lda L_A401		;A3F4 AD 01 A4
L_A3F7	inx				;A3F7 E8
		stx ZP_73		;A3F8 86 73
L_A3FA	jsr L_A6B1		;A3FA 20 B1 A6
		jsr rmt_ladder
		;jsr L_A2FA		;A3FD 20 FA A2
L_A400	rts				;A400 60

L_A401	dta $00,$00,$00,$00,$01,$01,$02,$02,$02,$02,$01
L_A40C	dta $01,$FF,$05,$05,$03,$03,$03,$04,$04,$04,$05,$05,$05,$01,$01,$01
		dta $01
		
L_A41D	sta ZP_76		;A41D 85 76
		lda #$03		;A41F A9 03
		sta L_0E31		;A421 8D 31 0E
		lda #$00		;A424 A9 00
		sta L_0ED5		;A426 8D D5 0E
		lda #$16		;A429 A9 16
		sta L_0ED7		;A42B 8D D7 0E
		lda #$A3		;A42E A9 A3	
		sta L_0ED8		;A430 8D D8 0E
		jmp rtm_hero_fall
		;sta L_0EC0		;A433 8D C0 0E
L_A436	clc				;A436 18
		lda ZP_6D		;A437 A5 6D
		adc #$10		;A439 69 10
		sta ZP_5E		;A43B 85 5E
		ldx #$05		;A43D A2 05
L_A43F	clc				;A43F 18
		lda ZP_6F		;A440 A5 6F
		adc L_8042,X	;A442 7D 42 80
		tay				;A445 A8
		lda L_182B,Y	;A446 B9 2B 18
		and #$07		;A449 29 07
		beq L_A457		;A44B F0 0A
		sec				;A44D 38
		lda L_18C7,Y	;A44E B9 C7 18
		sbc ZP_5E		;A451 E5 5E
		cmp #$03		;A453 C9 03
		bcc L_A46C		;A455 90 15
L_A457	lda ZP_5D		;A457 A5 5D
		beq L_A46F		;A459 F0 14
		lda L_182C,Y	;A45B B9 2C 18
		and #$07		;A45E 29 07
		beq L_A46F		;A460 F0 0D
		sec				;A462 38
		lda L_18C8,Y	;A463 B9 C8 18
		sbc ZP_5E		;A466 E5 5E
		cmp #$03		;A468 C9 03
		bcs L_A46F		;A46A B0 03
L_A46C	jmp L_A042		;A46C 4C 42 A0
L_A46F	dex				;A46F CA
		bpl L_A43F		;A470 10 CD
		lda ZP_6F		;A472 A5 6F
		beq L_A4A1		;A474 F0 2B
		lda ZP_5D		;A476 A5 5D
		beq L_A4A1		;A478 F0 27
		lda ZP_76		;A47A A5 76
		cmp #$08		;A47C C9 08
		bne L_A490		;A47E D0 10
		clc				;A480 18
		lda #$50		;A481 A9 50
		adc ZP_6A		;A483 65 6A
		sta ZP_6A		;A485 85 6A
		lda #$00		;A487 A9 00
		adc ZP_6B		;A489 65 6B
		sta ZP_6B		;A48B 85 6B
		jmp L_A4A1		;A48D 4C A1 A4
L_A490	cmp #$04		;A490 C9 04
		bne L_A4A1		;A492 D0 0D
		sec				;A494 38
		lda ZP_6A		;A495 A5 6A
		sbc #$50		;A497 E9 50
		sta ZP_6A		;A499 85 6A
		lda ZP_6B		;A49B A5 6B
		sbc #$00		;A49D E9 00
		sta ZP_6B		;A49F 85 6B
L_A4A1	jsr L_A6A3		;A4A1 20 A3 A6
		clc				;A4A4 18
		lda #$14		;A4A5 A9 14
		adc ZP_74		;A4A7 65 74
		sta ZP_74		;A4A9 85 74
		lda #$00		;A4AB A9 00
		adc ZP_75		;A4AD 65 75
		sta ZP_75		;A4AF 85 75
		lda ZP_75		;A4B1 A5 75
		cmp #$03		;A4B3 C9 03
		bne L_A4BF		;A4B5 D0 08
		lda #$FF		;A4B7 A9 FF
		sta ZP_74		;A4B9 85 74
		lda #$02		;A4BB A9 02
		sta ZP_75		;A4BD 85 75
L_A4BF	clc				;A4BF 18
		lda ZP_74		;A4C0 A5 74
		adc ZP_6C		;A4C2 65 6C
		sta ZP_6C		;A4C4 85 6C
		lda ZP_75		;A4C6 A5 75
		adc ZP_6D		;A4C8 65 6D
		sta ZP_6D		;A4CA 85 6D
		cmp ZP_5B		;A4CC C5 5B
		bne L_A4D6		;A4CE D0 06
		lda ZP_5A		;A4D0 A5 5A
		cmp ZP_6B		;A4D2 C5 6B
		beq L_A4D9		;A4D4 F0 03
L_A4D6	jmp L_A6B3		;A4D6 4C B3 A6
L_A4D9	rts				;A4D9 60
L_A4DA	clc				;A4DA 18
		lda L_8648		;A4DB AD 48 86
		adc L_8649		;A4DE 6D 49 86
		cmp #$20		;A4E1 C9 20
		bne L_A4F2		;A4E3 D0 0D
		lda ZP_6D		;A4E5 A5 6D
		cmp ZP_71		;A4E7 C5 71
		bcc L_A4F7		;A4E9 90 0C
		sec				;A4EB 38
		sbc ZP_71		;A4EC E5 71
		cmp #$11		;A4EE C9 11
		bcc L_A4F7		;A4F0 90 05
L_A4F2	lda ZP_76		;A4F2 A5 76
		jmp L_A41D		;A4F4 4C 1D A4
L_A4F7	clc				;A4F7 18
		lda ZP_6D		;A4F8 A5 6D
		adc #$10		;A4FA 69 10
		sta ZP_60		;A4FC 85 60
		lda #$05		;A4FE A9 05
		sta ZP_5F		;A500 85 5F
L_A502	clc				;A502 18
		lda ZP_6F		;A503 A5 6F
		ldx ZP_5F		;A505 A6 5F
		adc L_8042,X	;A507 7D 42 80
		sta ZP_61		;A50A 85 61
		tax				;A50C AA
		lda ZP_60		;A50D A5 60
		sec				;A50F 38
		sbc L_18C7,X	;A510 FD C7 18
		cmp #$03		;A513 C9 03
		bcs L_A51E		;A515 B0 07
		lda L_182B,X	;A517 BD 2B 18
		and #$07		;A51A 29 07
		bne L_A533		;A51C D0 15
L_A51E	lda ZP_5D		;A51E A5 5D
		beq L_A57E		;A520 F0 5C
		sec				;A522 38
		lda ZP_60		;A523 A5 60
		sbc L_18C8,X	;A525 FD C8 18
		cmp #$03		;A528 C9 03
		bcs L_A57E		;A52A B0 52
		lda L_182C,X	;A52C BD 2C 18
		and #$07		;A52F 29 07
		beq L_A57E		;A531 F0 4B
L_A533	lda ZP_75		;A533 A5 75
		bmi L_A57E		;A535 30 47
		lda ZP_5F		;A537 A5 5F
		sta L_0E32		;A539 8D 32 0E
		ldx ZP_77		;A53C A6 77
		beq L_A55E		;A53E F0 1E
		cpx #$04		;A540 E0 04
		bcc L_A546		;A542 90 02
		ldx #$03		;A544 A2 03
L_A546	lda L_A57A,X	;A546 BD 7A A5
		jsr L_8B5C		;A549 20 5C 8B
		lda #$2D		;A54C A9 2D
		jsr rmt_points
		;sta L_0EBB		;A54E 8D BB 0E
		ldx #$0F		;A551 A2 0F
L_A553	lda L_0E3B,X	;A553 BD 3B 0E
		and #$BF		;A556 29 BF
		sta L_0E3B,X	;A558 9D 3B 0E
		dex				;A55B CA
		bne L_A553		;A55C D0 F5
L_A55E	lda #$01		;A55E A9 01
L_A560	sta L_0E31		;A560 8D 31 0E
		inc ZP_82		;A563 E6 82
		ldx ZP_6E		;A565 A6 6E
		lda L_0E33		;A567 AD 33 0E
		beq L_A571		;A56A F0 05
		lda L_A560,X	;A56C BD 60 A5
		bne L_A574		;A56F D0 03
L_A571	lda L_A573,X	;A571 BD 73 A5
L_A573	equ *-1			;!
L_A574	jmp L_A6B1		;A574 4C B1 A6

		dta $13,$15,$0D
L_A57A	dta $10,$80,$81,$83

L_A57E	dec ZP_5F		;A57E C6 5F
		bmi L_A585		;A580 30 03
		jmp L_A502		;A582 4C 02 A5
L_A585	ldx ZP_5C		;A585 A6 5C
		sec				;A587 38
		lda L_18C7,X	;A588 BD C7 18
		sbc ZP_6D		;A58B E5 6D
		cmp #$0C		;A58D C9 0C
		bcc L_A5EA		;A58F 90 59
		lda L_182B,X	;A591 BD 2B 18
		tay				;A594 A8
		and #$80		;A595 29 80
		bne L_A5AD		;A597 D0 14
		inx				;A599 E8
		ldy ZP_6F		;A59A A4 6F
		lda ZP_6B		;A59C A5 6B
		sbc L_8049,Y	;A59E F9 49 80
		cmp #$03		;A5A1 C9 03
		bcc L_A5EA		;A5A3 90 45
		lda L_182B,X	;A5A5 BD 2B 18
		tay				;A5A8 A8
		and #$80		;A5A9 29 80
		beq L_A5EA		;A5AB F0 3D
L_A5AD	tya				;A5AD 98
		and #$7F		;A5AE 29 7F
		sta L_182B,X	;A5B0 9D 2B 18
		ldx #$00		;A5B3 A2 00
		lda L_0E32		;A5B5 AD 32 0E
		cmp L_1800		;A5B8 CD 00 18
		beq L_A5BE		;A5BB F0 01
		inx				;A5BD E8
L_A5BE	lda #$A8		;A5BE A9 A8
		sta ZP_A3		;A5C0 85 A3
		lda #$B5		;A5C2 A9 B5
		sta ZP_A4		;A5C4 85 A4
		lda L_1802,X	;A5C6 BD 02 18
		ldy L_1804,X	;A5C9 BC 04 18
		tax				;A5CC AA
		jsr L_AAB9		;A5CD 20 B9 AA
		lda #$06		;A5D0 A9 06
		sta ZP_BC		;A5D2 85 BC
		clc				;A5D4 18
		lda ZP_BA		;A5D5 A5 BA
		adc #$05		;A5D7 69 05
		sta ZP_BB		;A5D9 85 BB
		inc L_0E33		;A5DB EE 33 0E
		lda #$2D		;A5DE A9 2D
		jsr rmt_points
		jmp rmt_hammer_msx
		;sta L_0EBB		;A5E0 8D BB 0E
		;clc				;A5E3 18
		;lda ZP_6E		;A5E4 A5 6E
L_A5E6	adc #$11		;A5E6 69 11
		sta ZP_6E		;A5E8 85 6E
L_A5EA	ldy ZP_76		;A5EA A4 76
		lda ZP_6B		;A5EC A5 6B
		cpy #$04		;A5EE C0 04
		bne L_A5FB		;A5F0 D0 09
		cmp L_8049		;A5F2 CD 49 80
		bcs L_A614		;A5F5 B0 1D
		lda #$08		;A5F7 A9 08
		bne L_A605		;A5F9 D0 0A
L_A5FB	cpy #$08		;A5FB C0 08
		bne L_A614		;A5FD D0 15
		cmp #$9C		;A5FF C9 9C
		bcc L_A614		;A601 90 11
		lda #$04		;A603 A9 04
L_A605	sta ZP_76		;A605 85 76
		sec				;A607 38
		lda #$00		;A608 A9 00
		sbc ZP_74		;A60A E5 74
		sta ZP_74		;A60C 85 74
		lda #$00		;A60E A9 00
		sbc ZP_75		;A610 E5 75
		sta ZP_75		;A612 85 75
L_A614	ldx ZP_5C		;A614 A6 5C
		jsr L_A67A		;A616 20 7A A6
		lda ZP_6F		;A619 A5 6F
		cmp #$19		;A61B C9 19
		bcs L_A623		;A61D B0 04
		inx				;A61F E8
		jsr L_A67A		;A620 20 7A A6
L_A623	lda ZP_76		;A623 A5 76
		cmp #$08		;A625 C9 08
		bne L_A639		;A627 D0 10
		clc				;A629 18
		lda #$50		;A62A A9 50
		adc ZP_6A		;A62C 65 6A
		sta ZP_6A		;A62E 85 6A
		lda #$00		;A630 A9 00
		adc ZP_6B		;A632 65 6B
		sta ZP_6B		;A634 85 6B
		jmp L_A64A		;A636 4C 4A A6
L_A639	cmp #$04		;A639 C9 04
		bne L_A650		;A63B D0 13
		sec				;A63D 38
		lda ZP_6A		;A63E A5 6A
		sbc #$50		;A640 E9 50
		sta ZP_6A		;A642 85 6A
		lda ZP_6B		;A644 A5 6B
		sbc #$00		;A646 E9 00
		sta ZP_6B		;A648 85 6B
L_A64A	jsr L_A6A3		;A64A 20 A3 A6
		jsr L_A783		;A64D 20 83 A7
L_A650	clc				;A650 18
		lda #$14		;A651 A9 14
		adc ZP_74		;A653 65 74
		sta ZP_74		;A655 85 74
		lda #$00		;A657 A9 00
		adc ZP_75		;A659 65 75
		sta ZP_75		;A65B 85 75
		clc				;A65D 18
		lda ZP_74		;A65E A5 74
		adc ZP_6C		;A660 65 6C
		sta ZP_6C		;A662 85 6C
		lda ZP_75		;A664 A5 75
		adc ZP_6D		;A666 65 6D
		sta ZP_6D		;A668 85 6D
		lda ZP_6D		;A66A A5 6D
		cmp ZP_5B		;A66C C5 5B
		bne L_A676		;A66E D0 06
		lda ZP_6B		;A670 A5 6B
		cmp ZP_5A		;A672 C5 5A
		beq L_A679		;A674 F0 03
L_A676	jmp L_A6B3		;A676 4C B3 A6
L_A679	rts				;A679 60
L_A67A	lda L_19FF,X	;A67A BD FF 19
		beq L_A679		;A67D F0 FA
		tay				;A67F A8
		lda L_0E3B,Y	;A680 B9 3B 0E
		beq L_A679		;A683 F0 F4
		and #$40		;A685 29 40
		bne L_A679		;A687 D0 F0
		lda L_0E32		;A689 AD 32 0E
		cmp L_0EAB,Y	;A68C D9 AB 0E
		bne L_A679		;A68F D0 E8
		lda L_0E4B,Y	;A691 B9 4B 0E
		cmp #$02		;A694 C9 02
		beq L_A679		;A696 F0 E1
		inc ZP_77		;A698 E6 77
		lda #$40		;A69A A9 40
		ora L_0E3B,Y	;A69C 19 3B 0E
		sta L_0E3B,Y	;A69F 99 3B 0E
		rts				;A6A2 60
L_A6A3	txa				;A6A3 8A
		pha				;A6A4 48
		ldy ZP_6F		;A6A5 A4 6F
		lda ZP_6B		;A6A7 A5 6B
		jsr L_994A		;A6A9 20 4A 99
		pla				;A6AC 68
		tax				;A6AD AA
		sty ZP_6F		;A6AE 84 6F
		rts				;A6B0 60
L_A6B1	sta ZP_6E		;A6B1 85 6E
L_A6B3	ldx ZP_7A		;A6B3 A6 7A
		lda L_B9E6,X	;A6B5 BD E6 B9
		beq L_A6D1		;A6B8 F0 17
		and #$7F		;A6BA 29 7F
		tay				;A6BC A8
		ldx ZP_79		;A6BD A6 79
		lda #$00		;A6BF A9 00
L_A6C1	sta L_1400,X	;A6C1 9D 00 14
		sta L_1500,X	;A6C4 9D 00 15
		sta L_1600,X	;A6C7 9D 00 16
		sta L_1300,X	;A6CA 9D 00 13
		inx				;A6CD E8
		dey				;A6CE 88
		bne L_A6C1		;A6CF D0 F0
L_A6D1	ldx ZP_6E		;A6D1 A6 6E
		stx ZP_7A		;A6D3 86 7A
		clc				;A6D5 18
		lda ZP_6B		;A6D6 A5 6B
		adc L_BA19,X	;A6D8 7D 19 BA
		adc #$30		;A6DB 69 30
		sta L_D000		;A6DD 8D 00 D0
		sta L_D002		;A6E0 8D 02 D0
		clc				;A6E3 18
		lda ZP_6B		;A6E4 A5 6B
		adc L_BA32,X	;A6E6 7D 32 BA
		adc #$30		;A6E9 69 30
		sta L_D001		;A6EB 8D 01 D0
		clc				;A6EE 18
		ldy L_BA4B,X	;A6EF BC 4B BA
		lda ZP_6D		;A6F2 A5 6D
		adc L_BA00,X	;A6F4 7D 00 BA
		adc #$20		;A6F7 69 20
		sta ZP_5B		;A6F9 85 5B
		sta ZP_79		;A6FB 85 79
		lda L_B9E6,X	;A6FD BD E6 B9
		beq L_A776		;A700 F0 74
		asl @			;A702 0A
		php				;A703 08
		lsr @			;A704 4A
		and #$3F		;A705 29 3F
		sta ZP_5A		;A707 85 5A
		plp				;A709 28
L_A70A	lda L_BA64,Y	;A70A B9 64 BA
		bcc L_A713		;A70D 90 04
		tax				;A70F AA
		lda L_0D00,X	;A710 BD 00 0D
L_A713	ldx ZP_5B		;A713 A6 5B
		sta L_1400,X	;A715 9D 00 14
		lda L_BB40,Y	;A718 B9 40 BB
		bcc L_A721		;A71B 90 04
		tax				;A71D AA
		lda L_0D00,X	;A71E BD 00 0D
L_A721	ldx ZP_5B		;A721 A6 5B
		sta L_1500,X	;A723 9D 00 15
		lda L_BC1C,Y	;A726 B9 1C BC
		bcc L_A72F		;A729 90 04
		tax				;A72B AA
		lda L_0D00,X	;A72C BD 00 0D
L_A72F	ldx ZP_5B		;A72F A6 5B
		sta L_1600,X	;A731 9D 00 16
		iny				;A734 C8
		inc ZP_5B		;A735 E6 5B
		dec ZP_5A		;A737 C6 5A
		bne L_A70A		;A739 D0 CF
		ldx ZP_6E		;A73B A6 6E
		lda L_B9E6,X	;A73D BD E6 B9
		and #$40		;A740 29 40
		beq L_A776		;A742 F0 32
		lda #$3A		;A744 A9 3A
		ldx #$3D		;A746 A2 3D
		ldy #$38		;A748 A0 38
		bcc L_A753		;A74A 90 07
		lda #$29		;A74C A9 29
		ldx #$2B		;A74E A2 2B
		ldy #$2D		;A750 A0 2D
		clc				;A752 18
L_A753	adc ZP_6B		;A753 65 6B
		sta L_D004		;A755 8D 04 D0
		clc				;A758 18
		txa				;A759 8A
		adc ZP_6B		;A75A 65 6B
		sta L_D005		;A75C 8D 05 D0
		tya				;A75F 98
		clc				;A760 18
		adc ZP_6B		;A761 65 6B
		sta L_D006		;A763 8D 06 D0
		ldy ZP_79		;A766 A4 79
		ldx #$00		;A768 A2 00
L_A76A	lda L_A777,X	;A76A BD 77 A7
		sta L_1303,Y	;A76D 99 03 13
		iny				;A770 C8
		inx				;A771 E8
		cpx #$0C		;A772 E0 0C
		bcc L_A76A		;A774 90 F4
L_A776	rts				;A776 60

L_A777	dta $02,$01,$00,$0B,$0B,$0B,$0B,$3B,$0B,$0B,$0B,$0B

L_A783	ldx ZP_5C		;A783 A6 5C
		lda L_182B,X	;A785 BD 2B 18
		and #$40		;A788 29 40
		beq L_A7E4		;A78A F0 58
		ldy ZP_70		;A78C A4 70
		lda ZP_78		;A78E A5 78
		and #$04		;A790 29 04
		bne L_A79A		;A792 D0 06
		cpy ZP_6F		;A794 C4 6F
		bne L_A7AA		;A796 D0 12
		beq L_A7E4		;A798 F0 4A
L_A79A	lda ZP_78		;A79A A5 78
		and #$08		;A79C 29 08
		bne L_A7E4		;A79E D0 44
		sec				;A7A0 38
		lda L_8049,Y	;A7A1 B9 49 80
		sbc ZP_6B		;A7A4 E5 6B
		cmp #$02		;A7A6 C9 02
		bcc L_A7E4		;A7A8 90 3A
L_A7AA	lda L_182B,X	;A7AA BD 2B 18
		and #$B8		;A7AD 29 B8
		sta L_182B,X	;A7AF 9D 2B 18
		lda L_18C7,X	;A7B2 BD C7 18
		pha				;A7B5 48
		lda L_8049,Y	;A7B6 B9 49 80
		and #$03		;A7B9 29 03
		lsr @			;A7BB 4A
		tax				;A7BC AA
		lda L_A7E7,X	;A7BD BD E7 A7
		sta ZP_A4		;A7C0 85 A4
		lda L_A7E5,X	;A7C2 BD E5 A7
		sta ZP_A3		;A7C5 85 A3
		ldx L_8049,Y	;A7C7 BE 49 80
		pla				;A7CA 68
		tay				;A7CB A8
		jsr L_AAB9		;A7CC 20 B9 AA
		ldx L_B205		;A7CF AE 05 B2
		lda #$00		;A7D2 A9 00
		dec ZP_C5		;A7D4 C6 C5
		beq L_A7E1		;A7D6 F0 09
		lda #$2D		;A7D8 A9 2D
		jsr rmt_points
		;sta L_0EBB		;A7DA 8D BB 0E
		lda #$80		;A7DD A9 80
		sta (ZP_00,X)	;A7DF 81 00
L_A7E1	jmp L_8B5C		;A7E1 4C 5C 8B
L_A7E4	rts				;A7E4 60

L_A7E5	dta $F8,$0A
L_A7E7	dta $B5,$B6

L_A7E9	lda #$02		;A7E9 A9 02
		sta ZP_5A		;A7EB 85 5A
		lda ZP_14		;A7ED A5 14
		and #$01		;A7EF 29 01
		bne L_A817		;A7F1 D0 24
L_A7F3	ldy ZP_5A		;A7F3 A4 5A
		ldx L_8042,Y	;A7F5 BE 42 80
		dec L_18CB,X	;A7F8 DE CB 18
		dec L_18CC,X	;A7FB DE CC 18
		lda L_18CB,X	;A7FE BD CB 18
		cmp #$37		;A801 C9 37
		bcs L_A80D		;A803 B0 08
		lda #$BE		;A805 A9 BE
		sta L_18CB,X	;A807 9D CB 18
		sta L_18CC,X	;A80A 9D CC 18
L_A80D	ldy #$07		;A80D A0 07
		jsr L_A83B		;A80F 20 3B A8
		dec ZP_5A		;A812 C6 5A
		bpl L_A7F3		;A814 10 DD
		rts				;A816 60
L_A817	ldy ZP_5A		;A817 A4 5A
		ldx L_8042,Y	;A819 BE 42 80
		inc L_18D3,X	;A81C FE D3 18
		inc L_18D4,X	;A81F FE D4 18
		lda L_18D3,X	;A822 BD D3 18
		cmp #$BF		;A825 C9 BF
		bcc L_A831		;A827 90 08
		lda #$37		;A829 A9 37
		sta L_18D3,X	;A82B 9D D3 18
		sta L_18D4,X	;A82E 9D D4 18
L_A831	ldy #$13		;A831 A0 13
		jsr L_A83B		;A833 20 3B A8
		dec ZP_5A		;A836 C6 5A
		bpl L_A817		;A838 10 DD
		rts				;A83A 60
L_A83B	sta ZP_5E		;A83B 85 5E
		sty ZP_5F		;A83D 84 5F
		ldx #$07		;A83F A2 07
		stx ZP_60		;A841 86 60
		ldx #$00		;A843 A2 00
		stx ZP_61		;A845 86 61
		cmp #$3E		;A847 C9 3E
		bcs L_A861		;A849 B0 16
		sec				;A84B 38
		lda #$3E		;A84C A9 3E
		sbc ZP_5E		;A84E E5 5E
		sta ZP_61		;A850 85 61
		clc				;A852 18
		adc ZP_5E		;A853 65 5E
		sta ZP_5E		;A855 85 5E
		sec				;A857 38
		lda ZP_60		;A858 A5 60
		sbc ZP_61		;A85A E5 61
		sta ZP_60		;A85C 85 60
		jmp L_A86B		;A85E 4C 6B A8
L_A861	cmp #$B7		;A861 C9 B7
		bcc L_A86B		;A863 90 06
		lda #$BE		;A865 A9 BE
		sbc ZP_5E		;A867 E5 5E
		sta ZP_60		;A869 85 60
L_A86B	clc				;A86B 18
		ldx ZP_5E		;A86C A6 5E
		lda ZP_5F		;A86E A5 5F
		adc L_1000,X	;A870 7D 00 10
		sta ZP_5C		;A873 85 5C
		lda #$00		;A875 A9 00
		adc L_1100,X	;A877 7D 00 11
		sta ZP_5D		;A87A 85 5D
		ldy #$00		;A87C A0 00
		lda ZP_61		;A87E A5 61
		asl @			;A880 0A
		adc ZP_61		;A881 65 61
		tax				;A883 AA
L_A884	lda L_B686,X	;A884 BD 86 B6
		sta (ZP_5C),Y	;A887 91 5C
		inx				;A889 E8
		iny				;A88A C8
		lda L_B686,X	;A88B BD 86 B6
		sta (ZP_5C),Y	;A88E 91 5C
		inx				;A890 E8
		iny				;A891 C8
		lda L_B686,X	;A892 BD 86 B6
		sta (ZP_5C),Y	;A895 91 5C
		inx				;A897 E8
		clc				;A898 18
		tya				;A899 98
		adc #$26		;A89A 69 26
		tay				;A89C A8
		cmp #$28		;A89D C9 28
		bcs L_A8A3		;A89F B0 02
		inc ZP_5D		;A8A1 E6 5D
L_A8A3	dec ZP_60		;A8A3 C6 60
		bpl L_A884		;A8A5 10 DD
		rts				;A8A7 60
L_A8A8	lda ZP_68		;A8A8 A5 68
		beq L_A8C0		;A8AA F0 14
		dec ZP_C2		;A8AC C6 C2
		bpl L_A8C0		;A8AE 10 10
		ldx ZP_C1		;A8B0 A6 C1
		jsr L_A8C7		;A8B2 20 C7 A8
		dec ZP_C1		;A8B5 C6 C1
		bpl L_A8C1		;A8B7 10 08
		dec ZP_68		;A8B9 C6 68
		lda #$2D		;A8BB A9 2D
		jsr rmt_points
		;sta L_0EBB		;A8BD 8D BB 0E		
L_A8C0	rts				;A8C0 60
L_A8C1	ldx ZP_C1		;A8C1 A6 C1
		lda #$04		;A8C3 A9 04
		sta ZP_C2		;A8C5 85 C2
L_A8C7	lda L_A8F1,X	;A8C7 BD F1 A8
		sta ZP_A4		;A8CA 85 A4
		lda L_A8E2,X	;A8CC BD E2 A8
		sta ZP_A3		;A8CF 85 A3
		clc				;A8D1 18
		lda ZP_C4		;A8D2 A5 C4
		adc L_A90F,X	;A8D4 7D 0F A9
		tay				;A8D7 A8
		clc				;A8D8 18
		lda ZP_C3		;A8D9 A5 C3
		adc L_A900,X	;A8DB 7D 00 A9
		tax				;A8DE AA
		jmp L_AAB9		;A8DF 4C B9 AA
		
L_A8E2	dta $6E,$12,$06,$F6,$E2,$C6,$E2,$C6,$E2,$C6,$E2,$C6,$E2,$C6,$6E
L_A8F1	dta $B5,$B9,$B9,$B8,$B8,$B8,$B8,$B8,$B8,$B8,$B8,$B8,$B8,$B8,$B5
L_A900	dta $00,$FC,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
L_A90F	dta $00,$FB,$04,$03,$02,$00,$02,$00,$02,$00,$02,$00,$02,$00,$00

L_A91E	clc				;A91E 18
		lda ZP_5A		;A91F A5 5A
		adc ZP_5C		;A921 65 5C
		sta ZP_5C		;A923 85 5C
		clc				;A925 18
		lda ZP_5B		;A926 A5 5B
		adc ZP_5D		;A928 65 5D
		sta ZP_5D		;A92A 85 5D
		ldy #$0F		;A92C A0 0F
L_A92E	lda L_0E3B,Y	;A92E B9 3B 0E
		bmi L_A964		;A931 30 31
		and #$05		;A933 29 05
		cmp #$01		;A935 C9 01
		bne L_A964		;A937 D0 2B
		lda L_0E6B,Y	;A939 B9 6B 0E
		asl @			;A93C 0A
		tax				;A93D AA
		lda L_0380,Y	;A93E B9 80 03
		adc L_84C1,X	;A941 7D C1 84
		cmp ZP_5D		;A944 C5 5D
		bcs L_A964		;A946 B0 1C
		jmp collision_fix
		;adc L_84E9,X	;A948 7D E9 84
L_A94B	cmp ZP_5B		;A94B C5 5B
		bcc L_A964		;A94D 90 15
		clc				;A94F 18
		lda L_0360,Y	;A950 B9 60 03
		adc L_84C0,Y	;A953 79 C0 84
		cmp ZP_5C		;A956 C5 5C
		bcs L_A964		;A958 B0 0A				
		adc L_84E8,X	;A95A 7D E8 84
		cmp ZP_5A		;A95D C5 5A
		bcc L_A964		;A95F 90 03
		tya				;A961 98
		sec				;A962 38
		rts				;A963 60
L_A964	dey				;A964 88
		bne L_A92E		;A965 D0 C7
		clc				;A967 18
		rts				;A968 60
L_A969	clc				;A969 18
		jsr L_A9FF		;A96A 20 FF A9
		ldx #$00		;A96D A2 00
		stx ZP_98		;A96F 86 98
		bcc L_A980		;A971 90 0D
L_A973	jsr L_A9FA		;A973 20 FA A9
		bcc L_A980		;A976 90 08
		rts				;A978 60
L_A979	sta ZP_97		;A979 85 97
L_A97B	jsr L_AA69		;A97B 20 69 AA
		bcs L_A9F7		;A97E B0 77
L_A980	dec ZP_91		;A980 C6 91
		bmi L_A9F7		;A982 30 73
		lda #$00		;A984 A9 00
		sta ZP_9A		;A986 85 9A
		lda ZP_90		;A988 A5 90
		sta ZP_8F		;A98A 85 8F
		ldx ZP_8E		;A98C A6 8E
		lda L_1100,X	;A98E BD 00 11
		sta ZP_95		;A991 85 95
		lda L_1000,X	;A993 BD 00 10
		sta ZP_94		;A996 85 94
		inc ZP_8E		;A998 E6 8E
		lda ZP_92		;A99A A5 92
		sta ZP_50		;A99C 85 50
L_A99E	ldy ZP_98		;A99E A4 98
		lda (ZP_96),Y	;A9A0 B1 96
		inc ZP_98		;A9A2 E6 98
		pha				;A9A4 48
		ldx ZP_99		;A9A5 A6 99
		beq L_A9B2		;A9A7 F0 09
L_A9A9	lsr ZP_9A		;A9A9 46 9A
		ror @			;A9AB 6A
		lsr ZP_9A		;A9AC 46 9A
		ror @			;A9AE 6A
		dex				;A9AF CA
		bne L_A9A9		;A9B0 D0 F7
L_A9B2	sta ZP_51		;A9B2 85 51
		tax				;A9B4 AA
		lda L_1B00,X	;A9B5 BD 00 1B
		ldy ZP_8F		;A9B8 A4 8F
		and (ZP_94),Y	;A9BA 31 94
		ora ZP_51		;A9BC 05 51
		sta (ZP_94),Y	;A9BE 91 94
		inc ZP_8F		;A9C0 E6 8F
		pla				;A9C2 68
		sta ZP_9A		;A9C3 85 9A
		dec ZP_50		;A9C5 C6 50
		bne L_A99E		;A9C7 D0 D5
		ldy ZP_9A		;A9C9 A4 9A
		beq L_A9ED		;A9CB F0 20
		ldx ZP_99		;A9CD A6 99
		beq L_A9ED		;A9CF F0 1C
		lda ZP_8F		;A9D1 A5 8F
		cmp #$28		;A9D3 C9 28
		bcs L_A9ED		;A9D5 B0 16
		tya				;A9D7 98
L_A9D8	asl @			;A9D8 0A
		asl @			;A9D9 0A
		inx				;A9DA E8
		cpx #$04		;A9DB E0 04
		bcc L_A9D8		;A9DD 90 F9
		sta ZP_51		;A9DF 85 51
		tax				;A9E1 AA
		lda L_1B00,X	;A9E2 BD 00 1B
		ldy ZP_8F		;A9E5 A4 8F
		and (ZP_94),Y	;A9E7 31 94
		ora ZP_51		;A9E9 05 51
		sta (ZP_94),Y	;A9EB 91 94
L_A9ED	clc				;A9ED 18
		lda ZP_93		;A9EE A5 93
		adc ZP_98		;A9F0 65 98
		sta ZP_98		;A9F2 85 98
		jmp L_A980		;A9F4 4C 80 A9
L_A9F7	rts				;A9F7 60
L_A9F8	sta ZP_97		;A9F8 85 97
L_A9FA	jsr L_AA69		;A9FA 20 69 AA
		bcs L_AA63		;A9FD B0 64
L_A9FF	lda ZP_91		;A9FF A5 91
		sta ZP_51		;AA01 85 51
		lda ZP_8E		;AA03 A5 8E
		sta ZP_9A		;AA05 85 9A
		ldx ZP_99		;AA07 A6 99
		lda L_AA65,X	;AA09 BD 65 AA
		sta ZP_8F		;AA0C 85 8F
		ldx #$00		;AA0E A2 00
L_AA10	ldy ZP_9A		;AA10 A4 9A
		lda L_1100,Y	;AA12 B9 00 11
		sta ZP_95		;AA15 85 95
		lda L_1000,Y	;AA17 B9 00 10
		sta ZP_94		;AA1A 85 94
		inc ZP_9A		;AA1C E6 9A
		lda ZP_92		;AA1E A5 92
		sta ZP_50		;AA20 85 50
		lda ZP_8F		;AA22 A5 8F
		ldy ZP_90		;AA24 A4 90
		and (ZP_94),Y	;AA26 31 94
		bcc L_AA32		;AA28 90 08
		ora (ZP_96,X)	;AA2A 01 96
		inc ZP_96		;AA2C E6 96
		bne L_AA32		;AA2E D0 02
		inc ZP_97		;AA30 E6 97
L_AA32	sta (ZP_94),Y	;AA32 91 94
		iny				;AA34 C8
		lda #$00		;AA35 A9 00
L_AA37	dec ZP_50		;AA37 C6 50
		beq L_AA4B		;AA39 F0 10
		bcc L_AA45		;AA3B 90 08
		lda (ZP_96,X)	;AA3D A1 96
		inc ZP_96		;AA3F E6 96
		bne L_AA45		;AA41 D0 02
		inc ZP_97		;AA43 E6 97
L_AA45	sta (ZP_94),Y	;AA45 91 94
		iny				;AA47 C8
		jmp L_AA37		;AA48 4C 37 AA
L_AA4B	lda ZP_8F		;AA4B A5 8F
		beq L_AA5F		;AA4D F0 10
		eor #$FF		;AA4F 49 FF
		and (ZP_94),Y	;AA51 31 94
		bcc L_AA5D		;AA53 90 08
		ora (ZP_96,X)	;AA55 01 96
		inc ZP_96		;AA57 E6 96
		bne L_AA5D		;AA59 D0 02
		inc ZP_97		;AA5B E6 97
L_AA5D	sta (ZP_94),Y	;AA5D 91 94
L_AA5F	dec ZP_51		;AA5F C6 51
		bne L_AA10		;AA61 D0 AD
L_AA63	clc				;AA63 18
		rts				;AA64 60
		
L_AA65	dta $00,$C0,$F0,$FC

L_AA69	sty ZP_8E		;AA69 84 8E
		ldy #$00		;AA6B A0 00
		sty ZP_93		;AA6D 84 93
		lda (ZP_96),Y	;AA6F B1 96
		sta ZP_92		;AA71 85 92
		iny				;AA73 C8
		lda (ZP_96),Y	;AA74 B1 96
		sta ZP_91		;AA76 85 91
		iny				;AA78 C8
		sty ZP_98		;AA79 84 98
		cpx #$A0		;AA7B E0 A0
		bcc L_AA8F		;AA7D 90 10
		txa				;AA7F 8A
		eor #$FF		;AA80 49 FF
		lsr @			;AA82 4A
		lsr @			;AA83 4A
		adc #$01		;AA84 69 01
		sta ZP_93		;AA86 85 93
		adc ZP_98		;AA88 65 98
		sta ZP_98		;AA8A 85 98
		jmp L_AA9E		;AA8C 4C 9E AA
L_AA8F	txa				;AA8F 8A
		lsr @			;AA90 4A
		lsr @			;AA91 4A
		adc ZP_92		;AA92 65 92
		cmp #$29		;AA94 C9 29
		beq L_AAA9		;AA96 F0 11
		bcc L_AAA9		;AA98 90 0F
		sbc #$28		;AA9A E9 28
		sta ZP_93		;AA9C 85 93
L_AA9E	sec				;AA9E 38
		lda ZP_92		;AA9F A5 92
		sbc ZP_93		;AAA1 E5 93
		sta ZP_92		;AAA3 85 92
		beq L_AAB5		;AAA5 F0 0E
		bmi L_AAB5		;AAA7 30 0C
L_AAA9	txa				;AAA9 8A
		lsr @			;AAAA 4A
		lsr @			;AAAB 4A
		sta ZP_90		;AAAC 85 90
		txa				;AAAE 8A
		and #$03		;AAAF 29 03
		sta ZP_99		;AAB1 85 99
		clc				;AAB3 18
		rts				;AAB4 60
L_AAB5	sec				;AAB5 38
		rts				;AAB6 60
L_AAB7	sta ZP_A4		;AAB7 85 A4
L_AAB9	sty ZP_9B		;AAB9 84 9B
		ldy #$00		;AABB A0 00
		sty ZP_A0		;AABD 84 A0
		lda (ZP_A3),Y	;AABF B1 A3
		sta ZP_9F		;AAC1 85 9F
		iny				;AAC3 C8
		lda (ZP_A3),Y	;AAC4 B1 A3
		beq L_AB2C		;AAC6 F0 64
		sta ZP_9E		;AAC8 85 9E
		iny				;AACA C8
		sty ZP_A5		;AACB 84 A5
		txa				;AACD 8A
		lsr @			;AACE 4A
		lsr @			;AACF 4A
		sta ZP_9D		;AAD0 85 9D
		tay				;AAD2 A8
		iny				;AAD3 C8
		sty ZP_A6		;AAD4 84 A6
		iny				;AAD6 C8
		sty ZP_A7		;AAD7 84 A7
		iny				;AAD9 C8
		sty ZP_A8		;AADA 84 A8
		cpx #$D0		;AADC E0 D0
		bcc L_AB2D		;AADE 90 4D
		txa				;AAE0 8A
		eor #$FF		;AAE1 49 FF
		lsr @			;AAE3 4A
		lsr @			;AAE4 4A
		adc #$01		;AAE5 69 01
		sta ZP_A0		;AAE7 85 A0
		adc ZP_A5		;AAE9 65 A5
		sta ZP_A5		;AAEB 85 A5
		lda #$00		;AAED A9 00
		sta ZP_9D		;AAEF 85 9D
		lda ZP_A0		;AAF1 A5 A0
		jmp L_AB3B		;AAF3 4C 3B AB
L_AAF6	lda ZP_9D		;AAF6 A5 9D
		sta ZP_9C		;AAF8 85 9C
		ldx ZP_9F		;AAFA A6 9F
L_AAFC	ldy ZP_A5		;AAFC A4 A5
		lda (ZP_A3),Y	;AAFE B1 A3
		ldy ZP_9C		;AB00 A4 9C
		eor (ZP_A1),Y	;AB02 51 A1
		sta (ZP_A1),Y	;AB04 91 A1
		inc ZP_A5		;AB06 E6 A5
		inc ZP_9C		;AB08 E6 9C
		dex				;AB0A CA
		bne L_AAFC		;AB0B D0 EF
		dec ZP_9E		;AB0D C6 9E
		beq L_AB2C		;AB0F F0 1B
		clc				;AB11 18
		lda ZP_A0		;AB12 A5 A0
		adc ZP_A5		;AB14 65 A5
		sta ZP_A5		;AB16 85 A5
		ldy ZP_9B		;AB18 A4 9B
		lda L_1000,Y	;AB1A B9 00 10
		sta ZP_A1		;AB1D 85 A1
		cmp #$28		;AB1F C9 28
		bcs L_AB28		;AB21 B0 05
		lda L_1100,Y	;AB23 B9 00 11
		sta ZP_A2		;AB26 85 A2
L_AB28	inc ZP_9B		;AB28 E6 9B
		bne L_AAF6		;AB2A D0 CA
L_AB2C	rts				;AB2C 60
L_AB2D	lda ZP_9D		;AB2D A5 9D
		clc				;AB2F 18
		adc ZP_9F		;AB30 65 9F
		cmp #$28		;AB32 C9 28
		bcc L_AB48		;AB34 90 12
		sec				;AB36 38
		sbc #$28		;AB37 E9 28
		sta ZP_A0		;AB39 85 A0
L_AB3B	sta ZP_5A		;AB3B 85 5A
		sec				;AB3D 38
		lda ZP_9F		;AB3E A5 9F
		sbc ZP_5A		;AB40 E5 5A
		sta ZP_9F		;AB42 85 9F
		bmi L_AB2C		;AB44 30 E6
		beq L_AB2C		;AB46 F0 E4
L_AB48	ldx ZP_9B		;AB48 A6 9B
		lda L_1000,X	;AB4A BD 00 10
		sta ZP_A1		;AB4D 85 A1
		lda L_1100,X	;AB4F BD 00 11
		sta ZP_A2		;AB52 85 A2
		inc ZP_9B		;AB54 E6 9B
		lda ZP_A0		;AB56 A5 A0
		bne L_AAF6		;AB58 D0 9C
		ldx ZP_9F		;AB5A A6 9F
		dex				;AB5C CA
		dex				;AB5D CA
		beq L_AB67		;AB5E F0 07
		dex				;AB60 CA
		beq L_ABB5		;AB61 F0 52
		dex				;AB63 CA
		bne L_AAF6		;AB64 D0 90
		inx				;AB66 E8
L_AB67	ldy ZP_A5		;AB67 A4 A5
		lda (ZP_A3),Y	;AB69 B1 A3
		inc ZP_A5		;AB6B E6 A5
		ldy ZP_9D		;AB6D A4 9D
		eor (ZP_A1),Y	;AB6F 51 A1
		sta (ZP_A1),Y	;AB71 91 A1
		ldy ZP_A5		;AB73 A4 A5
		lda (ZP_A3),Y	;AB75 B1 A3
		inc ZP_A5		;AB77 E6 A5
		ldy ZP_A6		;AB79 A4 A6
		eor (ZP_A1),Y	;AB7B 51 A1
		sta (ZP_A1),Y	;AB7D 91 A1
		txa				;AB7F 8A
		beq L_AB9D		;AB80 F0 1B
		ldy ZP_A5		;AB82 A4 A5
		lda (ZP_A3),Y	;AB84 B1 A3
		inc ZP_A5		;AB86 E6 A5
		ldy ZP_A7		;AB88 A4 A7
		eor (ZP_A1),Y	;AB8A 51 A1
		sta (ZP_A1),Y	;AB8C 91 A1
		txa				;AB8E 8A
		bmi L_AB9D		;AB8F 30 0C
		ldy ZP_A5		;AB91 A4 A5
		lda (ZP_A3),Y	;AB93 B1 A3
		ldy ZP_A8		;AB95 A4 A8
		eor (ZP_A1),Y	;AB97 51 A1
		sta (ZP_A1),Y	;AB99 91 A1
		inc ZP_A5		;AB9B E6 A5
L_AB9D	dec ZP_9E		;AB9D C6 9E
		beq L_AB2C		;AB9F F0 8B
		ldy ZP_9B		;ABA1 A4 9B
		lda L_1000,Y	;ABA3 B9 00 10
		sta ZP_A1		;ABA6 85 A1
		cmp #$28		;ABA8 C9 28
		bcs L_ABB1		;ABAA B0 05
		lda L_1100,Y	;ABAC B9 00 11
		sta ZP_A2		;ABAF 85 A2
L_ABB1	inc ZP_9B		;ABB1 E6 9B
		bne L_AB67		;ABB3 D0 B2
L_ABB5	dex				;ABB5 CA
		bne L_AB67		;ABB6 D0 AF
L_ABB8	sty ZP_52		;ABB8 84 52
L_ABBA	sta ZP_53		;ABBA 85 53
		stx ZP_54		;ABBC 86 54
		sty ZP_55		;ABBE 84 55
L_ABC0	ldy #$00		;ABC0 A0 00
		lda (ZP_52),Y	;ABC2 B1 52
		bpl L_ABEC		;ABC4 10 26
		iny				;ABC6 C8
		cmp #$FF		;ABC7 C9 FF
		beq L_AC30		;ABC9 F0 65
		cmp #$FE		;ABCB C9 FE
		bne L_ABDB		;ABCD D0 0C
		lda (ZP_52),Y	;ABCF B1 52
		sta ZP_54		;ABD1 85 54
		iny				;ABD3 C8
		lda (ZP_52),Y	;ABD4 B1 52
		sta ZP_55		;ABD6 85 55
		iny				;ABD8 C8
		bne L_ABF1		;ABD9 D0 16
L_ABDB	sta ZP_97		;ABDB 85 97
		lda (ZP_52),Y	;ABDD B1 52
		sta ZP_96		;ABDF 85 96
		ldx ZP_54		;ABE1 A6 54
		ldy ZP_55		;ABE3 A4 55
		jsr L_A973		;ABE5 20 73 A9
		ldy #$02		;ABE8 A0 02
		bne L_ABF1		;ABEA D0 05
L_ABEC	jsr L_AC01		;ABEC 20 01 AC
		ldy #$01		;ABEF A0 01
L_ABF1	tya				;ABF1 98
		clc				;ABF2 18
		adc ZP_52		;ABF3 65 52
		sta ZP_52		;ABF5 85 52
		bcc L_ABC0		;ABF7 90 C7
		inc ZP_53		;ABF9 E6 53
		bne L_ABC0		;ABFB D0 C3
L_ABFD	stx ZP_54		;ABFD 86 54
		sty ZP_55		;ABFF 84 55
L_AC01	ldy #$06		;AC01 A0 06
		sty ZP_91		;AC03 84 91
		ldy ZP_55		;AC05 A4 55
		sty ZP_8E		;AC07 84 8E
		ldy #$01		;AC09 A0 01
		sty ZP_92		;AC0B 84 92
		ldx #$B7		;AC0D A2 B7
		asl @			;AC0F 0A
		sta ZP_96		;AC10 85 96
		asl @			;AC12 0A
		adc ZP_96		;AC13 65 96
		adc #$58		;AC15 69 58
		bcc L_AC1A		;AC17 90 01
		inx				;AC19 E8
L_AC1A	sta ZP_96		;AC1A 85 96
		stx ZP_97		;AC1C 86 97
		ldx ZP_54		;AC1E A6 54
		jsr L_AAA9		;AC20 20 A9 AA
		jsr L_A969		;AC23 20 69 A9
		clc				;AC26 18
		lda ZP_54		;AC27 A5 54
		adc #$04		;AC29 69 04
		tax				;AC2B AA
		stx ZP_54		;AC2C 86 54
		ldy ZP_55		;AC2E A4 55
L_AC30	rts				;AC30 60
L_AC31	sta ZP_B9		;AC31 85 B9
		stx ZP_58		;AC33 86 58
		jsr L_AE74		;AC35 20 74 AE
		ldx ZP_B9		;AC38 A6 B9
		lda L_800C,X	;AC3A BD 0C 80
		sta ZP_51		;AC3D 85 51
		lda L_8008,X	;AC3F BD 08 80
		sta ZP_50		;AC42 85 50
		ldy #$00		;AC44 A0 00
		ldx #$18		;AC46 A2 18
		jsr L_B000		;AC48 20 00 B0
		jsr L_AE39		;AC4B 20 39 AE
		ldx ZP_B9		;AC4E A6 B9
		lda L_180A		;AC50 AD 0A 18
		sta L_0200		;AC53 8D 00 02
		lda L_180B		;AC56 AD 0B 18
		sta L_0201		;AC59 8D 01 02
		ldy L_8089,X	;AC5C BC 89 80
L_AC5F	ldx L_8089,Y	;AC5F BE 89 80
		cpx #$FF		;AC62 E0 FF
		beq L_AC71		;AC64 F0 0B
		lda L_1200,X	;AC66 BD 00 12
		ora #$80		;AC69 09 80
		sta L_1200,X	;AC6B 9D 00 12
		iny				;AC6E C8
		bne L_AC5F		;AC6F D0 EE
L_AC71	lda ZP_58		;AC71 A5 58
		beq L_AC78		;AC73 F0 03
		jsr L_AD87		;AC75 20 87 AD
L_AC78	lda #$05		;AC78 A9 05
		sta ZP_52		;AC7A 85 52
L_AC7C	ldy ZP_52		;AC7C A4 52
		ldx #$00		;AC7E A2 00
		lda #$1A		;AC80 A9 1A
		jsr L_ADF4		;AC82 20 F4 AD
		dec ZP_52		;AC85 C6 52
		bpl L_AC7C		;AC87 10 F3
		lda ZP_58		;AC89 A5 58
		bne L_AC90		;AC8B D0 03
		jmp L_AD5C		;AC8D 4C 5C AD
L_AC90	lda #$9B		;AC90 A9 9B
		sta ZP_53		;AC92 85 53
		lda #$05		;AC94 A9 05
		sta ZP_52		;AC96 85 52
L_AC98	lda #$19		;AC98 A9 19
		sta ZP_54		;AC9A 85 54
L_AC9C	ldx ZP_53		;AC9C A6 53
		lda L_182B,X	;AC9E BD 2B 18
		and #$38		;ACA1 29 38
		beq L_ACF0		;ACA3 F0 4B
		pha				;ACA5 48
		clc				;ACA6 18
		ldy L_1963,X	;ACA7 BC 63 19
		lda L_8042,Y	;ACAA B9 42 80
		adc ZP_54		;ACAD 65 54
		tay				;ACAF A8
		lda L_18C7,Y	;ACB0 B9 C7 18
		sta ZP_55		;ACB3 85 55
		ldy ZP_54		;ACB5 A4 54
		lda L_8049,Y	;ACB7 B9 49 80
		sta ZP_56		;ACBA 85 56
		pla				;ACBC 68
		cmp #$20		;ACBD C9 20
		bne L_ACCD		;ACBF D0 0C
		clc				;ACC1 18
		lda ZP_55		;ACC2 A5 55
		adc #$06		;ACC4 69 06
		tay				;ACC6 A8
		lda L_18C7,X	;ACC7 BD C7 18
		jmp L_ACEB		;ACCA 4C EB AC
L_ACCD	cmp #$28		;ACCD C9 28
		bne L_ACDE		;ACCF D0 0D
		sec				;ACD1 38
		lda L_18C7,X	;ACD2 BD C7 18
		sbc #$05		;ACD5 E9 05
		tay				;ACD7 A8
		lda L_18C7,X	;ACD8 BD C7 18
		jmp L_ACEB		;ACDB 4C EB AC
L_ACDE	cmp #$18		;ACDE C9 18
		bne L_ACF0		;ACE0 D0 0E
		clc				;ACE2 18
		lda L_18C7,X	;ACE3 BD C7 18
		adc #$06		;ACE6 69 06
		tay				;ACE8 A8
		adc #$05		;ACE9 69 05
L_ACEB	ldx ZP_56		;ACEB A6 56
		jsr L_AD9E		;ACED 20 9E AD
L_ACF0	dec ZP_53		;ACF0 C6 53
		dec ZP_54		;ACF2 C6 54
		bpl L_AC9C		;ACF4 10 A6
		dec ZP_52		;ACF6 C6 52
		bpl L_AC98		;ACF8 10 9E
		lda #$A8		;ACFA A9 A8
		sta ZP_96		;ACFC 85 96
		lda #$B5		;ACFE A9 B5
		ldx L_1802		;AD00 AE 02 18
		ldy L_1804		;AD03 AC 04 18
		jsr L_A979		;AD06 20 79 A9
		ldx L_1803		;AD09 AE 03 18
		ldy L_1805		;AD0C AC 05 18
		jsr L_A97B		;AD0F 20 7B A9
		ldx L_181E		;AD12 AE 1E 18
		ldy L_1820		;AD15 AC 20 18
		lda L_181F		;AD18 AD 1F 18
		jsr L_AD8D		;AD1B 20 8D AD
		jsr L_8E14		;AD1E 20 14 8E
		lda #$9C		;AD21 A9 9C
		sta ZP_A3		;AD23 85 A3
		lda #$BE		;AD25 A9 BE
		ldx L_1823		;AD27 AE 23 18
		ldy L_1824		;AD2A AC 24 18
		jsr L_AAB7		;AD2D 20 B7 AA
		ldx ZP_B9		;AD30 A6 B9
		lda L_807C,X	;AD32 BD 7C 80
		and #$08		;AD35 29 08
		beq L_AD5C		;AD37 F0 23
		clc				;AD39 18
		lda L_182A		;AD3A AD 2A 18
		adc #$0C		;AD3D 69 0C
		tay				;AD3F A8
		ldx L_1829		;AD40 AE 29 18
		dex				;AD43 CA
		lda #$A8		;AD44 A9 A8
		sta ZP_96		;AD46 85 96
		lda #$B9		;AD48 A9 B9
		jsr L_A979		;AD4A 20 79 A9
		lda #$5C		;AD4D A9 5C
		sta ZP_A3		;AD4F 85 A3
		lda #$B9		;AD51 A9 B9
		ldx L_1829		;AD53 AE 29 18
		ldy L_182A		;AD56 AC 2A 18
		jsr L_AAB7		;AD59 20 B7 AA
L_AD5C	jsr L_AD8A		;AD5C 20 8A AD
		jsr L_AE7C		;AD5F 20 7C AE
		lda #$02		;AD62 A9 02
		sta ZP_50		;AD64 85 50
L_AD66	ldx ZP_50		;AD66 A6 50
		ldy L_180F,X	;AD68 BC 0F 18
		lda L_1812,X	;AD6B BD 12 18
		tax				;AD6E AA
		lda #$0A		;AD6F A9 0A
		sta ZP_51		;AD71 85 51
L_AD73	lda L_B716,X	;AD73 BD 16 B7
		sta L_1700,Y	;AD76 99 00 17
		iny				;AD79 C8
		inx				;AD7A E8
		dec ZP_51		;AD7B C6 51
		bne L_AD73		;AD7D D0 F4
		dec ZP_50		;AD7F C6 50
		bpl L_AD66		;AD81 10 E3
		sta L_D01E		;AD83 8D 1E D0
		rts				;AD86 60
L_AD87	jmp (L_1808)	;AD87 6C 08 18
L_AD8A	jmp (L_1806)	;AD8A 6C 06 18
L_AD8D	stx ZP_54		;AD8D 86 54
		sty ZP_55		;AD8F 84 55
		pha				;AD91 48
		jsr L_AD9E		;AD92 20 9E AD
		clc				;AD95 18
		lda ZP_54		;AD96 A5 54
		adc #$0C		;AD98 69 0C
		tax				;AD9A AA
		ldy ZP_55		;AD9B A4 55
		pla				;AD9D 68
L_AD9E	sta ZP_56		;AD9E 85 56
		sty ZP_57		;ADA0 84 57
		stx ZP_58		;ADA2 86 58
L_ADA4	lda ZP_56		;ADA4 A5 56
		cmp ZP_57		;ADA6 C5 57
		beq L_ADF3		;ADA8 F0 49
		bcc L_ADF3		;ADAA 90 47
		sec				;ADAC 38
		sbc ZP_57		;ADAD E5 57
		cmp #$04		;ADAF C9 04
		bcc L_ADD2		;ADB1 90 1F
		lda ZP_57		;ADB3 A5 57
		and #$03		;ADB5 29 03
		bne L_ADD2		;ADB7 D0 19
		lda L_1818		;ADB9 AD 18 18
		sta ZP_96		;ADBC 85 96
		lda L_1819		;ADBE AD 19 18
		ldx ZP_58		;ADC1 A6 58
		ldy ZP_57		;ADC3 A4 57
		jsr L_A979		;ADC5 20 79 A9
		clc				;ADC8 18
		lda ZP_57		;ADC9 A5 57
		adc #$04		;ADCB 69 04
		sta ZP_57		;ADCD 85 57
		jmp L_ADA4		;ADCF 4C A4 AD
L_ADD2	ldy L_181A		;ADD2 AC 1A 18
		ldx L_181B		;ADD5 AE 1B 18
		lda ZP_57		;ADD8 A5 57
		and #$03		;ADDA 29 03
		bne L_ADE4		;ADDC D0 06
		ldy L_181C		;ADDE AC 1C 18
		ldx L_181D		;ADE1 AE 1D 18
L_ADE4	sty ZP_96		;ADE4 84 96
		txa				;ADE6 8A
		ldx ZP_58		;ADE7 A6 58
		ldy ZP_57		;ADE9 A4 57
		jsr L_A979		;ADEB 20 79 A9
		inc ZP_57		;ADEE E6 57
		jmp L_ADA4		;ADF0 4C A4 AD
L_ADF3	rts				;ADF3 60
L_ADF4	sty ZP_54		;ADF4 84 54
		stx ZP_55		;ADF6 86 55
		sta ZP_56		;ADF8 85 56
L_ADFA	dec ZP_56		;ADFA C6 56
		bmi L_AE38		;ADFC 30 3A
		clc				;ADFE 18
		ldx ZP_54		;ADFF A6 54
		lda L_8042,X	;AE01 BD 42 80
		adc ZP_55		;AE04 65 55
		tax				;AE06 AA
		lda L_182B,X	;AE07 BD 2B 18
		and #$07		;AE0A 29 07
		tay				;AE0C A8
		lda ZP_55		;AE0D A5 55
		and #$01		;AE0F 29 01
		bne L_AE1D		;AE11 D0 0A
		lda L_802A,Y	;AE13 B9 2A 80
		sta ZP_96		;AE16 85 96
		lda L_8030,Y	;AE18 B9 30 80
		bne L_AE25		;AE1B D0 08
L_AE1D	lda L_8036,Y	;AE1D B9 36 80
		sta ZP_96		;AE20 85 96
		lda L_803C,Y	;AE22 B9 3C 80
L_AE25	sta ZP_97		;AE25 85 97
		ldy L_18C7,X	;AE27 BC C7 18
		ldx ZP_55		;AE2A A6 55
		lda L_8049,X	;AE2C BD 49 80
		tax				;AE2F AA
		jsr L_A97B		;AE30 20 7B A9
		inc ZP_55		;AE33 E6 55
		jmp L_ADFA		;AE35 4C FA AD
L_AE38	rts				;AE38 60
L_AE39	jsr L_AE74		;AE39 20 74 AE
		lda #$0E		;AE3C A9 0E
		ldx #$00		;AE3E A2 00
L_AE40	sta L_1200,X	;AE40 9D 00 12
		dex				;AE43 CA
		bne L_AE40		;AE44 D0 FA
		lda #$41		;AE46 A9 41
		sta L_12CA		;AE48 8D CA 12
		lda #$80		;AE4B A9 80
		sta L_12CB		;AE4D 8D CB 12
		lda #$80		;AE50 A9 80
		sta L_12CC		;AE52 8D CC 12
		lda #$4E		;AE55 A9 4E
		sta L_1262		;AE57 8D 62 12
		sta L_1200		;AE5A 8D 00 12
		lda #$00		;AE5D A9 00
		sta L_1263		;AE5F 8D 63 12
		lda #$30		;AE62 A9 30
		sta L_1264		;AE64 8D 64 12
		lda #$00		;AE67 A9 00
		sta L_1201		;AE69 8D 01 12
		lda #$21		;AE6C A9 21
		sta L_1202		;AE6E 8D 02 12
		jmp L_B1B3		;AE71 4C B3 B1
L_AE74	ldx #$86		;AE74 A2 86
		lda #$80		;AE76 A9 80
		ldy #$40		;AE78 A0 40
		bne L_AE82		;AE7A D0 06
L_AE7C	ldx #$80		;AE7C A2 80
		lda #$80		;AE7E A9 80
		ldy #$C0		;AE80 A0 C0
L_AE82	stx L_0230		;AE82 8E 30 02
		sta L_0231		;AE85 8D 31 02
		sty ZP_7E		;AE88 84 7E
		sty L_D40E		;AE8A 8C 0E D4
		ldx ZP_14		;AE8D A6 14
L_AE8F	cpx ZP_14		;AE8F E4 14
		beq L_AE8F		;AE91 F0 FC
		rts				;AE93 60
L_AE94	lda #$05		;AE94 A9 05
		sta ZP_50		;AE96 85 50
L_AE98	ldx ZP_50		;AE98 A6 50
		jsr L_AEC7		;AE9A 20 C7 AE
		dec ZP_50		;AE9D C6 50
		bpl L_AE98		;AE9F 10 F7
		lda #$00		;AEA1 A9 00
		jsr L_B083		;AEA3 20 83 B0
		lda #$04		;AEA6 A9 04
		jsr L_B083		;AEA8 20 83 B0
		lda #$08		;AEAB A9 08
		jsr L_B083		;AEAD 20 83 B0
		ldy #$B7		;AEB0 A0 B7
		lda #$AE		;AEB2 A9 AE
		jmp L_ABB8		;AEB4 4C B8 AB
		
		dta $FE,$94,$32,$BF,$1C,$FE,$94,$27,$BF,$1C,$FE,$94,$1C,$BF,$1C,$FF
		
L_AEC7	lda L_AF1C,X	;AEC7 BD 1C AF
		sta ZP_52		;AECA 85 52
		lda L_AF16,X	;AECC BD 16 AF
		bmi L_AEF5		;AECF 30 24
		beq L_AF15		;AED1 F0 42
		tay				;AED3 A8
		clc				;AED4 18
		adc L_8042,X	;AED5 7D 42 80
		tax				;AED8 AA
		inc ZP_52		;AED9 E6 52
L_AEDB	cpy ZP_52		;AEDB C4 52
		bcs L_AEE5		;AEDD B0 06
		inc L_18C7,X	;AEDF FE C7 18
		lda L_18C7,X	;AEE2 BD C7 18
L_AEE5	sta L_18C8,X	;AEE5 9D C8 18
		inx				;AEE8 E8
		inx				;AEE9 E8
		iny				;AEEA C8
		iny				;AEEB C8
		cpy #$1A		;AEEC C0 1A
		bcs L_AF15		;AEEE B0 25
		sta L_18C7,X	;AEF0 9D C7 18
		bcc L_AEDB		;AEF3 90 E6
L_AEF5	and #$7F		;AEF5 29 7F
		tay				;AEF7 A8
		clc				;AEF8 18
		adc L_8042,X	;AEF9 7D 42 80
		tax				;AEFC AA
L_AEFD	cpy ZP_52		;AEFD C4 52
		bcc L_AF07		;AEFF 90 06
		inc L_18C7,X	;AF01 FE C7 18
		lda L_18C7,X	;AF04 BD C7 18
L_AF07	sta L_18C8,X	;AF07 9D C8 18
		dex				;AF0A CA
		dex				;AF0B CA
		dey				;AF0C 88
		dey				;AF0D 88
		bmi L_AF15		;AF0E 30 05
		sta L_18C7,X	;AF10 9D C7 18
		bpl L_AEFD		;AF13 10 E8
L_AF15	rts				;AF15 60

L_AF16	dta $98,$02,$96,$02,$86,$00
L_AF1C	dta $0C,$1A,$00,$1A,$00,$1A

L_AF22	ldx #$80		;AF22 A2 80
		lda #$50		;AF24 A9 50
L_AF26	sta L_0402,X	;AF26 9D 02 04
		dex				;AF29 CA
		bpl L_AF26		;AF2A 10 FA
		lda #$01		;AF2C A9 01
		sta L_0400		;AF2E 8D 00 04
		lda #$80		;AF31 A9 80
		sta L_0401		;AF33 8D 01 04
		lda #$00		;AF36 A9 00
		sta ZP_96		;AF38 85 96
		lda #$04		;AF3A A9 04
		ldx #$21		;AF3C A2 21
		ldy #$3E		;AF3E A0 3E
		jsr L_A979		;AF40 20 79 A9
		ldx #$51		;AF43 A2 51
		ldy #$3E		;AF45 A0 3E
		jsr L_A97B		;AF47 20 7B A9
		lda #$10		;AF4A A9 10
		jsr L_B083		;AF4C 20 83 B0
		lda #$08		;AF4F A9 08
		jsr L_B083		;AF51 20 83 B0
		ldy #$84		;AF54 A0 84
		lda #$AF		;AF56 A9 AF
		jsr L_ABB8		;AF58 20 B8 AB
		ldy #$02		;AF5B A0 02
		lda #$08		;AF5D A9 08
		jsr L_AF66		;AF5F 20 66 AF
		ldy #$02		;AF62 A0 02
		lda #$17		;AF64 A9 17
L_AF66	pha				;AF66 48
		jsr L_9189		;AF67 20 89 91
		pla				;AF6A 68
		sta L_0340,X	;AF6B 9D 40 03
		tya				;AF6E 98
		sta L_0EAB,X	;AF6F 9D AB 0E
		lda #$01		;AF72 A9 01
		sta L_0E8B,X	;AF74 9D 8B 0E
		lda #$10		;AF77 A9 10
		and L_D20A		;AF79 2D 0A D2
		ora #$08		;AF7C 09 08
		sta L_0E5B,X	;AF7E 9D 5B 0E
		jmp L_9177		;AF81 4C 77 91
		
		dta $FE,$1C,$38,$B6,$DA,$FE,$4C,$38,$B6,$DA,$FE,$1C,$BF,$B6,$C6,$FE
		dta $4C,$BF,$B6,$C6,$FF
		
L_AF99	lda ZP_CF		;AF99 A5 CF
		cmp #$05		;AF9B C9 05
		bcc L_AFA7		;AF9D 90 08
		lda #$00		;AF9F A9 00
		sta L_186F		;AFA1 8D 6F 18
		sta L_1855		;AFA4 8D 55 18
L_AFA7	rts				;AFA7 60
		clc				;AFA8 18
L_AFA9	lda ZP_BA		;AFA9 A5 BA
		adc #$05		;AFAB 69 05
		sta ZP_BE		;AFAD 85 BE
		lda #$60		;AFAF A9 60
		sta ZP_BF		;AFB1 85 BF
		lda #$0C		;AFB3 A9 0C
		jsr L_B083		;AFB5 20 83 B0
		ldy #$BF		;AFB8 A0 BF
		lda #$AF		;AFBA A9 AF
		jmp L_ABB8		;AFBC 4C B8 AB
		
		dta $FE,$04,$28,$B7,$02,$FE,$04,$4E,$B7,$02,$FE,$52,$4E,$B7,$02,$FE
		dta $04,$9A,$B7,$02,$FE,$9A,$28,$B6,$EE,$FE,$40,$4E,$B6,$EE,$FE,$9A
		dta $4E,$B6,$EE,$FE,$9A,$9A,$B6,$EE,$FF
		
L_AFE8	ldy #$97		;AFE8 A0 97
		ldx #$B4		;AFEA A2 B4
		bne L_AFF8		;AFEC D0 0A
L_AFEE	ldy #$06		;AFEE A0 06
		ldx #$B2		;AFF0 A2 B2
		bne L_AFF8		;AFF2 D0 04
L_AFF4	ldy #$6F		;AFF4 A0 6F
		ldx #$B2		;AFF6 A2 B2
L_AFF8	stx ZP_51		;AFF8 86 51
		sty ZP_50		;AFFA 84 50
		ldy #$00		;AFFC A0 00
		ldx #$1C		;AFFE A2 1C
L_B000	stx ZP_53		;B000 86 53
		sty ZP_52		;B002 84 52
L_B004	ldy #$00		;B004 A0 00
		lda (ZP_50),Y	;B006 B1 50
		beq L_B082		;B008 F0 78
		bmi L_B028		;B00A 30 1C
		tax				;B00C AA
		inc ZP_50		;B00D E6 50
		bne L_B013		;B00F D0 02
		inc ZP_51		;B011 E6 51
L_B013	lda (ZP_50),Y	;B013 B1 50
		sta (ZP_52),Y	;B015 91 52
		inc ZP_50		;B017 E6 50
		bne L_B01D		;B019 D0 02
		inc ZP_51		;B01B E6 51
L_B01D	inc ZP_52		;B01D E6 52
		bne L_B023		;B01F D0 02
		inc ZP_53		;B021 E6 53
L_B023	dex				;B023 CA
		bne L_B013		;B024 D0 ED
		beq L_B004		;B026 F0 DC
L_B028	cmp #$C0		;B028 C9 C0
		and #$3F		;B02A 29 3F
		bcs L_B04B		;B02C B0 1D
		tax				;B02E AA
		iny				;B02F C8
		lda (ZP_50),Y	;B030 B1 50
		dey				;B032 88
L_B033	sta (ZP_52),Y	;B033 91 52
		inc ZP_52		;B035 E6 52
		bne L_B03B		;B037 D0 02
		inc ZP_53		;B039 E6 53
L_B03B	dex				;B03B CA
		bne L_B033		;B03C D0 F5
		lda #$02		;B03E A9 02
L_B040	clc				;B040 18
		adc ZP_50		;B041 65 50
		sta ZP_50		;B043 85 50
		bcc L_B004		;B045 90 BD
		inc ZP_51		;B047 E6 51
		bne L_B004		;B049 D0 B9
L_B04B	sta ZP_8E		;B04B 85 8E
		inc ZP_50		;B04D E6 50
		bne L_B053		;B04F D0 02
		inc ZP_51		;B051 E6 51
L_B053	lda (ZP_50),Y	;B053 B1 50
		sta ZP_91		;B055 85 91
		inc ZP_50		;B057 E6 50
		bne L_B05D		;B059 D0 02
		inc ZP_51		;B05B E6 51
L_B05D	ldx ZP_91		;B05D A6 91
		lda ZP_50		;B05F A5 50
		sta ZP_54		;B061 85 54
		lda ZP_51		;B063 A5 51
		sta ZP_55		;B065 85 55
L_B067	lda (ZP_54),Y	;B067 B1 54
		sta (ZP_52),Y	;B069 91 52
		inc ZP_52		;B06B E6 52
		bne L_B071		;B06D D0 02
		inc ZP_53		;B06F E6 53
L_B071	inc ZP_54		;B071 E6 54
		bne L_B077		;B073 D0 02
		inc ZP_55		;B075 E6 55
L_B077	dex				;B077 CA
		bne L_B067		;B078 D0 ED
		dec ZP_8E		;B07A C6 8E
		bne L_B05D		;B07C D0 DF
		lda ZP_91		;B07E A5 91
		bne L_B040		;B080 D0 BE
L_B082	rts				;B082 60
L_B083	asl @			;B083 0A
		asl @			;B084 0A
		asl @			;B085 0A
		sta ZP_54		;B086 85 54
		lda #$03		;B088 A9 03
		sta ZP_55		;B08A 85 55
L_B08C	ldx ZP_54		;B08C A6 54
		lda L_8420,X	;B08E BD 20 84
		sta ZP_96		;B091 85 96
		lda L_8421,X	;B093 BD 21 84
		sta ZP_97		;B096 85 97
		lda #$01		;B098 A9 01
		sta ZP_99		;B09A 85 99
L_B09C	lda ZP_99		;B09C A5 99
		asl @			;B09E 0A
		adc ZP_54		;B09F 65 54
		tax				;B0A1 AA
		lda L_8420,X	;B0A2 BD 20 84
		sta ZP_94		;B0A5 85 94
		lda L_8421,X	;B0A7 BD 21 84
		sta ZP_95		;B0AA 85 95
		jsr L_B0C3		;B0AC 20 C3 B0
		inc ZP_99		;B0AF E6 99
		lda ZP_99		;B0B1 A5 99
		cmp #$04		;B0B3 C9 04
		bcc L_B09C		;B0B5 90 E5
		clc				;B0B7 18
		lda ZP_54		;B0B8 A5 54
		adc #$08		;B0BA 69 08
		sta ZP_54		;B0BC 85 54
		dec ZP_55		;B0BE C6 55
		bpl L_B08C		;B0C0 10 CA
		rts				;B0C2 60
L_B0C3	ldy #$00		;B0C3 A0 00
		lda (ZP_96),Y	;B0C5 B1 96
		sta ZP_92		;B0C7 85 92
		clc				;B0C9 18
		adc #$01		;B0CA 69 01
		sta (ZP_94),Y	;B0CC 91 94
		iny				;B0CE C8
		lda (ZP_96),Y	;B0CF B1 96
		sta ZP_91		;B0D1 85 91
		sta (ZP_94),Y	;B0D3 91 94
		iny				;B0D5 C8
		sty ZP_98		;B0D6 84 98
		sty ZP_8F		;B0D8 84 8F
L_B0DA	lda #$00		;B0DA A9 00
		sta ZP_9A		;B0DC 85 9A
		lda ZP_92		;B0DE A5 92
		sta ZP_50		;B0E0 85 50
L_B0E2	ldy ZP_98		;B0E2 A4 98
		lda (ZP_96),Y	;B0E4 B1 96
		pha				;B0E6 48
		ldx ZP_99		;B0E7 A6 99
L_B0E9	lsr ZP_9A		;B0E9 46 9A
		ror @			;B0EB 6A
		lsr ZP_9A		;B0EC 46 9A
		ror @			;B0EE 6A
		dex				;B0EF CA
		bne L_B0E9		;B0F0 D0 F7
		ldy ZP_8F		;B0F2 A4 8F
		sta (ZP_94),Y	;B0F4 91 94
		inc ZP_8F		;B0F6 E6 8F
		inc ZP_98		;B0F8 E6 98
		pla				;B0FA 68
		sta ZP_9A		;B0FB 85 9A
		dec ZP_50		;B0FD C6 50
		bne L_B0E2		;B0FF D0 E1
		lda ZP_9A		;B101 A5 9A
		ldx ZP_99		;B103 A6 99
L_B105	asl @			;B105 0A
		asl @			;B106 0A
		inx				;B107 E8
		cpx #$04		;B108 E0 04
		bcc L_B105		;B10A 90 F9
		ldy ZP_8F		;B10C A4 8F
		sta (ZP_94),Y	;B10E 91 94
		inc ZP_8F		;B110 E6 8F
		dec ZP_91		;B112 C6 91
		bne L_B0DA		;B114 D0 C4
		clc				;B116 18
		lda ZP_94		;B117 A5 94
		adc ZP_8F		;B119 65 8F
		sta ZP_94		;B11B 85 94
		lda ZP_95		;B11D A5 95
		adc #$00		;B11F 69 00
		sta ZP_95		;B121 85 95
		rts				;B123 60
L_B124	sty ZP_94		;B124 84 94
		stx ZP_95		;B126 86 95
L_B128	sta ZP_97		;B128 85 97
		ldy #$00		;B12A A0 00
		lda (ZP_96),Y	;B12C B1 96
		sta (ZP_94),Y	;B12E 91 94
		sta ZP_92		;B130 85 92
		iny				;B132 C8
		lda (ZP_96),Y	;B133 B1 96
		sta (ZP_94),Y	;B135 91 94
		sta ZP_91		;B137 85 91
		iny				;B139 C8
		sty ZP_98		;B13A 84 98
L_B13C	lda ZP_92		;B13C A5 92
		sta ZP_50		;B13E 85 50
		clc				;B140 18
		adc ZP_98		;B141 65 98
		sta ZP_51		;B143 85 51
		dec ZP_51		;B145 C6 51
L_B147	ldy ZP_51		;B147 A4 51
		lda (ZP_96),Y	;B149 B1 96
		ldx #$03		;B14B A2 03
L_B14D	ror @			;B14D 6A
		ror @			;B14E 6A
		rol ZP_53		;B14F 26 53
		rol @			;B151 2A
		rol ZP_53		;B152 26 53
		ror @			;B154 6A
		dex				;B155 CA
		bpl L_B14D		;B156 10 F5
		ldy ZP_98		;B158 A4 98
		lda ZP_53		;B15A A5 53
		sta (ZP_94),Y	;B15C 91 94
		inc ZP_98		;B15E E6 98
		dec ZP_51		;B160 C6 51
		dec ZP_50		;B162 C6 50
		bne L_B147		;B164 D0 E1
		dec ZP_91		;B166 C6 91
		bne L_B13C		;B168 D0 D2
		clc				;B16A 18
		lda ZP_98		;B16B A5 98
		adc ZP_94		;B16D 65 94
		sta ZP_94		;B16F 85 94
		bcc L_B175		;B171 90 02
		inc ZP_95		;B173 E6 95
L_B175	rts				;B175 60
L_B176	lda L_D209		;B176 AD 09 D2
		cmp #$21		;B179 C9 21
		bne L_B181		;B17B D0 04
		lda #$03		;B17D A9 03
		sta ZP_7D		;B17F 85 7D
L_B181	pla				;B181 68
		rti				;B182 40
L_B183	lda #$08		;B183 A9 08
		sta L_D01F		;B185 8D 1F D0
		lda L_D01F		;B188 AD 1F D0
		cmp #$07		;B18B C9 07
		rts				;B18D 60
L_B18E	jsr L_B183		;B18E 20 83 B1
		beq L_B1A2		;B191 F0 0F
		pha				;B193 48
L_B194	jsr L_B183		;B194 20 83 B1
		bne L_B194		;B197 D0 FB
		lda ZP_14		;B199 A5 14
		adc #$0A		;B19B 69 0A
L_B19D	cmp ZP_14		;B19D C5 14
		bne L_B19D		;B19F D0 FC
		pla				;B1A1 68
L_B1A2	rts				;B1A2 60
L_B1A3	ldx #$11		;B1A3 A2 11
L_B1A5	lda ZP_CD,X		;B1A5 B5 CD
		tay				;B1A7 A8
		lda ZP_DF,X		;B1A8 B5 DF
		sta ZP_CD,X		;B1AA 95 CD
		tya				;B1AC 98
		sta ZP_DF,X		;B1AD 95 DF
		dex				;B1AF CA
		bpl L_B1A5		;B1B0 10 F3
		rts				;B1B2 60
L_B1B3	lda #$00		;B1B3 A9 00
		sta ZP_50		;B1B5 85 50
		lda #$21		;B1B7 A9 21
		sta ZP_51		;B1B9 85 51
		lda #$20		;B1BB A9 20
		sta ZP_52		;B1BD 85 52
		lda #$00		;B1BF A9 00
		tay				;B1C1 A8
L_B1C2	sta L_1300,Y	;B1C2 99 00 13
		sta L_1400,Y	;B1C5 99 00 14
		sta L_1500,Y	;B1C8 99 00 15
		sta L_1600,Y	;B1CB 99 00 16
		sta L_1700,Y	;B1CE 99 00 17
		dey				;B1D1 88
		bne L_B1C2		;B1D2 D0 EE
L_B1D4	sta (ZP_50),Y	;B1D4 91 50
		dey				;B1D6 88
		bne L_B1D4		;B1D7 D0 FB
		inc ZP_51		;B1D9 E6 51
		dec ZP_52		;B1DB C6 52
		bne L_B1D4		;B1DD D0 F5
		rts				;B1DF 60
L_B1E0	clc				;B1E0 18
		adc ZP_14		;B1E1 65 14
L_B1E3	cmp ZP_14		;B1E3 C5 14
		bne L_B1E3		;B1E5 D0 FC
		rts				;B1E7 60
L_B1E8	lda #$00		;B1E8 A9 00
		ldx #$0F		;B1EA A2 0F
L_B1EC	sta L_0EBB,X	;B1EC 9D BB 0E
		dex				;B1EF CA
		bpl L_B1EC		;B1F0 10 FA
		ldx #$19		;B1F2 A2 19
L_B1F4	sta L_0E06,X	;B1F4 9D 06 0E
		dex				;B1F7 CA
		bpl L_B1F4		;B1F8 10 FA
L_B1FA	lda #$00		;B1FA A9 00
		ldx #$07		;B1FC A2 07
L_B1FE	sta L_D200,X	;B1FE 9D 00 D2
		dex				;B201 CA
		bpl L_B1FE		;B202 10 FA
		rts				;B204 60
		
L_B205	dta $B7,$88,$C9,$84,$C8,$85,$00,$01,$AC,$85,$AB,$0D,$AA,$A2,$AD,$F3
		dta $CC,$D9,$F3,$36,$56,$30,$28,$14,$3D,$CB,$02,$51,$55,$06,$A2,$88
		dta $90,$A2,$36,$06,$94,$03,$11,$30,$28,$14,$3D,$6E,$74,$83,$92,$A1
		dta $AD,$C5,$DA,$C5,$92,$C5,$92,$08,$85,$04,$07,$05,$0B,$16,$14,$15
		dta $14,$03,$85,$02,$06,$03,$07,$08,$08,$08,$07,$85,$00,$07,$43,$35
		dta $3C,$35,$2D,$35,$3C,$85,$04,$07,$19,$0A,$0A,$0A,$15,$12,$0D,$85
		dta $00,$07,$0C,$04,$05,$05,$0B,$06,$07,$00,$98,$66,$0F,$80,$81,$82
		dta $83,$84,$85,$86,$87,$88,$89,$8A,$8B,$8C,$8D,$8E,$89,$8F,$0B,$A2
		dta $A3,$A4,$A5,$A6,$A6,$A6,$A5,$A4,$A4,$A2,$85,$A3,$83,$A4,$A3,$A6
		dta $82,$A5,$82,$A4,$8C,$00,$93,$A9,$09,$A0,$A0,$A1,$A2,$A3,$A4,$A4
		dta $A5,$A5,$C2,$09,$A0,$A0,$A0,$A2,$A3,$A4,$A4,$A5,$A5,$8A,$A0,$04
		dta $A1,$A2,$A3,$A3,$83,$A4,$84,$A5,$90,$A0,$03,$A1,$A2,$A3,$83,$A4
		dta $84,$A5,$86,$A0,$02,$A1,$A2,$83,$A3,$83,$A4,$82,$A0,$82,$A1,$84
		dta $A3,$82,$A0,$02,$A1,$A2,$83,$A3,$01,$A0,$C3,$0C,$A1,$A2,$A2,$A3
		dta $A3,$A4,$A4,$A5,$A5,$A6,$A6,$A6,$13,$A1,$A2,$A2,$A3,$A3,$A4,$A4
		dta $A5,$A5,$A6,$A6,$A0,$A0,$A0,$A1,$A2,$A3,$A4,$A4,$83,$A5,$83,$A1
		dta $03,$A2,$A3,$A3,$83,$A4,$83,$A5,$01,$A1,$C2,$05,$A2,$A3,$A4,$A5
		dta $A5,$05,$A0,$A0,$A1,$A2,$A3,$83,$A4,$82,$A5,$C3,$0C,$A1,$A2,$A2
		dta $A3,$A3,$A4,$A4,$A5,$A5,$A6,$A6,$A6,$13,$A1,$A2,$A2,$A3,$A3,$A4
		dta $A4,$A5,$A5,$A6,$A6,$A0,$A0,$A0,$A1,$A2,$A3,$A4,$A4,$83,$A5,$83
		dta $A1,$03,$A2,$A3,$A3,$83,$A4,$83,$A5,$C3,$07,$A1,$A1,$A2,$A3,$A4
		dta $A5,$A5,$83,$A3,$83,$A0,$83,$A4,$83,$A0,$83,$A5,$83,$A0,$83,$A5
		dta $83,$A0,$83,$A6,$82,$A0,$83,$A8,$35,$A0,$A0,$A9,$A9,$A0,$A0,$A8
		dta $A8,$A0,$A0,$A8,$A8,$A0,$A0,$A7,$A7,$A0,$A6,$A6,$A0,$A0,$A6,$A6
		dta $A0,$A0,$A5,$A5,$A0,$A0,$A4,$A4,$A0,$A3,$A0,$A2,$A0,$A1,$A3,$A4
		dta $A5,$A6,$A5,$A4,$A3,$A4,$A5,$A6,$A7,$A6,$A5,$A4,$A3,$A0,$92,$A7
		dta $84,$A0,$02,$A3,$A4,$84,$A5,$82,$A6,$90,$A7,$0A,$23,$24,$25,$26
		dta $28,$2A,$2D,$32,$30,$2E,$C4,$0A,$3E,$3D,$3B,$39,$37,$36,$37,$39
		dta $3B,$3D,$08,$3D,$3E,$40,$47,$53,$63,$72,$72,$8C,$00,$83,$44,$8B
		dta $0B,$04,$1C,$11,$06,$05,$8C,$00,$03,$07,$01,$01,$C6,$02,$D9,$B6
		dta $83,$5B,$8C,$0B,$03,$22,$06,$05,$8C,$05,$03,$07,$01,$01,$89,$5B
		dta $89,$51,$89,$5B,$95,$6C,$9A,$88,$8B,$6C,$03,$6D,$6E,$70,$8F,$88
		dta $8C,$6C,$8C,$5B,$8C,$6C,$8B,$5B,$AC,$6C,$8C,$88,$8C,$6C,$8C,$88
		dta $8B,$6C,$AC,$88,$86,$CC,$83,$B6,$83,$CC,$83,$A2,$83,$CC,$84,$99
		dta $82,$CC,$83,$88,$82,$CC,$83,$80,$1B,$CC,$CC,$79,$79,$CC,$CC,$72
		dta $72,$CC,$CC,$6C,$6C,$CC,$CC,$66,$66,$CC,$60,$60,$CC,$CC,$5B,$5B
		dta $5B,$51,$55,$55,$85,$51,$05,$4C,$51,$48,$51,$44,$91,$08,$91,$48
		dta $1F,$2D,$23,$28,$2D,$34,$2D,$2F,$35,$10,$0C,$04,$05,$0A,$05,$01
		dta $02,$16,$1B,$23,$2D,$3B,$4B,$64,$1D,$20,$28,$2F,$39,$48,$56,$6D
		dta $C4,$04,$32,$33,$32,$32,$82,$32,$85,$28,$16,$29,$28,$27,$28,$28
		dta $27,$28,$29,$27,$28,$34,$35,$34,$34,$35,$3C,$3D,$3C,$44,$43,$44
		dta $44,$00,$BF,$A9,$BF,$A9,$92,$A9,$98,$88,$93,$B6,$91,$5B,$8F,$6C
		dta $82,$48,$83,$80,$82,$44,$83,$79,$82,$40,$83,$72,$82,$3C,$82,$6C
		dta $82,$39,$83,$66,$82,$35,$83,$5B,$82,$32,$83,$55,$82,$2F,$83,$51
		dta $82,$2D,$83,$4C,$82,$2A,$83,$48,$82,$28,$83,$44,$82,$25,$83,$3F
		dta $82,$23,$83,$3C,$82,$2D,$83,$3C,$00,$58,$1C,$00,$1C,$64,$1C,$70
		dta $1C,$7C,$1C,$0C,$1C,$88,$1C,$94,$1C,$64,$1E,$6A,$1C,$73,$1E,$82
		dta $1E,$91,$1E,$79,$1C,$A0,$1E,$AF,$1E,$42,$20,$FC,$1D,$4A,$20,$4E
		dta $20,$46,$20,$FC,$1D,$4A,$20,$4E,$20
L_B50E	dta $65,$65,$65,$B9,$65,$91,$CF,$65,$65,$65,$65,$4F,$65,$65,$39,$00
L_B51E	dta $20,$1C,$20,$00,$20,$00,$00,$1F,$1F,$1E,$1C,$00,$1E,$1E,$00,$00
L_B52E	dta $61,$00,$52,$00,$20,$00,$00,$25,$08,$BE,$90,$00,$34,$2A,$00,$00
L_B53E	dta $1D,$1C,$1D,$00,$20,$00,$00,$1C,$1C,$1C,$1C,$00,$1C,$1C,$00,$00
L_B54E	dta $FC,$18,$EC,$00,$31,$00,$00,$F1,$D3,$89,$00,$00,$3A,$30,$00,$00
L_B55E	dta $06,$04,$06,$00,$04,$00,$00,$02,$02,$02,$00,$00,$00,$00,$00,$00
		dta $00,$00,$02,$06,$55,$50,$04,$00,$15,$10,$51,$50,$40,$40,$55,$50
		dta $02,$06,$55,$50,$40,$40,$51,$50,$15,$10,$04,$00,$55,$50,$02,$06
		dta $AA,$A0,$A0,$A0,$80,$20,$80,$20,$A0,$A0,$AA,$A0,$02,$06,$FF,$F0
		dta $0C,$00,$0C,$00,$0C,$00,$0C,$00,$FF,$F0,$02,$0C,$02,$00,$55,$50
		dta $5A,$90,$55,$50,$55,$50,$55,$50,$02,$00,$02,$00,$02,$00,$02,$00
		dta $02,$00,$02,$00,$02,$04,$AA,$A0,$80,$20,$80,$20,$80,$20,$02,$01
		dta $80,$20,$02,$01,$AA,$A0,$02,$04,$FF,$F0,$C0,$30,$C0,$30,$C0,$30
		dta $02,$01,$C0,$30,$02,$01,$FF,$F0,$02,$08,$55,$50,$95,$60,$9F,$60
		dta $9F,$60,$9F,$60,$9F,$60,$15,$40,$05,$00,$02,$08,$55,$50,$15,$40
		dta $1F,$40,$1F,$40,$1F,$40,$1F,$40,$15,$40,$05,$00,$02,$08,$05,$55
		dta $01,$54,$01,$F4,$01,$F4,$01,$F4,$01,$F4,$01,$54,$00,$50,$04,$10
		dta $00,$00,$00,$0A,$00,$00,$0A,$0A,$00,$02,$08,$8A,$00,$A2,$08,$8A
		dta $08,$82,$08,$8A,$88,$82,$08,$8A,$88,$82,$08,$8A,$A8,$A2,$08,$8A
		dta $88,$82,$08,$8A,$88,$82,$0A,$0A,$08,$82,$08,$0A,$00,$A2,$08,$0A
		dta $00,$02,$88,$0A,$00,$00,$08,$00,$00,$00,$00,$0A,$00,$00,$00,$0A
		dta $02,$09,$14,$14,$55,$55,$55,$55,$55,$55,$55,$55,$15,$54,$15,$54
		dta $05,$50,$01,$40,$02,$09,$14,$14,$55,$15,$55,$15,$54,$55,$54,$55
		dta $14,$14,$15,$14,$04,$50,$01,$40
L_B686	dta $00,$14,$00,$55,$55,$55,$04,$04,$04,$15,$15,$15,$51,$51,$51,$40
		dta $40,$40,$55,$55,$55,$00,$14,$00,$02,$09,$28,$00,$A0,$00,$A0,$00
		dta $A0,$00,$A0,$00,$A0,$00,$A0,$00,$A0,$00,$2A,$80,$02,$09,$0A,$00
		dta $02,$80,$02,$80,$02,$80,$02,$80,$02,$80,$02,$80,$02,$80,$AA,$00
		dta $03,$06,$0F,$FF,$F0,$3F,$FF,$FC,$FA,$AA,$AF,$FA,$AA,$AF,$FF,$AA
		dta $FF,$3F,$FF,$FC,$03,$06,$3F,$FF,$FC,$FF,$AA,$FF,$FA,$AA,$AF,$FA
		dta $AA,$AF,$3F,$FF,$FC,$0F,$FF,$F0,$02,$09,$55,$00,$55,$40,$51,$40
		dta $4A,$50,$6A,$50,$68,$50,$61,$40,$55,$40,$55,$00,$02,$09,$05,$50
		dta $15,$5F,$14,$50,$52,$90,$5A,$90,$5A,$10,$18,$5F,$15,$50,$05,$50
L_B716	dta $38,$6C,$DC,$DE,$AA,$10,$10,$10,$1C,$08,$10,$44,$10,$54,$54,$FE
		dta $FE,$00,$FE,$FE,$38,$44,$82,$82,$BA,$6C,$AA,$D6,$EE,$FE,$00,$00
		dta $14,$3C,$38,$00,$7C,$FE,$DA,$DA,$03,$08,$00,$50,$00,$05,$D4,$00
		dta $1F,$57,$00,$D5,$D5,$C0,$55,$55,$50,$AA,$AA,$A0,$AA,$AA,$A0,$2A
		dta $AA,$80,$54,$44,$44,$44,$44,$54,$10,$50,$10,$10,$10,$54,$54,$04
		dta $04,$54,$40,$54,$54,$04,$04,$54,$04,$54,$40,$44,$44,$54,$04,$04
		dta $54,$40,$40,$54,$04,$54,$54,$44,$40,$54,$44,$54,$54,$04,$04,$04
		dta $04,$04,$54,$44,$44,$54,$44,$54,$54,$44,$44,$54,$04,$54,$00,$00
		dta $00,$00,$00,$00,$54,$44,$44,$54,$44,$44,$54,$44,$44,$50,$44,$54
		dta $54,$40,$40,$40,$40,$54,$50,$44,$44,$44,$44,$50,$54,$40,$40,$50
		dta $40,$54,$54,$40,$40,$50,$40,$40,$54,$40,$40,$44,$44,$54,$44,$44
		dta $44,$54,$44,$44,$54,$10,$10,$10,$10,$54,$04,$04,$04,$04,$44,$54
		dta $40,$44,$50,$50,$44,$44,$40,$40,$40,$40,$40,$54,$44,$54,$54,$44
		dta $44,$44,$44,$54,$54,$54,$54,$44,$54,$44,$44,$44,$44,$54,$54,$44
		dta $44,$54,$40,$40,$10,$44,$04,$10,$00,$10,$54,$44,$44,$54,$50,$44
		dta $54,$40,$40,$54,$04,$54,$54,$10,$10,$10,$10,$10,$44,$44,$44,$44
		dta $44,$54,$44,$44,$44,$44,$54,$10,$44,$44,$44,$54,$54,$44,$44,$44
		dta $10,$10,$44,$44,$44,$44,$44,$10,$10,$10,$01,$0A,$28,$A8,$34,$F4
		dta $54,$74,$F4,$24,$54,$44
L_B83C	dta $44,$58,$6C,$80
L_B840	dta $B8,$B8,$B8,$B8,$03,$06,$30,$FC,$FC,$F0,$CC,$CC,$30,$CC,$CC,$30
		dta $CC,$CC,$30,$CC,$CC,$FC,$FC,$FC,$03,$06,$FC,$FC,$FC,$0C,$CC,$CC
		dta $0C,$CC,$CC,$FC,$CC,$CC,$0C,$CC,$CC,$FC,$FC,$FC,$03,$06,$FC,$FC
		dta $FC,$C0,$CC,$CC,$C0,$CC,$CC,$FC,$CC,$CC,$0C,$CC,$CC,$FC,$FC,$FC
		dta $03,$06,$FC,$FC,$FC,$CC,$CC,$CC,$CC,$CC,$CC,$FC,$CC,$CC,$CC,$CC
		dta $CC,$FC,$FC,$FC,$02,$10,$AA,$A8,$AA,$A8,$05,$40,$05,$40,$12,$10
		dta $12,$10,$52,$14,$42,$04,$42,$04,$52,$14,$12,$10,$12,$10,$05,$40
		dta $05,$40,$AA,$A8,$AA,$A8,$02,$06,$AA,$A8,$AA,$A8,$42,$14,$52,$04
		dta $AA,$A8,$AA,$A8,$04,$03,$02,$0C,$02,$80,$0A,$A0,$20,$08,$20,$08
		dta $80,$02,$80,$02,$80,$02,$80,$02,$20,$08,$20,$08,$0A,$A0,$02,$80
		dta $04,$05,$02,$08,$02,$80,$0A,$A0,$28,$28,$28,$08,$20,$28,$28,$20
		dta $0A,$20,$02,$80,$04,$06,$02,$06,$02,$80,$0A,$A0,$0A,$A0,$0A,$A0
		dta $0A,$A0,$02,$80,$04,$07,$02,$04,$00,$80,$02,$A0,$02,$A0,$00,$80
		dta $00,$00,$04,$12,$00,$02,$00,$00,$00,$02,$00,$00,$20,$02,$00,$80
		dta $08,$02,$02,$00,$02,$02,$08,$00,$00,$80,$20,$00,$00,$00,$00,$00
		dta $00,$00,$00,$00,$AA,$80,$0A,$A8,$00,$00,$00,$00,$00,$00,$00,$00
		dta $00,$00,$00,$00,$00,$80,$08,$00,$02,$02,$02,$00,$08,$02,$00,$80
		dta $20,$02,$00,$20,$00,$02,$00,$00,$00,$02,$00,$00,$03,$0C,$00,$40
		dta $C0,$00,$50,$50,$01,$51,$50,$0D,$41,$40,$05,$45,$10,$01,$DD,$14
		dta $17,$D5,$50,$15,$F5,$14,$17,$FD,$54,$57,$DD,$70,$5F,$5F,$14,$5D
		dta $5D,$D0,$03,$0C,$00,$C0,$00,$00,$14,$00,$05,$15,$00,$01,$45,$00
		dta $05,$45,$10,$01,$75,$5C,$53,$7D,$D0,$11,$FD,$14,$15,$FF,$54,$D7
		dta $DF,$50,$57,$D7,$14,$57,$57,$F0,$03,$14,$2A,$AA,$A8,$2A,$AA,$A8
		dta $2A,$AA,$A8,$2A,$AA,$A8,$80,$00,$02,$2A,$AA,$A8,$2A,$AA,$A8,$2A
		dta $AA,$A8,$20,$22,$28,$22,$22,$28,$22,$22,$28,$22,$22,$28,$20,$22
		dta $08,$2A,$AA,$A8,$80,$00,$02,$2A,$AA,$A8,$2A,$AA,$A8,$2A,$AA,$A8
		dta $2A,$AA,$A8,$2A,$AA,$A8
L_B9E6	dta $10,$10,$90,$0A,$8A,$0C,$8E,$0E,$0F,$0D,$0F,$8D,$10,$90,$90,$90
		dta $10,$10,$10,$D0,$98,$50,$18,$95,$15,$00
L_BA00	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
		dta $00,$00,$00,$00,$F8,$00,$F8,$F9,$F9
L_BA19	dta $FE,$FE,$FE,$FE,$FE,$FE,$FE,$01,$FF,$FF,$FF,$FF,$FE,$FE,$FE,$FE
		dta $01,$01,$01,$FE,$FE,$01,$01,$FE,$01
L_BA32	dta $FE,$FE,$FE,$FE,$FE,$FE,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
		dta $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
L_BA4B	dta $A6,$B6,$A6,$C6,$C6,$D0,$30,$30,$7A,$89,$7A,$89,$96,$00,$10,$20
		dta $00,$10,$20,$6B,$53,$6B,$53,$3E,$3E
L_BA64	dta $78,$FF,$00,$00,$00,$00,$00,$00,$60,$20,$30,$3C,$FC,$E0,$C0,$00
		dta $78,$FF,$00,$00,$00,$00,$00,$00,$30,$38,$3E,$1E,$9E,$EE,$EC,$00
		dta $00,$78,$FF,$00,$00,$00,$00,$00,$00,$30,$00,$02,$7E,$FE,$EC,$00
		dta $78,$FF,$00,$00,$00,$00,$00,$00,$10,$18,$3C,$3C,$EC,$44,$00,$FE
		dta $FE,$FE,$FE,$00,$00,$68,$EF,$00,$00,$00,$00,$00,$00,$00,$18,$FC
		dta $FC,$EC,$44,$00,$FE,$0C,$FE,$FE,$FE,$00,$00,$70,$EF,$00,$00,$00
		dta $00,$00,$00,$00,$18,$7C,$FC,$FC,$E0,$C0,$00,$78,$FF,$00,$00,$00
		dta $00,$00,$00,$00,$00,$40,$7E,$FE,$EC,$00,$7E,$3C,$00,$00,$00,$00
		dta $00,$00,$3C,$24,$24,$3C,$3C,$7E,$24,$00,$01,$03,$83,$C3,$63,$63
		dta $63,$C3,$83,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$02,$C2
		dta $83,$E3,$E3,$E3,$E3,$03,$00,$3E,$3E,$00,$00,$1E,$12,$12,$72,$FF
		dta $FF,$FF,$6F,$0E,$00,$00,$7E,$3C,$18,$00,$00,$00,$3C,$24,$24,$66
		dta $7E,$7E,$7E,$7E,$66,$00,$3C,$7E,$FF,$FF,$BF,$3F,$0F,$0F,$00,$00
		dta $3C,$7E,$3C,$42,$7E,$FF,$FF,$FF,$F7,$EF,$0F,$00
L_BB40	dta $00,$00,$78,$70,$98,$80,$E7,$00,$CE,$EE,$06,$01,$01,$03,$80,$E0
		dta $00,$00,$78,$70,$98,$80,$E7,$00,$E7,$E3,$E0,$40,$00,$00,$00,$77
		dta $00,$00,$00,$78,$70,$98,$80,$E7,$20,$60,$78,$78,$00,$80,$80,$8E
		dta $00,$00,$78,$70,$98,$80,$E7,$00,$76,$72,$00,$81,$81,$81,$00,$00
		dta $00,$00,$00,$00,$00,$00,$00,$70,$60,$80,$98,$FF,$18,$7E,$72,$00
		dta $81,$81,$81,$00,$00,$01,$00,$00,$00,$00,$00,$00,$00,$70,$60,$80
		dta $98,$FF,$18,$7E,$72,$40,$01,$01,$03,$80,$E0,$00,$00,$78,$70,$98
		dta $80,$E7,$00,$7F,$7E,$1E,$00,$80,$80,$8E,$00,$00,$42,$42,$C3,$81
		dta $BD,$00,$00,$DB,$5A,$42,$81,$81,$42,$00,$40,$A8,$2C,$20,$10,$10
		dta $10,$20,$2C,$A8,$40,$00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$00
		dta $10,$10,$10,$10,$1C,$7C,$00,$00,$C0,$DE,$FE,$E1,$6D,$6D,$0C,$00
		dta $00,$00,$00,$70,$06,$0C,$00,$00,$24,$7E,$7E,$7E,$42,$DB,$DB,$99
		dta $81,$00,$00,$00,$00,$7E,$C0,$80,$00,$00,$40,$40,$60,$00,$06,$06
		dta $00,$00,$00,$3C,$00,$00,$00,$00,$00,$00,$C0,$06
L_BC1C	dta $00,$00,$0C,$18,$CE,$FF,$30,$7C,$00,$03,$C3,$C0,$00,$00,$00,$00
		dta $00,$00,$0C,$18,$CE,$FF,$30,$7C,$00,$00,$00,$60,$60,$00,$00,$00
		dta $00,$00,$00,$0C,$18,$CE,$FF,$30,$3C,$0E,$0E,$0C,$00,$00,$00,$00
		dta $00,$00,$0C,$18,$CE,$FF,$30,$7C,$00,$03,$C3,$C0,$00,$00,$10,$00
		dta $00,$00,$00,$10,$10,$10,$10,$1C,$38,$FE,$CF,$00,$4C,$00,$00,$00
		dta $00,$00,$00,$10,$00,$F0,$00,$00,$00,$10,$10,$10,$10,$1C,$38,$FE
		dta $CF,$00,$4C,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0C,$18,$CE
		dta $FF,$30,$7C,$00,$03,$03,$00,$00,$00,$00,$00,$00,$3C,$18,$3C,$7E
		dta $42,$C3,$C3,$00,$00,$00,$42,$00,$00,$08,$10,$10,$10,$1C,$08,$0C
		dta $08,$1C,$10,$10,$10,$08,$1C,$22,$41,$41,$22,$1C,$00,$00,$08,$00
		dta $0C,$08,$0C,$0C,$00,$00,$C0,$C0,$00,$00,$00,$00,$00,$00,$01,$00
		dta $00,$00,$00,$00,$00,$00,$04,$0C,$00,$15,$54,$00,$00,$55,$55,$00
		dta $00,$5D,$75,$00,$01,$7D,$7D,$40,$05,$F3,$CF,$50,$0D,$7F,$FD,$70
		dta $0C,$FC,$3F,$70,$05,$FF,$FF,$10,$07,$F5,$5F,$D0,$07,$DF,$F7,$D0
		dta $05,$FF,$FF,$50,$05,$7F,$FD,$50,$04,$0C,$00,$15,$54,$00,$00,$55
		dta $55,$00,$00,$5D,$75,$00,$01,$7D,$7D,$40,$01,$F3,$CF,$50,$0D,$7F
		dta $FD,$70,$0D,$FC,$3F,$30,$04,$FF,$FF,$50,$07,$8C,$CF,$D0,$07,$C0
		dta $03,$D0,$05,$73,$37,$50,$05,$FF,$FD,$50,$03,$0D,$00,$04,$00,$00
		dta $05,$00,$00,$05,$00,$00,$05,$40,$00,$05,$40,$55,$55,$50,$7D,$55
		dta $50,$FF,$55,$50,$F5,$55,$50,$DF,$D5,$50,$DD,$55,$40,$DF,$55,$40
		dta $F5,$55,$00,$03,$11,$00,$03,$C0,$00,$05,$70,$00,$05,$50,$00,$05
		dta $50,$00,$05,$54,$00,$05,$54,$00,$05,$54,$00,$05,$54,$00,$05,$54
		dta $55,$55,$D4,$7D,$57,$50,$FF,$5D,$40,$FD,$55,$40,$FF,$55,$00,$FD
		dta $54,$00,$DD,$50,$00,$F5,$50,$00,$03,$0C,$D7,$D0,$00,$F5,$54,$00
		dta $FD,$55,$00,$FF,$55,$40,$FF,$55,$40,$FD,$55,$40,$F5,$55,$40,$15
		dta $55,$40,$01,$55,$00,$01,$D7,$00,$03,$DF,$C0,$01,$FF,$F0,$03,$0A
		dta $57,$F4,$00,$F5,$55,$00,$FF,$55,$40,$FF,$55,$50,$FD,$55,$50,$F5
		dta $55,$50,$01,$55,$40,$00,$55,$00,$00,$F7,$F0,$00,$7F,$FC,$06,$20
		dta $00,$15,$40,$00,$00,$00,$00,$55,$50,$00,$00,$00,$00,$FD,$50,$00
		dta $00,$00,$03,$F5,$55,$00,$00,$00,$03,$AF,$55,$50,$00,$00,$03,$2D
		dta $55,$54,$00,$00,$0F,$F5,$55,$54,$00,$00,$0F,$F5,$55,$55,$00,$00
		dta $3F,$FD,$D5,$D5,$00,$00,$3F,$FF,$D5,$75,$00,$00,$15,$7F,$D5,$75
		dta $40,$00,$3F,$DF,$55,$75,$40,$00,$0F,$FF,$55,$75,$40,$00,$03,$FD
		dta $55,$D5,$50,$00,$00,$F5,$55,$D5,$50,$00,$00,$05,$55,$D5,$50,$00
		dta $00,$15,$55,$D5,$54,$00,$00,$15,$57,$55,$54,$00,$00,$55,$57,$55
		dta $55,$00,$00,$55,$5D,$55,$55,$00,$01,$55,$5D,$55,$55,$40,$01,$55
		dta $5F,$D5,$55,$40,$05,$55,$7F,$FD,$55,$40,$05,$55,$7F,$FD,$55,$40
		dta $05,$55,$1F,$FF,$55,$50,$15,$54,$15,$FF,$55,$5F,$35,$50,$15,$5F
		dta $55,$57,$FD,$40,$15,$40,$15,$5F,$0D,$C0,$15,$40,$01,$57,$3F,$C0
		dta $05,$50,$00,$5F,$37,$00,$1D,$DC,$03,$FF,$00,$00,$FF,$FC,$0F,$7F
		dta $03,$1A,$00,$55,$40,$01,$55,$50,$05,$5F,$C0,$05,$FD,$F0,$05,$7F
		dta $F0,$51,$5F,$C0,$54,$5F,$00,$05,$6F,$00,$15,$BB,$80,$55,$AE,$80
		dta $52,$AA,$80,$02,$AA,$A0,$0A,$AA,$AC,$0A,$AA,$2C,$2A,$3F,$00,$E8
		dta $AA,$80,$E0,$AA,$80,$02,$AA,$A0,$0B,$AA,$BA,$2E,$EE,$EF,$EB,$BB
		dta $AB,$FE,$AA,$FC,$0F,$FF,$EA,$0A,$00,$AA,$0A,$80,$A0,$02,$80,$00
		dta $02,$0B,$05,$50,$15,$54,$15,$54,$59,$55,$59,$55,$55,$65,$55,$95
		dta $56,$55,$15,$54,$15,$54,$05,$50,$02,$0B,$05,$50,$15,$54,$15,$54
		dta $55,$65,$55,$65,$59,$55,$56,$55,$55,$95,$15,$54,$15,$54,$05,$50
		dta $03,$0B,$06,$55,$00,$95,$55,$60,$95,$55,$60,$A6,$A5,$60,$95,$6A
		dta $A0,$95,$55,$60,$95,$55,$60,$95,$55,$60,$95,$5A,$A0,$9A,$A5,$60
		dta $05,$55,$00,$03,$0B,$05,$AA,$00,$9A,$55,$60,$95,$55,$60,$95,$55
		dta $60,$95,$55,$60,$95,$9A,$A0,$99,$A5,$60,$95,$55,$60,$95,$55,$60
		dta $95,$55,$60,$05,$A5,$00,$03,$0B,$05,$55,$00,$95,$55,$60,$99,$A6
		dta $60,$95,$5A,$A0,$95,$55,$60,$95,$55,$60,$AA,$55,$60,$99,$A6,$60
		dta $95,$55,$60,$95,$55,$60,$05,$55,$00,$03,$10,$00,$40,$00,$00,$50
		dta $00,$00,$54,$00,$01,$54,$00,$06,$55,$00,$15,$55,$00,$16,$A9,$40
		dta $68,$8A,$48,$68,$8A,$25,$9A,$A5,$95,$54,$89,$56,$56,$26,$95,$5A
		dta $A9,$55,$56,$65,$58,$15,$95,$94,$05,$55,$40,$03,$10,$00,$01,$80
		dta $00,$05,$40,$00,$16,$40,$00,$55,$80,$01,$56,$40,$05,$65,$60,$05
		dta $A5,$81,$16,$A9,$45,$14,$8A,$16,$14,$89,$59,$16,$A5,$65,$14,$89
		dta $54,$16,$25,$50,$05,$65,$40,$01,$56,$00,$00,$00,$00,$B4,$CC,$6D
		dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$13,$85			
		dta $00,$04,$13,$85

	org $0009

	dta $01
	
		run my_start

		
L_D000	equ $D000
L_D001	equ $D001
L_D002	equ $D002
L_D003	equ $D003
L_D004	equ $D004
L_D005	equ $D005
L_D006	equ $D006
L_D00C	equ $D00C
L_D010	equ $D010
L_D011	equ $D011
L_D012	equ $D012
L_D018	equ $D018
L_D01B	equ $D01B
L_D01D	equ $D01D
L_D01E	equ $D01E
L_D01F	equ $D01F
L_D200	equ $D200
L_D208	equ $D208
L_D209	equ $D209
L_D20A	equ $D20A
L_D20E	equ $D20E
L_D20F	equ $D20F
L_D300	equ $D300
L_D400	equ $D400
L_D402	equ $D402
L_D403	equ $D403
L_D407	equ $D407
L_D40E	equ $D40E
L_E45C	equ $E45C
L_E462	equ $E462
