*
* Hostage
*
* (c) 1990, Infogrames / Mindscape
* (s) 2020, Antoine Vignau
*

*-----------------------
		
	 mx	%00
	 rel
	 lst	off

	 use	REPERE.X.S
	 
*-----------------------

	use	4/Event.Macs
	use	4/Locator.Macs
	use	4/Mem.Macs
	use	4/Misc.Macs
	use	4/QD.Macs
	use	4/Sound.Macs
	use	4/Util.Macs
	
*-----------------------

L0F0000  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F0
         TCS
         LDA   #$0003
         STA   $F2
         LDA   #$0003
         STA   $F4
         BRA   L0F003C
L0F0017  LDA   $F4
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         BNE   L0F003A
         DEC   $F2
L0F003A  INC   $F4
L0F003C  LDA   $F4
         SEC
         SBC   #$0006
         BVS   L0F0047
         EOR   #$8000
L0F0047  BPL   L0F0017
         LDA   $F2
         BNE   L0F0057
         SEP   #$20
         STZ   L020045
         REP   #$20
         BRL   L0F0125
L0F0057  LDA   #$0004
         STA   $F2
         LDA   L02003B
         CMP   #$0000
         BNE   L0F0067
         BRL   L0F00CF
L0F0067  LDA   #$0014
         STA   $F4
         BRA   L0F00C2
L0F006E  LDA   $F4
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         BEQ   L0F00BE
         LDA   $F4
         SEC
         SBC   #$0014
         LDX   #$0000
         TAY
         BPL   L0F009C
         DEX
L0F009C  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDA   [$F6]
         CMP   #$FFFF
         BNE   L0F00C0
L0F00BE  DEC   $F2
L0F00C0  INC   $F4
L0F00C2  LDA   $F4
         SEC
         SBC   #$0018
         BVS   L0F00CD
         EOR   #$8000
L0F00CD  BPL   L0F006E
L0F00CF  LDA   $F2
         BNE   L0F00DC
         SEP   #$20
         STZ   L020045
         REP   #$20
         BRA   L0F0125
L0F00DC  LDA   #$000E
         STA   $F2
         LDA   #$0006
         STA   $F4
         BRA   L0F010D
L0F00E8  LDA   $F4
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F6
         STX   $F8
         LDY   #$0002
         LDA   [$F6],Y
         BNE   L0F010B
         DEC   $F2
L0F010B  INC   $F4
L0F010D  LDA   $F4
         SEC
         SBC   #$0014
         BVS   L0F0118
         EOR   #$8000
L0F0118  BPL   L0F00E8
         LDA   $F2
         BNE   L0F0125
         SEP   #$20
         STZ   L020045
         REP   #$20
L0F0125  TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L0F012D  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         STZ   $EE
         LDA   $FF
         BEQ   L0F0163
         LDA   $FD
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STA   $FF
L0F0163  LDA   #$0006
         STA   $F0
         BRL   L0F029B
L0F016B  LDA   $F0
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         BNE   L0F018F
         BRL   L0F0299
L0F018F  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$000A
         LDA   [$F2],Y
         CMP   #$0000
         BNE   L0F01BD
         BRL   L0F0299
L0F01BD  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         CMP   $FF
         BEQ   L0F01EE
         LDA   $FF
         CMP   #$0000
         BEQ   L0F01EE
         BRL   L0F0299
L0F01EE  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0014
         LDA   [$F2],Y
         CMP   #$0002
         BEQ   L0F0244
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0014
         LDA   [$F2],Y
         CMP   #$0001
         BNE   L0F0299
L0F0244  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0003
         LDY   #$0018
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $FD
         LDY   #$0012
         STA   [$F2],Y
         LDA   $F0
         STA   $EE
L0F0299  INC   $F0
L0F029B  LDA   $F0
         SEC
         SBC   #$0014
         BVS   L0F02A6
         EOR   #$8000
L0F02A6  BMI   L0F02AF
         LDA   $EE
         BNE   L0F02AF
         BRL   L0F016B
L0F02AF  LDA   $EE
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

L0F02BB  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00EA
         TCS
         LDA   #L0307A2
         LDX   #^L0307A2
         STX   $EE
         STA   $EC
         LDA   #L030636
         LDX   #^L030636
         STX   $F2
         STA   $F0
         BRA   L0F0310
L0F02DC  LDY   #$0012
         LDA   [$F0],Y
         CMP   $FF
         BNE   L0F0304
         JSL   L0703A5
         AND   #$0001
         TAY
         BEQ   L0F02F4
         LDA   #$0001
         BRA   L0F02F7
L0F02F4  LDA   #$0002
L0F02F7  LDY   #$0014
         STA   [$F0],Y
         LDA   #$0000
         LDY   #$0012
         STA   [$F0],Y
L0F0304  LDA   $F0
         CLC
         ADC   #$001A
         STA   $F0
         BCC   L0F0310
         INC   $F2
L0F0310  SEC
         LDA   $F0
         SBC   $EC
         BNE   L0F031D
         LDA   $F2
         SBC   $EE
         BRA   L0F0323
L0F031D  LDA   $F2
         SBC   $EE
         REP   #$02
L0F0323  BVS   L0F0328
         EOR   #$8000
L0F0328  BPL   L0F02DC
         TSC
         CLC
         ADC   #$000E
         TCS
         PLD
         RTL

L0F0332  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   #L0304E2
         LDX   #^L0304E2
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         STA   $EE
         LDA   $FF
         PHA
         LDA   #$0016
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03082E
         LDX   #^L03082E
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         STAL  L0305B4
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         LDA   $FF
         LDY   #$0004
         STA   [$F2],Y
         LDA   #L0304E2
         LDX   #^L0304E2
         STA   $F2
         STX   $F4
         LDA   #$0001
         LDY   #$0002
         STA   [$F2],Y
         LDA   $FF
         PHA
         LDA   #$0016
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03082E
         LDX   #^L03082E
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STAL  L0304E2
         LDA   $FF
         PHA
         LDA   #$0016
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03082E
         LDX   #^L03082E
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0004
         LDA   [$F2],Y
         PHA
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         PLA
         LDY   #$0002
         STA   [$F2],Y
         LDA   #$0006
         STA   $F0
         BRL   L0F05CD
L0F0401  LDA   $F0
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         BNE   L0F0425
         BRL   L0F05CB
L0F0425  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$000A
         LDA   [$F2],Y
         CMP   #$0000
         BNE   L0F0453
         BRL   L0F05CB
L0F0453  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         CMP   $FD
         BEQ   L0F0480
         BRL   L0F05CB
L0F0480  LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0003
         LDY   #$0018
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0001
         LDY   #$0012
         STA   [$F2],Y
         PEA   $0001
         PEI   $F0
         JSL   L081C57
         PLY
         PLY
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0001
         LDY   #$0014
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0018
         STA   [$F2],Y
         LDA   $F0
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0004
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $FF
         LDY   #$0012
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$00BE
         LDY   #$000E
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0092
         LDY   #$0010
         STA   [$F2],Y
L0F05CB  INC   $F0
L0F05CD  LDA   $F0
         SEC
         SBC   #$0014
         BVS   L0F05D8
         EOR   #$8000
L0F05D8  BMI   L0F05DD
         BRL   L0F0401
L0F05DD  LDA   #$0000
         STAL  L0304E2
         LDA   #L0304E2
         LDX   #^L0304E2
         STA   $F2
         STX   $F4
         LDA   $EE
         LDY   #$0002
         STA   [$F2],Y
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0004
         STA   [$F2],Y
         LDA   #$0000
         STAL  L0305B4
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0002
         STA   [$F2],Y
         TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L0F0628  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         LDA   #L0304E2
         LDX   #^L0304E2
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         STA   $EE
         LDA   $FD
         PHA
         LDA   #$0016
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03082E
         LDX   #^L03082E
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         STAL  L0305B4
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         LDA   $FD
         LDY   #$0004
         STA   [$F2],Y
         LDA   #L0304E2
         LDX   #^L0304E2
         STA   $F2
         STX   $F4
         LDA   #$0001
         LDY   #$0002
         STA   [$F2],Y
         LDA   $FD
         PHA
         LDA   #$0016
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03082E
         LDX   #^L03082E
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         STAL  L0304E2
         LDA   $FD
         PHA
         LDA   #$0016
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03082E
         LDX   #^L03082E
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0004
         LDA   [$F2],Y
         PHA
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         PLA
         LDY   #$0002
         STA   [$F2],Y
         LDA   $FF
         BNE   L0F0705
         LDAL  L0305B4
         PHA
         PEA   $0001
         JSL   L0F012D
         PLY
         PLY
         STA   $F0
         BRA   L0F0713
L0F0705  PEA   $0000
         PEA   $0001
         JSL   L0F012D
         PLY
         PLY
         STA   $F0
L0F0713  LDA   $F0
         BNE   L0F071A
         BRL   L0F0813
L0F071A  PEA   $0001
         PEI   $F0
         JSL   L081C57
         PLY
         PLY
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0005
         LDY   #$0014
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0018
         STA   [$F2],Y
         LDA   $F0
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0004
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $FD
         LDY   #$0012
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$00BE
         LDY   #$000E
         STA   [$F2],Y
         LDA   $F0
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0092
         LDY   #$0010
         STA   [$F2],Y
L0F0813  LDA   #$0000
         STAL  L0304E2
         LDA   #L0304E2
         LDX   #^L0304E2
         STA   $F2
         STX   $F4
         LDA   $EE
         LDY   #$0002
         STA   [$F2],Y
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0004
         STA   [$F2],Y
         LDA   #$0000
         STAL  L0305B4
         LDA   #L0305B4
         LDX   #^L0305B4
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0002
         STA   [$F2],Y
         TSC
         CLC
         ADC   #$000A
         TCS
         PLD
         RTL

L0F085E  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         STZ   $F2
         BRL   L0F0921
L0F086E  LDA   $F2
         LDX   #$0000
         TAY
         BPL   L0F0877
         DEX
L0F0877  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDY   #$0002
         LDA   [$F4],Y
         CMP   $FF
         BEQ   L0F089E
         BRL   L0F091F
L0F089E  LDA   $F2
         LDX   #$0000
         TAY
         BPL   L0F08A7
         DEX
L0F08A7  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         STA   [$F4]
         LDA   $F2
         LDX   #$0000
         TAY
         BPL   L0F08D0
         DEX
L0F08D0  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         LDY   #$0002
         STA   [$F4],Y
         LDA   $F2
         LDX   #$0000
         TAY
         BPL   L0F08FC
         DEX
L0F08FC  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         LDY   #$0004
         STA   [$F4],Y
L0F091F  INC   $F2
L0F0921  LDA   $F2
         SEC
         SBC   #$0004
         BVS   L0F092C
         EOR   #$8000
L0F092C  BMI   L0F0931
         BRL   L0F086E
L0F0931  TSC
         CLC
         ADC   #$0008
         TCS
         PLD
         RTL

L0F0939  ENT
         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00EC
         TCS
         STZ   $EE
         STZ   $F0
         BRL   L0F0C1C
L0F094B  LDA   $F0
         LDX   #$0000
         TAY
         BPL   L0F0954
         DEX
L0F0954  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         CMP   #$0001
         BNE   L0F0979
         BRL   L0F0C1A
L0F0979  LDA   $F0
         CLC
         ADC   #$0014
         ASL
         ASL
         ASL
         LDX   #$0000
         PHX
         PHA
         LDA   #L0304DA
         LDX   #^L0304DA
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         BNE   L0F09A1
         BRL   L0F0C1A
L0F09A1  LDA   $F0
         CLC
         ADC   #$0014
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         PHA
         LDA   $FD
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L0F09FC
         BRL   L0F0C1A
L0F09FC  LDA   L02003B
         SEC
         SBC   #$0003
         BVS   L0F0A08
         EOR   #$8000
L0F0A08  BMI   L0F0A0D
         BRL   L0F0AA4
L0F0A0D  LDA   $F0
         LDX   #$0000
         TAY
         BPL   L0F0A16
         DEX
L0F0A16  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   [$F2]
         CMP   #$FFFF
         BEQ   L0F0A3B
         BRL   L0F0AA4
L0F0A3B  LDA   $F0
         LDX   #$0000
         TAY
         BPL   L0F0A44
         DEX
L0F0A44  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         SEC
         SBC   #$0006
         BEQ   L0F0A71
         BVS   L0F0A6F
         EOR   #$8000
L0F0A6F  BMI   L0F0AA4
L0F0A71  LDA   $FD
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0008
         LDA   [$F2],Y
         PHA
         LDA   $F0
         EOR   #$0004
         PLX
         STX   $F2
         CMP   $F2
         BEQ   L0F0AAC
L0F0AA4  LDA   L02004A
         BEQ   L0F0AAC
         BRL   L0F0B63
L0F0AAC  LDA   $F0
         CLC
         ADC   #$0014
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$000F
         LDY   #$000A
         STA   [$F2],Y
         LDA   $F0
         CLC
         ADC   #$0014
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$000C
         STA   [$F2],Y
         LDA   $FD
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         PHA
         LDA   $FD
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         PLX
         STX   $F2
         CMP   $F2
         BNE   L0F0B60
         LDA   #$0001
         STA   L02003F
L0F0B60  BRL   L0F0C1A
L0F0B63  LDA   $F0
         CLC
         ADC   #$0014
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDY   #$0002
         LDA   [$F2],Y
         CMP   #$0016
         BNE   L0F0B95
         BRL   L0F0C15
L0F0B95  LDA   $F0
         LDX   #$0000
         TAY
         BPL   L0F0B9E
         DEX
L0F0B9E  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0001
         STA   [$F2]
         LDA   $F0
         LDX   #$0000
         TAY
         BPL   L0F0BC7
         DEX
L0F0BC7  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   $FD
         LDY   #$0002
         STA   [$F2],Y
         LDA   $F0
         LDX   #$0000
         TAY
         BPL   L0F0BF2
         DEX
L0F0BF2  PEA   $0000
         PEA   $0006
         CLC
         JSL   L0105E1
         LDA   #L031764
         LDX   #^L031764
         JSL   L010410
         PLA
         PLX
         STA   $F2
         STX   $F4
         LDA   #$0000
         LDY   #$0004
         STA   [$F2],Y
L0F0C15  LDA   #$0001
         STA   $EE
L0F0C1A  INC   $F0
L0F0C1C  LDA   $F0
         SEC
         SBC   #$0004
         BVS   L0F0C27
         EOR   #$8000
L0F0C27  BMI   L0F0C2C
         BRL   L0F094B
L0F0C2C  LDA   $EE
         TAY
         TSC
         CLC
         ADC   #$000A
         TCS
         TYA
         PLD
         RTL

         PHD
         TSC
         SEC
         SBC   #$00F7
         TCD
         ADC   #$00F0
         TCS
         LDA   L020039
         BRL   L0F0C75
L0F0C49  BRL   L0F0C82
L0F0C4C  PEI   $FF
         JSL   L0F012D
         PLY
         BRL   L0F0C82
L0F0C56  PEI   $FF
         JSL   L0F012D
         PLY
         PEI   $FF
         JSL   L0F012D
         PLY
         BRL   L0F0C82
L0F0C67  BRL   L0F0C82
         BRL   L0F0C82
L0F0C6D  DA    L0F0C49
         DA    L0F0C4C
         DA    L0F0C56
         DA    L0F0C67
L0F0C75  CMP   #$0003
         BCC   L0F0C7D
         LDA   #$0003
L0F0C7D  ASL
         TAX
         JMP   (L0F0C6D,X)

L0F0C82  TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0F0C8A  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00F0
         TCS
         JSL   L0703A5
         AND   #$0007
         STA   $F2
         LDA   L020039
         BRL   L0F0DFE
L0F0CA4  BRL   L0F0E0B
L0F0CA7  JSL   L0703A5
         AND   #$0004
         CLC
         ADC   #$0003
         PHA
         LDA   $F2
         PLX
         STX   $F8
         AND   $F8
         STA   $F2
         BRL   L0F0E0B
L0F0CBF  JSL   L0703A5
         AND   #$0004
         CLC
         ADC   #$0003
         PHA
         LDA   $F2
         PLX
         STX   $F8
         AND   $F8
         STA   $F2
         JSL   L0703A5
         AND   #$0004
         CLC
         ADC   #$0003
         PHA
         LDA   $F2
         PLX
         STX   $F8
         AND   $F8
         STA   $F2
         LDA   $FF
         SEC
         SBC   #$0003
         LDX   #$0000
         TAY
         BPL   L0F0CF6
         DEX
L0F0CF6  STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDA   #L03177C
         LDX   #^L03177C
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         SEC
         SBC   #$0000
         BNE   L0F0D1A
         BRL   L0F0DED
L0F0D1A  BVS   L0F0D1F
         EOR   #$8000
L0F0D1F  BMI   L0F0D24
         BRL   L0F0DED
L0F0D24  LDA   $FF
         SEC
         SBC   #$0003
         LDX   #$0000
         TAY
         BPL   L0F0D31
         DEX
L0F0D31  STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDA   #L03177C
         LDX   #^L03177C
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$000F
         LDY   #$000A
         STA   [$F4],Y
         LDA   $FF
         SEC
         SBC   #$0003
         LDX   #$0000
         TAY
         BPL   L0F0D80
         DEX
L0F0D80  STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDA   #L03177C
         LDX   #^L03177C
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   [$F4]
         PHA
         LDA   #$001A
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L03059A
         LDX   #^L03059A
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         LDY   #$000C
         STA   [$F4],Y
         LDA   $FF
         SEC
         SBC   #$0003
         LDX   #$0000
         TAY
         BPL   L0F0DCF
         DEX
L0F0DCF  STX   $F8
         ASL
         ROL   $F8
         LDX   $F8
         PHX
         PHA
         LDA   #L03177C
         LDX   #^L03177C
         JSL   L010410
         PLA
         PLX
         STA   $F4
         STX   $F6
         LDA   #$0000
         STA   [$F4]
L0F0DED  BRL   L0F0E0B
L0F0DF0  BRL   L0F0E0B
         BRL   L0F0E0B
L0F0DF6  DA    L0F0CA4
         DA    L0F0CA7
         DA    L0F0CBF
         DA    L0F0DF0
L0F0DFE  CMP   #$0003
         BCC   L0F0E06
         LDA   #$0003
L0F0E06  ASL
         TAX
         JMP   (L0F0DF6,X)

L0F0E0B  LDA   $F2
         TAY
         TSC
         CLC
         ADC   #$0008
         TCS
         TYA
         PLD
         RTL

L0F0E17  ENT
         PHD
         TSC
         SEC
         SBC   #$00F5
         TCD
         ADC   #$00E4
         TCS
         LDA   $FD
         PHA
         LDA   #$000E
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $FB
         PHA
         LDA   #$007E
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0312AA
         LDX   #^L0312AA
         JSL   L010410
         PLA
         PLX
         JSL   L010410
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDY   #$0004
         LDA   [$F0],Y
         STA   $EE
         LDA   $FD
         CLC
         ADC   #$0003
         PHA
         LDA   #$000E
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $FB
         PHA
         LDA   #$007E
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0312AA
         LDX   #^L0312AA
         JSL   L010410
         PLA
         PLX
         JSL   L010410
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDY   #$0004
         LDA   [$F0],Y
         STA   $EC
         LDA   $FD
         CLC
         ADC   #$0006
         PHA
         LDA   #$000E
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   $FB
         PHA
         LDA   #$007E
         CLC
         JSL   L01059C
         PLA
         LDX   #$0000
         PHX
         PHA
         LDA   #L0312AA
         LDX   #^L0312AA
         JSL   L010410
         PLA
         PLX
         JSL   L010410
         PLA
         PLX
         STA   $F0
         STX   $F2
         LDY   #$0004
         LDA   [$F0],Y
         STA   $EA
         LDA   L020039
         BRL   L0F0F46
L0F0EED  PEA   $0000
         PEI   $EE
         JSL   L0F0628
         PLY
         PLY
         BRL   L0F0F53
L0F0EFB  PEA   $0000
         PEI   $EE
         JSL   L0F0628
         PLY
         PLY
         PEA   $0000
         PEI   $EC
         JSL   L0F0628
         PLY
         PLY
         BRL   L0F0F53
L0F0F14  PEA   $0000
         PEI   $EE
         JSL   L0F0628
         PLY
         PLY
         PEA   $0000
         PEI   $EC
         JSL   L0F0628
         PLY
         PLY
         PEA   $0000
         PEI   $EA
         JSL   L0F0628
         PLY
         PLY
         BRL   L0F0F53
L0F0F38  BRL   L0F0F53
         BRL   L0F0F53
L0F0F3E  DA    L0F0EED
         DA    L0F0EFB
         DA    L0F0F14
         DA    L0F0F38
L0F0F46  CMP   #$0003
         BCC   L0F0F4E
         LDA   #$0003
L0F0F4E  ASL
         TAX
         JMP   (L0F0F3E,X)

L0F0F53  TSC
         CLC
         ADC   #$0010
         TCS
         PLD
         RTL

         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0F0F81  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         LDX   #$0000
         LDA   #$0032
         PHX
         PHA
         LDX   #$0000
         LDA   #$0002
         PHX
         PHA
         PHX
         PHA
         _TickCount
         BCS   L0F0FAA
         LDA   #$0000
L0F0FAA  STAL  L020010
         PLA
         PLX
         SEC
         JSL   L0104A0
         PLY
         PLY
         SEC
         SBC   L0200E2
         PHA
         TXA
         SBC   L0200E4
         TAX
         PLA
         CLC
         ADC   L020098
         PHA
         TXA
         ADC   L02009A
         TAX
         PLA
         CLC
         JSL   L0104A0
         PLY
         PLY
         STX   L0200A2
         STA   L0200A0
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0F0FE2  ENT
         PHD
         TSC
         SEC
         SBC   #$00FB
         TCD
         ADC   #$00F4
         TCS
         LDX   L02009E
         LDA   L02009C
         STX   L02009A
         STA   L020098
         LDX   #$0000
         LDA   #$0002
         PHX
         PHA
         PHX
         PHA
         _TickCount
         BCS   L0F100F
         LDA   #$0000
L0F100F  STAL  L020010
         PLA
         PLX
         SEC
         JSL   L0104A0
         PLY
         PLY
         STX   L0200E4
         STA   L0200E2
         TSC
         CLC
         ADC   #$0006
         TCS
         PLD
         RTL

L0F102A  ENT
         PHD
         TSC
         SEC
         SBC   #$00F9
         TCD
         ADC   #$00E6
         TCS
         LDA   #$0005
         STA   $E8
         LDA   L0200D7
         EOR   #$0001
         STA   L0200D7
         LDA   L0200D9
         BEQ   L0F104B
         BRL   L0F1382
L0F104B  LDA   #$000C
         STA   L0200D9
         JSL   L0F0F81
         LDA   $E8
         LDX   #$0000
         PHX
         PHA
         LDX   L0200A2
         LDA   L0200A0
         CLC
         JSL   L0105E1
         PLA
         PLX
         STX   L0200A2
         STA   L0200A0
         SEC
         LDA   L0200A0
         SBC   L02009C
         BNE   L0F1080
         LDA   L0200A2
         SBC   L02009E
         BRA   L0F1088
L0F1080  LDA   L0200A2
         SBC   L02009E
         REP   #$02
L0F1088  BCC   L0F108D
         BRL   L0F10F2
L0F108D  LDX   L02009E
         LDA   L02009C
         SEC
         SBC   L0200A0
         PHA
         TXA
         SBC   L0200A2
         TAX
         PLA
         STX   L0200A2
         STA   L0200A0
         LDX   #$0000
         LDA   #$0E10
         PHX
         PHA
         LDX   L0200A2
         LDA   L0200A0
         CLC
         JSL   L0104A0
         PLY
         PLY
         STA   L0200DC
         LDX   #$0000
         LDA   #$003C
         PHX
         PHA
         LDX   #$0000
         LDA   #$0E10
         PHX
         PHA
         LDX   L0200A2
         LDA   L0200A0
         CLC
         JSL   L0104A0
         PLA
         PLX
         CLC
         JSL   L0104A0
         PLY
         PLY
         STA   L0200DE
         LDA   L0200DC
         BNE   L0F10F0
         LDA   L0200DE
         BNE   L0F10F0
         STZ   L02004A
L0F10F0  BRA   L0F10FB
L0F10F2  STZ   L0200DC
         STZ   L0200DE
         STZ   L02004A
L0F10FB  LDA   L0200DC
         PHA
         JSL   L07025A
         PLY
         STX   $F0
         STA   $EE
         LDY   #$0001
         LDA   [$EE],Y
         AND   #$00FF
         BEQ   L0F112B
         LDA   [$EE]
         SEP   #$20
         STAL  L031FE3
         REP   #$20
         LDY   #$0001
         LDA   [$EE],Y
         SEP   #$20
         STAL  L031FE3+1
         REP   #$20
         BRA   L0F1140
L0F112B  LDA   #$0030
         SEP   #$20
         STAL  L031FE3
         REP   #$20
         LDA   [$EE]
         SEP   #$20
         STAL  L031FE3+1
         REP   #$20
L0F1140  LDA   L0200DE
         PHA
         JSL   L07025A
         PLY
         STX   $EC
         STA   $EA
         LDY   #$0001
         LDA   [$EA],Y
         AND   #$00FF
         BEQ   L0F1170
         LDA   [$EA]
         SEP   #$20
         STAL  L031FE3+3
         REP   #$20
         LDY   #$0001
         LDA   [$EA],Y
         SEP   #$20
         STAL  L031FE3+4
         REP   #$20
         BRA   L0F1185
L0F1170  LDA   #$0030
         SEP   #$20
         STAL  L031FE3+3
         REP   #$20
         LDA   [$EA]
         SEP   #$20
         STAL  L031FE3+4
         REP   #$20
L0F1185  LDA   $FF
         BRL   L0F1373
L0F118A  LDA   L0200DE
         CMP   #$0002
         BCS   L0F11BC
         LDA   L0200D7
         BEQ   L0F11BC
         LDA   L0200DC
         BNE   L0F11BC
         PEA   ^L031FE9
         PEA   L031FE9
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L0F11DA
L0F11BC  PEA   ^L031FED
         PEA   L031FED
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0F11DA  PEA   ^L031FE3
         PEA   L031FE3
         PEA   ^L031FF1
         PEA   L031FF1
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PEA   ^L031FE3
         PEA   L031FE3
         PEA   ^L031FF9
         PEA   L031FF9
         LDX   L0200A6
         LDA   L0200A4
         PHX
         PHA
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         BRL   L0F1380
L0F1227  LDA   L0200DE
         CMP   #$0002
         BCS   L0F1259
         LDA   L0200D7
         BEQ   L0F1259
         LDA   L0200DC
         BNE   L0F1259
         PEA   ^L032001
         PEA   L032001
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L0F1277
L0F1259  PEA   ^L032005
         PEA   L032005
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0F1277  PEA   ^L031FE3
         PEA   L031FE3
         PEA   ^L032009
         PEA   L032009
         LDX   L020070
         LDA   L02006E
         PHX
         PHA
         PEA   $0016
         PEA   $000A
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         BRL   L0F1380
L0F12A0  LDA   L0200DE
         CMP   #$0002
         BCS   L0F12D2
         LDA   L0200D7
         BEQ   L0F12D2
         LDA   L0200DC
         BNE   L0F12D2
         PEA   ^L032011
         PEA   L032011
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
         BRA   L0F12F0
L0F12D2  PEA   ^L032015
         PEA   L032015
         PEA   $00E1
         PEA   $2000
         PEA   $001C
         PEA   $0082
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$000C
         TCS
         TYA
L0F12F0  PEA   ^L031FE3
         PEA   L031FE3
         PEA   ^L032019
         PEA   L032019
         PEA   $00E1
         PEA   $2000
         PEA   $0016
         PEA   $00FA
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PEA   ^L031FE3
         PEA   L031FE3
         PEA   ^L032021
         PEA   L032021
         LDX   L0200A6
         LDA   L0200A4
         PHX
         PHA
         PEA   $0016
         PEA   $00FA
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         PEA   ^L031FE3
         PEA   L031FE3
         PEA   ^L032029
         PEA   L032029
         LDX   L020070
         LDA   L02006E
         PHX
         PHA
         PEA   $0016
         PEA   $00FA
         JSL   L130403
         TAY
         TSC
         CLC
         ADC   #$0010
         TCS
         TYA
         BRL   L0F1380
L0F1363  BRL   L0F1380
         BRL   L0F1380
L0F1369  DA    L0F118A
         DA    L0F118A
         DA    L0F12A0
         DA    L0F1227
         DA    L0F1363
L0F1373  CMP   #$0004
         BCC   L0F137B
         LDA   #$0004
L0F137B  ASL
         TAX
         JMP   (L0F1369,X)

L0F1380  BRA   L0F1385
L0F1382  DEC   L0200D9
L0F1385  TSC
         CLC
         ADC   #$0012
         TCS
         PLD
         RTL

