
*---------------------------------------------------------*
*     Disassembled with The Flaming Bird Disassembler     *
*    (c) Phoenix corp. 1992,93  -  All rights reserved    *
*---------------------------------------------------------*

         REL
	 mx	%00
	 
	 use	BENESEG.X.S

	 use	4/Misc.Macs
	 use	4/Util.Macs
	 
*-------------------------------

L190000  ENT
         PHP
         SEP   #$20
         LDA   #$FD
         STA   L023E28
         STA   L024426
         LDX   #L02547F
         INX
         STX   L02557F
         LDA   #$00
         STA   L02441C
         INC
         STA   L025581
         REP   #$20
         LDA   #L025E74
         STA   L025804
         LDA   #^L025E74
         STA   L025806
         LDA   #L023A31
         STA   L025800
         LDA   #^L023A31
         STA   L025802
         LDA   #$FFFF
         STA   L023D85
         LDA   #$AAAA
         STA   L025806
         LDA   #$0001
         STA   L025808
         STZ   L025583
         LDX   #L025583
         TXY
         INY
         LDA   #$000D
         PHB
         MVN   L025583,L025583
         PLB
         LDA   #$000F
         STA   L02537F
         LDA   #$00F0
         STA   L025380
         LDX   #L02537F
         LDY   #L025381
         LDA   #$00FD
         PHB
         MVN   L02537F,L02537F
         PLB
         LDX   #$2000
         LDY   #$2001
         LDA   #$00AA
         STAL  $E12000
         LDA   #$00C8
         STA   $64
         PHB
         LDA   #$009E
L190087  MVN   $E10000,$E10000
         LDX   #$2000
         TYA
         CLC
         ADC   #$0000
         TAY
         LDA   #$009F
         DEC   $64
         BNE   L190087
         PLB
         JSL   L0F2F42
         JSL   L180E5F
         JSL   L180E09
         SEP   #$20
         LDA   #$80
         STA   $65
L1900AD  LDX   $64
         PHX
         LDA   $65
         CLC
         ADC   #$10
         STA   $69
         LDA   #$01
         STA   $68
         LDA   #$09
         STA   $64
         LDX   $68
         PHX
         JSL   L1901FC
         PLX
         STX   $68
         LDA   #$0A
         STA   $68
         LDX   $68
         PHX
         JSL   L190255
         PLX
         STX   $68
         LDA   #$12
         STA   $68
         LDA   #$0E
         STA   $64
         LDX   $68
         PHX
         JSL   L1901FC
         PLX
         STX   $68
         LDA   #$60
         STA   $68
         LDA   #$0E
         STA   $64
         LDX   $68
         PHX
         JSL   L1901FC
         PLX
         STX   $68
         LDA   #$6E
         STA   $68
         LDX   $68
         PHX
         JSL   L190255
         PLX
         STX   $68
         LDA   #$76
         STA   $68
         LDA   #$09
         STA   $64
         JSL   L1901FC
         PLX
         STX   $64
         DEC   $65
         BNE   L1900AD
         LDA   #$80
         STA   $65
L190120  LDX   $64
         PHX
         LDA   #$01
         STA   L024459
         LDA   $65
         CLC
         ADC   #$10
         STA   $69
         LDA   #$20
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         BNE   L190145
         STA   $60
L190145  STZ   $65
         LDA   $69
         STA   $64
         LDX   $64
         LDA   L0206A8,X
         STA   $61
         LDX   $60
         STX   L024D58
         LDA   #$60
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         DEX
         STX   $60
         LDA   $61
         STA   $5C
         CMP   #$02
         BCC   L190174
         LDA   #$FF
         STA   $60
L190174  LDX   $64
         LDA   L0206A8,X
         STA   $61
         LDX   $60
         STX   L024D78
         INC   $69
         LDA   #$20
         STA   $68
         LDX   $68
         STA   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         BNE   L190198
         STA   $60
L190198  STZ   $65
         LDA   $69
         STA   $64
         LDX   $64
         LDA   L0206A8,X
         STA   $61
         LDX   $60
         STX   L024D5A
         LDA   #$60
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         DEX
         STX   $60
         LDA   $61
         CMP   #$02
         BCC   L1901C5
         LDA   #$FF
         STA   $60
L1901C5  LDX   $64
         LDA   L0206A8,X
         STA   $61
         LDX   $60
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         PLX
         STX   $64
         DEC   $65
         BEQ   L1901F8
         JMP   L190120

L1901F8  PLP
         RTL

L1901FA  PLP
         RTL

L1901FC  PHP
         SEP   #$20
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   $68
         CLC
         ADC   $64
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D78
         INC   $69
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D7A
         LDA   $68
         SEC
         SBC   $64
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$2020
         STX   $64
         STX   $66
         JSL   L072EDA
         PLP
         RTL

L190255  PHP
         SEP   #$20
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   $68
         CLC
         ADC   #$08
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D78
         INC   $69
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D7A
         LDA   $68
         SEC
         SBC   #$08
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$AAAA
         STX   $64
         STX   $66
         JSL   L072EDA
         PLP
         RTL

L1902AE  PHP
         SEP   #$20
         LDA   #$E1
         STAL  L1902CF+1
         LDA   L026084
         STAL  L1902CF+2
         REP   #$20
         LDA   #$0040
         STA   $44
         LDX   L026082
         LDY   #$2018
L1902CB  LDA   #$004F
         PHB
L1902CF  MVN   $000000,$000000
         PLB
         TYA
         CLC
         ADC   #$0050
         TAY
         DEC   $44
         BNE   L1902CB
         SEP   #$20
         LDA   #$48
         STA   L02444A
         PLP
         RTL

L1902E6  PHP
         SEP   #$20
         LDA   #$E1
         STAL  L19030C+1
         LDA   L026084
         STAL  L19030C+2
         REP   #$20
         LDA   L026082
         CLC
         ADC   #$0A00
         TAX
         LDA   #$0020
         STA   $44
         LDY   #$3418
L190308  LDA   #$004F
         PHB
L19030C  MVN   $000000,$000000
         PLB
         TYA
         CLC
         ADC   #$0050
         TAY
         DEC   $44
         BNE   L190308
         SEP   #$20
         LDA   #$48
         STA   L02444A
         PLP
         RTL

L190323  ENT
         PHP
         REP   #$20
         LDA   L0242E5
         PHA
         PEA   ^L026075
         PEA   L026075
         JSL   L0E0000
         PLA
         STA   $70
         PLA
         STA   $72
         LDA   [$70]
         STA   L026082
         LDY   #$0002
         LDA   [$70],Y
         STA   L026084
         PLA
         STA   L0242E5
         LDA   #$FF08
         STA   $5C
         JSL   L2909FD
         LDA   #$0001
         STA   L0242D5
L19035A  SEP   #$20
         LDA   L024443
         SEC
         SBC   #$08
         STA   L024443
         REP   #$20
         JSL   L072403
         LDX   #$0040
         STX   L023C89
         JSL   L120000
         SEP   #$20
         LDA   L024443
         STA   $5C
         CMP   #$20
         BCS   L19035A
         LDA   #$01
         STA   L024426
         REP   #$30
         LDA   #$0000
         STAL  $E12000
         LDA   #$00C8
         STA   $44
         LDX   #$2000
         LDY   #$2001
         LDA   #$007E
L19039C  PHB
         MVN   $E10000,$E10000
         PLB
         TYA
         CLC
         ADC   #$0020
         TAY
         LDX   #$2000
         LDA   #$007F
         DEC   $44
         BNE   L19039C
         SEP   #$20
         STZ   L024454
         REP   #$20
         LDA   #L0256D3
         INC
         STA   $60
         LDA   #$0019
         STA   $64
L1903C3  SEP   #$20
         LDA   #$90
         STA   ($60)
         REP   #$20
         LDA   $60
         CLC
         ADC   #$000A
         STA   $60
         DEC   $64
         BNE   L1903C3
         SEP   #$20
         STZ   L024426
L1903DC  JSL   L072418
         LDA   L024454
         STA   $5C
         CMP   #$02
         BCC   L1903DC
         REP   #$20
         JSL   L1902AE
         LDX   #$0028
         STX   $64
L1903F4  PHX
         JSL   L1902E6
         JSL   L1904F5
         JSL   L1904AB
         JSL   L1905F6
         JSL   L0F030E
         LDX   #$0020
         STX   L023C89
         JSL   L120000
         PLX
         DEX
         STX   $64
         BNE   L1903F4
         SEP   #$20
         LDA   #$8F
         STA   L024443
         REP   #$20
         LDA   #$0050
         STA   $68
L190427  PHA
         LDA   #L026021
         DEC
         CLC
         ADC   $68
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   L024442
         LDA   L024443
         DEC
         STA   L024443
         JSL   L072403
         JSL   L1902E6
         JSL   L071A2F
         JSL   L1904F5
         PLX
         STX   $68
         PHX
         LDA   $68
         CMP   #$14
         BCC   L190461
         JSL   L1904AB
         JSL   L1905F6
L190461  JSL   L0F030E
         PLX
         STX   $68
         SEP   #$20
         DEC   $68
         BEQ   L190483
         LDX   $68
         PHX
         REP   #$20
         LDX   #$0010
         STX   L023C89
         JSL   L120000
         PLA
         STA   $68
         JMP   L190427

L190483  REP   #$20
         LDA   L0242E5
         PHA
         JSL   L0E00B9
         PLA
         STA   L0242E5
         LDX   #$1E10
         STX   $60
         LDA   L024321
         BEQ   L19049E
         LDX   #$140B
L19049E  STX   L024440
         SEP   #$20
         STZ   L02444A
         STZ   L02447E
         PLP
         RTL

L1904AB  PHP
         SEP   #$20
         JSL   L190616
         AND   #$30
         BEQ   L1904B8
         PLP
         RTL

L1904B8  JSL   L190616
         AND   #$03
         STA   L025F9E
         STA   $5C
         STZ   $5D
         REP   #$20
         LDA   #L025F8E
         CLC
         ADC   $5C
         STA   $6C
         SEP   #$20
         LDA   ($6C)
         STA   $5C
         BEQ   L1904D9
         PLP
         RTL

L1904D9  LDA   #$03
         STA   ($6C)
         LDA   #$43
         LDY   #$0004
         STA   ($6C),Y
         LDA   #$66
         LDY   #$0008
         STA   ($6C),Y
         LDA   #$01
         LDY   #$000C
         STA   ($6C),Y
         JMP   L19057E

L1904F5  PHP
         SEP   #$20
         LDX   #$0004
         STX   $64
         LDX   #L025F8E
         STX   $6C
         STZ   L025F9E
L190505  LDX   $64
         PHX
         LDA   ($6C)
         STA   $5C
         BEQ   L190512
         JSL   L190528
L190512  INC   L025F9E
         LDX   $6C
         INX
         STX   $6C
         PLX
         DEX
         STX   $64
         BNE   L190505
         PLP
         RTL

L190522  DA    L190566
         DA    L190554
         DA    L190536
L190528  PHP
         SEP   #$20
         DEC   $5C
         ASL   $5C
         STZ   $5D
         LDX   $5C
         JMP   (L190522,X)

L190536  JSL   L190587
         LDY   #$0008
         LDA   ($6C),Y
         CLC
         ADC   #$23
         STA   ($6C),Y
         CMP   #$90
         BCC   L19057E
         LDA   #$8C
         STA   ($6C),Y
         LDA   ($6C)
         DEC
         STA   ($6C)
         JMP   L19057E

L190554  LDY   #$000C
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BNE   L19057E
         LDA   ($6C)
         DEC
         STA   ($6C)
         JMP   L19057E

L190566  JSL   L190587
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$23
         STA   ($6C),Y
         CMP   #$90
         BCC   L19057E
         LDA   #$00
         STA   ($6C)
         PLP
         RTL

L19057E  LDX   #$0005
         STX   L023D85
         JMP   L190590

L190587  PHP
         SEP   #$20
         LDX   #$0000
         STX   L023D85
L190590  LDA   L025F9E
         STZ   $61
         STA   $60
         LDX   $60
         LDA   L026071,X
         STA   $68
         LDA   #$01
         STA   L024459
         LDY   #$0004
         LDA   ($6C),Y
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L023FEE
         LDY   #$0008
         LDA   ($6C),Y
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L023FF0
         LDX   $68
         PHX
         LDA   L023D85
         STA   L023FEC
         JSL   L0F2148
         PLX
         STX   $68
         INC   $68
         JSR   L1916E3
         LDX   $60
         STX   L023FF0
         LDY   #$0004
         LDA   ($6C),Y
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L023FEE
         LDA   L023D85
         STA   L023FEC
         JSL   L0F2148
         PLP
         RTL

L1905F6  PHP
         SEP   #$20
         JSL   L19063B
         JSL   L19063B
         AND   #$3F
         CLC
         ADC   #$50
         STA   $69
         JSL   L19063B
         AND   #$7F
         STA   $68
         JSL   L0F0384
         PLP
         RTL

L190616  PHP
         SEP   #$20
         LDX   $60
         PHX
         LDX   $68
         PHX
         LDA   L025F9F
         INC
         AND   #$7F
         STA   L025F9F
         STA   $60
         STZ   $61
         LDX   $60
         LDA   L025FA1,X
         STA   $5C
         PLX
         STX   $68
         PLX
         STX   $60
         PLP
         RTL

L19063B  PHP
         SEP   #$20
         LDX   $60
         PHX
         LDX   $68
         PHX
         LDA   L025FA0
         DEC
         STA   L025FA0
         STA   $60
         BPL   L190655
         INC   $60
         AND   #$7F
         STA   $60
L190655  STZ   $61
         LDX   $60
         LDA   L025FA1,X
         STA   $5C
         PLX
         STX   $68
         PLX
         STX   $60
         PLP
         RTL

L190666  ENT
         PHP
         SEP   #$20
         DEC   L025581
         BEQ   L190671
         JMP   L190777

L190671  LDX   L02557F
         STX   $60
         LDA   ($60)
         STA   $5C
         INX
         STX   $60
         CMP   #$FE
         BEQ   L1906D1
         BCS   L1906E9
         LDA   $5C
         BEQ   L1906D9
         STA   $64
         REP   #$20
         LDA   #L025583
         CLC
         ADC   #$0004
         STA   $6C
         SEP   #$20
         LDA   #$10
         STA   $65
L19069A  LDA   ($6C)
         STA   $5C
         BEQ   L19071A
         LDX   $6C
         INX
         STX   $6C
         DEC   $65
         BNE   L19069A
L1906A9  LDX   #$FFFF
         PHX
         PEA   ^L1906BA
         PEA   L1906BA
         _SysFailMgr
L1906BA  STR   ' Trouble in ysmai2 '
         JMP   L1906A9

L1906D1  LDX   $60
         STX   L02557F
         JMP   L190671

L1906D9  LDA   ($60)
         STA   L025581
         LDX   $60
         INX
         STX   $60
         STX   L02557F
         JMP   L190777

L1906E9  LDA   #$01
         STA   L025581
         JSL   L190774
         LDX   #L025583
         STX   $60
         STZ   $5C
         LDA   #$10
         STA   $65
L1906FD  LDA   $5C
         ORA   ($60)
         STA   $5C
         LDX   $60
         INX
         STX   $60
         DEC   $65
         BNE   L1906FD
         LDA   $5C
         BEQ   L190712
         PLP
         RTL

L190712  LDA   $5C
         STA   L023E28
         JMP   L1901FA

L19071A  LDA   $64
         BIT   #$10
         BNE   L190745
         LDA   $64
         STA   ($6C)
         LDA   ($60)
         LDX   $60
         INX
         STX   $60
         LDY   #$0014
         STA   ($6C),Y
         INC
         LDY   #$0028
         STA   ($6C),Y
         LDY   #$003C
         LDA   #$06
         STA   ($6C),Y
         LDX   $60
         STX   L02557F
         JMP   L190671

L190745  LDA   #$EF
         AND   $64
         STA   $64
         STA   ($6C)
         LDA   ($60)
         LDX   $60
         INX
         STX   $60
         LDY   #$0014
         STA   ($6C),Y
         LDA   ($60)
         LDX   $60
         INX
         STX   $60
         LDY   #$0028
         STA   ($6C),Y
         LDY   #$003C
         LDA   #$06
         STA   ($6C),Y
         LDX   $60
         STX   L02557F
         JMP   L190671

L190774  PHP
         SEP   #$20
L190777  LDA   #$14
         STA   $65
         LDX   #L025583
         STX   $6C
L190780  LDX   $64
         PHX
         LDA   ($6C)
         DEC
         STA   $60
         BMI   L1907BB
         ASL   $60
         STZ   $61
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   ($6C),Y
         STA   $5C
         CMP   #$96
         BCS   L1907C9
         LDA   $5C
         STA   $69
         LDX   $60
         JMP   (L1907A5,X)

L1907A5  DA    L1907D0
         DA    L190EC6
         DA    L1911BD
         DA    $0000
         DA    L19080B
         DA    L190944
         DA    $0000
         DA    L19095E
         DA    L190CA2
         DA    L190D12
         DA    L190E33
L1907BB  LDX   $6C
         INX
         STX   $6C
         PLX
         STX   $64
         DEC   $65
         BNE   L190780
         PLP
         RTL

L1907C9  LDA   #$00
         STA   ($6C)
         JMP   L1907BB

L1907D0  LDA   $5C
         STA   L02444E
         JSR   L191337
         JSR   L19161A
         JSR   L191526
         LDX   L024DBC
         STX   L023FEE
         LDX   L024DBE
         STX   L023FF0
         LDA   #$CC
         XBA
         LDA   #$CC
         JSL   L0F26A2
         STZ   $65
         JSR   L191561
         LDA   #$01
         STA   L02445B
         LDX   #$AAAA
         STX   $64
         STX   $66
         JSL   L072F07
         JMP   L1907BB

L19080B  LDA   $5C
         CLC
         ADC   #$0A
         STA   $5C
         STA   L02444E
         JSR   L191337
         JSR   L191641
L19081B  LDX   L024DB8
         STX   $60
         LDX   L024DBC
         STX   $68
         LDY   #$0014
         LDA   ($6C),Y
         BIT   #$08
         BNE   L19083B
         LDY   #$0028
         LDA   ($6C),Y
         BIT   #$08
         BEQ   L190843
         LDA   $68
         STA   $60
L19083B  LDA   L024DBE
         STA   $68
         JMP   L19084C

L190843  LDA   $68
         STA   $60
         LDA   L024DBA
         STA   $68
L19084C  LDA   $69
         STA   $5C
         CMP   $61
         BCS   L190857
         JMP   L1907BB

L190857  LDX   $60
         STX   L023FEE
         LDX   $68
         STX   L023FF0
         LDX   #$0000
         STX   L023362
         JSL   L0F26B4
         LDY   #$0028
         LDA   ($6C),Y
         STA   $5C
         CMP   #$0C
         BEQ   L1908E7
         LDY   #$0014
         LDA   ($6C),Y
         STA   $5C
         CMP   #$04
         BEQ   L190884
         JMP   L1907BB

L190884  LDY   #$003C
         LDA   ($6C),Y
         SEC
         SBC   #$07
         STA   $5C
         STA   $69
         LDA   #$1C
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$20
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D78
         INC   $69
         INC   $69
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D7A
         LDA   #$1C
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDX   #$0101
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   #$2020
         STX   $64
         STX   $66
         JSL   L072F07
         JMP   L1907BB

L1908E7  LDY   #$003C
         LDA   ($6C),Y
         SEC
         SBC   #$07
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$64
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         INC   $69
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   #$60
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDX   #$0101
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   #$2020
         STX   $64
         STX   $66
         JSL   L072F07
         JMP   L1907BB

L190944  LDA   $5C
         CLC
         ADC   #$0A
         STA   $5C
         STA   L02444E
         JSR   L191337
         JSR   L191641
         LDA   #$01
         STA   $65
         JSR   L191561
         JMP   L19081B

L19095E  LDY   #$003C
         LDA   ($6C),Y
         STA   $5C
         CMP   #$8C
         BCC   L19096C
         JMP   L190BA6

L19096C  LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$06
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$0A
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         INC   $69
         INC   $69
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         CLC
         ADC   #$03
         STA   $69
         LDA   #$0A
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$12
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   #$0A
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         CMP   #$10
         BCS   L190A23
         JMP   L190C0C

L190A23  LDA   $69
         CLC
         ADC   #$03
         STA   $69
         LDA   #$12
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         STX   L024D78
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   $69
         CLC
         ADC   #$0B
         STA   $69
         LDA   #$20
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5C
         STX   L024D7C
L190A66  LDX   #$0202
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$76
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$7A
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         INC   $69
         INC   $69
         INC   $69
         LDA   #$76
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         CLC
         ADC   #$03
         STA   $69
         LDA   #$6E
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$76
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   #$6E
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         CMP   #$10
         BCS   L190B3E
         JMP   L190C59

L190B3E  LDA   $69
         CLC
         ADC   #$03
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1912DF
         LDA   #$6E
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         STX   L024D78
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   $69
         CLC
         ADC   #$0B
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D5A
         INC   $69
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D5C
         STX   L024D7C
L190B89  LDX   #$0202
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
L190BA6  LDA   #$01
         STA   L024459
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         STA   L02444E
         INC   $69
         LDA   #$06
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         BNE   L190BCD
         STZ   $60
L190BCD  LDA   $60
         STA   $64
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         STA   $5C
         STZ   $5D
         LDA   L020748,X
         INC
         REP   #$20
         AND   #$00FF
         TAY
         LDA   $5C
         SEC
         SBC   #$0020
         BCC   L190C07
         STA   $5C
L190BF4  LDA   $5C
         CMP   #$00C7
         BCS   L190C00
         TAX
         JSL   L0F002A
L190C00  DEC   $5C
         BMI   L190C07
         DEY
         BNE   L190BF4
L190C07  SEP   #$20
         JMP   L1907BB

L190C0C  INC   $69
         LDA   #$12
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$20
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   #$12
         STA   $68
         INC   $69
         INC   $69
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   $69
         CLC
         ADC   #$0C
         STA   $69
         LDA   #$20
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   $60
         JMP   L190A66

L190C59  INC   $69
         LDA   #$60
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$6E
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         INC   $69
         INC   $69
         INC   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   $69
         CLC
         ADC   #$0C
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   $60
         JMP   L190B89

L190CA2  JSR   L190E5F
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$04
         STA   $68
         LDA   #$06
         STA   $64
         JSL   L1901FC
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$0A
         STA   $68
         JSL   L190255
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$12
         STA   $68
         LDA   #$0E
         STA   $64
         JSL   L1901FC
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$60
         STA   $68
         LDA   #$0E
         STA   $64
         JSL   L1901FC
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$6E
         STA   $68
         JSL   L190255
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$76
         STA   $68
         LDA   #$06
         STA   $64
         JSL   L1901FC
         JMP   L1907BB

L190D12  LDY   #$003C
         LDA   ($6C),Y
         STA   $5C
         CMP   #$8C
         BCC   L190D20
         JMP   L190DCC

L190D20  LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$17
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$20
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$08
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D58
         LDA   #$69
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$08
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D5A
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
L190DCC  LDA   #$01
         STA   L024459
         LDY   #$003C
         LDA   ($6C),Y
         STA   L02444E
         INC
         STA   $69
         LDA   #$17
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         STA   $5C
         BNE   L190DF4
         STZ   $60
L190DF4  LDA   $60
         STA   $64
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         STA   $5C
         STZ   $5D
         LDA   L020748,X
         INC
         REP   #$20
         AND   #$00FF
         TAY
         LDA   $5C
         SEC
         SBC   #$0020
         BCC   L190E2E
         STA   $5C
L190E1B  LDA   $5C
         CMP   #$00C7
         BCS   L190E27
         TAX
         JSL   L0F002A
L190E27  DEC   $5C
         BMI   L190E2E
         DEY
         BNE   L190E1B
L190E2E  SEP   #$20
         JMP   L1907BB

L190E33  JSR   L190E5F
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$16
         STA   $68
         LDA   #$0A
         STA   $64
         JSL   L1901FC
         LDY   #$003C
         LDA   ($6C),Y
         STA   $69
         LDA   #$60
         STA   $68
         LDA   #$0B
         STA   $64
         JSL   L1901FC
         JMP   L1907BB

L190E5F  PHP
         SEP   #$20
         LDA   #$01
         STA   L024459
         LDY   #$003C
         LDA   ($6C),Y
         STA   L02444E
         INC
         STA   $69
         LDA   #$20
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         STA   $5C
         BNE   L190E8A
         STZ   $60
L190E8A  LDA   $60
         STA   $64
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         STA   $5C
         STZ   $5D
         LDA   L020748,X
         INC
         REP   #$20
         AND   #$00FF
         TAY
         LDA   $5C
         SEC
         SBC   #$0020
         BCC   L190EC4
         STA   $5C
L190EB1  LDA   $5C
         CMP   #$00C7
         BCS   L190EBD
         TAX
         JSL   L0F003B
L190EBD  DEC   $5C
         BMI   L190EC4
         DEY
         BNE   L190EB1
L190EC4  PLP
         RTS

L190EC6  SEP   #$20
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$01
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$0A
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$0A
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$12
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   #$0A
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$12
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$20
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   #$12
         STA   $68
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   $69
         CLC
         ADC   #$0C
         STA   $69
         LDA   #$20
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5C
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$76
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$7F
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         LDA   #$76
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$6E
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         LDX   $60
         STX   L024D58
         LDA   #$76
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   #$6E
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D5A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDY   #$003C
         LDA   ($6C),Y
         INC
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1912DF
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D58
         LDA   #$6E
         STA   $68
         JSR   L1916E3
         LDX   $60
         STX   L024D78
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSR   L1916E3
         LDX   $60
         STX   L024D7A
         LDA   $69
         CLC
         ADC   #$0C
         STA   $69
         LDA   #$60
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024D5A
         STX   L024D7C
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$01
         STA   L024459
         LDY   #$003C
         LDA   ($6C),Y
         STA   $5C
         STA   L02444E
         INC   $5C
         LDA   $5C
         STA   $69
         STZ   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         STA   $5C
         BNE   L191123
         STZ   $60
L191123  LDA   $60
         STA   $64
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         STA   $5C
         PHA
         STZ   $5D
         LDA   L020748,X
         INC
         REP   #$20
         AND   #$00FF
         TAY
         LDA   $5C
         SEC
         SBC   #$0020
         BCC   L19115E
         STA   $5C
L19114B  LDA   $5C
         CMP   #$00C7
         BCS   L191157
         TAX
         JSL   L0F002A
L191157  DEC   $5C
         BMI   L19115E
         DEY
         BNE   L19114B
L19115E  SEP   #$20
         PLA
         STA   $5C
         LDY   $5C
         PHY
         LDA   $5C
         SEC
         SBC   L020748,X
         STA   $65
         LDX   $64
         STX   L023FEE
         LDA   #$7F
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         STA   $5C
         CMP   #$02
         BNE   L19118F
         LDA   #$FF
         STA   $60
L19118F  PLX
         STX   $5C
         LDA   $5C
         STA   $61
         LDX   $60
         STX   L023FF0
         LDX   #$AAAA
         STX   L023362
         JSL   L0F26B4
         LDY   #$003C
         LDA   ($6C),Y
         STA   $5C
         CMP   #$90
         BCS   L1911B4
         JMPL  L1907BB

L1911B4  STZ   $5C
         STZ   L024426
         JMPL  L1907BB

L1911BD  REP   #$20
         LDA   L025808
         BNE   L1911C7
         JMP   L191251

L1911C7  LDA   #L025E44
         STA   L025804
         LDA   #^L025E44
         STA   L025806
         LDA   #L023931
         STA   L025800
         LDA   #^L023931
         STA   L025802
         LDA   #$FFFF
         STA   L023D85
         LDA   #$0000
         STA   L025806
         LDA   #$0000
         STA   L025808
         LDA   #$AAAA
         STAL  $E12000
         LDA   #$00C8
         STA   $44
         LDX   #$2000
         LDY   #$2001
         LDA   #$007E
L191206  PHB
         MVN   $E10000,$E10000
         PLB
         TYA
         CLC
         ADC   #$0020
         TAY
         LDX   #$2000
         LDA   #$007F
         DEC   $44
         BNE   L191206
         LDA   #$0000
         STAL  $E12080
         LDA   #$00C8
         STA   $44
         LDX   #$2080
         LDY   #$2081
         LDA   #$001E
L191230  PHB
         MVN   $E10000,$E10000
         PLB
         TYA
         CLC
         ADC   #$0080
         TAY
         LDX   #$2080
         LDA   #$001F
         DEC   $44
         BNE   L191230
         JSL   L0F2F42
         JSL   L180E5F
         JSL   L180E09
L191251  SEP   #$20
         LDA   #$01
         STA   L024459
         LDY   #$003C
         LDA   ($6C),Y
         CLC
         ADC   #$02
         STA   $5C
         STA   ($6C),Y
         STA   L02444E
         STZ   $61
         LDA   $5C
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         PHA
         STA   $5C
         STZ   $5D
         LDA   L020888,X
         INC
         REP   #$20
         AND   #$00FF
         TAY
         LDA   $5C
         SEC
         SBC   #$0020
         BCC   L19129E
         STA   $5C
L19128B  LDA   $5C
         CMP   #$00C7
         BCS   L191297
         TAX
         JSL   L0F003B
L191297  DEC   $5C
         BMI   L19129E
         DEY
         BNE   L19128B
L19129E  SEP   #$20
         PLA
         STA   $61
         LDA   #$FF
         STA   $60
         LDX   $60
         STX   L023FF0
         PHX
         STZ   $61
         LDY   #$003C
         LDA   ($6C),Y
         STA   $60
         LDX   $60
         LDA   L020888,X
         EOR   #$FF
         INC
         STA   $5C
         PLX
         STX   $60
         LDA   $61
         CLC
         ADC   $5C
         STA   $61
         STZ   $60
         LDX   $60
         STX   L023FEE
         LDX   #$0000
         STX   L023362
         JSL   L0F26B4
         JMPL  L1907BB

L1912DF  PHP
         SEP   #$20
         LDA   $69
         STA   $5C
         CMP   #$87
         BCS   L191309
         LDA   $68
         CMP   #$20
         BCC   L1912FB
         CMP   #$50
         BCS   L191302
         LDA   #$01
         STA   L024459
         PLP
         RTS

L1912FB  LDA   #$00
         STA   L024459
         PLP
         RTS

L191302  LDA   #$02
         STA   L024459
         PLP
         RTS

L191309  LDA   $68
         CMP   #$08
         BCC   L191322
         CMP   #$69
         BCS   L191322
         CMP   #$25
         BCC   L191329
         CMP   #$4C
         BCS   L191330
         LDA   #$01
         STA   L024459
         PLP
         RTS

L191322  LDA   #$03
         STA   L024459
         PLP
         RTS

L191329  LDA   #$04
         STA   L024459
         PLP
         RTS

L191330  LDA   #$05
         STA   L024459
         PLP
         RTS

L191337  PHP
         SEP   #$20
         LDY   #$0028
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0014
         SEC
         SBC   ($6C),Y
         DEC
         STA   $5C
         BPL   L191350
         PLP
         JMP   L1914A4

L191350  LDA   #$01
         STA   L024459
         LDY   #$003C
         LDA   ($6C),Y
         DEC
         STA   $69
         STZ   L02580A
         LDY   #$0014
         LDA   ($6C),Y
         PHA
         CMP   #$05
         BCC   L191373
         CMP   #$08
         BCS   L191373
         LDA   #$02
         STA   L02580A
L191373  PLA
         ASL
         ASL
         ASL
         CLC
         ADC   L02580A
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         DEC
         STA   $5C
         BEQ   L191397
         BMI   L191395
         JMP   L191491

L191395  STZ   $60
L191397  LDA   $60
         STA   $64
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         STA   $5C
         STA   L024DBB
         SEC
         SBC   L0209C8,X
         STA   $65
         LDX   $64
         STX   L024DB8
         STZ   L02580A
         LDY   #$0028
         LDA   ($6C),Y
         PHA
         CMP   #$09
         BCC   L1913CC
         CMP   #$0C
         BCS   L1913CC
         LDA   #$FE
         STA   L02580A
L1913CC  PLA
         ASL
         ASL
         ASL
         CLC
         ADC   L02580A
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         DEX
         STX   $60
         LDA   $61
         DEC
         STA   $5C
         BEQ   L1913F3
         BPL   L1913EF
         JMP   L191491

L1913EF  LDA   #$FF
         STA   $60
L1913F3  LDA   $60
         STA   $5C
         STA   L024DBA
         INC   $69
         STZ   L02580A
         LDY   #$0014
         LDA   ($6C),Y
         PHA
         CMP   #$05
         BCC   L191412
         CMP   #$08
         BCS   L191412
         LDA   #$02
         STA   L02580A
L191412  PLA
         ASL
         ASL
         ASL
         CLC
         ADC   L02580A
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         STX   $60
         LDA   $61
         DEC
         STA   $5C
         BEQ   L191433
         BPL   L191491
         STZ   $60
L191433  LDA   $60
         STA   $64
         STZ   $61
         LDA   $69
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         STA   L024DBF
         SEC
         SBC   L0209C8,X
         STA   $65
         LDX   $64
         STX   L024DBC
         STZ   L02580A
         LDY   #$0028
         LDA   ($6C),Y
         PHA
         CMP   #$09
         BCC   L191466
         CMP   #$0C
         BCS   L191466
         LDA   #$FE
         STA   L02580A
L191466  PLA
         ASL
         ASL
         ASL
         CLC
         ADC   L02580A
         STA   $68
         LDX   $68
         STX   $04
         JSL   L1809AE
         LDX   $00
         DEX
         STX   $60
         LDA   $61
         DEC
         STA   $5C
         BEQ   L19148A
         BMI   L191491
         LDA   #$FF
         STA   $60
L19148A  LDA   $60
         STA   L024DBE
         PLP
         RTS

L191491  SEP   #$20
         LDX   #$2800
         STX   L024DB8
         STX   L024DBA
         STX   L024DBC
         STX   L024DBE
         PLP
         RTS

L1914A4  PHP
         SEP   #$20
         LDY   #$003C
         LDA   ($6C),Y
         DEC
         STA   $69
         LDY   #$0014
         LDA   ($6C),Y
         ASL
         ASL
         ASL
         STA   $5C
         STA   $68
         LDX   $5C
         PHX
         JSR   L1912DF
         JSR   L1916E3
         STZ   $5D
         LDA   $69
         STA   $5C
         LDX   $5C
         STX   $70
         LDA   L0209C8,X
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDX   $60
         STX   L024DB8
         LDA   $68
         CLC
         ADC   #$08
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024DBA
         INC   $69
         PLX
         STX   $5C
         LDA   $5C
         STA   $68
         JSR   L1916E3
         STZ   $5D
         LDA   $69
         STA   $5C
         LDX   $5C
         LDA   L0209C8,X
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDX   $60
         STX   L024DBC
         LDA   $68
         CLC
         ADC   #$08
         STA   $68
         JSR   L1916E3
         DEC   $60
         LDX   $60
         STX   L024DBE
         PLP
         RTS

L191526  PHP
         SEP   #$20
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   L024DB8
         STX   L024D58
         STX   $60
         LDA   L024DBA
         STA   $60
         LDX   $60
         STX   L024D78
         LDX   L024DBC
         STX   L024D5A
         STX   $60
         LDA   L024DBE
         STA   $60
         LDX   $60
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         JSL   L181103
         PLP
         RTS

L191561  PHP
         SEP   #$20
         LDA   #$02
         STA   L02445B
         LDA   #$00
         STA   L02474A
         LDY   #$0014
         LDA   ($6C),Y
         STA   $5C
         CMP   #$09
         BCS   L1915B3
         LDY   #$0028
         LDA   ($6C),Y
         STA   $5C
         CMP   #$08
         BCC   L191586
         PLP
         RTS

L191586  LDX   L024DBA
         STX   L024D7A
         STX   $60
         LDA   L024DB9
         STA   $61
         LDX   $60
         STX   L024D58
         STX   L024D78
         LDX   L024DBE
         STX   L024D5C
         STX   L024D7C
         STX   $60
         LDA   L024DBD
         STA   $61
         LDX   $60
         STX   L024D5A
         JMP   L1915DD

L1915B3  LDX   L024DB8
         STX   L024D58
         STX   L024D78
         STX   $60
         LDA   L024DBB
         STA   $61
         LDX   $60
         STX   L024D5A
         LDX   L024DBC
         STX   L024D7A
         STX   $60
         LDA   L024DBF
         STA   $61
         LDX   $60
         STX   L024D5C
         STX   L024D7C
L1915DD  LDX   #$0202
         STX   L024456
         LDA   $65
         BNE   L191603
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   #$AAAA
         STX   $64
         STX   $66
         JSL   L072F07
         PLP
         RTS

L191603  INC   L024D5D
         INC   L024D7D
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         PLP
         RTS

L19161A  PHP
         SEP   #$20
         LDY   #$003C
         LDA   ($6C),Y
         SEC
         SBC   #$10
         STA   $5C
         BPL   L19162B
         PLP
         RTS

L19162B  JSR   L19166C
         LDA   ($60)
         ORA   $64
         STA   ($60)
         LDX   $60
         INX
         STX   $60
         LDA   ($60)
         ORA   $65
         STA   ($60)
         PLP
         RTS

L191641  PHP
         LDY   #$003C
         LDA   ($6C),Y
         SEC
         SBC   #$16
         STA   $5C
         BPL   L191650
         PLP
         RTS

L191650  JSR   L19166C
         LDA   $64
         EOR   #$FF
         AND   ($60)
         STA   ($60)
         LDX   $60
         INX
         STX   $60
         LDA   $65
         EOR   #$FF
         AND   ($60)
         STA   ($60)
         STA   $5C
         PLP
         RTS

L19166C  PHP
         SEP   #$20
         LDA   $5C
         ASL
         STA   $68
         LDY   #$0014
         LDA   ($6C),Y
         STA   $64
         AND   #$08
         LSR
         LSR
         LSR
         CLC
         ADC   $68
         STA   $68
         LDA   $64
         AND   #$07
         STA   $5C
         STZ   $61
         LDA   $5C
         STA   $60
         LDX   $60
         LDA   L0257D7,X
         STA   $60
         LDY   #$0028
         LDA   ($6C),Y
         LDY   #$0014
         SEC
         SBC   ($6C),Y
         STA   $61
         STZ   $65
         STZ   $5C
L1916A9  LDA   $5C
         ORA   $60
         STA   $5C
         STA   $64
         DEC   $61
         BEQ   L1916D1
         LDA   $60
         ASL
         ROL   $60
         BCC   L1916A9
         STZ   $5C
L1916BE  LDA   $60
         ORA   $5C
         STA   $5C
         LDA   $60
         ASL
         ROL   $60
         DEC   $61
         BNE   L1916BE
         LDA   $5C
         STA   $65
L1916D1  STZ   $69
         REP   #$20
         LDA   $68
         CLC
         ADC   #L02537F
         LDY   $60
         STY   $68
         STA   $60
         PLP
         RTS

L1916E3  PHP
         SEP   #$20
         LDX   $64
         PHX
         LDX   $74
         PHX
         LDA   $69
         STA   $61
         STZ   $60
         REP   #$20
         LDA   $60
         LSR
         LSR
         STA   $60
         TAX
         SEP   #$20
         LDA   $68
         BIT   #$40
         BEQ   L191753
         LDA   L020B08,X
         EOR   #$FF
         INC
         STA   $5C
         STZ   $65
         LDA   $68
         AND   #$BF
         STA   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   $60
         TAX
         SEP   #$20
         LDA   $5C
         CLC
         ADC   L020B08,X
         CLC
         ADC   #$80
         STA   $5C
         LDA   #$00
         XBA
         LDA   $69
         STA   $60
         TAX
         LDA   L0206A8,X
         STA   $61
         LDA   $5C
         STA   $60
         LDA   L024459
         ASL
         STA   $5C
         TAX
         JMP   (L191745,X)

L191745  DA    L19179B
         DA    L1917A2
         DA    L1917AC
         DA    L1917A2
         DA    L1917BF
         DA    L1917D2
         DA    L1917AC
L191753  LDA   $68
         STA   $5C
         STZ   $5D
         REP   #$20
         LDA   $60
         CLC
         ADC   $5C
         STA   $60
         TAX
         SEP   #$20
         LDA   L020B08,X
         STA   $5C
         LDA   $69
         STA   $60
         STZ   $61
         LDX   $60
         LDA   L0206A8,X
         STA   $61
         LDA   $5C
         STA   $60
         LDA   L024459
         STA   $5C
         STZ   $5D
         REP   #$20
         LDA   $5C
         ASL
         TAX
         SEP   #$20
         JMP   (L19178D,X)

L19178D  DA    L19179B
         DA    L1917A2
         DA    L1917AC
         DA    L1917A2
         DA    L1917BF
         DA    L1917D2
         DA    L19179B
L19179B  LDA   $60
         CLC
         ADC   #$80
         STA   $60
L1917A2  REP   #$20
         PLA
         STA   $74
         PLA
         STA   $64
         PLP
         RTS

L1917AC  SEP   #$20
         LDA   $60
         CLC
         ADC   #$80
         STA   $60
         REP   #$20
         PLA
         STA   $74
         PLA
         STA   $64
         PLP
         RTS

L1917BF  SEP   #$20
         LDA   $60
         CLC
         ADC   #$82
         STA   $60
         REP   #$20
         PLA
         STA   $74
         PLA
         STA   $64
         PLP
         RTS

L1917D2  SEP   #$20
         LDA   $60
         CLC
         ADC   #$7A
         STA   $60
         REP   #$20
         PLA
         STA   $74
         PLA
         STA   $64
         PLP
         RTS

