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

         REL
	 mx	%00

	 use	GLOSEG.X.S

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

L200000  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L20000C
         PLP
         RTL

L20000C  LDY   #$0011
         LDA   ($6C),Y
         CMP   #$02
         BEQ   L200019
         JSL   L20005C
L200019  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         STA   $69
         LDY   #$0012
         STA   ($6C),Y
         LDX   #$FFFF
         STX   L023D85
         STZ   $61
         LDA   $69
         STA   $60
         LDY   $60
         LDA   L020928,Y
         ASL
         STA   $5C
         LDX   #L026B46
         STX   $60
         JSL   L0F07DA
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         PLP
         RTL

L200054  SEP   #$20
         LDX   #$0000
         JMP   L200061

L20005C  SEP   #$20
         LDX   #$0000
L200061  STX   L023D85
         LDA   ($6C)
         BIT   #$80
         BNE   L20006B
         RTL

L20006B  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0012
         LDA   ($6C),Y
         STA   $69
         STZ   $61
         STA   $60
         LDY   $60
         LDA   L020928,Y
         ASL
         STA   $5C
         LDX   #L026B46
         STX   $60
         JSL   L0F07DA
         RTL

L200092  LDA   #$FF
         STA   L024438
         LDA   #$01
         STA   L024444
         PLP
         RTL

L20009E  ENT
         PHP
         SEP   #$20
         LDA   L024E07
         BEQ   L200092
         DEC   L026B6E
         BEQ   L2000AD
         PLP
         RTL

L2000AD  INC   L026B6E
         LDA   L026B6F
         BEQ   L2000BE
         DEC
         STA   L026B6F
         PLP
         JMPL  L2007C9

L2000BE  LDA   L026DF7
         BEQ   L2000C7
         JMPL  L2001F8

L2000C7  LDA   L024F80
         AND   #$7F
         CMP   #$18
         BNE   L2000D2
         PLP
         RTL

L2000D2  JSL   L180C51
         STA   $64
         AND   #$0F
         BNE   L2000E0
         PLP
         JMP   L200270

L2000E0  LDA   $64
         AND   #$01
         BNE   L2000EA
         PLP
         JMP   L20017D

L2000EA  JSL   L180C51
         AND   #$1F
         CLC
         ADC   #$46
         STA   $69
         JSL   L180C51
         AND   #$3F
         CLC
         ADC   #$1B
         STA   $68
         LDX   #L024E60
         STX   $6C
         LDA   #$07
         STA   $65
L200109  LDA   ($6C)
         BEQ   L20011F
         REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         DEC   $65
         BNE   L200109
         PLP
         RTL

L20011F  LDA   #$15
         STA   ($6C)
         REP   #$20
         LDY   #$0004
         LDA   $68
         STA   ($6C),Y
         SEP   #$20
         LDY   #$0007
         LDA   $01
         STA   ($6C),Y
         LDY   #$000C
         LDA   #$00
         STA   ($6C),Y
         JSL   L180C51
         AND   #$E0
         STA   $60
         STZ   $61
         REP   #$20
         LDA   $60
         ASL
         STA   $60
         SEP   #$20
         DEC   $61
         REP   #$20
         LDY   #$0012
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDY   #$0014
         LDA   #$00
         STA   ($6C),Y
         JSL   L180C51
         AND   #$01
         BNE   L200174
         LDY   #$0010
         LDA   #$00
         STA   ($6C),Y
         PLP
         RTL

L200174  LDY   #$0010
         LDA   #$02
         STA   ($6C),Y
         PLP
         RTL

L20017D  PHP
         SEP   #$20
         JSL   L180C51
         AND   #$07
         LDX   #L024F80
         STX   $6C
         LDA   #$04
         STA   $65
L20018F  LDA   ($6C)
         BEQ   L2001A5
         REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         DEC   $65
         BNE   L20018F
         PLP
         RTL

L2001A5  LDY   #$000C
         LDA   #$00
         STA   ($6C),Y
         LDA   #$16
         STA   ($6C)
         LDY   #$000B
         LDA   #$03
         STA   ($6C),Y
         JSL   L180C51
         AND   #$01
         LDY   #$0010
         STA   ($6C),Y
         LDA   #$5D
         BNE   L2001C8
         LDA   #$19
L2001C8  LDY   #$0004
         STA   ($6C),Y
         LDY   #$0005
         LDA   #$32
         STA   ($6C),Y
         JSL   L180C51
         LDY   #$0011
         STA   ($6C),Y
         JSL   L180C51
         AND   #$01
         LDY   #$0012
         STA   ($6C),Y
         LDY   #$0013
         LDA   #$80
         STA   ($6C),Y
         LDY   #$0007
         LDA   #$04
         STA   ($6C),Y
         PLP
         RTL

L2001F8  SEP   #$20
         LDA   L024F80
         ORA   L024FE0
         ORA   L025040
         ORA   L0250A0
         BEQ   L20020A
         PLP
         RTL

L20020A  LDA   #$18
         STA   L024F80
         LDA   #$01
         STA   L024F87
L200214  JSL   L180C51
         AND   #$7F
         CMP   #$76
         BCS   L200214
         STA   $68
         LDA   L024442
         SEC
         SBC   #$11
         CMP   $68
         BCS   L200231
         CLC
         ADC   #$17
         CMP   $68
         BCS   L200214
L200231  LDA   $68
         STA   L024F84
         LDA   #$0A
         STA   L024F85
         LDX   #$0004
         STX   L024F8B
         JSL   L180C51
         AND   #$07
         CLC
         ADC   #$0E
         STA   L024F90
         LDA   #$01
         STA   L024FE7
         STA   L025047
         STA   L0250A7
         LDA   #$04
         STA   L024FEB
         STA   L02504B
         STA   L0250AB
         LDA   #$00
         STA   L024FEC
         STA   L02504C
         STA   L0250AC
         PLP
         RTL

L200270  PHP
         SEP   #$20
         JSL   L180C51
         AND   #$3F
         CLC
         ADC   #$20
         STA   $68
         LDA   #$50
         STA   $69
         LDA   #$06
         STA   $65
L200286  LDX   $64
         PHX
         LDX   $68
         PHX
         JSL   L180C51
         AND   #$10
         SEC
         SBC   #$08
         CLC
         ADC   $68
         STA   $68
         JSL   L180C51
         AND   #$10
         CLC
         ADC   $69
         STA   $69
         LDX   $68
         PHX
         JSL   L0F0384
         PLX
         STX   $68
         JSL   L03159E
         PLX
         STX   $68
         PLX
         STX   $64
         DEC   $65
         BNE   L200286
         PLP
         RTL

L2002BF  SEP   #$20
         LDA   ($6C)
         AND   #$80
         CLC
         ADC   #$0F
         STA   ($6C)
         PLP
         RTL

L2002CC  SEP   #$20
         LDA   ($6C)
         AND   #$80
         ORA   #$0E
         STA   ($6C)
         PLP
         RTL

L2002D8  ENT
         PHP
         SEP   #$20
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$05
         CMP   #$92
         BCS   L2002BF
         STA   ($6C),Y
         CLC
         ADC   #$03
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0011
         REP   #$20
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         LDY   #$0013
         LDA   ($6C),Y
         STA   $60
         LDY   #$0004
         LDA   ($6C),Y
         STA   $61
         LDY   #$0010
         LDA   ($6C),Y
         BIT   #$01
         BNE   L20031F
         REP   #$20
         LDA   $60
         CLC
         ADC   $68
         STA   $60
         JMP   L200328

L20031F  REP   #$20
         LDA   $60
         SEC
         SBC   $68
         STA   $60
L200328  SEP   #$20
         LDY   #$0013
         LDA   $60
         STA   ($6C),Y
         LDY   #$0004
         LDA   $61
         STA   ($6C),Y
         CMP   #$76
         BCC   L20033F
         JMP   L2002BF

L20033F  CLC
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0009
         STA   ($6C),Y
         REP   #$20
         LDA   #$0064
         CLC
         ADC   $68
         STA   $60
         LDY   #$0011
         STA   ($6C),Y
         SEP   #$20
         LDY   #$0005
         LDA   ($6C),Y
         CMP   #$73
         BCS   L20036B
         PLP
         RTL

L20036B  CLC
         ADC   #$02
         STA   $69
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDX   $68
         PHX
         JSL   L031582
         PLX
         STX   $68
         JSL   L031582
         PLP
         RTL

L20038A  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L20039B
         DEC
         STA   ($6C),Y
         BEQ   L20039B
         PLP
         RTL

L20039B  LDY   #$0010
         REP   #$20
         LDA   ($6C),Y
         STA   $64
         SEP   #$20
         LDY   #$0012
         LDA   ($6C),Y
         STZ   $69
         SEC
         SBC   $65
         BCS   L2003B7
         CLC
         ADC   $64
         INC   $69
L2003B7  SEC
         SBC   $65
         BCS   L2003C1
         CLC
         ADC   $64
         INC   $69
L2003C1  SEC
         SBC   $65
         BCS   L2003CB
         CLC
         ADC   $64
         INC   $69
L2003CB  SEC
         SBC   $65
         BCS   L2003D5
         CLC
         ADC   $64
         INC   $69
L2003D5  SEC
         SBC   $65
         BCS   L2003DF
         CLC
         ADC   $64
         INC   $69
L2003DF  SEC
         SBC   $65
         BCS   L2003E9
         CLC
         ADC   $64
         INC   $69
L2003E9  LDY   #$0012
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0014
         LDA   ($6C),Y
         BIT   #$80
         BNE   L200406
         LDA   $5C
         CLC
         ADC   $69
         JMP   L20040B

L200406  LDA   $5C
         SEC
         SBC   $69
L20040B  LDY   #$0005
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   $5C
         LDY   #$0013
         LDA   ($6C),Y
         BIT   #$80
         BNE   L200428
         LDA   $5C
         CLC
         ADC   #$06
         JMP   L20042D

L200428  LDA   $5C
         SEC
         SBC   #$06
L20042D  LDY   #$0004
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   $69
         CMP   #$90
         BCC   L200440
         JMP   L2002BF

L200440  LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         CMP   #$76
         BCC   L20044E
         JMP   L2002BF

L20044E  CLC
         ADC   #$03
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$0009
         STA   ($6C),Y
         LDA   $69
         CLC
         ADC   #$02
         LDY   #$000A
         STA   ($6C),Y
         PLP
         RTL

L20046A  ENT
         PHP
         SEP   #$20
         LDY   #$000C
         LDA   ($6C),Y
         BEQ   L20047B
         DEC
         STA   ($6C),Y
         BEQ   L20047B
         PLP
         RTL

L20047B  LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0009
         STA   ($6C),Y
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$06
         STA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0010
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BEQ   L2004AE
         PLP
         RTL

L2004AE  LDX   #L024F80
         STX   $60
         STZ   $64
         LDX   #$FF02
         STX   $68
         JSL   L200512
         LDX   #L024FE0
         STX   $60
         LDX   #$FF01
         STX   $68
         JSL   L200512
         LDX   #L025040
         STX   $60
         LDX   #$0101
         STX   $68
         JSL   L200512
         LDX   #L0250A0
         STX   $60
         LDA   #$02
         STA   $64
         LDX   #$0102
         STX   $68
         JSL   L200512
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$05
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$03
         STA   $69
         JSL   L03159E
         JSL   L03159E
         JSL   L03159E
         JSL   L0F0384
         PLP
         RTL

L200512  LDA   ($60)
         AND   #$80
         ORA   #$17
         STA   ($60)
         LDY   #$000C
         LDA   $64
         STA   ($60),Y
         LDY   #$0004
         LDA   ($6C),Y
         STA   ($60),Y
         LDY   #$0005
         LDA   ($6C),Y
         STA   ($60),Y
         LDY   #$0010
         LDA   #$03
         STA   ($60),Y
         LDY   #$0011
         LDA   $68
         STA   ($60),Y
         LDY   #$0012
         LDA   #$00
         STA   ($60),Y
         LDA   L024442
         LDY   #$0004
         SEC
         SBC   ($6C),Y
         SEC
         SBC   #$05
         LDY   #$0013
         STA   ($60),Y
         LDY   #$0014
         LDA   $69
         STA   ($60),Y
         RTL

L20055D  ENT
         PHP
         SEP   #$20
         LDA   L026B6F
         BEQ   L200567
         PLP
         RTL

L200567  LDA   #$FC
         STA   L024410
         LDY   #$000C
         LDA   #$00
         STA   ($6C),Y
         LDA   #$FF
         STA   L024E07
         LDY   #$0007
         LDA   ($6C),Y
         BMI   L2005E4
         LDA   #$FF
         STA   ($6C),Y
         LDY   #$0010
         LDA   ($6C),Y
         DEC
         STA   ($6C),Y
         BPL   L2005E4
         JSL   L200054
         LDY   #$0004
         LDA   ($6C),Y
         INC
         INC
         STA   $68
         LDY   #$0005
         LDA   ($6C),Y
         DEC
         STA   $69
         LDX   $68
         PHX
         JSL   L0F0384
         PLX
         STX   $68
         LDA   $68
         CLC
         ADC   #$05
         STA   $68
         LDX   $68
         PHX
         JSL   L0F0384
         PLX
         STX   $68
         INC   $69
         INC   $69
         INC   $69
         LDX   $68
         PHX
         JSL   L0F0384
         PLX
         STX   $68
         LDA   $68
         SEC
         SBC   #$05
         STA   $68
         JSL   L0F0384
         LDX   #$2000
         STX   $04
         JSL   L18071A
         JMP   L2002CC

L2005E4  LDY   #$0011
         LDA   ($6C),Y
         CMP   #$01
         BCS   L200628
         LDY   #$0005
         LDA   ($6C),Y
         CMP   #$67
         BCS   L20060D
         INC
         LDY   #$0005
         STA   $5C
         STA   ($6C),Y
         LDY   #$0007
         LDA   #$FF
         STA   ($6C),Y
         LDA   $5C
         STA   L026DF8
         JMP   L200640

L20060D  LDY   #$000B
         LDA   #$04
         STA   ($6C),Y
         LDY   #$001F
         STA   ($6C),Y
         LDY   #$0011
         LDA   #$01
         STA   ($6C),Y
         LDA   #$FF
         STA   L026DF8
         JMP   L200640

L200628  LDY   #$000B
         LDA   #$04
         STA   ($6C),Y
         LDY   #$001F
         STA   ($6C),Y
         LDY   #$0011
         LDA   #$02
         STA   ($6C),Y
         LDA   #$FF
         STA   L026DF8
L200640  LDY   #$0005
         LDA   ($6C),Y
         CLC
         ADC   #$04
         LDY   #$000A
         STA   ($6C),Y
         LDY   #$0004
         LDA   ($6C),Y
         CLC
         ADC   #$02
         LDY   #$0008
         STA   ($6C),Y
         CLC
         ADC   #$06
         LDY   #$0009
         STA   ($6C),Y
         PLP
         RTL

L200664  PHP
         SEP   #$20
         LDX   #L026B70
         STX   $70
         LDA   #$04
         STA   $65
L200670  LDX   $64
         PHX
         LDA   ($70)
         BEQ   L20067B
         JSL   L200689
L20067B  LDX   $70
         INX
         STX   $70
         PLX
         STX   $64
         DEC   $65
         BNE   L200670
         PLP
         RTL

L200689  PHP
         LDA   ($70)
         BIT   #$80
         BEQ   L20069E
         AND   #$7F
         STA   ($70)
         LDX   #$0000
         STX   L023D85
         JSL   L20070A
L20069E  LDX   #$0005
         STX   L023D85
         LDA   ($70)
         AND   #$7F
         STA   $5C
         BNE   L2006AE
         PLP
         RTL

L2006AE  LDX   $5C
         PHX
         JSL   L20077C
         PLX
         STX   $5C
         LDA   ($70)
         ORA   #$80
         STA   ($70)
         LDA   $5C
         SEC
         SBC   #$02
         BEQ   L2006DF
         BCS   L2006E8
         LDY   #$0004
         LDA   ($70),Y
         CLC
         ADC   #$0C
         STA   ($70),Y
         CMP   #$8E
         BCS   L2006D9
         PLP
         JMP   L20070A

L2006D9  LDA   #$00
         STA   ($70)
         PLP
         RTL

L2006DF  LDA   ($70)
         DEC
         STA   ($70)
         PLP
         JMP   L20070A

L2006E8  LDY   #$0008
         LDA   ($70),Y
         CLC
         ADC   #$0C
         STA   ($70),Y
         CMP   #$8E
         BCS   L2006FA
         PLP
         JMP   L20070A

L2006FA  LDY   #$0008
         LDA   #$8E
         STA   ($70),Y
         LDA   ($70)
         DEC
         STA   ($70)
         PLP
         JMP   L20070A

L20070A  PHP
         SEP   #$20
         LDA   #$01
         STA   L024459
         LDY   #$000C
         LDA   ($70),Y
         STA   $68
         LDY   #$0004
         LDA   ($70),Y
         STA   $69
         JSL   L031E2F
         LDX   $60
         STX   L023FEE
         LDY   #$0008
         LDA   ($70),Y
         STA   $69
         JSL   L031E2F
         LDX   $60
         STX   L023FF0
         LDX   $68
         PHX
         LDX   $70
         PHX
         LDX   L023D85
         STX   L023FEC
         JSL   L0F2148
         PLX
         STX   $70
         PLX
         STX   $68
         INC   $68
         JSL   L031E2F
         LDX   $60
         STX   L023FF0
         LDY   #$0004
         LDA   ($70),Y
         STA   $69
         JSL   L031E2F
         LDX   $60
         STX   L023FEE
         LDX   L023D85
         STX   L023FEC
         LDX   $70
         PHX
         JSL   L0F2148
         PLX
         STX   $70
         PLP
         RTL

L20077C  PHP
         SEP   #$20
         LDA   L024443
         LDY   #$0004
         CMP   ($70),Y
         BCS   L20078B
         PLP
         RTL

L20078B  LDY   #$0008
         CMP   ($70),Y
         BCC   L200794
         PLP
         RTL

L200794  LDA   L024442
         SEC
         SBC   #$03
         LDY   #$000C
         CMP   ($70),Y
         BCC   L2007A3
         PLP
         RTL

L2007A3  CLC
         ADC   #$06
         LDY   #$000C
         CMP   ($70),Y
         BCS   L2007AF
         PLP
         RTL

L2007AF  LDA   #$01
         STA   L0244A2
         LDA   L024443
         SEC
         SBC   #$03
         STA   $69
         LDY   #$000C
         LDA   ($70),Y
         STA   $68
         JSL   L0F0384
         PLP
         RTL

L2007C9  PHP
         SEP   #$20
         JSL   L180C51
         AND   #$03
         BEQ   L2007D6
         PLP
         RTL

L2007D6  JSL   L180C51
         AND   #$40
         CLC
         ADC   #$20
         STA   $68
         LDA   #$50
         STA   $69
         JSL   L03159E
         LDX   $6C
         PHX
         LDX   #L026B70
         STX   $6C
         STZ   $64
         LDA   ($6C)
         BEQ   L20081D
         LDX   $6C
         INX
         STX   $6C
         INC   $64
         LDA   ($6C)
         BEQ   L20081D
         LDX   $6C
         INX
         STX   $6C
         INC   $64
         LDA   ($6C)
         BEQ   L20081D
         LDX   $6C
         INX
         STX   $6C
         INC   $64
         LDA   ($6C)
         BEQ   L20081D
         PLX
         STX   $6C
         PLP
         RTL

L20081D  JSL   L180C51
         AND   #$03
         ASL
         ASL
         ORA   $64
         ASL
         STA   $68
         STZ   $69
         REP   #$20
         LDA   #L026B80
         CLC
         ADC   $68
         STA   $60
         SEP   #$20
         LDA   ($60)
         LDY   #$000C
         STA   ($6C),Y
         LDX   $60
         INX
         STX   $60
         LDA   ($60)
         LDY   #$0004
         STA   ($6C),Y
         LDY   #$0008
         STA   ($6C),Y
         LDA   #$03
         STA   ($6C)
         PLX
         STX   $6C
         PLP
         RTL
L200859  RTL

L20085A  PHP
         REP   #$20
         LDA   #$0050
         STA   $44
         LDX   $6C
         LDY   #$200C
         SEP   #$20
         LDA   L026E32
         STAL  L20087C+2
         LDA   #$E1
         STAL  L20087C+1
         REP   #$20
L200878  LDA   #$0065
         PHB
L20087C  MVN   $000000,$000000
         PLB
         TYA
         CLC
         ADC   #$003A
         TAY
         DEC   $44
         BNE   L200878
         PLP
         RTL

L20088C  PHP
         REP   #$20
         LDA   #$200C
         STA   $70
         LDA   #$00E1
         STA   $72
         LDA   #$0028
         STA   $5C
L20089E  PHA
         LDA   L026BA2
         STA   $64
         JSL   L2008B7
         LDA   L026BA4
         STA   $64
         JSL   L2008B7
         PLA
         DEC
         BNE   L20089E
         PLP
         RTL

L2008B7  PHP
         REP   #$20
         LDA   $70
         PHA
         LDA   #$0033
         STA   $60
L2008C2  LDA   [$6C]
         AND   $64
         ORA   [$70]
         STA   [$70]
         INC   $70
         INC   $70
         INC   $6C
         INC   $6C
         DEC   $60
         BNE   L2008C2
         PLA
         CLC
         ADC   #$00A0
         STA   $70
         PLP
         RTL

L2008DF  PHP
         SEP   #$20
         LDA   L026BA0
         INC
         CMP   #$11
         BCS   L20090E
         STA   L026BA0
         ASL
         STZ   $69
         STA   $68
         REP   #$20
         LDA   #L026BA6
         SEC
         SBC   #$0002
         CLC
         ADC   $68
         STA   $60
         LDA   ($60)
         STA   L026BA2
         INC   $60
         LDA   ($60)
         STA   L026BA4
         PLP
         RTL

L20090E  REP   #$20
         LDA   #$FFFF
         STA   L026BA0
         STA   L026BA2
         STA   L026BA4
         PLP
         RTL

L20091E  PHP
         REP   #$20
         LDA   #$0000
         STAL  $E1200C
         LDA   #$0050
         STA   $44
         LDX   #$200C
         TXY
         INY
         LDA   #$0064
L200935  PHB
         MVN   $E10000,$E10000
         PLB
         TYA
         CLC
         ADC   #$003A
         TAY
         LDX   #$200C
         LDA   #$0065
         DEC   $44
         BNE   L200935
         PLP
         RTL

L20094C  SEP   #$20
         LDA   #$04
         STA   $64
         JMP   L200959

L200955  LDA   #$05
         STA   $64
L200959  LDA   L026BE6
         INC
         AND   #$1F
         CMP   #$14
         BCC   L200965
         LDA   #$00
L200965  STA   L026BE6
         LSR
         STA   $5C
         STZ   $5D
         REP   #$20
         LDA   #L026BE8
         CLC
         ADC   $5C
         STA   $60
         SEP   #$20
         LDA   ($60)
         STA   $65
         RTL
         RTL

L20097F  PHP
         SEP   #$20
         LDA   L026BF2
         BNE   L200989
         PLP
         RTL

L200989  DEC
         STA   L026BF2
         JMP   L200990

L200990  PLP
         RTL

L200992  PHP
         REP   #$20
         LDA   $64
         PHA
         LDA   $60
         PHA
         LDA   L026DF9
         STA   $64
         ASL
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $64
         ASL
         CLC
         ADC   $64
         CLC
         ADC   $61
         STA   $61
         LSR   $65
         ROR   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   L026DF9
L2009C1  LDA   L026DFB
         STA   $64
         ASL
         ASL
         CLC
         ADC   $64
         STA   $60
         SEP   #$20
         LDA   $64
         ASL
         CLC
         ADC   $64
         CLC
         ADC   $61
         STA   $61
         LSR   $65
         ROR   $64
         REP   #$20
         LDA   $60
         CLC
         ADC   $64
         STA   L026DFB
         SEP   #$20
         LDA   L026DFA
         STA   $5C
         STZ   $61
         PLX
         STX   $60
         PLX
         STX   $64
         ROR
         ROR   $5C
         LDA   $5C
         PLP
         RTL

         PHP
         REP   #$20
         LDX   $64
         PHX
         LDX   $60
         PHX
         JMP   L2009C1

L200A0A  PHP
         SEP   #$20
         LDA   #$01
         STA   L024459
         REP   #$20
         LDX   #L026DD7
         LDY   #L024D58
         LDA   #$0007
         PHB
         MVN   L026DD7,L024D58
         PLB
         LDX   #L026DE7
         LDY   #L024D78
         LDA   #$0007
         PHB
         MVN   L026DE7,L024D78
         PLB
         LDX   #$0303
         STX   L024456
         SEP   #$20
         STZ   L02445B
         STZ   L02454A
         JSL   L181103
         LDX   #$0000
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   L026DD4
         CMP   #$90
         BCC   L200A56
         PLP
         RTL

L200A56  STA   $69
         LDA   #$40
         STA   $68
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020748,Y
         EOR   #$FF
         INC
         CLC
         ADC   $61
         STA   $61
         LDA   L0207E8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L026DE7
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L026DD7
         CLC
         ADC   $65
         STA   $60
         LDA   L020748,Y
         CLC
         ADC   $61
         STA   $61
         LDA   L020888,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L026DE9
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L026DD9
         CLC
         ADC   $65
         STA   $60
         LDA   L020748,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC2
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC0
         INC   $69
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $68
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0207E8,Y
         STA   $65
         LDA   $61
         SEC
         SBC   $65
         STA   $61
         LDX   $60
         STX   L024DC4
         CLC
         ADC   $65
         STA   $61
         LDA   $60
         CLC
         ADC   $65
         STA   $60
         LDX   $60
         STX   L024DC8
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DC6
         INC   $69
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0207E8,Y
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L026DEB
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L026DDB
         INC   $69
         INC   $69
         INC   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020748,Y
         LSR
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L026DED
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L026DDD
         LDX   L026DD7
         STX   L024D58
         STX   L024D78
         LDX   L026DD9
         STX   L024D5A
         LDX   L026DDB
         STX   L024D5C
         STX   L024D7A
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$5555
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L024DC0
         STX   L024D7A
         LDX   L026DDB
         STX   L024D5A
         STX   L024D7C
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$4444
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L026DE7
         STX   L024D58
         STX   L024D78
         LDX   L024DC2
         STX   L024D5A
         LDX   L026DEB
         STX   L024D5C
         STX   L024D7A
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         LDX   #$0102
         STX   L024456
         JSL   L181103
         LDX   #$5555
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L026DE9
         STX   L024D7A
         LDX   L026DEB
         STX   L024D5A
         STX   L024D7C
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         LDX   #$0201
         STX   L024456
         JSL   L181103
         LDX   #$4444
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L024DC4
         STX   L024D58
         STX   L024D78
         LDX   L024DC6
         STX   L024D5A
         LDX   L026DDD
         STX   L024D5C
         LDX   L024DC8
         STX   L024D7A
         LDX   L026DED
         STX   L024D7C
         LDX   #$0202
         STX   L024456
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         JSL   L181103
         LDX   #$CCCC
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L026DDD
         STX   L024D5A
         LDX   L026DED
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         LDA   #$04
         STA   L02445B
         STZ   L02494A
         JSL   L181103
         LDX   #$FFFF
         STX   $64
         STX   $66
         JSL   L072F07
         PLP
         RTL

L200CA6  ENT
         PHP
         SEP   #$20
         LDY   #$0007
         LDA   ($6C),Y
         BMI   L200CC5
         LDA   L026E20
         DEC
         BMI   L200CC5
         STA   L026E20
         CMP   #$03
         BCS   L200CC1
         JSL   L200859
L200CC1  LDA   #$FF
         STA   ($6C),Y
L200CC5  LDA   #$FF
         STA   L024410
         LDA   L024443
         STA   $5C
         LDA   L026DF7
         CMP   #$FF
         BNE   L200CF6
         LDY   #$0008
         LDA   #$00
         STA   ($6C),Y
         LDY   #$0009
         LDA   #$75
         STA   ($6C),Y
         LDY   #$000A
         LDA   #$66
         STA   ($6C),Y
         LDA   $5C
         CMP   #$69
         BCC   L200CF3
         PLP
         RTL
L200CF3  JMP   L200D13

L200CF6  LDY   #$0008
         LDA   #$30
         STA   ($6C),Y
         LDY   #$0009
         LDA   #$4F
         STA   ($6C),Y
         LDY   #$000A
         LDA   #$32
         STA   ($6C),Y
         LDA   $5C
         CMP   #$5F
         BCC   L200D13
         PLP
         RTL

L200D13  LDA   L02430D
         CMP   #$06
         BCC   L200D1F
         LDA   #$02
         STA   L02430D
L200D1F  LDA   #$01
         STA   L0244A2
         PLP
         RTL

L200D26  ENT
         PHP
         SEP   #$20
         LDA   L026DF8
         STZ   L026DF8
         STA   L026DF7
         LDA   L026E20
         CMP   #$04
         BCC   L200D40
         JSL   L200955
         JMP   L200D44

L200D40  JSL   L20094C
L200D44  LDA   L026DF7
         CMP   #$FF
         BNE   L200D52
         JSL   L200EA1
         JMP   L200D56

L200D52  JSL   L200EE8
L200D56  JSL   L200E17
         JSL   L200664
         PLP
L200D5F  ENT
         PHP
         REP   #$20
         LDX   $6C
         PHX
         LDA   L026E30
         STA   $6C
         LDA   L026E32
         STA   $6E
         JSL   L20085A
         PLX
         STX   $6C
         PLP
         RTL

L200D78  PHP
         SEP   #$20
         LDX   L026DFD+2
         STX   $72
         LDX   L026DFD
         STX   $70
         LDA   [$70]
         INC
         BNE   L200D8D
         JMP   L200E10

L200D8D  CLC
         ADC   #$1A
         STA   $60
         INX
         STX   $70
         LDA   [$70]
         CLC
         ADC   #$20
         STA   $61
         INX
         STX   $70
L200D9F  LDX   $70
         LDY   $60
         STY   L023FEE
         LDA   [$70]
         CMP   #$FA
         BCS   L200E08
         CLC
         ADC   #$1B
         STA   $60
         INX
         STX   $70
         LDA   [$70]
         CLC
         ADC   #$20
         STA   $61
         INX
         STX   $70
         LDY   $60
         STY   L023FF0
         LDY   $60
         PHY
         LDY   $70
         PHY
         LDY   $72
         PHY
         LDX   L023D85
         STX   L023FEC
         JSL   L0F2148
         PLX
         STX   $72
         PLX
         STX   $70
         LDA   L023FEE
         EOR   #$FF
         STA   L023FEE
         LDA   L023FF0
         EOR   #$FF
         STA   L023FF0
         LDX   $70
         PHX
         LDX   $72
         PHX
         LDX   L023D85
         STX   L023FEC
         JSL   L0F2148
         PLX
         STX   $72
         PLX
         STX   $70
         PLX
         STX   $60
         JMP   L200D9F

L200E08  LDX   $70
         INX
         STX   L026DFD
         PLP
         RTL

L200E10  INC   L026E1D
         PLX
         PLX
         PLP
         RTL

L200E17  PHP
         SEP   #$20
         LDX   #L026E01
         STX   $70
         LDA   #$08
         STA   $65
L200E23  LDX   $64
         PHX
         LDA   $65
         STA   L026E11
         LDA   ($70)
         BEQ   L200E33
         JSL   L200E41
L200E33  LDX   $70
         INX
         STX   $70
         PLX
         STX   $64
         DEC   $65
         BNE   L200E23
         PLP
         RTL

L200E41  PHP
         SEP   #$20
         LDA   ($70)
         BIT   #$80
         BEQ   L200E5A
         LDX   #$0000
         STX   L023D85
         JSL   L200F06
         LDA   ($70)
         AND   #$7F
         STA   ($70)
L200E5A  LDA   ($70)
         AND   #$7F
         BNE   L200E62
         PLP
         RTL

L200E62  LDA   L026E11
         CMP   #$01
         BEQ   L200E7D
         LDY   #$0008
         LDA   ($70),Y
         SEC
         SBC   #$02
         STA   ($70),Y
         CMP   #$10
         BCS   L200E7D
         LDA   #$00
         STA   ($70)
         PLP
         RTL

L200E7D  LDX   #$FFFF
         STX   L023D85
         JSL   L200F06
         LDA   ($70)
         ORA   #$80
         STA   ($70)
         PLP
         RTL

         LDX   #$FFFF
         STX   L023D85
         JSL   L200F06
         LDA   ($70)
         ORA   #$80
         STA   ($70)
         PLP
         RTL

L200EA1  PHP
         SEP   #$20
         LDA   L024428
         AND   #$07
         BEQ   L200EAD
         PLP
         RTL

L200EAD  LDA   #$01
         STA   L026E08
         LDA   #$67
         STA   L026E10
         LDX   #$0007
         STX   $64
         LDX   #L026E01
         STX   $60
L200EC1  LDA   ($60)
         BEQ   L200ED0
         LDX   $60
         INX
         STX   $60
         DEC   $64
         BNE   L200EC1
         PLP
         RTL

L200ED0  LDA   #$01
         STA   ($60)
         REP   #$20
         LDA   #$0008
         STA   $68
         CLC
         ADC   $60
         STA   $60
         SEP   #$20
         LDA   #$65
         STA   ($60)
         PLP
         RTL

L200EE8  PHP
         SEP   #$20
         LDX   #L026E01
         STX   $60
         LDX   #$0008
         STX   $64
L200EF5  LDA   ($60)
         AND   #$FE
         STA   ($60)
         LDX   $60
         INX
         STX   $60
         DEC   $64
         BNE   L200EF5
         PLP
         RTL

L200F06  PHP
         SEP   #$20
         STZ   $61
         LDY   #$0008
         LDA   ($70),Y
         STA   $60
         LDX   $60
         LDA   L0206A8,X
         SEC
         SBC   #$20
         CMP   #$C8
         BCC   L200F20
         PLP
         RTL

L200F20  CLC
         ADC   #$20
         STA   $60
         REP   #$20
         LDA   $60
         ASL
         STA   $60
         LDY   $60
         LDA   L020368,Y
         STA   $68
         LDX   #$00E1
         STX   $6A
         LDY   #$007E
L200F3B  LDA   L023D85
         STA   [$68],Y
         DEY
         DEY
         BNE   L200F3B
         PLP
         RTL

L200F46  ENT
         PHP
         REP   #$20
         LDA   L0242E3
         PHA
         PEA   ^L026E22
         PEA   L026E22
         JSL   L0E0000
         PLA
         STA   $70
         PLA
         STA   $72
         LDA   [$70]
         STA   L026E30
         LDY   #$0002
         LDA   [$70],Y
         STA   L026E32
         PLA
         STA   L0242E3
         CMP   #$FFFF
         BNE   L200FA8
         PHA
         PEA   ^L200F81
         PEA   L200F81
         _SysFailMgr
L200F81  STR   ' Could not allocate memory  for GLORLE'
L200FA8  LDA   #$FF0A
         STA   $5C
         JSL   L2909FD
         LDA   #$0001
         STA   L0242D5
         SEP   #$20
         LDA   #$FA
         STA   L026E12
         LDA   #$2D
         STA   L026E1A
         STZ   L026E1B
         STZ   L026E1C
         STZ   L026E1D
         STZ   L026E1E
         STZ   L026E1F
         STZ   L024544
         LDA   #$20
         STA   L026E20
         LDA   #$C8
         STA   L026E21
         STZ   L026BA0
         STZ   L026BA2
         STZ   L026BA4
         STZ   L026BE6
         STZ   L026DF7
         STZ   L026DF8
         STZ   L026E11
         STZ   L026DD5
         STZ   L026DD6
         LDA   #$C8
         STA   L026BF2
         LDA   #$01
         STA   L026DF9
         STA   L026DFB
         STA   L026DD3
         LDA   #$3C
         STA   L026DD4
         LDX   #L220000
         STX   L026DFD
         LDX   #^L220000
         STX   L026DFD+2
         LDA   #$87
         STA   L026B6E
         LDA   #$FF
         STA   L026B6F
         REP   #$20
         LDA   #$0000
         STAL  L026DD7
         STAL  L026DD9
         STAL  L026DDB
         STAL  L026DDD
         STAL  L026DDF
         STAL  L026DE1
         STAL  L026DE3
         STAL  L026DE5
         STAL  L026DE7
         STAL  L026DE7
         STAL  L026DE9
         STAL  L026DEB
         STAL  L026DED
         STAL  L026DEF
         STAL  L026DF1
         STAL  L026DF3
         STAL  L026DF5
         STAL  L026E01
         STAL  L026E01
         STAL  L026E03
         STAL  L026E05
         STAL  L026E07
         STAL  L026E09
         STAL  L026E0B
         STAL  L026E0D
         STAL  L026E0F
         LDAL  L026E13
         STAL  L025150
         LDAL  L026E15
         STAL  L025152
         LDAL  L026E17
         STAL  L025154
         LDAL  L026E13
         STAL  L025150
         LDAL  L026E15
         STAL  L025152
         LDAL  L026E17
         STAL  L025154
         LDAL  L026E19
         STAL  L025156
         JSL   L200859
         SEP   #$20
         LDA   #$FE
         STA   L023E28
         PLP
         RTL

         PLP
         RTL

L2010D9  ENT
         PHP
         SEP   #$20
         LDA   L026E12
         BEQ   L2010EE
         DEC   L026E12
         BEQ   L2010EE
         STZ   L026E12
         JMP   L2010EE

         PLP
         RTL

L2010EE  LDA   #$01
         STA   L02449E
         LDA   $FF
         STA   L024544
         LDA   #$00
         XBA
         LDA   L026E1D
         ASL
         TAX
         JMP   (L201103,X)

L201103  DA    L20110B
         DA    L20111F
         DA    L201137
         DA    L20115F
L20110B  JSL   L20094C
         LDX   #$0005
         STX   L023D85
         JSL   L200D78
         JSL   L200D78
         PLP
         RTL

L20111F  JSL   L20094C
         LDA   L026BE6
         CMP   #$0A
         BEQ   L20112C
         PLP
         RTL

L20112C  JSL   L20091E
         JSL   L200859
         INC   L026E1D
L201137  JSL   L200955
         JSL   L2008DF
         LDX   #$FFFF
         STX   L023D85
         LDX   L026E30
         STX   $6C
         LDX   L026E32
         STX   $6E
         JSL   L20088C
         LDA   L026BA0
         BMI   L20115A
         PLP
         RTL

L20115A  INC   L026E1D
         PLP
         RTL

L20115F  JSL   L200955
         JSL   L200D5F
         LDA   #$04
         STA   L024432
         STZ   L024436
         LDA   #$FF
         STA   L024438
         LDA   #$14
         STA   L024E00
         LDA   #$3B
         STA   L024E04
         LDA   #$14
         STA   L024E05
         LDA   #$FA
         STA   L024E07
         LDA   #$05
         STA   L024E08
         LDA   #$7A
         STA   L024E09
         LDA   #$03
         STA   L024E0A
         LDA   #$00
         STA   L024E0C
         LDA   #$01
         STA   L024E01
         STA   L024E02
         STA   L024E03
         LDA   #$FF
         STA   L024E21
         STA   L024E41
         LDA   #$19
         STA   L024E60
         LDA   #$1B
         STA   L024E64
         LDA   #$46
         STA   L024E65
         LDA   #$FF
         STA   L024E67
         LDA   #$1E
         STA   L024E68
         LDA   #$22
         STA   L024E69
         LDA   #$48
         STA   L024E6A
         LDA   #$02
         STA   L024E6B
         LDA   #$02
         STA   L024E7F
         LDA   #$FF
         STA   L024E6C
         LDA   #$04
         STA   L024E70
         LDA   #$00
         STA   L024E71
         LDA   #$19
         STA   L024EC0
         LDA   #$3A
         STA   L024EC4
         LDA   #$50
         STA   L024EC5
         LDA   #$FF
         STA   L024EC7
         LDA   #$3D
         STA   L024EC8
         LDA   #$41
         STA   L024EC9
         LDA   #$52
         STA   L024ECA
         LDA   #$02
         STA   L024ECB
         LDA   #$02
         STA   L024EDF
         LDA   #$FF
         STA   L024ECC
         LDA   #$04
         STA   L024ED0
         LDA   #$00
         STA   L024ED1
         LDA   #$19
         STA   L024F20
         LDA   #$5B
         STA   L024F24
         LDA   #$46
         STA   L024F25
         LDA   #$FF
         STA   L024F27
         LDA   #$5E
         STA   L024F28
         LDA   #$62
         STA   L024F29
         LDA   #$48
         STA   L024F2A
         LDA   #$02
         STA   L024F2B
         LDA   #$02
         STA   L024F3F
         LDA   #$E1
         STA   L024F2C
         LDA   #$04
         STA   L024F30
         LDA   #$00
         STA   L024F31
         STZ   L02449E
         PLP
         RTL

L201268  ENT
         PHP
         SEP   #$20
         STZ   L02430D
         LDA   #$64
         STA   L024420
         LDA   #$04
         STA   $5C
         LDA   L024442
         AND   #$40
         BEQ   L201282
         LDA   #$FC
         STA   $5C
L201282  LDA   $5C
         STA   L026E1C
L201287  LDA   L024442
         CLC
         ADC   L026E1C
         STA   L024442
         JSL   L20094C
         JSL   L200D5F
         JSL   L072403
         REP   #$20
         LDX   #$001E
         STX   L023C89
         JSL   L120000
         SEP   #$20
         LDA   L024442
         STA   $5C
         LDA   L026E1C
         BPL   L2012BE
         LDA   $5C
         CMP   #$23
         BCS   L201287
         JMP   L2012C4

L2012BE  LDA   $5C
         CMP   #$5C
         BCC   L201287
L2012C4  JSL   L290C1B
         LDA   L024443
         SEC
         SBC   #$0A
         STA   L024443
         JSL   L20094C
         JSL   L200D5F
         JSL   L072403
         REP   #$20
         LDX   #$003C
         STX   L023C89
         JSL   L120000
         SEP   #$20
         LDA   L024443
         CMP   #$26
         BCS   L2012C4
         JSL   L072347
         LDA   #$FF
         STA   L024426
L2012FB  LDA   L026BE6
         STA   $5C
         CMP   #$0A
         BEQ   L20131D
         JSL   L20094C
         JSL   L200D5F
         REP   #$20
         LDX   #$0014
         STX   L023C89
         JSL   L120000
         SEP   #$20
         JMP   L2012FB

L20131D  LDA   #$1F
         STA   L026E34
         JSL   L290FB9
         JSL   L290FD4
L20132A  LDA   L026E34
         BNE   L201338
         JSL   L290FD4
         LDA   #$1F
         STA   L026E34
L201338  DEC   L026E34
         JSL   L2013A9
         JSL   L0F030E
         REP   #$20
         LDX   #$0014
         STX   L023C89
         JSL   L120000
         SEP   #$20
         LDA   L026BF2
         CMP   #$64
         BCS   L20132A
         STZ   L020002
         LDX   L026DD3
         STX   $60
         LDA   $61
         STA   $5C
         CMP   #$82
         BCC   L20137D
         LDA   #$0F
         STA   L0257FA
         LDA   $5C
         CMP   #$90
         BCC   L20137D
         LDA   L0257FA
         CMP   #$01
         BNE   L2013A7
         JMP   L2013A7

L20137D  REP   #$20
         LDA   L026DD5
         STA   $68
         CLC
         ADC   $60
         STA   $60
         STA   L026DD3
         LDA   $68
         CLC
         ADC   #$0040
         STA   $60
         STA   L026DD5
         SEP   #$20
         JSL   L200A0A
         LDA   L026E1F
         BEQ   L20132A
         LDA   #$0F
         STA   L0257FA
L2013A7  PLP
         RTL

L2013A9  PHP
         SEP   #$20
         LDA   #$00
         XBA
         LDA   L026E1B
         ASL
         TAX
         JMP   (L2013B7,X)

L2013B7  DA    L2013C1
         DA    L2013C8
         DA    L2013F7
         DA    L201405
         DA    L201409
L2013C1  JSL   L200859
         INC   L026E1B
L2013C8  JSL   L20097F
         JSL   L200D5F
         JSL   L200992
         AND   #$7F
         STA   $68
L2013D8  JSL   L200992
         AND   #$7F
         CMP   #$46
         BCS   L2013D8
         CLC
         ADC   #$18
         STA   $69
         JSL   L0F0384
         LDA   L026BF2
         BEQ   L2013F2
         PLP
         RTL

L2013F2  INC   L026E1B
         PLP
         RTL

L2013F7  JSL   L200D5F
         DEC   L026E1A
         BEQ   L201402
         PLP
         RTL

L201402  INC   L026E1B
L201405  LDA   #$FF
         STA   $5C
L201409  LDA   $5C
         STA   L026E1F
         PLP
         RTL

L201410  ENT
         PHP
         SEP   #$20
         JSL   L200EE8
         JSL   L200E17
         LDX   #L026B70
         STX   $60
         LDA   #$04
         STA   $65
L201424  LDA   ($60)
         AND   #$80
         STA   ($60)
         LDX   $60
         INX
         STX   $60
         DEC   $65
         BNE   L201424
         JSL   L200664
         LDX   #L024E60
         STX   $6C
         LDA   #$03
         STA   $65
L201440  LDX   $64
         PHX
         LDA   ($6C)
         AND   #$7F
         CMP   #$19
         BNE   L20144F
         JSL   L201469
L20144F  REP   #$20
         LDA   $6C
         CLC
         ADC   #$0060
         STA   $6C
         SEP   #$20
         PLX
         STX   $64
         DEC   $65
         BNE   L201440
         JSL   L200D5F
         JMP   L2013A7

L201469  PHP
         SEP   #$20
         JSL   L200054
         LDA   #$00
         STA   ($6C)
         PLP
         RTL
         RTL
         RTL

L201478  ENT
         PHP
         SEP   #$20
         JSL   L0320D8
         REP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         CLC
         ADC   #$05
         STA   $68
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L020888,Y
         LSR
         STA   $65
         STA   $64
         LSR   $64
         CLC
         ADC   $60
         STA   $60
         LDY   #$0004
         LDX   $60
         STX   L024DBC
         SEC
         SBC   $65
         SEC
         SBC   $64
         STA   $60
         LDX   $60
         STX   L024DBA
         CLC
         ADC   $64
         STA   $60
         LDA   $61
         SEC
         SBC   $64
         STA   $61
         LDX   $60
         STX   L024DB8
         CLC
         ADC   $64
         CLC
         ADC   $65
         STA   $61
         LDX   $60
         STX   L024DBE
         LDX   L024DB8
         STX   L024D58
         STX   L024D78
         LDX   L024DBA
         STX   L024D5A
         LDX   L024DBE
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   L024DBC
         STX   L024D7A
         LDX   L024DBE
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         JSL   L181103
         JSL   L03219C
         LDX   #$5555
         STX   L023D85
         LDA   #$01
         STA   L02445B
         LDX   #$4444
         STX   $64
         LDX   #$1111
         STX   $66
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         LDX   #$5555
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L024DB8
         STX   $60
         DEC   $60
         DEC   $60
         DEC   $61
         REP   #$20
         LDY   #$0020
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBA
         STX   $60
         DEC   $60
         REP   #$20
         LDY   #$0022
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBE
         STX   $60
         INC   $61
         DEC   $60
         DEC   $60
         REP   #$20
         LDY   #$0024
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DB8
         STX   $60
         INC   $60
         INC   $60
         DEC   $61
         REP   #$20
         LDY   #$0040
         LDA   $60
         STA   ($6C),Y
         LDY   #$0004
         LDA   L024DBC
         STA   $60
         SEP   #$20
         INC   $60
         REP   #$20
         LDY   #$0042
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBE
         STX   $60
         INC   $60
         INC   $60
         INC   $61
         REP   #$20
         LDY   #$0044
         LDA   $60
         STA   ($6C),Y
         LDY   #$0002
         LDA   #$0202
         STA   ($6C),Y
         SEP   #$20
         LDA   L024459
         LDY   #$0001
         STA   ($6C),Y
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         PLP
         RTL

L2015EE  ENT
         PHP
         SEP   #$20
         JSL   L0320D8
         REP   #$20
         LDY   #$0004
         LDA   ($6C),Y
         STA   $68
         SEP   #$20
         CLC
         ADC   #$05
         STA   $68
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STY   $74
         LDA   L0209C8,Y
         LSR
         STA   $65
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DBE
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DBC
         CLC
         ADC   $65
         STA   $60
         LSR   $65
         LDA   $61
         SEC
         SBC   $65
         STA   $61
         LDA   $60
         CLC
         ADC   $65
         STA   $60
         LDX   $60
         STX   L024DBA
         SEC
         SBC   $65
         SEC
         SBC   $65
         STA   $60
         LDX   $60
         STX   L024DB8
         LDA   $69
         CLC
         ADC   #$04
         STA   $69
         JSL   L031E2F
         STZ   $5D
         LDA   $69
         STA   $5C
         LDY   $5C
         STX   $74
         LDA   L020748,Y
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC2
         LDA   L0207E8,Y
         EOR   #$FF
         INC
         CLC
         ADC   $60
         STA   $60
         LDX   $60
         STX   L024DC0
         LDX   L024DB8
         STX   L024D58
         STX   L024D78
         LDX   L024DBC
         STX   L024D5A
         LDX   L024DC0
         STX   L024D5C
         STX   L024D7A
         LDX   #$0102
         STX   L024456
         LDA   #$01
         STA   L02445B
         STZ   L02464A
         JSL   L181103
         LDX   L024DBA
         STX   L024D58
         STX   L024D78
         LDX   L024DBE
         STX   L024D7A
         LDX   L024DC2
         STX   L024D5A
         STX   L024D7C
         LDX   #$0201
         STX   L024456
         LDA   #$02
         STA   L02445B
         STZ   L02474A
         JSL   L181103
         LDX   L024DB8
         STX   L024D58
         LDX   L024DBA
         STX   L024D78
         LDX   L024DC0
         STX   L024D5A
         LDX   L024DC2
         STX   L024D7A
         LDX   #$0101
         STX   L024456
         LDA   #$03
         STA   L02445B
         STZ   L02484A
         JSL   L181103
         JSL   L03219C
         LDA   #$03
         STA   L02445B
         LDA   L024428
         AND   #$08
         STA   $5C
         LDX   #$8888
         STX   $64
         LDX   #$2222
         STX   $66
         LDA   $5C
         BEQ   L20172C
         LDX   #$AAAA
         STX   $64
         STX   $66
L20172C  JSL   L072F07
         LDA   #$01
         STA   L02445B
         LDX   #$FFFF
         STX   $64
         STX   $66
         JSL   L072F07
         LDA   #$02
         STA   L02445B
         LDX   #$FFFF
         STX   $64
         STX   $66
         JSL   L072F07
         LDX   L024DB8
         STX   $60
         DEC   $60
         DEC   $60
         DEC   $61
         REP   #$20
         LDY   #$0020
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBC
         STX   $60
         DEC   $60
         REP   #$20
         LDY   #$0022
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DC0
         STX   $60
         INC   $61
         DEC   $60
         DEC   $60
         REP   #$20
         LDY   #$0024
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBA
         STX   $60
         INC   $60
         INC   $60
         DEC   $61
         REP   #$20
         LDY   #$0040
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DBE
         STX   $60
         INC   $60
         REP   #$20
         LDY   #$0042
         LDA   $60
         STA   ($6C),Y
         SEP   #$20
         LDX   L024DC2
         STX   $60
         INC   $60
         INC   $60
         INC   $61
         REP   #$20
         LDY   #$0044
         LDA   $60
         STA   ($6C),Y
         LDY   #$0002
         LDA   #$0202
         STA   ($6C),Y
         SEP   #$20
         LDA   L024459
         LDY   #$0001
         STA   ($6C),Y
         LDA   ($6C)
         ORA   #$80
         STA   ($6C)
         PLP
         RTL

