The Battle of Olympus (NES)/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by one other user not shown)
(No difference)

Latest revision as of 20:58, 28 January 2024

Chip tiny.png The following article is a ROM map for The Battle of Olympus (NES).

Bank 7 Disassembly (US version)

Bank 7 is the fixed ROM bank and provides much of the game's code, with the other banks supplying data and bank-specific code. Addresses are given as they appear in RAM; to get the file address, simply add $10010.

; data
$C000:19 D4	; $D419

; reset vector jumps to here
; control flow target
$C002:78	SEI
$C003:D8	CLD
$C004:A2 FF	LDX #$FF
$C006:9A	TXS
$C007:20 8C D3	JSR $D38C	; set PPU_Control_Register_1_settings = select 8x8 sprites, background pattern table #1, sprite pattern table #0, PPU auto-increment by 1, name table #0
$C00A:20 94 D3	JSR $D394	; turn off a bunch of PPU stuff, set PPU_Control_Register_2_settings to #$00
$C00D:8D 10 40	STA $4010	; pAPU Delta Modulation Control Register
$C010:8D 15 40	STA $4015	; pAPU Sound/Vertical Clock Signal Register
$C013:A9 C0	LDA #$C0
$C015:8D 17 40	STA $4017	; Joypad #2/SOFTCLK
; control flow target
$C018:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$C01B:10 FB	BPL $C018	; wait for VBlank busy loop
; control flow target
$C01D:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$C020:10 FB	BPL $C01D	; wait for VBlank busy loop
$C022:20 1D D3	JSR $D31D	; initialize RAM, VRAM, etc.
$C025:20 0C E5	JSR $E50C
$C028:A9 AA	LDA #$AA
$C02A:85 DA	STA $DA
$C02C:85 DC	STA $DC
$C02E:85 F5	STA $F5
$C030:A9 10	LDA #$10
$C032:85 EF	STA $EF	; max HP
$C034:85 4A	STA $4A	; current HP
$C036:A9 00	LDA #$00
$C038:85 6E	STA $6E
$C03A:85 6F	STA $6F
$C03C:85 E0	STA $E0	; 1's digit of current olive count
$C03E:85 E1	STA $E1	; 10's digit of current olive count
$C040:20 20 E3	JSR $E320	; sets quest status flag specified by A
$C043:A2 01	LDX #$01
$C045:20 8A C7	JSR $C78A
$C048:20 11 EE	JSR $EE11
$C04B:A9 00	LDA #$00
$C04D:A6 DE	LDX $DE
$C04F:F0 08	BEQ $C059
$C051:85 DE	STA $DE
$C053:20 38 C1	JSR $C138
$C056:4C 5C C0	JMP $C05C
; control flow target
$C059:20 31 C1	JSR $C131
; control flow target
$C05C:20 DD D7	JSR $D7DD	; ask the RNG for a number
$C05F:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$C062:E6 47	INC $47
$C064:20 82 C0	JSR $C082
$C067:A5 47	LDA $47
$C069:29 1F	AND #$1F
$C06B:D0 03	BNE $C070
$C06D:20 47 C3	JSR $C347
; control flow target
$C070:A5 FC	LDA $FC
$C072:F0 E8	BEQ $C05C
$C074:A6 95	LDX $95
$C076:E8	INX
$C077:D0 E3	BNE $C05C
$C079:20 BE F5	JSR $F5BE
$C07C:A9 00	LDA #$00
$C07E:85 FC	STA $FC
$C080:F0 DA	BEQ $C05C
; control flow target
$C082:A5 2E	LDA $2E
$C084:20 A2 D7	JSR $D7A2

; jump table
$C087:8F C0	; $C08F
$C089:6E DA	; $DA6E
$C08B:AD C1	; $C1AD
$C08D:00 C2	; $C200

; control flow target
$C08F:AD E2 03	LDA $03E2
$C092:F0 02	BEQ $C096
$C094:E6 2E	INC $2E
; control flow target
$C096:20 58 D3	JSR $D358
$C099:20 F2 C3	JSR $C3F2
$C09C:A4 44	LDY $44
$C09E:D0 71	BNE $C111
$C0A0:A5 55	LDA $55
$C0A2:05 54	ORA $54
$C0A4:D0 06	BNE $C0AC
$C0A6:A5 51	LDA $51
$C0A8:29 30	AND #$30
$C0AA:D0 40	BNE $C0EC
; control flow target
$C0AC:A5 65	LDA $65
$C0AE:C9 E0	CMP #$E0
$C0B0:B0 15	BCS $C0C7
$C0B2:20 BE F1	JSR $F1BE
$C0B5:20 19 D0	JSR $D019
$C0B8:20 A0 D8	JSR $D8A0
$C0BB:20 DC C1	JSR $C1DC
$C0BE:A5 F8	LDA $F8
$C0C0:29 30	AND #$30
$C0C2:D0 0F	BNE $C0D3
$C0C4:85 70	STA $70
; control flow target
$C0C6:60	RTS
; control flow target
$C0C7:20 86 C2	JSR $C286
$C0CA:B0 04	BCS $C0D0
$C0CC:84 44	STY $44
$C0CE:90 41	BCC $C111
; control flow target
$C0D0:4C E7 C1	JMP $C1E7
; control flow target
$C0D3:29 20	AND #$20
$C0D5:F0 03	BEQ $C0DA
$C0D7:4C 49 E4	JMP $E449
; control flow target
$C0DA:20 9B E0	JSR $E09B
$C0DD:20 9B C1	JSR $C19B
$C0E0:20 0B F3	JSR $F30B
$C0E3:20 2C F6	JSR $F62C
$C0E6:20 0F D3	JSR $D30F
$C0E9:4C EB D3	JMP $D3EB
; control flow target
$C0EC:A0 02	LDY #$02
$C0EE:29 20	AND #$20
$C0F0:D0 01	BNE $C0F3
$C0F2:C8	INY
; control flow target
$C0F3:20 09 E7	JSR $E709
$C0F6:B1 3E	LDA ($3E),Y
$C0F8:F0 CC	BEQ $C0C6
$C0FA:30 2B	BMI $C127
$C0FC:AA	TAX
$C0FD:20 7A C1	JSR $C17A
$C100:86 2F	STX $2F
$C102:20 BE F5	JSR $F5BE
$C105:20 3D D0	JSR $D03D
$C108:20 5C F1	JSR $F15C
$C10B:20 65 F1	JSR $F165
$C10E:4C 68 C3	JMP $C368
; control flow target
$C111:20 00 D3	JSR $D300	; initialize a bunch of stuff
$C114:20 5C F1	JSR $F15C
$C117:A4 44	LDY $44
$C119:30 12	BMI $C12D
$C11B:20 BC CF	JSR $CFBC
$C11E:A4 44	LDY $44
$C120:88	DEY
$C121:20 5E D5	JSR $D55E
$C124:4C 67 C1	JMP $C167
; control flow target
$C127:48	PHA
$C128:20 00 D3	JSR $D300	; initialize a bunch of stuff
$C12B:68	PLA
$C12C:A8	TAY
; control flow target
$C12D:88	DEY
$C12E:98	TYA
$C12F:29 7F	AND #$7F
; control flow target
$C131:A6 DF	LDX $DF	; location
$C133:85 DF	STA $DF	; location
$C135:E8	INX
$C136:86 DE	STX $DE
; control flow target
$C138:20 52 F6	JSR $F652	; STZ to $8E, $94-$97, $99-$9A, pAPU stuff
$C13B:A5 DF	LDA $DF	; location
$C13D:C9 08	CMP #$08
$C13F:B0 03	BCS $C144
$C141:20 9B EB	JSR $EB9B
; control flow target
$C144:20 E9 C2	JSR $C2E9
$C147:A9 FF	LDA #$FF
$C149:85 45	STA $45
$C14B:20 5C F1	JSR $F15C
$C14E:20 33 D5	JSR $D533
$C151:A9 4B	LDA #$4B	; maximum number of drops per screen?
$C153:85 6C	STA $6C
$C155:85 6D	STA $6D
$C157:A5 44	LDA $44
$C159:C9 0C	CMP #$0C
$C15B:D0 0A	BNE $C167
$C15D:A2 01	LDX #$01
$C15F:A5 64	LDA $64
$C161:F0 01	BEQ $C164
$C163:E8	INX
; control flow target
$C164:20 8A C7	JSR $C78A
; control flow target
$C167:A9 00	LDA #$00
$C169:85 70	STA $70
$C16B:20 9B C1	JSR $C19B
$C16E:20 65 F1	JSR $F165
$C171:20 0C D3	JSR $D30C
$C174:20 EB D3	JSR $D3EB
$C177:4C 68 C3	JMP $C368
; control flow target
$C17A:CA	DEX
$C17B:E0 02	CPX #$02
$C17D:B0 1B	BCS $C19A
$C17F:A5 DF	LDA $DF	; location
$C181:C9 06	CMP #$06
$C183:D0 15	BNE $C19A
$C185:A5 2F	LDA $2F
$C187:C9 12	CMP #$12
$C189:F0 0F	BEQ $C19A
$C18B:A5 F2	LDA $F2
$C18D:4A	LSR A
$C18E:90 0A	BCC $C19A
$C190:A5 F1	LDA $F1
$C192:0A	ASL A
$C193:90 05	BCC $C19A
$C195:0A	ASL A
$C196:90 02	BCC $C19A
$C198:A2 12	LDX #$12
; control flow target
$C19A:60	RTS
; control flow target
$C19B:20 14 E5	JSR $E514
; control flow target
$C19E:20 75 D8	JSR $D875
$C1A1:20 92 E1	JSR $E192
$C1A4:20 43 CF	JSR $CF43
$C1A7:20 FF C2	JSR $C2FF
$C1AA:4C 5D D8	JMP $D85D	; copy $D869-$D874 to $0200-$020B
; control flow target
$C1AD:20 DB C2	JSR $C2DB
$C1B0:20 F2 C3	JSR $C3F2
$C1B3:20 EB D3	JSR $D3EB
$C1B6:A5 47	LDA $47
$C1B8:29 03	AND #$03
$C1BA:D0 1F	BNE $C1DB
$C1BC:A9 09	LDA #$09
$C1BE:85 99	STA $99
$C1C0:A2 01	LDX #$01
$C1C2:A5 F2	LDA $F2
$C1C4:29 02	AND #$02
$C1C6:F0 01	BEQ $C1C9
$C1C8:E8	INX
; control flow target
$C1C9:86 6A	STX $6A
$C1CB:20 A0 D8	JSR $D8A0
$C1CE:A5 4A	LDA $4A	; current HP
$C1D0:C5 EF	CMP $EF	; max HP
$C1D2:90 07	BCC $C1DB
$C1D4:20 E2 C2	JSR $C2E2
$C1D7:A9 00	LDA #$00
$C1D9:85 2E	STA $2E
; control flow target
$C1DB:60	RTS
; control flow target
$C1DC:A5 4A	LDA $4A	; current HP
$C1DE:F0 01	BEQ $C1E1
; control flow target
$C1E0:60	RTS
; control flow target
$C1E1:A5 66	LDA $66
$C1E3:C9 20	CMP #$20
$C1E5:B0 F9	BCS $C1E0
; control flow target
$C1E7:20 F5 C1	JSR $C1F5
$C1EA:85 1A	STA $1A
$C1EC:A9 03	LDA #$03
$C1EE:85 2E	STA $2E
$C1F0:A9 12	LDA #$12
$C1F2:4C ED F5	JMP $F5ED
; control flow target
$C1F5:A9 00	LDA #$00
$C1F7:85 4D	STA $4D
$C1F9:85 59	STA $59
$C1FB:85 5A	STA $5A
$C1FD:85 4B	STA $4B
$C1FF:60	RTS
; control flow target
$C200:20 58 D3	JSR $D358
$C203:A5 65	LDA $65
$C205:C9 E0	CMP #$E0
$C207:90 05	BCC $C20E
$C209:20 E6 D3	JSR $D3E6
$C20C:90 2F	BCC $C23D
; control flow target
$C20E:A5 51	LDA $51
$C210:29 04	AND #$04
$C212:D0 0E	BNE $C222
$C214:A9 00	LDA #$00
$C216:85 44	STA $44
$C218:85 F8	STA $F8
$C21A:85 F9	STA $F9
$C21C:20 F2 C3	JSR $C3F2
$C21F:4C EB D3	JMP $D3EB
; control flow target
$C222:20 C4 C3	JSR $C3C4
$C225:E6 1A	INC $1A
$C227:A2 0C	LDX #$0C
$C229:A5 1A	LDA $1A
$C22B:C9 20	CMP #$20
$C22D:90 02	BCC $C231
$C22F:A2 0E	LDX #$0E
; control flow target
$C231:86 13	STX $13
$C233:A9 00	LDA #$00
$C235:85 5D	STA $5D
$C237:20 CC CB	JSR $CBCC
$C23A:20 EB D3	JSR $D3EB
; control flow target
$C23D:A6 95	LDX $95
$C23F:E8	INX
$C240:F0 01	BEQ $C243
$C242:60	RTS
; control flow target
$C243:20 00 D3	JSR $D300	; initialize a bunch of stuff
$C246:20 F5 C1	JSR $C1F5
$C249:85 4C	STA $4C
$C24B:85 2E	STA $2E
$C24D:20 D0 ED	JSR $EDD0
$C250:20 00 D3	JSR $D300	; initialize a bunch of stuff
$C253:A5 10	LDA $10
$C255:F0 0E	BEQ $C265
$C257:20 22 E0	JSR $E022	; check password?
$C25A:B0 09	BCS $C265
$C25C:20 0C C3	JSR $C30C
$C25F:A9 00	LDA #$00
$C261:85 DE	STA $DE
$C263:F0 18	BEQ $C27D
; control flow target
$C265:A5 E1	LDA $E1	; 10's digit of current olive count
$C267:A2 0A	LDX #$0A
$C269:20 6A D7	JSR $D76A	; multiplies A by X, returning low byte in $03 and high byte in A
$C26C:A5 03	LDA $03	; 10's digit is always < 10, so A * X <= 90 and high byte is always #$00; discard the high byte and use the low byte
$C26E:18	CLC
$C26F:65 E0	ADC $E0	; 1's digit of current olive count; A now has the total olive count
$C271:4A	LSR	; death penalty: divide olive count by 2, rounding down
$C272:A2 0A	LDX #$0A
$C274:20 85 D7	JSR $D785	; divides A by X, returning quotient in $02 and remainder in A
$C277:85 E0	STA $E0	; new 1's digit of current olive count
$C279:A5 02	LDA $02
$C27B:85 E1	STA $E1	; new 10's digit of current olive count
; control flow target
$C27D:A5 EF	LDA $EF	; max HP
$C27F:85 4A	STA $4A	; current HP
$C281:4C 44 C1	JMP $C144

$C284:10 20	BPL $C2A6
; control flow target
$C286:A2 CA	LDX #$CA
$C288:A9 C2	LDA #$C2
; control flow target
$C28A:86 04	STX $04
$C28C:85 05	STA $05
$C28E:A5 DF	LDA $DF	; location
$C290:0A	ASL A
$C291:0A	ASL A
$C292:0A	ASL A
$C293:0A	ASL A
$C294:65 2F	ADC $2F
$C296:85 02	STA $02
$C298:A5 64	LDA $64
$C29A:85 03	STA $03
$C29C:A5 63	LDA $63
$C29E:46 03	LSR $03
$C2A0:6A	ROR A
$C2A1:46 03	LSR $03
$C2A3:6A	ROR A
$C2A4:4A	LSR A
$C2A5:85 03	STA $03
$C2A7:A0 00	LDY #$00
; control flow target
$C2A9:B1 04	LDA ($04),Y
$C2AB:F0 1B	BEQ $C2C8
$C2AD:C5 02	CMP $02
$C2AF:D0 11	BNE $C2C2
$C2B1:C8	INY
$C2B2:A5 03	LDA $03
$C2B4:D1 04	CMP ($04),Y
$C2B6:90 0B	BCC $C2C3
$C2B8:C8	INY
$C2B9:D1 04	CMP ($04),Y
$C2BB:B0 07	BCS $C2C4
$C2BD:C8	INY
$C2BE:B1 04	LDA ($04),Y
$C2C0:A8	TAY
$C2C1:60	RTS
; control flow target
$C2C2:C8	INY
; control flow target
$C2C3:C8	INY
; control flow target
$C2C4:C8	INY
$C2C5:C8	INY
$C2C6:D0 E1	BNE $C2A9
; control flow target
$C2C8:38	SEC
$C2C9:60	RTS

; data for $C2A9 + unknown
$C2CA:27 26
$C2CC:2A
$C2CD:06 26
$C2CF:50 54
$C2D1:30 40
$C2D3:26 2A
$C2D5:23 41
$C2D7:16 1A
$C2D9:24 00

; control flow target
$C2DB:A9 80	LDA #$80
$C2DD:05 4B	ORA $4B
$C2DF:85 4B	STA $4B
$C2E1:60	RTS
; control flow target
$C2E2:A5 4B	LDA $4B
$C2E4:29 7F	AND #$7F
$C2E6:85 4B	STA $4B
$C2E8:60	RTS
; control flow target
$C2E9:20 F9 E5	JSR $E5F9
$C2EC:A0 06	LDY #$06
$C2EE:A5 DF	LDA $DF	; location
$C2F0:C9 08	CMP #$08
$C2F2:90 01	BCC $C2F5
$C2F4:C8	INY
; control flow target
$C2F5:98	TYA
$C2F6:4C 00 E6	JMP $E600

; data
$C2F9:08 2C
$C2FB:37 16
$C2FD:28 30

; control flow target
$C2FF:A2 18	LDX #$18
$C301:A9 20	LDA #$20
$C303:85 02	STA $02
$C305:A9 F9	LDA #$F9
$C307:A0 C2	LDY #$C2
$C309:4C DF D2	JMP $D2DF
; control flow target
$C30C:A2 01	LDX #$01
; control flow target
$C30E:B5 6E	LDA $6E,X
$C310:F0 0D	BEQ $C31F
$C312:86 02	STX $02
$C314:20 0D E3	JSR $E30D
$C317:08	PHP
$C318:A6 02	LDX $02
$C31A:28	PLP
$C31B:D0 02	BNE $C31F
$C31D:95 6E	STA $6E,X
; control flow target
$C31F:CA	DEX
$C320:10 EC	BPL $C30E
$C322:60	RTS

; data
$C323:01 FF
$C325:01 FF
$C327:FF 01 01 FF
$C32B:04 0C
$C32D:04 0C
$C32F:08
$C330:08
$C331:04 04
$C333:00 06
$C335:0F 18 E8 10
$C339:F0 08
$C33B:07 06
$C33D:05 04
$C33F:FD FC FC
$C342:FB
$C343:58
$C344:C8
$C345:30 A8

; control flow target
$C347:A5 47	LDA $47
$C349:29 20	AND #$20
$C34B:D0 15	BNE $C362
; control flow target
$C34D:A5 49	LDA $49
$C34F:8D 0C 02	STA $020C
$C352:A5 48	LDA $48
$C354:8D 0F 02	STA $020F
$C357:A9 03	LDA #$03
$C359:8D 0E 02	STA $020E
$C35C:A9 28	LDA #$28
$C35E:8D 0D 02	STA $020D
$C361:60	RTS
; control flow target
$C362:A9 F8	LDA #$F8
$C364:8D 0C 02	STA $020C
; control flow target
$C367:60	RTS
; control flow target
$C368:A0 00	LDY #$00
$C36A:84 FC	STY $FC
$C36C:84 61	STY $61
$C36E:84 62	STY $62
$C370:84 54	STY $54
$C372:84 55	STY $55
$C374:84 52	STY $52
$C376:84 47	STY $47
$C378:84 66	STY $66
$C37A:84 6A	STY $6A
$C37C:A5 44	LDA $44
$C37E:A2 02	LDX #$02
$C380:20 B5 C3	JSR $C3B5
; control flow target
$C383:A9 00	LDA #$00
$C385:85 17	STA $17
$C387:85 18	STA $18
$C389:85 5D	STA $5D
$C38B:85 5B	STA $5B
$C38D:A5 44	LDA $44
$C38F:F0 D6	BEQ $C367
$C391:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$C394:20 58 D3	JSR $D358
$C397:20 C4 C3	JSR $C3C4
$C39A:20 0B C4	JSR $C40B
$C39D:A5 44	LDA $44
$C39F:10 06	BPL $C3A7
$C3A1:A5 51	LDA $51
$C3A3:29 FC	AND #$FC
$C3A5:85 51	STA $51
; control flow target
$C3A7:20 BE F1	JSR $F1BE
$C3AA:E6 47	INC $47
$C3AC:20 47 C3	JSR $C347
$C3AF:20 19 D0	JSR $D019
$C3B2:4C 83 C3	JMP $C383
; control flow target
$C3B5:86 02	STX $02
$C3B7:38	SEC
$C3B8:E9 0B	SBC #$0B
$C3BA:10 02	BPL $C3BE
$C3BC:A9 00	LDA #$00
; control flow target
$C3BE:18	CLC
$C3BF:65 02	ADC $02
$C3C1:85 4B	STA $4B
$C3C3:60	RTS
; control flow target
$C3C4:A9 00	LDA #$00
$C3C6:85 13	STA $13
$C3C8:85 15	STA $15
$C3CA:85 19	STA $19
$C3CC:A5 63	LDA $63
$C3CE:85 10	STA $10
$C3D0:A5 64	LDA $64
$C3D2:85 11	STA $11
$C3D4:A5 65	LDA $65
$C3D6:85 12	STA $12
$C3D8:60	RTS
; control flow target
$C3D9:09 80	ORA #$80
$C3DB:85 44	STA $44
$C3DD:29 7F	AND #$7F
$C3DF:A2 07	LDX #$07
$C3E1:20 B5 C3	JSR $C3B5
$C3E4:20 CC CB	JSR $CBCC
$C3E7:20 EB D3	JSR $D3EB
$C3EA:20 A7 C3	JSR $C3A7
$C3ED:A5 46	LDA $46
$C3EF:85 44	STA $44
$C3F1:60	RTS
; control flow target
$C3F2:20 C4 C3	JSR $C3C4
$C3F5:A5 4B	LDA $4B
$C3F7:30 12	BMI $C40B
$C3F9:C9 0C	CMP #$0C
$C3FB:B0 0E	BCS $C40B
$C3FD:20 10 C6	JSR $C610
$C400:A5 44	LDA $44
$C402:D0 D5	BNE $C3D9
$C404:A5 30	LDA $30
$C406:F0 03	BEQ $C40B
$C408:20 E5 C5	JSR $C5E5
; control flow target
$C40B:20 E8 C4	JSR $C4E8
$C40E:A5 4D	LDA $4D
$C410:F0 04	BEQ $C416
$C412:A9 08	LDA #$08
$C414:85 13	STA $13
; control flow target
$C416:20 CC CB	JSR $CBCC
$C419:A5 13	LDA $13
$C41B:05 4C	ORA $4C
$C41D:AA	TAX
$C41E:4A	LSR A
$C41F:A8	TAY
$C420:B9 00 CF	LDA $CF00,Y
$C423:85 68	STA $68
$C425:A5 65	LDA $65
$C427:18	CLC
$C428:7D 05 CF	ADC $CF05,X
$C42B:85 67	STA $67
$C42D:A9 FF	LDA #$FF
$C42F:85 69	STA $69
$C431:A5 F1	LDA $F1
$C433:29 04	AND #$04
$C435:F0 20	BEQ $C457
$C437:24 5D	BIT $5D
$C439:70 1C	BVS $C457
$C43B:30 15	BMI $C452
$C43D:C0 00	CPY #$00
$C43F:D0 08	BNE $C449
$C441:A5 62	LDA $62
$C443:C9 02	CMP #$02
$C445:D0 0B	BNE $C452
$C447:F0 0E	BEQ $C457
; control flow target
$C449:C0 03	CPY #$03
$C44B:D0 05	BNE $C452
$C44D:20 DE C6	JSR $C6DE
$C450:B0 05	BCS $C457
; control flow target
$C452:BD 0F CF	LDA $CF0F,X
$C455:85 69	STA $69
; control flow target
$C457:A6 54	LDX $54
$C459:F0 02	BEQ $C45D
$C45B:C6 54	DEC $54
; control flow target
$C45D:20 EB D3	JSR $D3EB
$C460:A5 10	LDA $10
$C462:85 63	STA $63
$C464:A5 11	LDA $11
$C466:85 64	STA $64
$C468:A5 12	LDA $12
$C46A:85 65	STA $65
$C46C:A5 4C	LDA $4C
$C46E:F0 02	BEQ $C472
$C470:C6 12	DEC $12
; control flow target
$C472:A9 00	LDA #$00
$C474:85 07	STA $07
$C476:A2 01	LDX #$01
$C478:A5 55	LDA $55
$C47A:F0 01	BEQ $C47D
$C47C:E8	INX
; control flow target
$C47D:A5 4F	LDA $4F
$C47F:09 01	ORA #$01
$C481:A8	TAY
$C482:20 AB CA	JSR $CAAB
$C485:85 51	STA $51
$C487:A5 4D	LDA $4D
$C489:F0 0F	BEQ $C49A
$C48B:A5 4F	LDA $4F
$C48D:4A	LSR A
$C48E:09 08	ORA #$08
$C490:A8	TAY
$C491:A2 01	LDX #$01
$C493:20 AB CA	JSR $CAAB
$C496:05 51	ORA $51
$C498:85 51	STA $51
; control flow target
$C49A:A0 07	LDY #$07
; control flow target
$C49C:A2 02	LDX #$02
$C49E:84 14	STY $14
$C4A0:20 AB CA	JSR $CAAB
$C4A3:A4 14	LDY $14
$C4A5:88	DEY
$C4A6:88	DEY
$C4A7:05 07	ORA $07
$C4A9:85 07	STA $07
$C4AB:C0 04	CPY #$04
$C4AD:B0 ED	BCS $C49C
$C4AF:A6 4C	LDX $4C
$C4B1:F0 0C	BEQ $C4BF
$C4B3:AA	TAX
$C4B4:29 88	AND #$88
$C4B6:4A	LSR A
$C4B7:85 07	STA $07
$C4B9:8A	TXA
$C4BA:29 44	AND #$44
$C4BC:0A	ASL A
$C4BD:05 07	ORA $07
; control flow target
$C4BF:05 51	ORA $51
$C4C1:85 51	STA $51
$C4C3:60	RTS
; control flow target
$C4C4:20 A0 C8	JSR $C8A0
$C4C7:20 32 C9	JSR $C932
$C4CA:A9 01	LDA #$01
$C4CC:A6 53	LDX $53
$C4CE:F0 05	BEQ $C4D5
$C4D0:10 01	BPL $C4D3
$C4D2:0A	ASL A
; control flow target
$C4D3:85 4F	STA $4F
; control flow target
$C4D5:A5 5D	LDA $5D
$C4D7:29 84	AND #$84
$C4D9:C9 84	CMP #$84
$C4DB:F0 06	BEQ $C4E3
$C4DD:A5 5B	LDA $5B
$C4DF:05 54	ORA $54
$C4E1:F0 04	BEQ $C4E7
; control flow target
$C4E3:A9 04	LDA #$04
$C4E5:85 13	STA $13
; control flow target
$C4E7:60	RTS
; control flow target
$C4E8:A5 4B	LDA $4B
$C4EA:30 E9	BMI $C4D5
$C4EC:20 A2 D7	JSR $D7A2

; jump table
$C4EF:C4 C4	; $C4C4
$C4F1:91 C7	; $C791
$C4F3:AC C5	; $C5AC
$C4F5:B7 C5	; $C5B7
$C4F7:A4 C5	; $C5A4
$C4F9:A4 C5	; $C5A4
$C4FB:D0 C5	; $C5D0
$C4FD:79 C5	; $C579
$C4FF:79 C5	; $C579
$C501:9B C5	; $C59B
$C503:9B C5	; $C59B
$C505:79 C5	; $C579
$C507:20 C5	; $C520
$C509:0B C5	; $C50B

; control flow target
$C50B:A9 0A	LDA #$0A
$C50D:85 13	STA $13
$C50F:A9 02	LDA #$02
$C511:85 50	STA $50
; control flow target
$C513:A9 00	LDA #$00
$C515:85 19	STA $19
$C517:85 5D	STA $5D
$C519:85 5C	STA $5C
$C51B:85 66	STA $66
$C51D:85 5B	STA $5B
$C51F:60	RTS
; control flow target
$C520:20 13 C5	JSR $C513
$C523:A9 80	LDA #$80
$C525:85 F9	STA $F9
$C527:85 18	STA $18
$C529:4C 32 C9	JMP $C932

$C52C:A5 4B	LDA $4B
$C52E:C9 02	CMP #$02
$C530:B0 46	BCS $C578
$C532:A5 4A	LDA $4A	; current HP
$C534:18	CLC
$C535:65 6A	ADC $6A
$C537:85 06	STA $06
$C539:A5 7B	LDA $7B
$C53B:29 7F	AND #$7F
$C53D:4A	LSR A
$C53E:4A	LSR A
$C53F:C5 06	CMP $06
$C541:90 02	BCC $C545
$C543:A5 4A	LDA $4A	; current HP
; control flow target
$C545:20 9C D7	JSR $D79C
$C548:18	CLC
$C549:65 6A	ADC $6A
$C54B:85 6A	STA $6A
$C54D:A6 59	LDX $59
$C54F:30 1F	BMI $C570
$C551:A4 11	LDY $11
$C553:B9 38 C3	LDA $C338,Y
$C556:85 53	STA $53
$C558:A9 18	LDA #$18
$C55A:85 57	STA $57
$C55C:A9 FE	LDA #$FE
$C55E:85 56	STA $56
$C560:A9 02	LDA #$02
$C562:85 55	STA $55
$C564:A9 00	LDA #$00
$C566:85 5D	STA $5D
$C568:85 59	STA $59
$C56A:85 54	STA $54
$C56C:85 5B	STA $5B
$C56E:85 4B	STA $4B
; control flow target
$C570:A9 40	LDA #$40
$C572:85 66	STA $66
$C574:A9 08	LDA #$08
$C576:85 99	STA $99
; control flow target
$C578:60	RTS
; control flow target
$C579:20 F2 C6	JSR $C6F2
$C57C:A5 4F	LDA $4F
$C57E:AA	TAX
$C57F:B0 10	BCS $C591
$C581:4A	LSR A
$C582:08	PHP
$C583:A5 10	LDA $10
$C585:29 0F	AND #$0F
$C587:C9 08	CMP #$08
$C589:68	PLA
$C58A:20 DE C5	JSR $C5DE
$C58D:D0 48	BNE $C5D7
$C58F:A9 03	LDA #$03
; control flow target
$C591:86 16	STX $16
$C593:85 15	STA $15
$C595:20 A0 C8	JSR $C8A0
$C598:4C 32 C9	JMP $C932
; control flow target
$C59B:20 ED C7	JSR $C7ED
$C59E:A5 5A	LDA $5A
$C5A0:C9 08	CMP #$08
$C5A2:B0 07	BCS $C5AB
; control flow target
$C5A4:A2 00	LDX #$00
$C5A6:86 44	STX $44
$C5A8:E8	INX
$C5A9:86 4B	STX $4B
; control flow target
$C5AB:60	RTS
; control flow target
$C5AC:20 F2 C6	JSR $C6F2
$C5AF:A9 03	LDA #$03
$C5B1:90 06	BCC $C5B9
$C5B3:45 4F	EOR $4F
$C5B5:B0 02	BCS $C5B9
; control flow target
$C5B7:A9 00	LDA #$00
; control flow target
$C5B9:85 15	STA $15
$C5BB:A4 4F	LDY $4F
$C5BD:B9 37 C3	LDA $C337,Y
$C5C0:85 53	STA $53
$C5C2:20 D9 C8	JSR $C8D9
$C5C5:20 32 C9	JSR $C932
$C5C8:A5 47	LDA $47
$C5CA:C9 10	CMP #$10
$C5CC:90 0F	BCC $C5DD
$C5CE:B0 07	BCS $C5D7
; control flow target
$C5D0:20 32 C9	JSR $C932
$C5D3:A9 00	LDA #$00
$C5D5:85 53	STA $53
; control flow target
$C5D7:A9 00	LDA #$00
$C5D9:85 44	STA $44
$C5DB:85 4B	STA $4B
; control flow target
$C5DD:60	RTS
; control flow target
$C5DE:29 01	AND #$01
$C5E0:69 00	ADC #$00
$C5E2:C9 01	CMP #$01
$C5E4:60	RTS
; control flow target
$C5E5:A2 02	LDX #$02
$C5E7:A5 11	LDA $11
$C5E9:D0 1D	BNE $C608
$C5EB:A5 10	LDA $10
$C5ED:C9 28	CMP #$28
$C5EF:B0 0E	BCS $C5FF
$C5F1:A5 31	LDA $31
; control flow target
$C5F3:85 46	STA $46
$C5F5:20 8A C7	JSR $C78A
$C5F8:68	PLA
$C5F9:68	PLA
$C5FA:A9 0B	LDA #$0B
$C5FC:4C D9 C3	JMP $C3D9
; control flow target
$C5FF:C9 D8	CMP #$D8
$C601:90 05	BCC $C608
$C603:CA	DEX
$C604:A5 32	LDA $32
$C606:D0 EB	BNE $C5F3
; control flow target
$C608:60	RTS

; STX to $16-$18
; control flow target
$C609:86 18	STX $18
$C60B:86 16	STX $16
$C60D:86 17	STX $17
$C60F:60	RTS

; control flow target
$C610:A9 00	LDA #$00
$C612:85 5B	STA $5B
$C614:A6 66	LDX $66
$C616:F0 0F	BEQ $C627
$C618:CA	DEX
$C619:86 66	STX $66
$C61B:8A	TXA
$C61C:0A	ASL A
$C61D:09 80	ORA #$80
$C61F:85 19	STA $19
$C621:E0 20	CPX #$20
$C623:A2 00	LDX #$00
$C625:B0 E2	BCS $C609	; STX to $16-$18
; control flow target
$C627:A5 5D	LDA $5D
$C629:4A	LSR A
$C62A:90 1D	BCC $C649
$C62C:2A	ROL A
$C62D:09 80	ORA #$80
$C62F:A6 5C	LDX $5C
$C631:E8	INX
$C632:E0 12	CPX #$12
$C634:90 05	BCC $C63B
$C636:A9 00	LDA #$00
$C638:AA	TAX
$C639:F0 0A	BEQ $C645
; control flow target
$C63B:E0 07	CPX #$07
$C63D:D0 06	BNE $C645
$C63F:09 40	ORA #$40
$C641:A0 01	LDY #$01
$C643:84 99	STY $99
; control flow target
$C645:85 5D	STA $5D
$C647:86 5C	STX $5C
; control flow target
$C649:A5 F8	LDA $F8
$C64B:29 C0	AND #$C0
$C64D:85 18	STA $18
$C64F:29 40	AND #$40
$C651:F0 2E	BEQ $C681
$C653:24 19	BIT $19
$C655:70 2A	BVS $C681
$C657:20 DE C6	JSR $C6DE
$C65A:90 25	BCC $C681
$C65C:CA	DEX
$C65D:E0 08	CPX #$08
$C65F:90 20	BCC $C681
$C661:E8	INX
$C662:F0 02	BEQ $C666
$C664:A2 03	LDX #$03
; control flow target
$C666:A0 00	LDY #$00
$C668:A5 55	LDA $55
$C66A:D0 02	BNE $C66E
$C66C:84 53	STY $53
; control flow target
$C66E:A5 59	LDA $59
$C670:30 04	BMI $C676
$C672:84 59	STY $59
$C674:84 4B	STY $4B
; control flow target
$C676:E8	INX
$C677:86 5C	STX $5C
$C679:A5 F9	LDA $F9
$C67B:29 0C	AND #$0C
$C67D:09 01	ORA #$01
$C67F:85 5D	STA $5D
; control flow target
$C681:A5 F9	LDA $F9
$C683:AA	TAX
$C684:29 03	AND #$03
$C686:85 16	STA $16
$C688:F0 02	BEQ $C68C
$C68A:85 50	STA $50
; control flow target
$C68C:8A	TXA
$C68D:29 0C	AND #$0C
$C68F:85 17	STA $17
$C691:F0 47	BEQ $C6DA
$C693:A5 59	LDA $59
$C695:D0 43	BNE $C6DA
$C697:A5 55	LDA $55
$C699:05 54	ORA $54
$C69B:D0 13	BNE $C6B0
$C69D:A5 5D	LDA $5D
$C69F:D0 09	BNE $C6AA
$C6A1:24 19	BIT $19
$C6A3:70 05	BVS $C6AA
$C6A5:20 24 C7	JSR $C724
$C6A8:90 30	BCC $C6DA
; control flow target
$C6AA:A5 17	LDA $17
$C6AC:29 04	AND #$04
$C6AE:D0 2B	BNE $C6DB
; control flow target
$C6B0:A5 30	LDA $30
$C6B2:05 5D	ORA $5D
$C6B4:D0 24	BNE $C6DA
$C6B6:A5 17	LDA $17
$C6B8:29 08	AND #$08
$C6BA:F0 1E	BEQ $C6DA
$C6BC:20 F2 C6	JSR $C6F2
$C6BF:90 19	BCC $C6DA
$C6C1:A9 02	LDA #$02
$C6C3:20 86 D6	JSR $D686
$C6C6:B0 12	BCS $C6DA
$C6C8:A5 10	LDA $10
$C6CA:29 0F	AND #$0F
$C6CC:4A	LSR A
$C6CD:4A	LSR A
$C6CE:4A	LSR A
$C6CF:AA	TAX
$C6D0:20 E6 C6	JSR $C6E6
$C6D3:20 89 C7	JSR $C789
$C6D6:A9 0B	LDA #$0B
$C6D8:85 44	STA $44
; control flow target
$C6DA:60	RTS
; control flow target
$C6DB:E6 5B	INC $5B
$C6DD:60	RTS
; control flow target
$C6DE:A5 5A	LDA $5A
$C6E0:38	SEC
$C6E1:E9 04	SBC #$04
$C6E3:C9 08	CMP #$08
$C6E5:60	RTS
; control flow target
$C6E6:8A	TXA
$C6E7:4A	LSR A
$C6E8:6A	ROR A
$C6E9:45 53	EOR $53
$C6EB:10 04	BPL $C6F1
$C6ED:A9 00	LDA #$00
$C6EF:85 53	STA $53
; control flow target
$C6F1:60	RTS
; control flow target
$C6F2:A9 02	LDA #$02
$C6F4:85 03	STA $03
$C6F6:A0 10	LDY #$10
; control flow target
$C6F8:84 02	STY $02
$C6FA:20 E6 CA	JSR $CAE6
$C6FD:A4 02	LDY $02
$C6FF:0A	ASL A
$C700:30 10	BMI $C712
$C702:4A	LSR A
$C703:AA	TAX
$C704:BD C0 04	LDA $04C0,X
$C707:29 08	AND #$08
$C709:F0 07	BEQ $C712
$C70B:C8	INY
$C70C:C6 03	DEC $03
$C70E:D0 E8	BNE $C6F8
$C710:38	SEC
$C711:60	RTS
; control flow target
$C712:18	CLC
$C713:60	RTS

; data + unknown
$C714:01 01
$C716:00 01
$C718:00 00
$C71A:00 00
$C71C:01 01
$C71E:01 01
$C720:00 01
$C722:00 00

; control flow target
$C724:A5 17	LDA $17
$C726:29 08	AND #$08
$C728:D0 29	BNE $C753
$C72A:A0 0D	LDY #$0D
$C72C:A9 03	LDA #$03
$C72E:20 7E C8	JSR $C87E
$C731:F0 5C	BEQ $C78F
$C733:09 04	ORA #$04
$C735:C0 0E	CPY #$0E
$C737:90 12	BCC $C74B
$C739:D0 08	BNE $C743
$C73B:C9 0E	CMP #$0E
$C73D:D0 50	BNE $C78F
$C73F:A0 05	LDY #$05
$C741:D0 24	BNE $C767
; control flow target
$C743:C9 0C	CMP #$0C
$C745:D0 48	BNE $C78F
$C747:A0 07	LDY #$07
$C749:D0 1C	BNE $C767
; control flow target
$C74B:85 59	STA $59
$C74D:4A	LSR A
$C74E:29 01	AND #$01
$C750:AA	TAX
$C751:90 24	BCC $C777
; control flow target
$C753:A0 0B	LDY #$0B
$C755:20 7C C8	JSR $C87C
$C758:F0 35	BEQ $C78F
$C75A:48	PHA
$C75B:4A	LSR A
$C75C:46 02	LSR $02
$C75E:2A	ROL A
$C75F:49 02	EOR #$02
$C761:29 03	AND #$03
$C763:0A	ASL A
$C764:0A	ASL A
$C765:A8	TAY
$C766:68	PLA
; control flow target
$C767:85 59	STA $59
$C769:84 02	STY $02
$C76B:A5 10	LDA $10
$C76D:29 0C	AND #$0C
$C76F:4A	LSR A
$C770:4A	LSR A
$C771:65 02	ADC $02
$C773:A8	TAY
$C774:BE 14 C7	LDX $C714,Y
; control flow target
$C777:20 E6 C6	JSR $C6E6
$C77A:A9 01	LDA #$01
$C77C:85 4B	STA $4B
$C77E:18	CLC
; control flow target
$C77F:A5 59	LDA $59
$C781:29 FE	AND #$FE
$C783:86 4F	STX $4F
$C785:05 4F	ORA $4F
$C787:85 59	STA $59
; control flow target
$C789:E8	INX
; control flow target
$C78A:86 4F	STX $4F
$C78C:86 50	STX $50
$C78E:60	RTS
; control flow target
$C78F:38	SEC
$C790:60	RTS
; control flow target
$C791:A5 59	LDA $59
$C793:30 58	BMI $C7ED
$C795:29 04	AND #$04
$C797:F0 0B	BEQ $C7A4
$C799:A0 0D	LDY #$0D
$C79B:A9 01	LDA #$01
$C79D:20 7E C8	JSR $C87E
$C7A0:D0 0B	BNE $C7AD
$C7A2:F0 14	BEQ $C7B8
; control flow target
$C7A4:A0 0A	LDY #$0A
$C7A6:A9 01	LDA #$01
$C7A8:20 7E C8	JSR $C87E
$C7AB:D0 0B	BNE $C7B8
; control flow target
$C7AD:A9 00	LDA #$00
$C7AF:85 5B	STA $5B
$C7B1:A5 4F	LDA $4F
$C7B3:85 16	STA $16
$C7B5:4C A6 C8	JMP $C8A6
; control flow target
$C7B8:A5 59	LDA $59
$C7BA:4A	LSR A
$C7BB:08	PHP
$C7BC:29 03	AND #$03
$C7BE:A8	TAY
$C7BF:A5 10	LDA $10
$C7C1:29 0F	AND #$0F
$C7C3:D9 2B C3	CMP $C32B,Y
$C7C6:68	PLA
$C7C7:20 DE C5	JSR $C5DE
$C7CA:D0 E1	BNE $C7AD
$C7CC:A5 17	LDA $17
$C7CE:39 2F C3	AND $C32F,Y
$C7D1:F0 13	BEQ $C7E6
$C7D3:A5 10	LDA $10
$C7D5:29 F0	AND #$F0
$C7D7:19 2B C3	ORA $C32B,Y
$C7DA:85 10	STA $10
$C7DC:A5 59	LDA $59
$C7DE:29 07	AND #$07
$C7E0:09 80	ORA #$80
$C7E2:85 59	STA $59
$C7E4:D0 17	BNE $C7FD
; control flow target
$C7E6:A9 00	LDA #$00
$C7E8:85 59	STA $59
$C7EA:85 4B	STA $4B
$C7EC:60	RTS
; control flow target
$C7ED:A6 5A	LDX $5A
$C7EF:D0 2F	BNE $C820
$C7F1:A5 12	LDA $12
$C7F3:29 0F	AND #$0F
$C7F5:D0 06	BNE $C7FD
$C7F7:A5 51	LDA $51
$C7F9:29 04	AND #$04
$C7FB:D0 E9	BNE $C7E6
; control flow target
$C7FD:A5 5D	LDA $5D
$C7FF:D0 5F	BNE $C860
$C801:A5 17	LDA $17
$C803:D0 06	BNE $C80B
$C805:A6 16	LDX $16
$C807:F0 57	BEQ $C860
$C809:D0 0F	BNE $C81A
; control flow target
$C80B:A5 59	LDA $59
$C80D:29 02	AND #$02
$C80F:F0 02	BEQ $C813
$C811:A9 0C	LDA #$0C
; control flow target
$C813:49 0C	EOR #$0C
$C815:45 17	EOR $17
$C817:4A	LSR A
$C818:4A	LSR A
$C819:AA	TAX
; control flow target
$C81A:CA	DEX
$C81B:20 7F C7	JSR $C77F
$C81E:A2 10	LDX #$10
; control flow target
$C820:CA	DEX
$C821:86 5A	STX $5A
$C823:8A	TXA
$C824:4A	LSR A
$C825:90 39	BCC $C860
$C827:E0 08	CPX #$08
$C829:B0 23	BCS $C84E
$C82B:A6 12	LDX $12
$C82D:E0 20	CPX #$20
$C82F:90 16	BCC $C847
$C831:E0 B8	CPX #$B8
$C833:90 19	BCC $C84E
$C835:20 65 C8	JSR $C865
$C838:30 17	BMI $C851
; control flow target
$C83A:98	TYA
$C83B:4A	LSR A
$C83C:20 86 D6	JSR $D686
$C83F:B0 0D	BCS $C84E
$C841:A5 46	LDA $46
$C843:85 44	STA $44
$C845:D0 07	BNE $C84E
; control flow target
$C847:20 65 C8	JSR $C865
$C84A:10 05	BPL $C851
$C84C:30 EC	BMI $C83A
; control flow target
$C84E:20 65 C8	JSR $C865
; control flow target
$C851:18	CLC
$C852:65 12	ADC $12
$C854:85 12	STA $12
$C856:A2 00	LDX #$00
$C858:86 53	STX $53
$C85A:B9 23 C3	LDA $C323,Y
$C85D:20 6E C8	JSR $C86E
; control flow target
$C860:A9 06	LDA #$06
$C862:85 13	STA $13
$C864:60	RTS

; control flow target
$C865:A5 59	LDA $59
$C867:29 03	AND #$03
$C869:A8	TAY
$C86A:B9 27 C3	LDA $C327,Y
$C86D:60	RTS

; control flow target
$C86E:10 01	BPL $C871
$C870:CA	DEX
; control flow target
$C871:18	CLC
$C872:65 10	ADC $10
$C874:85 10	STA $10
$C876:8A	TXA
$C877:65 11	ADC $11
$C879:85 11	STA $11
$C87B:60	RTS

; control flow target
$C87C:A9 02	LDA #$02
; control flow target
$C87E:85 03	STA $03
; control flow target
$C880:84 02	STY $02
$C882:20 E6 CA	JSR $CAE6
$C885:A4 02	LDY $02
$C887:0A	ASL A
$C888:30 0B	BMI $C895
$C88A:4A	LSR A
$C88B:AA	TAX
$C88C:BD C0 04	LDA $04C0,X
$C88F:29 28	AND #$28
$C891:C9 20	CMP #$20
$C893:B0 08	BCS $C89D
; control flow target
$C895:C8	INY
$C896:C6 03	DEC $03
$C898:D0 E6	BNE $C880
$C89A:A9 00	LDA #$00
$C89C:60	RTS
; control flow target
$C89D:4A	LSR A
$C89E:4A	LSR A
$C89F:60	RTS
; control flow target
$C8A0:A5 5B	LDA $5B
$C8A2:05 5D	ORA $5D
$C8A4:D0 05	BNE $C8AB
; control flow target
$C8A6:A4 16	LDY $16
$C8A8:88	DEY
$C8A9:10 18	BPL $C8C3
; control flow target
$C8AB:A5 55	LDA $55
$C8AD:D0 24	BNE $C8D3
$C8AF:A5 53	LDA $53
$C8B1:F0 20	BEQ $C8D3
$C8B3:24 19	BIT $19
$C8B5:70 1C	BVS $C8D3
$C8B7:A4 4F	LDY $4F
$C8B9:88	DEY
$C8BA:38	SEC
$C8BB:F9 23 C3	SBC $C323,Y
$C8BE:85 53	STA $53
$C8C0:4C D3 C8	JMP $C8D3
; control flow target
$C8C3:A5 53	LDA $53
$C8C5:20 00 C9	JSR $C900
$C8C8:C8	INY
$C8C9:C4 4F	CPY $4F
$C8CB:F0 04	BEQ $C8D1
$C8CD:88	DEY
$C8CE:20 00 C9	JSR $C900
; control flow target
$C8D1:85 53	STA $53
; control flow target
$C8D3:A5 51	LDA $51
$C8D5:29 03	AND #$03
$C8D7:D0 03	BNE $C8DC
; control flow target
$C8D9:20 0A C9	JSR $C90A
; control flow target
$C8DC:A4 55	LDY $55
$C8DE:D0 1F	BNE $C8FF
$C8E0:A5 53	LDA $53
$C8E2:F0 14	BEQ $C8F8
$C8E4:10 03	BPL $C8E9
$C8E6:20 9C D7	JSR $D79C
; control flow target
$C8E9:A6 61	LDX $61
$C8EB:CA	DEX
$C8EC:10 0F	BPL $C8FD
$C8EE:4A	LSR A
$C8EF:4A	LSR A
$C8F0:4A	LSR A
$C8F1:A8	TAY
$C8F2:A6 62	LDX $62
$C8F4:E8	INX
$C8F5:8A	TXA
$C8F6:29 03	AND #$03
; control flow target
$C8F8:85 62	STA $62
$C8FA:BE 3A C3	LDX $C33A,Y
; control flow target
$C8FD:86 61	STX $61
; control flow target
$C8FF:60	RTS
; control flow target
$C900:D9 36 C3	CMP $C336,Y
$C903:F0 04	BEQ $C909
$C905:18	CLC
$C906:79 23 C3	ADC $C323,Y
; control flow target
$C909:60	RTS
; control flow target
$C90A:A0 00	LDY #$00
$C90C:A5 53	LDA $53
$C90E:4A	LSR A
$C90F:4A	LSR A
$C910:4A	LSR A
$C911:4A	LSR A
$C912:C9 08	CMP #$08
$C914:90 03	BCC $C919
$C916:88	DEY
$C917:09 F0	ORA #$F0
; control flow target
$C919:85 02	STA $02
$C91B:A5 53	LDA $53
$C91D:0A	ASL A
$C91E:0A	ASL A
$C91F:0A	ASL A
$C920:0A	ASL A
$C921:18	CLC
$C922:65 52	ADC $52
$C924:85 52	STA $52
$C926:A5 10	LDA $10
$C928:65 02	ADC $02
$C92A:85 10	STA $10
$C92C:98	TYA
$C92D:65 11	ADC $11
$C92F:85 11	STA $11
$C931:60	RTS
; control flow target
$C932:A5 51	LDA $51
$C934:29 04	AND #$04
$C936:D0 63	BNE $C99B
$C938:A5 55	LDA $55
$C93A:F0 2E	BEQ $C96A
$C93C:A5 56	LDA $56
$C93E:05 4D	ORA $4D
$C940:D0 30	BNE $C972
$C942:E6 4E	INC $4E
$C944:A5 4E	LDA $4E
$C946:C9 01	CMP #$01
$C948:D0 28	BNE $C972
$C94A:A5 4C	LDA $4C
$C94C:F0 0D	BEQ $C95B
$C94E:20 61 CA	JSR $CA61
$C951:B0 1D	BCS $C970
$C953:A5 58	LDA $58
$C955:C9 38	CMP #$38
$C957:B0 17	BCS $C970
$C959:90 17	BCC $C972
; control flow target
$C95B:A5 58	LDA $58
$C95D:C9 38	CMP #$38
$C95F:90 11	BCC $C972
$C961:20 61 CA	JSR $CA61
$C964:B0 0C	BCS $C972
$C966:E6 4C	INC $4C
$C968:D0 08	BNE $C972
; control flow target
$C96A:E6 55	INC $55
$C96C:A5 4C	LDA $4C
$C96E:F0 02	BEQ $C972
; control flow target
$C970:C6 4C	DEC $4C
; control flow target
$C972:20 12 CA	JSR $CA12
; control flow target
$C975:A5 58	LDA $58
$C977:38	SEC
$C978:E5 02	SBC $02
$C97A:85 58	STA $58
$C97C:A5 02	LDA $02
$C97E:A6 4C	LDX $4C
$C980:F0 05	BEQ $C987
$C982:49 FF	EOR #$FF
$C984:18	CLC
$C985:69 01	ADC #$01
; control flow target
$C987:18	CLC
$C988:65 12	ADC $12
$C98A:CA	DEX
$C98B:30 0B	BMI $C998
$C98D:C9 38	CMP #$38
$C98F:B0 07	BCS $C998
$C991:86 4C	STX $4C
$C993:86 55	STX $55
$C995:86 56	STX $56
$C997:60	RTS
; control flow target
$C998:85 12	STA $12
; control flow target
$C99A:60	RTS
; control flow target
$C99B:A5 55	LDA $55
$C99D:F0 2F	BEQ $C9CE
$C99F:A4 56	LDY $56
$C9A1:30 CF	BMI $C972
$C9A3:A5 4D	LDA $4D
$C9A5:D0 21	BNE $C9C8
$C9A7:A5 12	LDA $12
$C9A9:29 0F	AND #$0F
$C9AB:C9 08	CMP #$08
$C9AD:A5 4C	LDA $4C
$C9AF:20 DE C5	JSR $C5DE
$C9B2:F0 BE	BEQ $C972
$C9B4:C0 04	CPY #$04
$C9B6:90 10	BCC $C9C8
$C9B8:24 19	BIT $19
$C9BA:30 0C	BMI $C9C8
$C9BC:A5 5D	LDA $5D
$C9BE:F0 04	BEQ $C9C4
$C9C0:29 04	AND #$04
$C9C2:F0 04	BEQ $C9C8
; control flow target
$C9C4:A9 08	LDA #$08
$C9C6:85 54	STA $54
; control flow target
$C9C8:A9 00	LDA #$00
$C9CA:85 55	STA $55
$C9CC:85 57	STA $57
; control flow target
$C9CE:85 56	STA $56
$C9D0:A5 4C	LDA $4C
$C9D2:0A	ASL A
$C9D3:05 4D	ORA $4D
$C9D5:AA	TAX
$C9D6:A5 12	LDA $12
$C9D8:29 F0	AND #$F0
$C9DA:1D 33 C3	ORA $C333,X
$C9DD:85 12	STA $12
$C9DF:24 18	BIT $18
$C9E1:10 B7	BPL $C99A
$C9E3:A9 00	LDA #$00
$C9E5:85 58	STA $58
$C9E7:85 4E	STA $4E
$C9E9:85 5D	STA $5D
$C9EB:20 F1 C9	JSR $C9F1
$C9EE:4C 75 C9	JMP $C975
; control flow target
$C9F1:A0 01	LDY #$01
$C9F3:A5 53	LDA $53
$C9F5:69 13	ADC #$13
$C9F7:C9 26	CMP #$26
$C9F9:B0 01	BCS $C9FC
$C9FB:88	DEY
; control flow target
$C9FC:A5 F1	LDA $F1
$C9FE:29 02	AND #$02
$CA00:F0 02	BEQ $CA04
$CA02:C8	INY
$CA03:C8	INY
; control flow target
$CA04:B9 3F C3	LDA $C33F,Y
$CA07:85 56	STA $56
$CA09:B9 43 C3	LDA $C343,Y
$CA0C:85 57	STA $57
$CA0E:A9 02	LDA #$02
$CA10:85 55	STA $55
; control flow target
$CA12:A0 48	LDY #$48
$CA14:A5 F9	LDA $F9
$CA16:25 56	AND $56
$CA18:10 06	BPL $CA20
$CA1A:A5 5D	LDA $5D
$CA1C:D0 02	BNE $CA20
$CA1E:A0 38	LDY #$38
; control flow target
$CA20:84 02	STY $02
$CA22:A4 56	LDY $56
$CA24:10 18	BPL $CA3E
$CA26:A5 51	LDA $51
$CA28:29 08	AND #$08
$CA2A:F0 12	BEQ $CA3E
$CA2C:C8	INY
$CA2D:10 07	BPL $CA36
$CA2F:A0 FF	LDY #$FF
$CA31:84 56	STY $56
$CA33:C8	INY
$CA34:84 57	STY $57
; control flow target
$CA36:20 3E CA	JSR $CA3E
$CA39:A9 00	LDA #$00
$CA3B:85 02	STA $02
$CA3D:60	RTS
; control flow target
$CA3E:A5 57	LDA $57
$CA40:18	CLC
$CA41:65 02	ADC $02
$CA43:85 57	STA $57
$CA45:A5 56	LDA $56
$CA47:85 02	STA $02
$CA49:69 00	ADC #$00
$CA4B:85 56	STA $56
$CA4D:C9 05	CMP #$05
$CA4F:D0 04	BNE $CA55
$CA51:A9 00	LDA #$00
$CA53:85 57	STA $57
; control flow target
$CA55:A9 02	LDA #$02
$CA57:85 13	STA $13
$CA59:60	RTS

; data
$CA5A:1E 0F E2
$CA5D:F1 00
$CA5F:10 20

; control flow target
$CA61:A5 4F	LDA $4F
$CA63:29 02	AND #$02
$CA65:A8	TAY
$CA66:20 87 CA	JSR $CA87
$CA69:0A	ASL A
$CA6A:10 0C	BPL $CA78
$CA6C:A5 4F	LDA $4F
$CA6E:29 02	AND #$02
$CA70:A8	TAY
$CA71:C8	INY
$CA72:20 87 CA	JSR $CA87
$CA75:0A	ASL A
$CA76:30 0D	BMI $CA85
; control flow target
$CA78:4A	LSR A
$CA79:AA	TAX
$CA7A:BD C0 04	LDA $04C0,X
$CA7D:29 50	AND #$50
$CA7F:C9 40	CMP #$40
$CA81:D0 02	BNE $CA85
$CA83:18	CLC
$CA84:60	RTS
; control flow target
$CA85:38	SEC
$CA86:60	RTS
; control flow target
$CA87:A2 00	LDX #$00
$CA89:B9 5A CA	LDA $CA5A,Y
$CA8C:10 01	BPL $CA8F
$CA8E:CA	DEX
; control flow target
$CA8F:18	CLC
$CA90:65 10	ADC $10
$CA92:48	PHA
$CA93:8A	TXA
$CA94:65 11	ADC $11
$CA96:AA	TAX
$CA97:68	PLA
$CA98:E0 03	CPX #$03
$CA9A:B0 0C	BCS $CAA8
$CA9C:4A	LSR A
$CA9D:4A	LSR A
$CA9E:4A	LSR A
$CA9F:4A	LSR A
$CAA0:1D 5E CA	ORA $CA5E,X
$CAA3:A8	TAY
$CAA4:B9 00 05	LDA $0500,Y
$CAA7:60	RTS
; control flow target
$CAA8:A9 C0	LDA #$C0
$CAAA:60	RTS
; control flow target
$CAAB:86 03	STX $03
; control flow target
$CAAD:84 02	STY $02
$CAAF:20 E6 CA	JSR $CAE6
$CAB2:A4 02	LDY $02
$CAB4:0A	ASL A
$CAB5:30 11	BMI $CAC8
$CAB7:4A	LSR A
$CAB8:AA	TAX
$CAB9:BD C0 04	LDA $04C0,X
$CABC:29 D0	AND #$D0
$CABE:D0 0E	BNE $CACE
; control flow target
$CAC0:88	DEY
$CAC1:C6 03	DEC $03
$CAC3:D0 E8	BNE $CAAD
$CAC5:A9 00	LDA #$00
$CAC7:60	RTS
; control flow target
$CAC8:90 18	BCC $CAE2
$CACA:B9 57 CB	LDA $CB57,Y
$CACD:60	RTS
; control flow target
$CACE:10 08	BPL $CAD8
$CAD0:C0 06	CPY #$06
$CAD2:90 EC	BCC $CAC0
$CAD4:B9 4D CB	LDA $CB4D,Y
$CAD7:60	RTS
; control flow target
$CAD8:C9 40	CMP #$40
$CADA:90 E4	BCC $CAC0
$CADC:F0 04	BEQ $CAE2
$CADE:C0 04	CPY #$04
$CAE0:B0 DE	BCS $CAC0
; control flow target
$CAE2:B9 4D CB	LDA $CB4D,Y
$CAE5:60	RTS
; control flow target
$CAE6:A2 00	LDX #$00
$CAE8:B9 29 CB	LDA $CB29,Y
$CAEB:10 01	BPL $CAEE
$CAED:CA	DEX
; control flow target
$CAEE:18	CLC
$CAEF:65 10	ADC $10
$CAF1:85 04	STA $04
$CAF3:8A	TXA
$CAF4:65 11	ADC $11
$CAF6:C9 03	CMP #$03
$CAF8:B0 2C	BCS $CB26
$CAFA:4A	LSR A
$CAFB:66 04	ROR $04
$CAFD:4A	LSR A
$CAFE:66 04	ROR $04
$CB00:46 04	LSR $04
$CB02:46 04	LSR $04
$CB04:A9 05	LDA #$05
$CB06:85 05	STA $05
$CB08:A5 12	LDA $12
$CB0A:18	CLC
$CB0B:79 3B CB	ADC $CB3B,Y
$CB0E:C9 B0	CMP #$B0
$CB10:B0 14	BCS $CB26
$CB12:29 F0	AND #$F0
$CB14:85 06	STA $06
$CB16:0A	ASL A
$CB17:90 03	BCC $CB1C
$CB19:E6 05	INC $05
$CB1B:18	CLC
; control flow target
$CB1C:65 06	ADC $06
$CB1E:A8	TAY
$CB1F:90 02	BCC $CB23
$CB21:E6 05	INC $05
; control flow target
$CB23:B1 04	LDA ($04),Y
$CB25:60	RTS
; control flow target
$CB26:A9 C0	LDA #$C0
$CB28:60	RTS

; data + unknown
$CB29:07 07
$CB2B:F8
$CB2C:F8
$CB2D:FB
$CB2E:04 FB
$CB30:04 0D
$CB32:F2 00
$CB34:07 F8
$CB36:00 0F
$CB38:F0 00
$CB3A:00 D6
$CB3C:EA
$CB3D:D6 EA
$CB3F:D0 D0
$CB41:F0 F0
$CB43:F0 F0
$CB45:E8
$CB46:E8
$CB47:E8
$CB48:F0 F0
$CB4A:F0 D8
$CB4C:E8
$CB4D:01 01
$CB4F:02 02
$CB51:08
$CB52:08
$CB53:04 04
$CB55:01 02
$CB57:11 11
$CB59:22 22 88 88
$CB5D:40
$CB5E:40
$CB5F:11 22

; control flow target
$CB61:A5 5D	LDA $5D
$CB63:29 C0	AND #$C0
$CB65:C9 C0	CMP #$C0
$CB67:D0 04	BNE $CB6D
$CB69:A5 5C	LDA $5C
$CB6B:C9 07	CMP #$07
; control flow target
$CB6D:60	RTS
; control flow target
$CB6E:A9 00	LDA #$00
$CB70:85 5D	STA $5D
$CB72:85 19	STA $19
$CB74:A4 4D	LDY $4D
$CB76:F0 02	BEQ $CB7A
$CB78:A9 08	LDA #$08
; control flow target
$CB7A:85 13	STA $13
$CB7C:20 CF CB	JSR $CBCF
$CB7F:4C 26 E8	JMP $E826

; data
$CB82:08 F8
$CB84:00 18

; control flow target
$CB86:A4 4C	LDY $4C
$CB88:B9 82 CB	LDA $CB82,Y
$CB8B:85 0A	STA $0A
$CB8D:A5 12	LDA $12
$CB8F:18	CLC
$CB90:79 84 CB	ADC $CB84,Y
; control flow target
$CB93:60	RTS
; control flow target
$CB94:4A	LSR A
$CB95:50 01	BVC $CB98
$CB97:38	SEC
; control flow target
$CB98:2A	ROL A
$CB99:0A	ASL A
$CB9A:AA	TAX
$CB9B:BD A8 CB	LDA $CBA8,X
$CB9E:85 08	STA $08
$CBA0:BD A9 CB	LDA $CBA9,X
$CBA3:85 09	STA $09
$CBA5:6C 08 00	JMP ($08)

; jump table
$CBA8:CB CC	; $CCCB
$CBAA:12 CD	; $CD12
$CBAC:BD CC	; $CCBD
$CBAE:12 CD	; $CD12
$CBB0:AE CC	; $CCAE
$CBB2:1E CD	; $CD1E
$CBB4:C1 CC	; $CCC1
$CBB6:08 CD	; $CD08
$CBB8:AA CC	; $CCAA
$CBBA:04 CD	; $CD04
; jump table
$CBBC:4F CC	; $CC4F
$CBBE:22 CC	; $CC22
$CBC0:35 CC	; $CC35
$CBC2:0D CC	; $CC0D
$CBC4:F7 CB	; $CBF7
$CBC6:31 CC	; $CC31
$CBC8:2D CC	; $CC2D
$CBCA:95 CD	; $CD95

; control flow target
$CBCC:20 31 CE	JSR $CE31
; control flow target
$CBCF:24 19	BIT $19
$CBD1:10 10	BPL $CBE3
$CBD3:50 04	BVC $CBD9
$CBD5:A2 14	LDX #$14
$CBD7:D0 4B	BNE $CC24
; control flow target
$CBD9:20 61 CB	JSR $CB61
$CBDC:F0 05	BEQ $CBE3
$CBDE:A5 66	LDA $66
$CBE0:4A	LSR A
$CBE1:B0 B0	BCS $CB93
; control flow target
$CBE3:A5 13	LDA $13
$CBE5:24 5D	BIT $5D
$CBE7:30 AB	BMI $CB94
$CBE9:AA	TAX
$CBEA:BD BC CB	LDA $CBBC,X
$CBED:85 08	STA $08
$CBEF:BD BD CB	LDA $CBBD,X
$CBF2:85 09	STA $09
$CBF4:6C 08 00	JMP ($08)
; control flow target
$CBF7:A2 10	LDX #$10
$CBF9:A5 55	LDA $55
$CBFB:F0 07	BEQ $CC04
$CBFD:A4 56	LDY $56
$CBFF:88	DEY
$CC00:10 07	BPL $CC09
$CC02:30 4F	BMI $CC53
; control flow target
$CC04:A5 62	LDA $62
$CC06:4A	LSR A
$CC07:B0 4A	BCS $CC53
; control flow target
$CC09:A2 1E	LDX #$1E
$CC0B:D0 46	BNE $CC53
; control flow target
$CC0D:A2 04	LDX #$04
$CC0F:20 DE C6	JSR $C6DE
$CC12:B0 3F	BCS $CC53
$CC14:A2 0C	LDX #$0C
$CC16:A5 59	LDA $59
$CC18:4A	LSR A
$CC19:20 DE C5	JSR $C5DE
$CC1C:D0 35	BNE $CC53
$CC1E:A2 0E	LDX #$0E
$CC20:D0 31	BNE $CC53
; control flow target
$CC22:A2 10	LDX #$10
; control flow target
$CC24:A4 56	LDY $56
$CC26:88	DEY
$CC27:30 2A	BMI $CC53
$CC29:E8	INX
$CC2A:E8	INX
$CC2B:D0 26	BNE $CC53
; control flow target
$CC2D:A2 66	LDX #$66
$CC2F:D0 0C	BNE $CC3D
; control flow target
$CC31:A2 10	LDX #$10
$CC33:D0 08	BNE $CC3D
; control flow target
$CC35:A9 00	LDA #$00
$CC37:A8	TAY
$CC38:20 F8 C8	JSR $C8F8
$CC3B:A2 2C	LDX #$2C
; control flow target
$CC3D:20 86 CB	JSR $CB86
$CC40:18	CLC
$CC41:65 0A	ADC $0A
$CC43:85 04	STA $04
$CC45:86 06	STX $06
$CC47:E8	INX
$CC48:E8	INX
$CC49:86 07	STX $07
$CC4B:A2 38	LDX #$38
$CC4D:D0 15	BNE $CC64
; control flow target
$CC4F:A5 62	LDA $62
$CC51:0A	ASL A
$CC52:AA	TAX
; control flow target
$CC53:BD 68 CE	LDA $CE68,X
$CC56:85 06	STA $06
$CC58:BD 69 CE	LDA $CE69,X
$CC5B:85 07	STA $07
$CC5D:20 86 CB	JSR $CB86
$CC60:85 04	STA $04
$CC62:A2 30	LDX #$30
; control flow target
$CC64:A9 00	LDA #$00
$CC66:24 19	BIT $19
$CC68:50 04	BVC $CC6E
$CC6A:A5 66	LDA $66
$CC6C:29 06	AND #$06
; control flow target
$CC6E:85 03	STA $03
$CC70:20 8D CC	JSR $CC8D
$CC73:85 08	STA $08
$CC75:20 8D CC	JSR $CC8D
$CC78:85 09	STA $09
$CC7A:A9 8C	LDA #$8C
$CC7C:85 0B	STA $0B
$CC7E:A9 CE	LDA #$CE
$CC80:85 0C	STA $0C
$CC82:A4 06	LDY $06
$CC84:20 D6 CD	JSR $CDD6
$CC87:A4 07	LDY $07
$CC89:4C D6 CD	JMP $CDD6
$CC8C:60	RTS
; control flow target
$CC8D:A5 50	LDA $50
$CC8F:4A	LSR A
$CC90:46 15	LSR $15
$CC92:2A	ROL A
$CC93:A8	TAY
$CC94:A5 4C	LDA $4C
$CC96:6A	ROR A
$CC97:A5 03	LDA $03
$CC99:6A	ROR A
$CC9A:19 9E CC	ORA $CC9E,Y
$CC9D:60	RTS

; data
$CC9E:42 62
$CCA0:02 22
$CCA2:F3 05
$CCA4:18
$CCA5:E8
$CCA6:06 FA
$CCA8:0E F2

; control flow target
$CCAA:A2 20	LDX #$20
$CCAC:D0 1F	BNE $CCCD
; control flow target
$CCAE:A2 32	LDX #$32
$CCB0:20 3D CC	JSR $CC3D
$CCB3:20 86 CB	JSR $CB86
$CCB6:18	CLC
$CCB7:79 A8 CC	ADC $CCA8,Y
$CCBA:4C D7 CC	JMP $CCD7
; control flow target
$CCBD:A2 1C	LDX #$1C
$CCBF:D0 0C	BNE $CCCD
; control flow target
$CCC1:A2 18	LDX #$18
$CCC3:A5 59	LDA $59
$CCC5:4A	LSR A
$CCC6:20 DE C5	JSR $C5DE
$CCC9:D0 02	BNE $CCCD
; control flow target
$CCCB:A2 08	LDX #$08
; control flow target
$CCCD:20 53 CC	JSR $CC53
$CCD0:20 86 CB	JSR $CB86
$CCD3:18	CLC
$CCD4:79 A6 CC	ADC $CCA6,Y
; control flow target
$CCD7:85 04	STA $04
$CCD9:A6 50	LDX $50
$CCDB:BD A1 CC	LDA $CCA1,X
$CCDE:18	CLC
$CCDF:65 02	ADC $02
$CCE1:85 02	STA $02
$CCE3:A2 50	LDX #$50
$CCE5:A9 47	LDA #$47
$CCE7:20 1E CE	JSR $CE1E
$CCEA:A5 04	LDA $04
$CCEC:38	SEC
$CCED:E5 0A	SBC $0A
$CCEF:85 04	STA $04
$CCF1:A6 6E	LDX $6E
$CCF3:BD 89 CD	LDA $CD89,X
; control flow target
$CCF6:48	PHA
$CCF7:BD 91 CD	LDA $CD91,X
$CCFA:05 08	ORA $08
$CCFC:85 08	STA $08
$CCFE:A2 4C	LDX #$4C
$CD00:68	PLA
$CD01:4C 1E CE	JMP $CE1E
; control flow target
$CD04:A2 22	LDX #$22
$CD06:D0 0C	BNE $CD14
; control flow target
$CD08:A2 1A	LDX #$1A
$CD0A:A5 59	LDA $59
$CD0C:4A	LSR A
$CD0D:20 DE C5	JSR $C5DE
$CD10:D0 02	BNE $CD14
; control flow target
$CD12:A2 0A	LDX #$0A
; control flow target
$CD14:20 53 CC	JSR $CC53
$CD17:20 86 CB	JSR $CB86
$CD1A:A2 30	LDX #$30
$CD1C:D0 0D	BNE $CD2B
; control flow target
$CD1E:A2 54	LDX #$54
$CD20:20 3D CC	JSR $CC3D
$CD23:A2 38	LDX #$38
$CD25:20 86 CB	JSR $CB86
$CD28:18	CLC
$CD29:65 0A	ADC $0A
; control flow target
$CD2B:18	CLC
$CD2C:65 0A	ADC $0A
$CD2E:85 04	STA $04
$CD30:A5 02	LDA $02
$CD32:A4 50	LDY $50
$CD34:88	DEY
$CD35:F0 03	BEQ $CD3A
$CD37:38	SEC
$CD38:E9 10	SBC #$10
; control flow target
$CD3A:9D 03 02	STA $0203,X
$CD3D:9D 0B 02	STA $020B,X
$CD40:18	CLC
$CD41:69 08	ADC #$08
$CD43:9D 07 02	STA $0207,X
$CD46:9D 0F 02	STA $020F,X
$CD49:B9 83 CB	LDA $CB83,Y
$CD4C:18	CLC
$CD4D:65 02	ADC $02
$CD4F:85 02	STA $02
$CD51:A2 50	LDX #$50
$CD53:A9 41	LDA #$41
$CD55:20 1E CE	JSR $CE1E
$CD58:B9 A4 CC	LDA $CCA4,Y
$CD5B:18	CLC
$CD5C:65 02	ADC $02
$CD5E:85 02	STA $02
$CD60:A6 6E	LDX $6E
$CD62:BD 8D CD	LDA $CD8D,X
$CD65:20 F6 CC	JSR $CCF6
$CD68:A2 00	LDX #$00
$CD6A:B9 85 CD	LDA $CD85,Y
$CD6D:10 01	BPL $CD70
$CD6F:CA	DEX
; control flow target
$CD70:18	CLC
$CD71:65 10	ADC $10
$CD73:85 5E	STA $5E
$CD75:8A	TXA
$CD76:65 11	ADC $11
$CD78:85 5F	STA $5F
$CD7A:A4 4C	LDY $4C
$CD7C:A5 04	LDA $04
$CD7E:18	CLC
$CD7F:79 87 CD	ADC $CD87,Y
$CD82:85 60	STA $60
$CD84:60	RTS

; data
$CD85:15 EA
$CD87:04 03
$CD89:51 51
$CD8B:46 46
$CD8D:50 50
$CD8F:48 48
$CD91:02 03
$CD93:03 03

; control flow target
$CD95:20 86 CB	JSR $CB86
$CD98:85 04	STA $04
$CD9A:A5 0A	LDA $0A
$CD9C:0A	ASL A
$CD9D:18	CLC
$CD9E:65 04	ADC $04
$CDA0:48	PHA
$CDA1:85 04	STA $04
$CDA3:A9 00	LDA #$00
$CDA5:85 03	STA $03
$CDA7:20 8D CC	JSR $CC8D
$CDAA:85 08	STA $08
$CDAC:85 09	STA $09
$CDAE:A9 8C	LDA #$8C
$CDB0:85 0B	STA $0B
$CDB2:A9 CE	LDA #$CE
$CDB4:85 0C	STA $0C
$CDB6:A5 50	LDA $50
$CDB8:4A	LSR A
$CDB9:A8	TAY
$CDBA:A5 02	LDA $02
$CDBC:48	PHA
$CDBD:18	CLC
$CDBE:79 38 C3	ADC $C338,Y
$CDC1:85 02	STA $02
$CDC3:A2 30	LDX #$30
$CDC5:A0 6C	LDY #$6C
$CDC7:20 D6 CD	JSR $CDD6
$CDCA:68	PLA
$CDCB:85 02	STA $02
$CDCD:68	PLA
$CDCE:85 04	STA $04
$CDD0:A0 70	LDY #$70
$CDD2:4C D6 CD	JMP $CDD6
$CDD5:60	RTS
; control flow target
$CDD6:24 08	BIT $08
$CDD8:70 09	BVS $CDE3
$CDDA:20 FA CD	JSR $CDFA
$CDDD:20 17 CE	JSR $CE17
$CDE0:4C E9 CD	JMP $CDE9
; control flow target
$CDE3:20 17 CE	JSR $CE17
$CDE6:20 FA CD	JSR $CDFA
; control flow target
$CDE9:A5 04	LDA $04
$CDEB:18	CLC
$CDEC:65 0A	ADC $0A
$CDEE:85 04	STA $04
$CDF0:8A	TXA
$CDF1:18	CLC
$CDF2:69 08	ADC #$08
$CDF4:AA	TAX
$CDF5:29 0F	AND #$0F
$CDF7:D0 DD	BNE $CDD6
$CDF9:60	RTS
; control flow target
$CDFA:B1 0B	LDA ($0B),Y
$CDFC:C8	INY
$CDFD:C9 FF	CMP #$FF
$CDFF:F0 15	BEQ $CE16
$CE01:9D 01 02	STA $0201,X
$CE04:A5 02	LDA $02
$CE06:38	SEC
$CE07:E9 08	SBC #$08
$CE09:9D 03 02	STA $0203,X
$CE0C:A5 09	LDA $09
$CE0E:9D 02 02	STA $0202,X
$CE11:A5 04	LDA $04
$CE13:9D 00 02	STA $0200,X
; control flow target
$CE16:60	RTS
; control flow target
$CE17:B1 0B	LDA ($0B),Y
$CE19:C8	INY
$CE1A:C9 FF	CMP #$FF
$CE1C:F0 12	BEQ $CE30
; control flow target
$CE1E:9D 05 02	STA $0205,X
$CE21:A5 02	LDA $02
$CE23:9D 07 02	STA $0207,X
$CE26:A5 08	LDA $08
$CE28:9D 06 02	STA $0206,X
$CE2B:A5 04	LDA $04
$CE2D:9D 04 02	STA $0204,X
; control flow target
$CE30:60	RTS
; control flow target
$CE31:A5 11	LDA $11
$CE33:85 0B	STA $0B
$CE35:A6 10	LDX $10
$CE37:8A	TXA
$CE38:29 07	AND #$07
$CE3A:85 0A	STA $0A
$CE3C:8A	TXA
$CE3D:46 0B	LSR $0B
$CE3F:6A	ROR A
$CE40:46 0B	LSR $0B
$CE42:6A	ROR A
$CE43:4A	LSR A
$CE44:C5 26	CMP $26
$CE46:90 14	BCC $CE5C
$CE48:C5 27	CMP $27
$CE4A:B0 10	BCS $CE5C
$CE4C:E9 0F	SBC #$0F
$CE4E:38	SEC
$CE4F:E5 28	SBC $28
$CE51:85 29	STA $29
$CE53:A5 0A	LDA $0A
$CE55:85 2A	STA $2A
$CE57:A9 80	LDA #$80
$CE59:85 02	STA $02
$CE5B:60	RTS
; control flow target
$CE5C:29 60	AND #$60
$CE5E:38	SEC
$CE5F:E5 28	SBC $28
$CE61:85 29	STA $29
$CE63:A5 10	LDA $10
$CE65:85 02	STA $02
$CE67:60	RTS

; data + unknown
$CE68:00 04
$CE6A:08
$CE6B:0C 10 14
$CE6E:08
$CE6F:18
$CE70:38
$CE71:3C 40 44
$CE74:08
$CE75:1C 08 20
$CE78:2C 24 2C
$CE7B:28
$CE7C:50 24
$CE7E:50 28
$CE80:38
$CE81:48
$CE82:40
$CE83:4C 32 28
$CE86:08
$CE87:5A
$CE88:38
$CE89:5E 40 62
$CE8C:00 01
$CE8E:10 11
$CE90:20 21 30
$CE93:31 02
$CE95:03 12
$CE97:13 22
$CE99:23 32
$CE9B:33 04
$CE9D:05 14
$CE9F:15 24
$CEA1:25 34
$CEA3:35 22
$CEA5:26 18
$CEA7:36 22
$CEA9:23 2A
$CEAB:38
$CEAC:22 29 30 39
$CEB0:08
$CEB1:09 FF
$CEB3:19 06 07
$CEB6:16 17
$CEB8:0C 0D 1C
$CEBB:1D 2C 2D
$CEBE:04 05
$CEC0:0A
$CEC1:2B
$CEC2:2C 2D 04
$CEC5:05 0A
$CEC7:0B
$CEC8:1A
$CEC9:1B
$CECA:18
$CECB:37 3D
$CECD:3E 3F 40
$CED0:42 43
$CED2:44 45 1A
$CED5:1B
$CED6:2A
$CED7:37 42
$CED9:43 2A
$CEDB:45 0E
$CEDD:0F 1E 1F 3D
$CEE1:3E 3F 40
$CEE4:3A
$CEE5:3B
$CEE6:22 23 FF 33
$CEEA:1A
$CEEB:1B
$CEEC:FF 37 42 43
$CEF0:FF 45 0E 0F
$CEF4:1E 1F 2E
$CEF7:2F 49 4A 4C
$CEFB:4D 4B FF
$CEFE:4E 4F 1C
$CF01:19 14 1C
$CF04:19 02 02
$CF07:02 05
$CF09:08
$CF0A:02 02
$CF0C:02 02
$CF0E:05 09
$CF10:07 08
$CF12:05 0A
$CF14:00 09
$CF16:07 08
$CF18:05

; control flow target
$CF19:20 D8 D6	JSR $D6D8
$CF1C:85 0D	STA $0D
$CF1E:20 E2 D1	JSR $D1E2
$CF21:A5 30	LDA $30
$CF23:C9 01	CMP #$01
$CF25:D0 1B	BNE $CF42
$CF27:A9 18	LDA #$18
$CF29:20 6E D1	JSR $D16E
$CF2C:A2 0B	LDX #$0B
; control flow target
$CF2E:A8	TAY
$CF2F:B1 02	LDA ($02),Y
$CF31:09 40	ORA #$40
$CF33:91 02	STA ($02),Y
$CF35:CA	DEX
$CF36:F0 0A	BEQ $CF42
$CF38:98	TYA
$CF39:18	CLC
$CF3A:69 30	ADC #$30
$CF3C:90 F0	BCC $CF2E
$CF3E:E6 03	INC $03
$CF40:D0 EC	BNE $CF2E
; control flow target
$CF42:60	RTS
; control flow target
$CF43:A5 30	LDA $30
$CF45:F0 0B	BEQ $CF52
$CF47:A9 00	LDA #$00
$CF49:20 00 E6	JSR $E600
$CF4C:20 19 CF	JSR $CF19
$CF4F:4C 5B CF	JMP $CF5B
; control flow target
$CF52:20 67 E6	JSR $E667
$CF55:20 BC CF	JSR $CFBC
$CF58:20 B3 D1	JSR $D1B3
; control flow target
$CF5B:A5 28	LDA $28
$CF5D:C9 40	CMP #$40
$CF5F:90 04	BCC $CF65
$CF61:A9 40	LDA #$40
$CF63:85 28	STA $28
; control flow target
$CF65:85 10	STA $10
$CF67:A9 20	LDA #$20
$CF69:85 11	STA $11
; control flow target
$CF6B:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$CF6E:20 7B CF	JSR $CF7B
$CF71:10 F8	BPL $CF6B
$CF73:A2 00	LDX #$00
$CF75:86 23	STX $23
$CF77:E8	INX
$CF78:86 22	STX $22
$CF7A:60	RTS
; control flow target
$CF7B:20 80 CF	JSR $CF80
$CF7E:30 20	BMI $CFA0
; control flow target
$CF80:20 85 CF	JSR $CF85
$CF83:30 1B	BMI $CFA0
; control flow target
$CF85:A9 00	LDA #$00
$CF87:85 23	STA $23
$CF89:20 C8 D0	JSR $D0C8
$CF8C:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$CF8F:20 BA D4	JSR $D4BA
$CF92:20 FF D4	JSR $D4FF
$CF95:A9 00	LDA #$00
$CF97:85 22	STA $22
$CF99:20 F5 D7	JSR $D7F5	; set some PPU/VRAM registers
$CF9C:E6 10	INC $10
$CF9E:C6 11	DEC $11
; control flow target
$CFA0:60	RTS
; control flow target
$CFA1:86 02	STX $02
$CFA3:85 03	STA $03
$CFA5:A0 3F	LDY #$3F
; control flow target
$CFA7:B1 02	LDA ($02),Y
$CFA9:99 C0 04	STA $04C0,Y
$CFAC:88	DEY
$CFAD:10 F8	BPL $CFA7
$CFAF:60	RTS

; data + unknown
$CFB0:10 11
$CFB2:12 13
$CFB4:14 20
$CFB6:21 22
$CFB8:23 24
$CFBA:25 62

; control flow target
$CFBC:20 25 E7	JSR $E725	; update mapper config to vertical mirroring
$CFBF:A6 DF	LDX $DF	; location
$CFC1:BD B0 CF	LDA $CFB0,X
$CFC4:A8	TAY
$CFC5:4A	LSR A
$CFC6:4A	LSR A
$CFC7:4A	LSR A
$CFC8:4A	LSR A
$CFC9:85 33	STA $33
$CFCB:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$CFCE:98	TYA
$CFCF:29 0F	AND #$0F
$CFD1:20 41 D7	JSR $D741	; given A, sets Y = A << 1, X = $8000,Y, and A = $8001,Y
$CFD4:20 34 D1	JSR $D134	; STX $34, STA $35
$CFD7:18	CLC
$CFD8:69 01	ADC #$01
$CFDA:20 A1 CF	JSR $CFA1
$CFDD:20 02 D0	JSR $D002
$CFE0:A9 49	LDA #$49
$CFE2:20 F8 CF	JSR $CFF8
$CFE5:85 02	STA $02
$CFE7:84 03	STY $03
$CFE9:A0 00	LDY #$00
; control flow target
$CFEB:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$CFEE:96 34	STX $34,Y
$CFF0:99 35 00	STA $35,Y
$CFF3:C0 08	CPY #$08
$CFF5:90 F4	BCC $CFEB
$CFF7:60	RTS
; control flow target
$CFF8:18	CLC
$CFF9:65 34	ADC $34
$CFFB:A4 35	LDY $35
$CFFD:90 01	BCC $D000
$CFFF:C8	INY
; control flow target
$D000:C8	INY
$D001:60	RTS
; control flow target
$D002:A9 40	LDA #$40
$D004:20 F8 CF	JSR $CFF8
$D007:20 D9 D2	JSR $D2D9
; control flow target
$D00A:A2 02	LDX #$02
; control flow target
$D00C:BD 16 D0	LDA $D016,X
$D00F:9D 1D 07	STA $071D,X
$D012:CA	DEX
$D013:10 F7	BPL $D00C
; control flow target
$D015:60	RTS

; data
$D016:12 2B 30

$D018:A5 2A	LDA $2A
$D01B:85 25	STA $25
$D01D:A5 29	LDA $29
$D01F:F0 F4	BEQ $D015
$D021:18	CLC
$D022:65 28	ADC $28
$D024:85 28	STA $28
$D026:A6 29	LDX $29
$D028:30 03	BMI $D02D
$D02A:18	CLC
$D02B:69 20	ADC #$20
; control flow target
$D02D:85 10	STA $10
$D02F:20 09 E7	JSR $E709
$D032:4C C8 D0	JMP $D0C8

; data
$D035:FF 60
$D037:00 40
$D039:00 02
$D03B:04 FC

; control flow target
$D03D:20 BC CF	JSR $CFBC
$D040:20 29 E7	JSR $E729	; update mapper config to horizontal mirroring
$D043:20 B3 D1	JSR $D1B3
$D046:A6 4F	LDX $4F
$D048:86 50	STX $50
$D04A:BD 34 D0	LDA $D034,X
$D04D:85 10	STA $10
$D04F:A9 20	LDA #$20
$D051:85 11	STA $11
$D053:A9 00	LDA #$00
$D055:85 61	STA $61
$D057:85 64	STA $64
; control flow target
$D059:85 25	STA $25
$D05B:20 E3 D3	JSR $D3E3
$D05E:A5 25	LDA $25
$D060:29 07	AND #$07
$D062:D0 1D	BNE $D081
$D064:A6 4F	LDX $4F
$D066:BD 22 C3	LDA $C322,X
$D069:18	CLC
$D06A:65 10	ADC $10
$D06C:85 10	STA $10
$D06E:C6 11	DEC $11
$D070:30 43	BMI $D0B5
$D072:20 C8 D0	JSR $D0C8
$D075:A5 4F	LDA $4F
$D077:4A	LSR A
$D078:A5 10	LDA $10
$D07A:20 DE C5	JSR $C5DE
$D07D:D0 02	BNE $D081
$D07F:06 22	ASL $22
; control flow target
$D081:A9 20	LDA #$20
$D083:20 E9 C8	JSR $C8E9
$D086:A6 4F	LDX $4F
$D088:BD 3A D0	LDA $D03A,X
$D08B:48	PHA
$D08C:20 9C D7	JSR $D79C
$D08F:18	CLC
$D090:65 63	ADC $63
$D092:A8	TAY
$D093:A5 25	LDA $25
$D095:29 0C	AND #$0C
$D097:D0 06	BNE $D09F
$D099:98	TYA
$D09A:18	CLC
$D09B:7D 22 C3	ADC $C322,X
$D09E:A8	TAY
; control flow target
$D09F:84 63	STY $63
$D0A1:84 02	STY $02
$D0A3:A9 00	LDA #$00
$D0A5:85 15	STA $15
$D0A7:A5 65	LDA $65
$D0A9:85 12	STA $12
$D0AB:20 6E CB	JSR $CB6E
$D0AE:68	PLA
$D0AF:18	CLC
$D0B0:65 25	ADC $25
$D0B2:4C 59 D0	JMP $D059
; control flow target
$D0B5:A6 4F	LDX $4F
$D0B7:BD 38 D0	LDA $D038,X
$D0BA:85 64	STA $64
$D0BC:BD 36 D0	LDA $D036,X
$D0BF:85 28	STA $28
$D0C1:20 25 E7	JSR $E725	; update mapper config to vertical mirroring
$D0C4:A9 0C	LDA #$0C
$D0C6:85 44	STA $44
; control flow target
$D0C8:A9 C0	LDA #$C0
$D0CA:85 03	STA $03
$D0CC:A0 01	LDY #$01
$D0CE:A9 00	LDA #$00
$D0D0:20 83 D1	JSR $D183
$D0D3:09 08	ORA #$08
$D0D5:85 07	STA $07
$D0D7:A9 0B	LDA #$0B
$D0D9:85 04	STA $04
$D0DB:0A	ASL A
$D0DC:09 80	ORA #$80
$D0DE:9D 30 07	STA $0730,X
$D0E1:E8	INX
$D0E2:86 23	STX $23
$D0E4:20 6E D1	JSR $D16E
$D0E7:A5 10	LDA $10
$D0E9:4A	LSR A
$D0EA:85 09	STA $09
$D0EC:66 05	ROR $05
; control flow target
$D0EE:A4 09	LDY $09
$D0F0:B1 02	LDA ($02),Y
$D0F2:29 3F	AND #$3F
$D0F4:AA	TAX
$D0F5:BD C0 04	LDA $04C0,X
$D0F8:29 03	AND #$03
$D0FA:20 3D D1	JSR $D13D
$D0FD:B1 02	LDA ($02),Y
$D0FF:0A	ASL A
$D100:0A	ASL A
$D101:A8	TAY
$D102:24 05	BIT $05
$D104:10 01	BPL $D107
$D106:C8	INY
; control flow target
$D107:A6 23	LDX $23
$D109:B1 34	LDA ($34),Y
$D10B:9D 30 07	STA $0730,X
$D10E:E8	INX
$D10F:C8	INY
$D110:C8	INY
$D111:B1 34	LDA ($34),Y
$D113:9D 30 07	STA $0730,X
$D116:E8	INX
$D117:86 23	STX $23
$D119:A5 09	LDA $09
$D11B:18	CLC
$D11C:69 30	ADC #$30
$D11E:85 09	STA $09
$D120:90 02	BCC $D124
$D122:E6 03	INC $03
; control flow target
$D124:C6 04	DEC $04
$D126:D0 C6	BNE $D0EE
$D128:A4 23	LDY $23
$D12A:A9 FF	LDA #$FF
$D12C:99 30 07	STA $0730,Y
$D12F:84 23	STY $23
$D131:4C DC D3	JMP $D3DC	; $22 = #$C0 | $22

; control flow target
$D134:86 34	STX $34
$D136:85 35	STA $35
$D138:60	RTS

; data
$D139:FC F3
$D13B:CF 3F

; control flow target
$D13D:A6 06	LDX $06
$D13F:F0 0C	BEQ $D14D
$D141:0A	ASL
$D142:0A	ASL
$D143:CA	DEX
$D144:F0 07	BEQ $D14D
$D146:0A	ASL
$D147:0A	ASL
$D148:CA	DEX
$D149:F0 02	BEQ $D14D
$D14B:0A	ASL
$D14C:0A	ASL
; control flow target
$D14D:85 08	STA $08
$D14F:A6 06	LDX $06
$D151:BD 39 D1	LDA $D139,X
$D154:A6 07	LDX $07
$D156:3D 80 07	AND $0780,X
$D159:05 08	ORA $08
$D15B:9D 80 07	STA $0780,X
$D15E:A5 06	LDA $06
$D160:49 02	EOR #$02
$D162:85 06	STA $06
$D164:4A	LSR
$D165:D0 06	BNE $D16D
$D167:8A	TXA
$D168:18	CLC
$D169:69 08	ADC #$08
$D16B:85 07	STA $07
; control flow target
$D16D:60	RTS

; control flow target
$D16E:A0 00	LDY #$00
$D170:84 02	STY $02
$D172:A0 05	LDY #$05
$D174:84 03	STY $03
$D176:60	RTS

; control flow target
$D177:A5 11	LDA $11
$D179:AA	TAX
$D17A:29 02	AND #$02
$D17C:4A	LSR
$D17D:A8	TAY	; Y = ($11 & #$02) >> 1
$D17E:A9 20	LDA #$20
$D180:20 6A D7	JSR $D76A	; multiplies A (#$20) by X ($11), returning low byte in $03 and high byte in A
; control flow target
$D183:85 02	STA $02
$D185:84 06	STY $06	; $06 = ($11 & #$02) >> 1
$D187:A6 23	LDX $23
$D189:A5 10	LDA $10
$D18B:29 1F	AND #$1F
$D18D:48	PHA	; save A ($10 & #$1F) for later
$D18E:18	CLC
$D18F:65 03	ADC $03
$D191:9D 31 07	STA $0731,X	; ($10 & #$1F) + low byte of multiplication result from line $D180
$D194:A9 20	LDA #$20
$D196:A0 00	LDY #$00
$D198:24 10	BIT $10
$D19A:F0 04	BEQ $D1A0
$D19C:A9 24	LDA #$24
$D19E:A0 40	LDY #$40
; control flow target
$D1A0:65 02	ADC $02
$D1A2:9D 30 07	STA $0730,X	; ($10 ? #$24 : #$20) + high byte of multiplication result from line $D180
$D1A5:E8	INX
$D1A6:E8	INX
$D1A7:84 24	STY $24	; ($10 ? #$40 : #$00)
$D1A9:68	PLA	; restore value of A ($10 & #$1F)
$D1AA:4A	LSR
$D1AB:4A	LSR
$D1AC:26 06	ROL $06
$D1AE:65 24	ADC $24
$D1B0:85 24	STA $24
$D1B2:60	RTS

; control flow target
$D1B3:A9 30	LDA #$30
$D1B5:85 0D	STA $0D
$D1B7:A9 51	LDA #$51
$D1B9:20 F8 CF	JSR $CFF8
$D1BC:AA	TAX
$D1BD:A5 2F	LDA $2F
$D1BF:0A	ASL
$D1C0:65 2F	ADC $2F
$D1C2:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$D1C5:86 06	STX $06
$D1C7:85 07	STA $07
$D1C9:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$D1CC:86 3E	STX $3E
$D1CE:85 3F	STA $3F
$D1D0:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$D1D3:86 40	STX $40
$D1D5:85 41	STA $41
$D1D7:A0 00	LDY #$00
$D1D9:B1 3E	LDA ($3E),Y
$D1DB:85 48	STA $48
$D1DD:C8	INY
$D1DE:B1 3E	LDA ($3E),Y
$D1E0:85 49	STA $49
; control flow target
$D1E2:A0 00	LDY #$00
; control flow target
$D1E4:B1 06	LDA ($06),Y
$D1E6:C8	INY
$D1E7:84 02	STY $02
$D1E9:48	PHA
$D1EA:2A	ROL
$D1EB:2A	ROL
$D1EC:2A	ROL
$D1ED:29 03	AND #$03
$D1EF:20 A2 D7	JSR $D7A2
; data, probably a jump table
$D1F2:26 D2	; $D226
$D1F4:FA D1	; $D1FA
$D1F6:04 D2	; $D204
$D1F8:0E D2	; $D20E

; control flow target
$D1FA:68	PLA
$D1FB:20 1D D2	JSR $D21D
$D1FE:9D 10 07	STA $0710,X
$D201:4C E4 D1	JMP $D1E4
; control flow target
$D204:68	PLA
$D205:20 1D D2	JSR $D21D
$D208:9D C0 04	STA $04C0,X
$D20B:4C E4 D1	JMP $D1E4
; control flow target
$D20E:A4 02	LDY $02
$D210:B1 06	LDA ($06),Y
$D212:C8	INY
$D213:AA	TAX
$D214:B1 06	LDA ($06),Y
$D216:86 06	STX $06
$D218:85 07	STA $07
$D21A:68	PLA
$D21B:D0 C5	BNE $D1E2
; control flow target
$D21D:29 3F	AND #$3F
$D21F:AA	TAX
$D220:A4 02	LDY $02
$D222:B1 06	LDA ($06),Y
$D224:C8	INY
$D225:60	RTS

; control flow target
$D226:18	CLC
$D227:A5 02	LDA $02
$D229:65 06	ADC $06
$D22B:85 06	STA $06
$D22D:90 02	BCC $D231
$D22F:E6 07	INC $07
; control flow target
$D231:68	PLA
$D232:20 CA D2	JSR $D2CA
$D235:84 0B	STY $0B
$D237:A9 05	LDA #$05
$D239:85 0C	STA $0C
$D23B:A9 0A	LDA #$0A
$D23D:85 0F	STA $0F	; currentTextBufferPosition
$D23F:A5 0D	LDA $0D
$D241:85 0E	STA $0E
; control flow target
$D243:20 8E D2	JSR $D28E
$D246:30 08	BMI $D250
$D248:85 03	STA $03
$D24A:20 5F D2	JSR $D25F
$D24D:90 F4	BCC $D243
$D24F:60	RTS

; control flow target
$D250:20 8E D2	JSR $D28E
$D253:AA	TAX
; control flow target
$D254:A5 03	LDA $03
$D256:20 5F D2	JSR $D25F
$D259:CA	DEX
$D25A:D0 F8	BNE $D254
$D25C:90 E5	BCC $D243
$D25E:60	RTS

; control flow target
$D25F:A0 00	LDY #$00
$D261:91 0B	STA ($0B),Y
$D263:E6 0B	INC $0B
$D265:D0 02	BNE $D269
$D267:E6 0C	INC $0C
; control flow target
$D269:C6 0E	DEC $0E
$D26B:F0 02	BEQ $D26F
; control flow target
$D26D:18	CLC
$D26E:60	RTS

; control flow target
$D26F:A9 30	LDA #$30
$D271:38	SEC
$D272:E5 0D	SBC $0D
$D274:F0 09	BEQ $D27F
$D276:18	CLC
$D277:65 0B	ADC $0B
$D279:85 0B	STA $0B
$D27B:90 02	BCC $D27F
$D27D:E6 0C	INC $0C
; control flow target
$D27F:A5 0D	LDA $0D
$D281:85 0E	STA $0E
$D283:C6 0F	DEC $0F	; currentTextBufferPosition
$D285:10 E6	BPL $D26D
$D287:38	SEC
$D288:60	RTS

; new game / continue screen tilemap encoding
; lut for ($06),Y at $D2A5
$D289:00	; +0; 00 - 10: $7F, $81, $FC
$D28A:03	; +3; 11000 - 11110: $FD, 9, i, e, y, u, $DF
$D28B:0A	; +10; 111110000 - 111111110:
$D28C:19	; +25; 11111111100000 - 11111111111110
$D28D:38	; +56; 11111111111111000000 - 11111111111111111110
; +119

; read Huffman string from ($D8), convert to bytes based on ($06) and $D289-$D28D
; control flow target
$D28E:A2 03	LDX #$03
$D290:86 04	STX $04
$D292:CA	DEX	; X = #$02
; control flow target
$D293:20 A8 D2	JSR $D2A8	; update stringBitWidth from X and read the next stringBitWidth bits from curStringByte into A; we start off reading 2 bits, but read an extra bit each iteration
$D296:C5 04	CMP $04	; $04 is a string of X 1s...
$D298:D0 06	BNE $D2A0	; ... so this branch gets taken the first time the low X bits of A contain a 0
$D29A:E8	INX
$D29B:38	SEC
$D29C:26 04	ROL $04	; this can happen at most 7 times until the orignal #$03 gets rotated into C, but anything over 4 times causes $D2A1 to start reading code instead of data
$D29E:90 F3	BCC $D293
; control flow target
$D2A0:18	CLC
$D2A1:7D 87 D2	ADC $D287,X	; at this point we must have #$02 <= X <= #$06
$D2A4:A8	TAY
$D2A5:B1 06	LDA ($06),Y
$D2A7:60	RTS

; update stringBitWidth from X and read the next stringBitWidth bits from curStringByte into A
; control flow target
$D2A8:86 05	STX $05
; read the next X bits from curStringByte into A
; IN: X = stringBitWidth
; curStringBitNum keeps track of which bit number of curStringByte we're reading
; curStringByte contains the current byte being read; it gets consumed via ASL
; curStringAddr contains the 16-bit address of the full data string
; OUT: A = the next stringBitWidth bits of curStringByte
; control flow target
$D2AA:A9 00	LDA #$00	; A = Y = #$00
$D2AC:A8	TAY
; control flow target
$D2AD:C6 16	DEC $16	; curStringBitNum
$D2AF:10 10	BPL $D2C1	; if curStringBitNum < #$00, reset curStringBitNum to #$07 and update curStringAddr
$D2B1:48	PHA
$D2B2:A9 07	LDA #$07
$D2B4:85 16	STA $16	; curStringBitNum
$D2B6:B1 D8	LDA ($D8),Y
$D2B8:85 17	STA $17	; curStringByte
$D2BA:E6 D8	INC $D8	; 16-bit curStringAddr++
$D2BC:D0 02	BNE $D2C0
$D2BE:E6 D9	INC $D9
; control flow target
$D2C0:68	PLA
; at this point, curStringByte has the right data
; control flow target
$D2C1:06 17	ASL $17	; shift high bit of curStringByte into C
$D2C3:2A	ROL	; shift C into low bit of A
$D2C4:CA	DEX
$D2C5:D0 E6	BNE $D2AD
$D2C7:A6 05	LDX $05	; we consumed X as our loop counter, so restore the old value of stringBitWidth
$D2C9:60	RTS

; control flow target
$D2CA:18	CLC
$D2CB:65 06	ADC $06
$D2CD:85 D8	STA $D8
$D2CF:A9 00	LDA #$00
$D2D1:85 16	STA $16
$D2D3:A8	TAY
$D2D4:65 07	ADC $07
$D2D6:85 D9	STA $D9
$D2D8:60	RTS

; control flow target
$D2D9:A2 0D	LDX #$0D
$D2DB:86 02	STX $02
$D2DD:A2 00	LDX #$00
; control flow target
$D2DF:85 03	STA $03
$D2E1:84 04	STY $04
$D2E3:A0 00	LDY #$00
; control flow target
$D2E5:8A	TXA
$D2E6:29 03	AND #$03
$D2E8:D0 04	BNE $D2EE
$D2EA:A9 0F	LDA #$0F
$D2EC:D0 03	BNE $D2F1
; control flow target
$D2EE:B1 03	LDA ($03),Y
$D2F0:C8	INY
; control flow target
$D2F1:9D 10 07	STA $0710,X
$D2F4:E8	INX
$D2F5:E4 02	CPX $02
$D2F7:90 EC	BCC $D2E5
; $22 |= #$01
; control flow target
$D2F9:A9 01	LDA #$01
$D2FB:05 22	ORA $22
$D2FD:85 22	STA $22
$D2FF:60	RTS

; initialize a bunch of stuff
; control flow target
$D300:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$D303:20 94 D3	JSR $D394	; turn off a bunch of PPU stuff, set PPU_Control_Register_2_settings to #$00
$D306:20 70 D3	JSR $D370	; STZ to $21-$23, $25, $28, set scrolling to 0
$D309:4C 4E D3	JMP $D34E	; BRA

; control flow target
$D30C:20 BE F5	JSR $F5BE
; control flow target
$D30F:A5 FF	LDA $FF	; PPU_Control_Register_1_settings
$D311:09 80	ORA #$80
$D313:20 8E D3	JSR $D38E
$D316:A9 1E	LDA #$1E
$D318:85 FE	STA $FE	; PPU_Control_Register_2_settings
$D31A:4C 19 D4	JMP $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
; control flow target
$D31D:20 39 E7	JSR $E739	; initialize mapper stuff
$D320:20 52 F6	JSR $F652	; STZ to $8E, $94-$97, $99-$9A, pAPU stuff
$D323:20 89 D3	JSR $D389	; STZ to $21-$23, $25, $28, set scrolling to 0, set PPU_Control_Register_1_settings = select 8x8 sprites, background pattern table #1, sprite pattern table #0, PPU auto-increment by 1, name table #0
$D326:20 94 D3	JSR $D394	; turn off a bunch of PPU stuff, set PPU_Control_Register_2_settings to #$00
$D329:A2 04	LDX #$04
$D32B:A9 00	LDA #$00
$D32D:A0 FA	LDY #$FA
$D32F:20 D0 D3	JSR $D3D0	; fill (A * 256 + X) with Y #$00's, i.e. STZ to $04-$FD
$D332:A2 00	LDX #$00
$D334:A9 01	LDA #$01
$D336:A0 C0	LDY #$C0
$D338:20 D0 D3	JSR $D3D0	; fill (A * 256 + X) with Y #$00's, i.e. STZ to $0100-$01BF
$D33B:85 02	STA $02	; at this point, A = Y = #$00
$D33D:A2 02	LDX #$02
; control flow target
; $D33F - $D34B are STZ to $0200 - $07FF
$D33F:86 03	STX $03	; save X to $03 even though nothing changes it
$D341:20 D4 D3	JSR $D3D4	; fill ($02) with Y #$00's
$D344:A6 03	LDX $03	; load X from $03, even though nothing changed it
$D346:E8	INX
$D347:E0 08	CPX #$08
$D349:90 F4	BCC $D33F
$D34B:20 C2 D3	JSR $D3C2	; fill $0710-$072F with #$0F
; control flow target
$D34E:20 9C D3	JSR $D39C	; set VRAM $2000-$27FF to #$7F, set some PPU/VRAM registers
$D351:20 F5 D7	JSR $D7F5	; set some PPU/VRAM registers - but we already did this as part of $D39C :/
$D354:A9 00	LDA #$00
$D356:F0 02	BEQ $D35A	; BRA
; control flow target
$D358:A9 30	LDA #$30
; write #$F8 to $020[048C],A up to $02FC
; control flow target
$D35A:A8	TAY
$D35B:A9 F8	LDA #$F8
$D35D:99 00 02	STA $0200,Y
$D360:99 04 02	STA $0204,Y
$D363:99 08 02	STA $0208,Y
$D366:99 0C 02	STA $020C,Y
$D369:98	TYA
$D36A:18	CLC
$D36B:69 10	ADC #$10
$D36D:D0 EB	BNE $D35A
$D36F:60	RTS

; STZ to $21-$23, $25, $28, set scrolling to 0
; control flow target
$D370:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D373:A9 00	LDA #$00
$D375:8D 03 20	STA $2003	; SPR-RAM Address Register
$D378:85 21	STA $21
$D37A:85 22	STA $22
$D37C:85 23	STA $23
$D37E:85 28	STA $28
$D380:85 25	STA $25
$D382:8D 05 20	STA $2005	; VRAM Address Register #1 (vertical scroll)
$D385:8D 05 20	STA $2005	; VRAM Address Register #1 (horizonal scroll)
$D388:60	RTS

; control flow target
$D389:20 70 D3	JSR $D370	; STZ to $21-$23, $25, $28, set scrolling to 0
; control flow target
$D38C:A9 10	LDA #$10	; select 8x8 sprites, background pattern table #1, sprite pattern table #0, PPU auto-increment by 1, name table #0
; control flow target
$D38E:8D 00 20	STA $2000	; PPU Control Register #1
$D391:85 FF	STA $FF	; PPU_Control_Register_1_settings
$D393:60	RTS

; turn off a bunch of PPU stuff, set PPU_Control_Register_2_settings to #$00
; control flow target
$D394:A9 00	LDA #$00
$D396:8D 01 20	STA $2001	; PPU Control Register 2 (turn everything off)
$D399:85 FE	STA $FE	; PPU_Control_Register_2_settings
$D39B:60	RTS

; set VRAM $2000-$27FF to #$7F, set some PPU/VRAM registers
; control flow target
$D39C:A9 20	LDA #$20
$D39E:20 A9 D3	JSR $D3A9	; write #$7F to VRAM #$400 times starting at address A * 256
$D3A1:A9 24	LDA #$24
$D3A3:20 A9 D3	JSR $D3A9	; write #$7F to VRAM #$400 times starting at address A * 256
$D3A6:4C F5 D7	JMP $D7F5	; set some PPU/VRAM registers

; write #$7F to VRAM #$400 times starting at address A * 256
; control flow target
$D3A9:AE 02 20	LDX $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D3AC:8D 06 20	STA $2006	; VRAM Address Register #2 - high byte
$D3AF:A2 00	LDX #$00
$D3B1:8E 06 20	STX $2006	; VRAM Address Register #2 - low byte
; write #$7F to VRAM #$400 times
$D3B4:A0 04	LDY #$04
$D3B6:A9 7F	LDA #$7F
; control flow target
$D3B8:8D 07 20	STA $2007	; VRAM I/O Register
$D3BB:CA	DEX
$D3BC:D0 FA	BNE $D3B8
$D3BE:88	DEY
$D3BF:D0 F7	BNE $D3B8
$D3C1:60	RTS

; fill $0710-$072F with #$0F
; control flow target
$D3C2:A9 10	LDA #$10
$D3C4:85 02	STA $02
$D3C6:A9 07	LDA #$07
$D3C8:85 03	STA $03
$D3CA:A0 20	LDY #$20
$D3CC:A9 0F	LDA #$0F
$D3CE:D0 06	BNE $D3D6
; fill (A * 256 + X) with Y #$00's
; control flow target
$D3D0:86 02	STX $02
$D3D2:85 03	STA $03
; fill ($02) with Y #$00's
; control flow target
$D3D4:A9 00	LDA #$00
; fill ($02) with A Y times
; control flow target
$D3D6:88	DEY
$D3D7:91 02	STA ($02),Y
$D3D9:D0 FB	BNE $D3D6
$D3DB:60	RTS

; $22 = #$C0 | $22
; control flow target
$D3DC:A9 C0	LDA #$C0
; $22 = A | $22
; control flow target
$D3DE:05 22	ORA $22
$D3E0:85 22	STA $22
$D3E2:60	RTS

; control flow target
$D3E3:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
; control flow target
$D3E6:A2 FF	LDX #$FF
; control flow target
$D3E8:CA	DEX
$D3E9:D0 FD	BNE $D3E8
; control flow target
$D3EB:2C 02 20	BIT $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D3EE:50 FB	BVC $D3EB
$D3F0:A2 04	LDX #$04
; control flow target
$D3F2:CA	DEX
$D3F3:D0 FD	BNE $D3F2
$D3F5:A5 28	LDA $28
$D3F7:29 3F	AND #$3F
$D3F9:0A	ASL
$D3FA:0A	ASL
$D3FB:0A	ASL
$D3FC:05 25	ORA $25
$D3FE:8D 05 20	STA $2005	; VRAM Address Register #1 (vertical scroll)
$D401:A9 30	LDA #$30
$D403:8D 05 20	STA $2005	; VRAM Address Register #1 (horizontal scroll)
$D406:A9 00	LDA #$00
$D408:2A	ROL
$D409:05 FF	ORA $FF	; PPU_Control_Register_1_settings
$D40B:8D 00 20	STA $2000	; PPU Control Register #1
$D40E:60	RTS

; control flow target
$D40F:85 02	STA $02
; control flow target
$D411:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$D414:C6 02	DEC $02
$D416:D0 F9	BNE $D411
$D418:60	RTS

; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
; control flow target
$D419:A5 22	LDA $22	; $21 = $22
$D41B:85 21	STA $21
$D41D:A9 00	LDA #$00	; STZ to $20,$22,$23,$29,$2A,$FD
$D41F:85 2A	STA $2A
$D421:85 29	STA $29
$D423:85 23	STA $23
$D425:85 20	STA $20
$D427:85 22	STA $22
$D429:85 FD	STA $FD
; control flow target
$D42B:A5 20	LDA $20	; busy loop until something else (must be IRQ somewhere) sets $20
$D42D:F0 FC	BEQ $D42B
$D42F:60	RTS

; this happens during IRQ and is the main interrupt handler
$D430:48	PHA	; save register state to stack
$D431:98	TYA
$D432:48	PHA
$D433:8A	TXA
$D434:48	PHA
$D435:A5 FE	LDA $FE	; PPU_Control_Register_2_settings
$D437:F0 32	BEQ $D46B
$D439:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D43C:A9 00	LDA #$00
$D43E:8D 01 20	STA $2001	; PPU Control Register #2 - #$00 sets this to display nothing
$D441:8D 03 20	STA $2003	; SPR-RAM Address Register - set to #$00
$D444:A9 02	LDA #$02
$D446:8D 14 40	STA $4014	; Sprite DMA Register - transfer 256 bytes starting at $100 * #$02 = $200
$D449:A5 21	LDA $21
$D44B:F0 16	BEQ $D463
$D44D:0A	ASL
$D44E:90 05	BCC $D455
$D450:48	PHA
$D451:20 BA D4	JSR $D4BA
$D454:68	PLA
; control flow target
$D455:0A	ASL
$D456:90 03	BCC $D45B
$D458:20 FF D4	JSR $D4FF
; control flow target
$D45B:A5 21	LDA $21
$D45D:4A	LSR
$D45E:90 03	BCC $D463
$D460:20 8A D4	JSR $D48A
; control flow target
$D463:20 F5 D7	JSR $D7F5	; set some PPU/VRAM registers
$D466:A5 FE	LDA $FE	; PPU_Control_Register_2_settings
$D468:8D 01 20	STA $2001	; PPU Control Register #2
; control flow target
$D46B:A5 FD	LDA $FD
$D46D:D0 03	BNE $D472
$D46F:20 6B F6	JSR $F66B
; control flow target
$D472:20 B8 D7	JSR $D7B8
$D475:A2 00	LDX #$00
$D477:86 21	STX $21
$D479:E8	INX
$D47A:86 20	STX $20
$D47C:68	PLA	; restore register state from stack
$D47D:AA	TAX
$D47E:68	PLA
$D47F:A8	TAY
$D480:68	PLA
$D481:40	RTI

; this happens during IRQ
; control flow target
$D482:A5 FF	LDA $FF	; PPU_Control_Register_1_settings
$D484:29 FB	AND #$FB
$D486:8D 00 20	STA $2000	; PPU Control Register #1
$D489:60	RTS

; this happens during IRQ
; control flow target
$D48A:20 82 D4	JSR $D482
$D48D:A2 10	LDX #$10
$D48F:20 94 D4	JSR $D494
$D492:A2 00	LDX #$00
; control flow target
$D494:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D497:A9 3F	LDA #$3F
$D499:8D 06 20	STA $2006	; VRAM Address Register #2 - high byte
$D49C:8E 06 20	STX $2006	; VRAM Address Register #2 - low byte
$D49F:A0 10	LDY #$10
; control flow target
$D4A1:BD 10 07	LDA $0710,X
$D4A4:8D 07 20	STA $2007	; VRAM I/O Register
$D4A7:E8	INX
$D4A8:88	DEY
$D4A9:D0 F6	BNE $D4A1
$D4AB:A9 3F	LDA #$3F
$D4AD:8D 06 20	STA $2006	; VRAM Address Register #2 - high byte
$D4B0:8C 06 20	STY $2006	; VRAM Address Register #2 - low byte
$D4B3:8C 06 20	STY $2006	; VRAM Address Register #2 - high byte
$D4B6:8C 06 20	STY $2006	; VRAM Address Register #2 - low byte
; control flow target
$D4B9:60	RTS

; this happens during IRQ
; control flow target
$D4BA:A0 00	LDY #$00
; control flow target
$D4BC:B9 30 07	LDA $0730,Y
$D4BF:30 F8	BMI $D4B9
$D4C1:8D 06 20	STA $2006	; VRAM Address Register #2 - high byte
$D4C4:C8	INY
$D4C5:B9 30 07	LDA $0730,Y
$D4C8:8D 06 20	STA $2006	; VRAM Address Register #2 - low byte
$D4CB:C8	INY
$D4CC:B9 30 07	LDA $0730,Y
$D4CF:C8	INY
$D4D0:0A	ASL
$D4D1:AA	TAX
$D4D2:A5 FF	LDA $FF	; PPU_Control_Register_1_settings
$D4D4:29 FB	AND #$FB
$D4D6:90 02	BCC $D4DA
$D4D8:09 04	ORA #$04
; control flow target
$D4DA:8D 00 20	STA $2000	; PPU Control Register #1
$D4DD:8A	TXA
$D4DE:0A	ASL
$D4DF:B0 0F	BCS $D4F0
$D4E1:4A	LSR
$D4E2:4A	LSR
$D4E3:AA	TAX
; control flow target
$D4E4:B9 30 07	LDA $0730,Y
$D4E7:C8	INY
$D4E8:8D 07 20	STA $2007	; VRAM I/O Register
$D4EB:CA	DEX
$D4EC:D0 F6	BNE $D4E4
$D4EE:F0 CC	BEQ $D4BC
; control flow target
$D4F0:4A	LSR
$D4F1:4A	LSR
$D4F2:AA	TAX
$D4F3:B9 30 07	LDA $0730,Y
$D4F6:C8	INY
; control flow target
$D4F7:8D 07 20	STA $2007	; VRAM I/O Register
$D4FA:CA	DEX
$D4FB:D0 FA	BNE $D4F7
$D4FD:F0 BD	BEQ $D4BC
; control flow target
$D4FF:20 82 D4	JSR $D482
$D502:A2 08	LDX #$08
$D504:A5 24	LDA $24
$D506:A0 23	LDY #$23
$D508:C9 40	CMP #$40
$D50A:90 02	BCC $D50E
$D50C:A0 27	LDY #$27
; control flow target
$D50E:84 00	STY $00
; control flow target
$D510:A4 00	LDY $00
$D512:8C 06 20	STY $2006	; VRAM Address Register #2 - high byte
$D515:A8	TAY
$D516:09 C0	ORA #$C0
$D518:8D 06 20	STA $2006	; VRAM Address Register #2 - low byte
$D51B:B9 80 07	LDA $0780,Y
$D51E:8D 07 20	STA $2007	; VRAM I/O Register
$D521:CA	DEX
$D522:F0 95	BEQ $D4B9
$D524:98	TYA
$D525:18	CLC
$D526:69 08	ADC #$08
$D528:29 7F	AND #$7F
$D52A:4C 10 D5	JMP $D510	; BRA

; data, it's used but I'm not sure what for
$D52D:F8
$D52E:18
$D52F:A0
$D530:60
$D531:60
$D532:A0

; control flow target
$D533:20 BC CF	JSR $CFBC
$D536:A5 DE	LDA $DE
$D538:C9 0B	CMP #$0B
$D53A:D0 0A	BNE $D546
$D53C:A5 2F	LDA $2F
$D53E:C9 04	CMP #$04
$D540:D0 04	BNE $D546
$D542:A9 0E	LDA #$0E
$D544:85 DE	STA $DE
; control flow target
$D546:A0 00	LDY #$00
; control flow target
$D548:B1 3C	LDA ($3C),Y
$D54A:10 07	BPL $D553
$D54C:AA	TAX
$D54D:29 3F	AND #$3F
$D54F:C5 DE	CMP $DE
$D551:F0 03	BEQ $D556
; control flow target
$D553:C8	INY
$D554:D0 F2	BNE $D548
; control flow target
$D556:8A	TXA
$D557:0A	ASL
$D558:10 04	BPL $D55E
$D55A:A9 01	LDA #$01
$D55C:85 4D	STA $4D
; control flow target
$D55E:B1 3A	LDA ($3A),Y
$D560:AA	TAX
$D561:29 0F	AND #$0F
$D563:85 44	STA $44
$D565:8A	TXA
$D566:29 F0	AND #$F0
$D568:4A	LSR
$D569:4A	LSR
$D56A:4A	LSR
$D56B:4A	LSR
$D56C:85 02	STA $02
$D56E:B1 38	LDA ($38),Y
$D570:29 F0	AND #$F0
$D572:05 02	ORA $02
$D574:A6 44	LDX $44
$D576:E0 0B	CPX #$0B
$D578:90 58	BCC $D5D2
$D57A:85 2F	STA $2F
$D57C:A5 59	LDA $59
$D57E:F0 0B	BEQ $D58B
$D580:29 03	AND #$03
$D582:AA	TAX
$D583:BD 2F D5	LDA $D52F,X
$D586:18	CLC
$D587:65 65	ADC $65
$D589:D0 0C	BNE $D597
; control flow target
$D58B:B1 38	LDA ($38),Y
$D58D:0A	ASL
$D58E:0A	ASL
$D58F:0A	ASL
$D590:0A	ASL
$D591:A6 4D	LDX $4D
$D593:F0 02	BEQ $D597
$D595:09 06	ORA #$06
; control flow target
$D597:85 65	STA $65
$D599:B1 36	LDA ($36),Y
$D59B:A2 10	LDX #$10
$D59D:20 6A D7	JSR $D76A	; multiplies A by X, returning low byte in $03 and high byte in A
$D5A0:85 11	STA $11
$D5A2:A5 03	LDA $03
$D5A4:85 10	STA $10
$D5A6:20 5C D6	JSR $D65C
$D5A9:A9 00	LDA #$00
$D5AB:85 30	STA $30
$D5AD:20 13 D6	JSR $D613
; control flow target
$D5B0:86 26	STX $26
$D5B2:84 27	STY $27
$D5B4:A5 10	LDA $10
$D5B6:85 63	STA $63
$D5B8:A5 11	LDA $11
$D5BA:85 64	STA $64
; control flow target
$D5BC:A9 00	LDA #$00
$D5BE:85 2A	STA $2A
$D5C0:85 28	STA $28
$D5C2:85 29	STA $29
$D5C4:20 31 CE	JSR $CE31
$D5C7:A5 2A	LDA $2A
$D5C9:85 25	STA $25
$D5CB:A5 29	LDA $29
$D5CD:F0 02	BEQ $D5D1
$D5CF:85 28	STA $28
; control flow target
$D5D1:60	RTS

; control flow target
$D5D2:86 30	STX $30
$D5D4:A2 00	LDX #$00
$D5D6:86 11	STX $11
$D5D8:B1 3C	LDA ($3C),Y
$D5DA:85 32	STA $32
$D5DC:B1 38	LDA ($38),Y
$D5DE:85 31	STA $31
$D5E0:B1 36	LDA ($36),Y
$D5E2:C9 FF	CMP #$FF
$D5E4:F0 03	BEQ $D5E9
$D5E6:20 2F D6	JSR $D62F	; when entering a room
; control flow target
$D5E9:A9 B0	LDA #$B0
$D5EB:85 65	STA $65
$D5ED:A2 01	LDX #$01
$D5EF:A0 20	LDY #$20
$D5F1:A5 45	LDA $45
$D5F3:C5 32	CMP $32
$D5F5:D0 03	BNE $D5FA
$D5F7:E8	INX
$D5F8:A0 E0	LDY #$E0
; control flow target
$D5FA:20 8A C7	JSR $C78A
$D5FD:84 10	STY $10
$D5FF:A5 46	LDA $46
$D601:85 45	STA $45
$D603:A2 60	LDX #$60
$D605:A0 00	LDY #$00
$D607:A5 30	LDA $30
$D609:C9 01	CMP #$01
$D60B:D0 A3	BNE $D5B0
$D60D:A2 10	LDX #$10
$D60F:A0 30	LDY #$30
$D611:D0 9D	BNE $D5B0
; control flow target
$D613:A0 50	LDY #$50
$D615:A6 2F	LDX $2F
$D617:A5 DF	LDA $DF	; location
$D619:C9 08	CMP #$08
$D61B:F0 08	BEQ $D625
$D61D:C9 0B	CMP #$0B
$D61F:D0 0B	BNE $D62C
$D621:E0 05	CPX #$05
$D623:90 07	BCC $D62C
; control flow target
$D625:E0 09	CPX #$09
$D627:B0 03	BCS $D62C
$D629:A2 30	LDX #$30
$D62B:60	RTS

; control flow target
$D62C:A2 10	LDX #$10
$D62E:60	RTS

; this happens when entering a room
; control flow target
$D62F:A6 DF	LDX $DF	; location
$D631:20 46 D6	JSR $D646
$D634:20 03 DB	JSR $DB03	; script engine function execution loop
$D637:A5 10	LDA $10	; NPC ID
$D639:C9 FF	CMP #$FF	; #$FF = no NPC
$D63B:F0 08	BEQ $D645	; if no NPC, RTS
$D63D:8D 0B 04	STA $040B	; else, save NPC ID to $040B
$D640:A9 01	LDA #$01
$D642:8D 00 04	STA $0400	; and #$01 to $0400
; control flow target
$D645:60	RTS

; this happens when entering a room
; control flow target
$D646:48	PHA	; save A on the stack
$D647:A9 05	LDA #$05
$D649:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$D64C:8A	TXA
$D64D:A2 00	LDX #$00
$D64F:20 4B D7	JSR $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
$D652:A8	TAY
$D653:68	PLA	; restore A from the stack
$D654:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$D657:86 42	STX $42	; set mainStringAddr
$D659:85 43	STA $43
$D65B:60	RTS

; control flow target
$D65C:A5 44	LDA $44
$D65E:38	SEC
$D65F:E9 0B	SBC #$0B
$D661:B0 02	BCS $D665
$D663:A9 00	LDA #$00
; control flow target
$D665:20 A2 D7	JSR $D7A2

; data, probably a jump table
$D668:7B D6	; $D67B
$D66A:D1 D5	; $D5D1
$D66C:72 D6	; $D672
$D66E:72 D6	; $D672
$D670:D1 D5	; $D5D1

; control flow target
$D672:A2 00	LDX #$00
$D674:A5 63	LDA $63
$D676:29 0F	AND #$0F
$D678:4C 6E C8	JMP $C86E
; control flow target
$D67B:A2 00	LDX #$00
$D67D:A4 4F	LDY $4F
$D67F:88	DEY
$D680:B9 2D D5	LDA $D52D,Y
$D683:4C 6E C8	JMP $C86E
; control flow target
$D686:A8	TAY
$D687:20 09 E7	JSR $E709
$D68A:A5 11	LDA $11
$D68C:85 03	STA $03
$D68E:A5 10	LDA $10
$D690:46 03	LSR $03
$D692:6A	ROR
$D693:46 03	LSR $03
$D695:6A	ROR
$D696:4A	LSR
$D697:4A	LSR
$D698:85 02	STA $02
$D69A:B9 D5 D6	LDA $D6D5,Y
$D69D:18	CLC
$D69E:65 12	ADC $12
$D6A0:4A	LSR
$D6A1:4A	LSR
$D6A2:4A	LSR
$D6A3:4A	LSR
$D6A4:85 03	STA $03
$D6A6:A0 04	LDY #$04
; control flow target
$D6A8:B1 3E	LDA ($3E),Y
$D6AA:C8	INY
$D6AB:84 04	STY $04
$D6AD:AA	TAX
$D6AE:29 7F	AND #$7F
$D6B0:38	SEC
$D6B1:F0 18	BEQ $D6CB
$D6B3:A8	TAY
$D6B4:88	DEY
$D6B5:B1 36	LDA ($36),Y
$D6B7:C5 02	CMP $02
$D6B9:D0 08	BNE $D6C3
$D6BB:B1 38	LDA ($38),Y
$D6BD:29 0F	AND #$0F
$D6BF:C5 03	CMP $03
$D6C1:F0 09	BEQ $D6CC
; control flow target
$D6C3:8A	TXA
$D6C4:30 04	BMI $D6CA
$D6C6:A4 04	LDY $04
$D6C8:D0 DE	BNE $D6A8
; control flow target
$D6CA:38	SEC
; control flow target
$D6CB:60	RTS

; control flow target
$D6CC:B1 3C	LDA ($3C),Y
$D6CE:85 46	STA $46
$D6D0:C8	INY
$D6D1:84 45	STY $45
$D6D3:18	CLC
$D6D4:60	RTS

; data, it's used but I'm not sure what for
$D6D5:20
$D6D6:20
$D6D7:00

; control flow target
$D6D8:A9 03	LDA #$03
$D6DA:85 33	STA $33
$D6DC:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$D6DF:A9 10	LDA #$10
$D6E1:A6 30	LDX $30
$D6E3:CA	DEX
$D6E4:D0 01	BNE $D6E7
$D6E6:0A	ASL
; control flow target
$D6E7:48	PHA
$D6E8:86 04	STX $04
$D6EA:A2 18	LDX #$18
$D6EC:A5 DF	LDA $DF	; location
$D6EE:20 4B D7	JSR $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
$D6F1:A8	TAY
$D6F2:A5 04	LDA $04
$D6F4:0A	ASL
$D6F5:18	CLC
$D6F6:65 04	ADC $04
$D6F8:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$D6FB:86 06	STX $06
$D6FD:85 07	STA $07
$D6FF:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$D702:86 04	STX $04
$D704:85 05	STA $05
$D706:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$D709:A8	TAY
$D70A:A9 00	LDA #$00
$D70C:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$D70F:20 34 D1	JSR $D134	; STX $34, STA $35
$D712:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$D715:20 A1 CF	JSR $CFA1
$D718:A5 04	LDA $04
$D71A:A4 05	LDY $05
$D71C:20 D9 D2	JSR $D2D9
$D71F:68	PLA
$D720:60	RTS

; STA $0730,X, INX, TYA, STA $0730,X, INX
; control flow target
$D721:9D 30 07	STA $0730,X
$D724:E8	INX
$D725:98	TYA
; STA $0730,X, INX
; control flow target
$D726:9D 30 07	STA $0730,X
$D729:E8	INX
; control flow target
$D72A:60	RTS

; STA $0730,X, INX, $23 = X, $0730,X = #$80, $22 = $22 | #$80
; control flow target
$D72B:20 26 D7	JSR $D726	; STA $0730,X, INX
; $23 = X, $0730,X = #$80, $22 = #$80 | $22
; control flow target
$D72E:86 23	STX $23
$D730:A9 80	LDA #$80
$D732:9D 30 07	STA $0730,X
$D735:4C DE D3	JMP $D3DE	; $22 = A | $22

; control flow target
$D738:88	DEY
$D739:30 EF	BMI $D72A
$D73B:9D 30 07	STA $0730,X
$D73E:E8	INX
$D73F:D0 F7	BNE $D738

; control flow target
; given A, sets Y = A << 1, X = $8000,Y, and A = $8001,Y
$D741:0A	ASL
$D742:A8	TAY
$D743:B9 00 80	LDA $8000,Y
$D746:AA	TAX
$D747:B9 01 80	LDA $8001,Y
$D74A:60	RTS

; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
; control flow target
$D74B:48	PHA
$D74C:BD 00 80	LDA $8000,X
$D74F:BC 01 80	LDY $8001,X
$D752:AA	TAX
$D753:68	PLA
; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
; control flow target
; given X and Y, set 16-bit $02-$03 to X * 256 + Y
$D754:86 02	STX $02
$D756:84 03	STY $03
; given A, set X to ($02),(A*2), A to ($02),(A*2+1), and INC $03 as appropriate
; control flow target
; given A, set Y = A << 1
$D758:0A	ASL
$D759:A8	TAY
; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
; control flow target
$D75A:B1 02	LDA ($02),Y
$D75C:AA	TAX
$D75D:C8	INY
$D75E:D0 02	BNE $D762
$D760:E6 03	INC $03
; given Y, set A = ($02),Y; Y++ and update $03 if Y overflowed
; control flow target
$D762:B1 02	LDA ($02),Y
$D764:C8	INY
$D765:D0 02	BNE $D769
$D767:E6 03	INC $03
; control flow target
$D769:60	RTS

; multiplies A by X, returning low byte in $03 and high byte in A
; after RTS, $02 and X are #$00 and $04 is the original value of A
; control flow target
$D76A:86 02	STX $02
$D76C:85 04	STA $04
$D76E:A9 00	LDA #$00
$D770:85 03	STA $03
$D772:A2 08	LDX #$08
; control flow target
$D774:46 02	LSR $02
$D776:90 03	BCC $D77B
$D778:18	CLC
$D779:65 04	ADC $04
; control flow target
$D77B:6A	ROR
$D77C:66 03	ROR $03
$D77E:CA	DEX
$D77F:D0 F3	BNE $D774
$D781:60	RTS

; unused?
$D782:20 DD D7	JSR $D7DD	; ask the RNG for a number
; divides A by X, returning quotient in $02 and remainder in A
; control flow target
$D785:85 02	STA $02
$D787:A9 00	LDA #$00
$D789:86 03	STX $03
$D78B:A2 09	LDX #$09
$D78D:D0 07	BNE $D796
; control flow target
$D78F:2A	ROL
$D790:C5 03	CMP $03
$D792:90 02	BCC $D796
$D794:E5 03	SBC $03
; control flow target
$D796:26 02	ROL $02
$D798:CA	DEX
$D799:D0 F4	BNE $D78F
$D79B:60	RTS

; control flow target
$D79C:49 FF	EOR #$FF
$D79E:18	CLC
$D79F:69 01	ADC #$01
$D7A1:60	RTS

; control flow target
$D7A2:0A	ASL
$D7A3:A8	TAY
$D7A4:C8	INY
$D7A5:68	PLA
$D7A6:85 2B	STA $2B
$D7A8:68	PLA
$D7A9:85 2C	STA $2C
$D7AB:B1 2B	LDA ($2B),Y
$D7AD:AA	TAX
$D7AE:C8	INY
$D7AF:B1 2B	LDA ($2B),Y
$D7B1:85 2C	STA $2C
$D7B3:86 2B	STX $2B
$D7B5:6C 2B 00	JMP ($2B)
; this happens during IRQ
; control flow target
$D7B8:A2 01	LDX #$01
$D7BA:8E 16 40	STX $4016	; Joypad #1
$D7BD:CA	DEX
$D7BE:8E 16 40	STX $4016	; Joypad #1
$D7C1:A2 08	LDX #$08
; control flow target
$D7C3:AD 16 40	LDA $4016	; Joypad #1
$D7C6:4A	LSR
$D7C7:26 F8	ROL $F8
$D7C9:4A	LSR
$D7CA:26 8F	ROL $8F
$D7CC:CA	DEX
$D7CD:D0 F4	BNE $D7C3
$D7CF:A5 8F	LDA $8F
$D7D1:05 F8	ORA $F8
$D7D3:A8	TAY
$D7D4:45 F9	EOR $F9
$D7D6:84 F9	STY $F9
$D7D8:25 F9	AND $F9
$D7DA:85 F8	STA $F8
$D7DC:60	RTS

; apparently this is the RNG
; control flow target
$D7DD:18	CLC
$D7DE:A5 DA	LDA $DA
$D7E0:29 48	AND #$48
$D7E2:F0 06	BEQ $D7EA
$D7E4:C9 48	CMP #$48
$D7E6:18	CLC
$D7E7:F0 01	BEQ $D7EA
$D7E9:38	SEC
; control flow target
$D7EA:26 DC	ROL $DC
$D7EC:26 DD	ROL $DD
$D7EE:26 DA	ROL $DA
$D7F0:26 DB	ROL $DB
$D7F2:A5 DA	LDA $DA
$D7F4:60	RTS

; set some PPU/VRAM registers
; control flow target
$D7F5:AD 02 20	LDA $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D7F8:A9 00	LDA #$00
$D7FA:8D 05 20	STA $2005	; VRAM Address Register #1 (vertical scroll)
$D7FD:A5 FB	LDA $FB
$D7FF:8D 05 20	STA $2005	; VRAM Address Register #1 (horizontal scroll)
$D802:A5 FF	LDA $FF	; PPU_Control_Register_1_settings
$D804:8D 00 20	STA $2000	; PPU Control Register #1
$D807:60	RTS

; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), messing with $03 if A > #$FD, then process the string located at (($8001),(A*2) + ($8000),(A*2))
; control flow target
$D808:A2 00	LDX #$00
$D80A:20 4B D7	JSR $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
; given A and X, process the string located at (A * 256 + X); string has format (<position high> <position low> <string length> <string>)+ #$FF, where the high bit of <string length> also controls PPU auto-increment and the second highest bit causes <string> to be repeated <string length> times
; control flow target
$D80D:86 00	STX $00
$D80F:85 01	STA $01
; control flow target
$D811:AE 02 20	LDX $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$D814:A0 00	LDY #$00
$D816:B1 00	LDA ($00),Y	; first byte of string position
$D818:30 DB	BMI $D7F5	; set some PPU/VRAM registers; this is the only path that reaches RTS - strings are terminated with #$FF
$D81A:8D 06 20	STA $2006	; VRAM Address Register #2 - high byte
$D81D:C8	INY
$D81E:B1 00	LDA ($00),Y	; second byte of string position
$D820:8D 06 20	STA $2006	; VRAM Address Register #2 - low byte
$D823:C8	INY
$D824:B1 00	LDA ($00),Y	; string length
$D826:C8	INY
$D827:0A	ASL
$D828:AA	TAX	; save string length * 2
$D829:A5 FF	LDA $FF	; PPU_Control_Register_1_settings
$D82B:09 04	ORA #$04	; set bit 2 (increment PPU by 1)
$D82D:B0 02	BCS $D831	; C is the high bit of string length
$D82F:29 FB	AND #$FB	; unset bit 2 (increment PPU by 32)
; control flow target
$D831:8D 00 20	STA $2000	; PPU Control Register #1
$D834:8A	TXA	; string length * 2
$D835:0A	ASL
$D836:B0 17	BCS $D84F	; C is the second highest bit of string length
$D838:4A	LSR
$D839:4A	LSR
$D83A:AA	TAX	; X = string length
; control flow target
$D83B:B1 00	LDA ($00),Y	; write next character of string to VRAM
$D83D:8D 07 20	STA $2007	; VRAM I/O Register
$D840:C8	INY
$D841:CA	DEX	; decrement remaining string length
$D842:D0 F7	BNE $D83B	; keep writing until remaining string length == 0
; control flow target
$D844:98	TYA
$D845:65 00	ADC $00
$D847:85 00	STA $00	; update low byte of string index
$D849:90 C6	BCC $D811	; if low byte didn't overflow, process the next substring
$D84B:E6 01	INC $01	; else, update high byte
$D84D:B0 C2	BCS $D811	; INC doesn't affect C, so this is BRA; process the next substring
; control flow target
$D84F:4A	LSR
$D850:4A	LSR
$D851:AA	TAX	; X = string length
$D852:B1 00	LDA ($00),Y	; write next character of string to VRAM X times
$D854:C8	INY
; control flow target
$D855:8D 07 20	STA $2007	; VRAM I/O Register
$D858:CA	DEX	; decrement remaining string length
$D859:D0 FA	BNE $D855	; keep writing until remaining string length == 0
$D85B:F0 E7	BEQ $D844	; BRA

; copy $D869-$D874 to $0200-$020B
; control flow target
$D85D:A2 0B	LDX #$0B
; control flow target
$D85F:BD 69 D8	LDA $D869,X
$D862:9D 00 02	STA $0200,X
$D865:CA	DEX
$D866:10 F7	BPL $D85F
$D868:60	RTS

; data, it's used but I'm not sure what for
$D869:2D 5B 22
$D86C:F8
$D86D:0B
$D86E:5C 03 64 0C
$D872:53 03
$D874:B4

; control flow target
$D875:A9 80	LDA #$80
$D877:85 02	STA $02
$D879:A9 07	LDA #$07
$D87B:85 03	STA $03
$D87D:A0 80	LDY #$80
$D87F:A9 FF	LDA #$FF
$D881:20 D6 D3	JSR $D3D6	; fill ($02) with A Y times
; control flow target
$D884:A9 00	LDA #$00
$D886:AE E2 03	LDX $03E2
$D889:F0 02	BEQ $D88D
$D88B:A9 01	LDA #$01
; control flow target
$D88D:20 94 D9	JSR $D994	; given A, process the A'th string from the pointer table located at $D99F
$D890:A2 00	LDX #$00
$D892:A5 4A	LDA $4A	; current HP
$D894:20 E1 D8	JSR $D8E1
$D897:A9 00	LDA #$00
$D899:20 A8 D8	JSR $D8A8
$D89C:20 BA D4	JSR $D4BA
; control flow target
$D89F:60	RTS

; control flow target
$D8A0:A6 23	LDX $23
$D8A2:D0 FB	BNE $D89F	; if $23 != #$00, RTS
$D8A4:A5 6B	LDA $6B
$D8A6:F0 22	BEQ $D8CA	; if $6B == #$00, go do some other stuff
; control flow target
$D8A8:20 60 D9	JSR $D960	; updates current olive count
$D8AB:A9 00	LDA #$00
$D8AD:85 6B	STA $6B
; $D8AF-$D8C6: write to $0730,X: #$207602, 10's digit of current olive count | #$A0, 1's digit of current olive count | #$A0
$D8AF:A9 20	LDA #$20
$D8B1:A0 76	LDY #$76
$D8B3:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$D8B6:A9 02	LDA #$02
$D8B8:20 26 D7	JSR $D726	; STA $0730,X, INX
$D8BB:A5 E0	LDA $E0	; 1's digit of current olive count
$D8BD:09 A0	ORA #$A0
$D8BF:A8	TAY
$D8C0:A5 E1	LDA $E1	; 10's digit of current olive count
$D8C2:09 A0	ORA #$A0
$D8C4:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$D8C7:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80

; control flow target
$D8CA:A5 6A	LDA $6A
$D8CC:F0 D1	BEQ $D89F	; if $6A == #$00, RTS
$D8CE:18	CLC
$D8CF:65 4A	ADC $4A	; current HP
$D8D1:C5 EF	CMP $EF	; max HP
$D8D3:90 02	BCC $D8D7
$D8D5:A5 EF	LDA $EF	; max HP
; at this point, A = min($6A + current HP, max HP)
; control flow target
$D8D7:A0 00	LDY #$00
$D8D9:84 6A	STY $6A	; set $6A = #$00
$D8DB:C5 4A	CMP $4A	; current HP
$D8DD:F0 C0	BEQ $D89F	; if min($6A + current HP, max HP) == current HP, RTS
$D8DF:85 4A	STA $4A	; set current HP = min($6A + current HP, max HP)
; control flow target
$D8E1:85 03	STA $03
$D8E3:4A	LSR
$D8E4:4A	LSR
$D8E5:85 02	STA $02
$D8E7:A5 EF	LDA $EF	; max HP
$D8E9:4A	LSR
$D8EA:4A	LSR
$D8EB:85 04	STA $04
$D8ED:A5 F2	LDA $F2
$D8EF:29 02	AND #$02
$D8F1:F0 06	BEQ $D8F9
$D8F3:46 02	LSR $02
$D8F5:46 03	LSR $03
$D8F7:46 04	LSR $04
; control flow target
$D8F9:A5 03	LDA $03
$D8FB:29 03	AND #$03
$D8FD:85 03	STA $03
$D8FF:A9 20	LDA #$20
$D901:A0 86	LDY #$86
$D903:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$D906:E8	INX
$D907:A4 02	LDY $02
$D909:A9 F0	LDA #$F0
$D90B:20 38 D7	JSR $D738
$D90E:A5 03	LDA $03
$D910:F0 08	BEQ $D91A
$D912:A9 F1	LDA #$F1
$D914:9D 30 07	STA $0730,X
$D917:E8	INX
$D918:E6 02	INC $02
; control flow target
$D91A:A5 04	LDA $04
$D91C:38	SEC
$D91D:E5 02	SBC $02
$D91F:A8	TAY
$D920:18	CLC
$D921:65 02	ADC $02
$D923:8D 32 07	STA $0732
$D926:A9 DD	LDA #$DD
$D928:20 38 D7	JSR $D738
$D92B:A4 03	LDY $03
$D92D:F0 2E	BEQ $D95D
$D92F:B9 8D D9	LDA $D98D,Y
$D932:85 02	STA $02
$D934:A9 1F	LDA #$1F
$D936:A0 18	LDY #$18
$D938:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$D93B:A9 06	LDA #$06
$D93D:9D 30 07	STA $0730,X
$D940:E8	INX
$D941:AD 91 D9	LDA $D991
$D944:25 02	AND $02
$D946:9D 30 07	STA $0730,X
$D949:E8	INX
$D94A:AD 92 D9	LDA $D992
$D94D:25 02	AND $02
$D94F:A0 04	LDY #$04
$D951:20 38 D7	JSR $D738
$D954:AD 93 D9	LDA $D993
$D957:25 02	AND $02
$D959:9D 30 07	STA $0730,X
$D95C:E8	INX
; control flow target
$D95D:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80

; control flow target
$D960:A4 E1	LDY $E1	; 10's digit of current olive count
$D962:C9 00	CMP #$00
$D964:18	CLC
$D965:10 12	BPL $D979	; branch if A ($6B) > 0
$D967:65 E0	ADC $E0	; 1's digit of current olive count
$D969:10 1E	BPL $D989	; if A ($6B) + 1's digit of current olive count > 0, 10's digit stays the same, 1's digit becomes $6B + 1's digit
; control flow target
$D96B:88	DEY
$D96C:30 07	BMI $D975
$D96E:18	CLC
$D96F:69 0A	ADC #$0A
$D971:30 F8	BMI $D96B
$D973:10 14	BPL $D989
; control flow target
$D975:A9 00	LDA #$00
$D977:F0 0F	BEQ $D988
; control flow target
$D979:65 E0	ADC $E0	; 1's digit of current olive count
; control flow target
$D97B:C9 0A	CMP #$0A
$D97D:90 0A	BCC $D989
$D97F:E9 0A	SBC #$0A
$D981:C8	INY
$D982:C0 0A	CPY #$0A
$D984:90 F5	BCC $D97B
$D986:A9 09	LDA #$09
; control flow target
$D988:A8	TAY
; control flow target
$D989:85 E0	STA $E0	; 1's digit of current olive count
$D98B:84 E1	STY $E1	; 10's digit of current olive count
$D98D:60	RTS

; data; it's used but I'm not sure what for
; probably lut from $D92F
$D98E:80 E0
$D990:F8 CC
$D992:EE 66

; given A, process the A'th string from the pointer table located at $D99F
; control flow target
$D994:0A	ASL
$D995:A8	TAY
$D996:BE 9F D9	LDX $D99F,Y
$D999:B9 A0 D9	LDA $D9A0,Y
$D99C:4C 0D D8	JMP $D80D	; given A and X, process the string located at (A * 256 + X)

; pointer table
$D99F:A7D9	; $D9A7
$D9A1:ABD9	; $D9AB
$D9A3:04DA	; $DA04	; continue game screen text
$D9A5:1FDA	; $DA1F	; new game screen text

$D9A7:23C0	; text position
$D9A9:50	; text length - repeat text $50 times
$D9AA:FF	; text
; first pointer starts overlapping with second pointer here
$D9AB:202B	; text position
$D9AD:04	; text length
$D9AE:F47F7FFB	; text: ???
$D9B2:2041	; text position
$D9B4:1E	; text length
$D9B5:E0E1E2E37F7FF4F3F4F5F6F7F8F9FAFBF2FB7F7FEC7F7FEDECDEEDECDEED	; text: ???
$D9D3:2061	; text position
$D9D5:04	; text length
$D9D6:E4E5E6E7	; text: ???
$D9DA:2075	; text position
$D9DC:0A	; text length
$D9DD:FC7F7FFDFC7FFDFC7FFD	; text: ???
$D9E6:2081	; text position
$D9E9:04	; text length
$D9EA:E8E9EAEB	; text: ???
$D9EE:2095	; text position
$D9F0:0A	; text length
$D9F1:EEDFDFEFEEDFEFEEDFEF	; text: ???
$D9FB:2086	; text position
$D9FD:4E	; text length - repeat text $4E times
$D9FE:7F	; text
$D9FF:20A0	; text position
$DA01:60	; text length - repeat text $60 times
$DA02:FE	; text
$DA03:FF	; end of string

; continue game screen text
$DA04:20A4	; text position
$DA06:16	; text length - this should read 17?
$DA07:B50E1405127F1408057F170F1204137F0F067F070F04AC	; text: "Enter the words of god."
$DA1E:FF	; end of string

; new game screen text
$DA1F:20A4	; text position
$DA21:0C	; text length
$DA22:B50E1405127F0E010D0513AC	; text: "Enter names."
$DAED:2106	; text position
$DA30:04	; text length
$DA31:B805120F	; text: "Hero"
$DA35:2166	; text position
$DA37:07	; text length
$DA38:B805120F090E05	; text: "Heroine"
$DA3F:FF	; end of string

; control flow target
$DA40:A0 01	LDY #$01
$DA42:D0 02	BNE $DA46	; BRA
; control flow target
$DA44:A0 00	LDY #$00
; control flow target
$DA46:E6 47	INC $47
$DA48:AD E2 03	LDA $03E2
$DA4B:C9 02	CMP #$02
$DA4D:90 18	BCC $DA67
$DA4F:F0 09	BEQ $DA5A
$DA51:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$DA54:20 0D 8F	JSR $8F0D	; not in this bank!
$DA57:4C 62 DA	JMP $DA62

; control flow target
$DA5A:A9 50	LDA #$50
$DA5C:20 5A D3	JSR $D35A
$DA5F:20 BE F1	JSR $F1BE
; control flow target
$DA62:A9 05	LDA #$05
$DA64:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
; control flow target
$DA67:4C E3 D3	JMP $D3E3

; data for $DA78
$DA6A:0F
$DA6B:05
$DA6C:05
$DA6D:02

; probably this happens when displaying a text box
; control flow target
$DA6E:20 E6 D3	JSR $D3E6
$DA71:AE E2 03	LDX $03E2
$DA74:E0 03	CPX #$03
$DA76:90 31	BCC $DAA9	; this jumps into the middle of BIT $00A9 :p
$DA78:BD 67 DA	LDA $DA67,X	; #$03 <= X <= #$06 or else we start loading code instead of data
$DA7B:A6 DF	LDX $DF	; location
$DA7D:20 46 D6	JSR $D646
$DA80:AD E2 03	LDA $03E2
$DA83:C9 06	CMP #$06
$DA85:F0 1F	BEQ $DAA6
$DA87:20 52 F6	JSR $F652	; STZ to $8E, $94-$97, $99-$9A, pAPU stuff
$DA8A:20 00 D3	JSR $D300	; initialize a bunch of stuff
$DA8D:20 82 EB	JSR $EB82
$DA90:A9 0D	LDA #$0D
$DA92:20 ED F5	JSR $F5ED
$DA95:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$DA98:20 AE 8E	JSR $8EAE	; not in this bank!
$DA9B:A9 0D	LDA #$0D
$DA9D:85 1A	STA $1A
$DA9F:A9 10	LDA #$10
$DAA1:8D E4 03	STA $03E4	; maxCharactersPerLine
$DAA4:D0 08	BNE $DAAE
; control flow target
$DAA6:A9 01	LDA #$01
; when coming from $DAA6:
$DAA8:2C A9 00	BIT $00A9
; when coming from $DA76:
$DAA9:A9 40	LDA #$00
; both paths meet here
$DAAB:20 B5 DE	JSR $DEB5
; control flow target
$DAAE:A9 05	LDA #$05
$DAB0:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
; $DAB3-$DAC1: fill $0440-$04FF with #$7F
$DAB3:A9 40	LDA #$40
$DAB5:85 02	STA $02
$DAB7:A9 04	LDA #$04
$DAB9:85 03	STA $03
$DABB:A9 7F	LDA #$7F
$DABD:A0 C0	LDY #$C0
$DABF:20 D6 D3	JSR $D3D6	; fill ($02) with A Y times
$DAC2:A0 00	LDY #$00
$DAC4:84 1B	STY $1B	; initialize currentLineNumber to #$00
$DAC6:20 03 DB	JSR $DB03	; script engine function execution loop
; control flow target
$DAC9:20 0B DD	JSR $DD0B
$DACC:18	CLC
$DACD:20 EE DC	JSR $DCEE
$DAD0:AD E2 03	LDA $03E2
$DAD3:C9 03	CMP #$03
$DAD5:90 04	BCC $DADB
$DAD7:C9 06	CMP #$06
$DAD9:90 12	BCC $DAED
; control flow target
$DADB:20 D8 D6	JSR $D6D8
$DADE:A9 00	LDA #$00
$DAE0:85 22	STA $22
$DAE2:8D E2 03	STA $03E2
$DAE5:85 2E	STA $2E
$DAE7:20 E3 D3	JSR $D3E3
$DAEA:4C 30 DF	JMP $DF30
; control flow target
$DAED:A9 00	LDA #$00
$DAEF:8D E2 03	STA $03E2
$DAF2:85 2E	STA $2E
$DAF4:20 00 D3	JSR $D300	; initialize a bunch of stuff
$DAF7:20 E9 C2	JSR $C2E9
$DAFA:20 5C F1	JSR $F15C
$DAFD:20 9B C1	JSR $C19B
$DB00:4C 0C D3	JMP $D30C

; script engine function execution loop
; control flow target
$DB03:A0 FF	LDY #$FF
$DB05:84 10	STY $10	; set NPC indicator to no
$DB07:C8	INY	; Y = #$00
$DB08:8C E3 03	STY $03E3
; control flow target
$DB0B:B1 42	LDA ($42),Y
$DB0D:C8	INY
$DB0E:20 14 DB	JSR $DB14
$DB11:4C 0B DB	JMP $DB0B	; BRA

; control flow target
$DB14:0A	ASL
$DB15:AA	TAX
$DB16:BD 23 DB	LDA $DB23,X
$DB19:85 02	STA $02
$DB1B:BD 24 DB	LDA $DB24,X
$DB1E:85 03	STA $03
$DB20:6C 02 00	JMP ($02)
; jump table
$DB23:8A DB	; $DB8A (0): read next byte of ($42),Y, store it in $10 (NPC to display), then increment Y, set $42-$43 = Y + $42-$43, and double RTS
$DB25:B0 DB	; $DBB0 (1): if quest status flag specified by the next byte of ($42),Y is not set, skip over a number of bytes given by the next byte of ($42),Y
$DB27:B7 DB	; $DBB7 (2): set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y
$DB29:0E DC	; $DC0E (3): display text based on address of next 2 bytes
$DB2B:99 DB	; $DB99 (4): double RTS
$DB2D:C4 DB	; $DBC4 (5): read next byte of ($42),Y, set that quest status flag, and increment Y
$DB2F:CD DB	; $DBCD (6): read next byte of ($42),Y, unset that quest status flag, and increment Y
$DB31:BD DB	; $DBBD (7): if quest status flag specified by the next byte of ($42),Y is set, skip over a number of bytes given by the next byte of ($42),Y
$DB33:E0 DB	; $DBE0 (8): read next byte of ($42),Y, save it in $03E3, increment Y
$DB35:FE DB	; $DBFE (9): display text based on current value of ($42), double RTS
$DB37:A4 DB	; $DBA4 (A): display Yes/No option
$DB39:9C DB	; $DB9C (B): if # salamander skins < 20, set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y, else skip a byte
$DB3B:5A DB	; $DB5A (C): check current vs. required olives
$DB3D:E7 DB	; $DBE7 (D): generate and display password, double RTS
$DB3F:43 DB	; $DB43 (E): do the normal post-string stuff and then set $2E to #$02
$DB41:4C DB	; $DB4C (F): do the normal post-string stuff and then call $00:8C52

; control flow target
$DB43:20 C9 DA	JSR $DAC9	; do the normal post-string stuff
$DB46:A9 02	LDA #$02
$DB48:85 2E	STA $2E
$DB4A:D0 09	BNE $DB55	; BRA to triple RTS

; control flow target
$DB4C:20 C9 DA	JSR $DAC9	; do the normal post-string stuff
$DB4F:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$DB52:20 52 8C	JSR $8C52	; not in this bank!
; control flow target
$DB55:68	PLA
$DB56:68	PLA
$DB57:68	PLA
$DB58:68	PLA
$DB59:60	RTS

; control flow target
$DB5A:B1 42	LDA ($42),Y	; read next byte of ($42),Y (required number of olives)
$DB5C:C8	INY
$DB5D:85 06	STA $06	; store it in $06 - this is the true item cost, whatever the displayed text says
; $DB5F-$DB67 end up setting A = oliveCount
$DB5F:A5 E1	LDA $E1	; 10's digit of current olive count
$DB61:0A	ASL
$DB62:0A	ASL
$DB63:65 E1	ADC $E1	; 10's digit of current olive count
$DB65:0A	ASL
$DB66:65 E0	ADC $E0	; 1's digit of current olive count
$DB68:C5 06	CMP $06	; check current olive count - required olive count
$DB6A:90 4B	BCC $DBB7	; if current olive count < required olive count then set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y
$DB6C:98	TYA	; else save Y on the stack
$DB6D:48	PHA
; control flow target
$DB6E:A9 FF	LDA #$FF
$DB70:85 6B	STA $6B
$DB72:20 A0 D8	JSR $D8A0	; probably displays olive count
$DB75:A5 06	LDA $06	; required olive count
$DB77:29 03	AND #$03
$DB79:D0 04	BNE $DB7F	; if required olive count % 4 == 0, $99 = #$11
$DB7B:A9 11	LDA #$11
$DB7D:85 99	STA $99
; control flow target
$DB7F:20 E3 D3	JSR $D3E3
$DB82:C6 06	DEC $06	; decrement required olive count
$DB84:D0 E8	BNE $DB6E	; loop until required olive count == #$00
$DB86:68	PLA	; restore the old value of Y
$DB87:A8	TAY
$DB88:C8	INY
$DB89:60	RTS

; read next byte of ($42),Y, store it in $10 (NPC to display), then increment Y, set $42-$43 = Y + $42-$43, and double RTS
; control flow target
$DB8A:B1 42	LDA ($42),Y	; read next byte
$DB8C:85 10	STA $10	; store it to $10 (NPC to display)
$DB8E:C8	INY
$DB8F:98	TYA
$DB90:18	CLC
$DB91:65 42	ADC $42	; set $42-$43 = Y + $42-$43
$DB93:85 42	STA $42
$DB95:90 02	BCC $DB99
$DB97:E6 43	INC $43
; control flow target
$DB99:68	PLA	; pull last return address off the stack
$DB9A:68	PLA
$DB9B:60	RTS	; this is effectively RTS RTS

; if $E2 (# salamander skins) < #$14, set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y, else skip a byte
; control flow target
$DB9C:A5 E2	LDA $E2	; salamanderSkins
$DB9E:C9 14	CMP #$14
$DBA0:90 15	BCC $DBB7	; set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y
$DBA2:C8	INY
$DBA3:60	RTS

; control flow target
$DBA4:98	TYA	; save Y on the stack
$DBA5:48	PHA
$DBA6:20 5C DC	JSR $DC5C	; display Yes/No option
$DBA9:68	PLA	; restore Y from the stack
$DBAA:A8	TAY
$DBAB:CA	DEX
$DBAC:10 09	BPL $DBB7	; if X > 0, set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y
$DBAE:C8	INY	; otherwise Y++ and RTS
$DBAF:60	RTS

; if quest status flag specified by the next byte of ($42),Y is not set, skip over a number of bytes given by the next byte of ($42),Y
; control flow target
$DBB0:20 D8 DB	JSR $DBD8	; read next byte of ($42),Y, increment Y, save it in $02, read quest status flag into A
$DBB3:D0 1F	BNE $DBD4	; if flag is set, go restore Y from $02, increment Y (thus skipping a byte), and RTS
; control flow target
$DBB5:A4 02	LDY $02	; else, restore the old value of Y
; control flow target
$DBB7:98	TYA	; set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y
$DBB8:18	CLC
$DBB9:71 42	ADC ($42),Y
$DBBB:A8	TAY
$DBBC:60	RTS

; if quest status flag specified by the next byte of ($42),Y is set, skip over a number of bytes given by the next byte of ($42),Y
; control flow target
$DBBD:20 D8 DB	JSR $DBD8	; read next byte of ($42),Y, increment Y, save it in $02, read quest status flag into A
$DBC0:F0 12	BEQ $DBD4	; if flag is not set, go restore Y from $02, increment Y (thus skipping a byte), and RTS
$DBC2:D0 F1	BNE $DBB5	; else, go restore Y from $02 and set Y = Y + ($42),Y, effectively skipping over the number of bytes specified by ($42),Y, then RTS

: read next byte of ($42),Y, set that quest status flag, and increment Y
; control flow target
$DBC4:B1 42	LDA ($42),Y
$DBC6:84 02	STY $02
$DBC8:20 20 E3	JSR $E320	; sets quest status flag specified by A
$DBCB:D0 07	BNE $DBD4	; BRA
: read next byte of ($42),Y, unset that quest status flag, and increment Y
; control flow target
$DBCD:B1 42	LDA ($42),Y
$DBCF:84 02	STY $02
$DBD1:20 14 E3	JSR $E314	; unsets quest status flag specified by A
; control flow target
$DBD4:A4 02	LDY $02	; restore the old value of Y
$DBD6:C8	INY
$DBD7:60	RTS

; read next byte of ($42),Y, increment Y, save it in $02, read quest status flag into A
; control flow target
$DBD8:B1 42	LDA ($42),Y
$DBDA:C8	INY
$DBDB:84 02	STY $02	; save Y since we're going to use it for other things
$DBDD:4C 0D E3	JMP $E30D	; read quest status flag specified by A into A

; read next byte of ($42),Y, save it in $03E3, increment Y
; control flow target
$DBE0:B1 42	LDA ($42),Y
$DBE2:8D E3 03	STA $03E3
$DBE5:C8	INY
$DBE6:60	RTS

; entry point for script engine function index #$0D
; control flow target
$DBE7:68	PLA	; RTS will return +1 level
$DBE8:68	PLA
$DBE9:20 91 DF	JSR $DF91	; generate a password and store it starting at $014A (string length at $0149) and $0169
$DBEC:A9 49	LDA #$49	; set curStringAddr to #$0149
$DBEE:85 D8	STA $D8
$DBF0:A9 01	LDA #$01
$DBF2:85 D9	STA $D9
$DBF4:A9 00	LDA #$00
$DBF6:85 17	STA $17	; set curStringByte to #$00
$DBF8:A9 C0	LDA #$C0
$DBFA:85 D7	STA $D7	; set curTableNum to #$C0 (password table)
$DBFC:D0 20	BNE $DC1E	; BRA
; entry point for script engine function index #$09
; control flow target
$DBFE:68	PLA	; RTS will return +1 level
$DBFF:68	PLA
$DC00:98	TYA
$DC01:18	CLC
$DC02:65 42	ADC $42
$DC04:85 D8	STA $D8	; curStringAddr_low
$DC06:A5 43	LDA $43
$DC08:69 00	ADC #$00	; $D9 += 1 if carry set
$DC0A:85 D9	STA $D9	; curStringAddr_high
$DC0C:D0 0A	BNE $DC18	; if $D9 overflowed, read the next 2 bytes into curStringAddr
; entry point for script engine function index #$03
; control flow target
$DC0E:B1 42	LDA ($42),Y
$DC10:85 D8	STA $D8	; curStringAddr_low
$DC12:C8	INY
$DC13:B1 42	LDA ($42),Y
$DC15:85 D9	STA $D9	; curStringAddr_high
$DC17:C8	INY
; control flow target
$DC18:A9 00	LDA #$00
$DC1A:85 D7	STA $D7	; set curTableNum to uppercase
$DC1C:85 16	STA $16	; set curStringBitNum to #$00
; control flow target
$DC1E:98	TYA	; save Y on the stack
$DC1F:48	PHA
$DC20:20 A3 DE	JSR $DEA3	; load A with the next byte from curStringAddr, increment curStringAddr
$DC23:85 19	STA $19	; numTokensToRead
$DC25:D0 2A	BNE $DC51	; this had better be BRA, or else we're reading 0 bytes
; control flow target
$DC27:20 C6 DD	JSR $DDC6	; looks like this is where all the heavy lifting happens
$DC2A:48	PHA	; save A on the stack
$DC2B:20 40 DA	JSR $DA40
$DC2E:68	PLA	; restore A from the stack
$DC2F:C9 FE	CMP #$FE
$DC31:F0 1B	BEQ $DC4E	; if A == #$FE, go handle a newline
$DC33:C9 FF	CMP #$FF
$DC35:D0 0F	BNE $DC46
$DC37:A5 D7	LDA $D7	; curTableNum
$DC39:29 FC	AND #$FC	; set lowest 2 bits of curTableNum to 0, maybe switching us back to the upper-case table
$DC3B:85 D7	STA $D7	; curTableNum
$DC3D:20 0B DD	JSR $DD0B
$DC40:38	SEC
$DC41:20 EE DC	JSR $DCEE
$DC44:D0 0B	BNE $DC51
; control flow target
$DC46:A6 1C	LDX $1C	; charactersOnCurrentLine
$DC48:E8	INX
$DC49:EC E4 03	CPX $03E4	; maxCharactersPerLine
$DC4C:90 05	BCC $DC53	; branch if X < maxCharactersPerLine
; control flow target
$DC4E:20 0F DD	JSR $DD0F
; control flow target
$DC51:A2 00	LDX #$00	; reset charactersOnCurrentLine
; control flow target
$DC53:86 1C	STX $1C	; charactersOnCurrentLine
$DC55:A5 19	LDA $19	; numTokensToRead
$DC57:D0 CE	BNE $DC27	; when $19 hits #$00, we're all done with displaying text
$DC59:68	PLA	; restore Y from the stack
$DC5A:A8	TAY
$DC5B:60	RTS

; display Yes/No option
; control flow target
$DC5C:20 0B DD	JSR $DD0B
$DC5F:A9 E4	LDA #$E4	; set curStringAddr to #$DCE4 ("  Yes No")
$DC61:85 D8	STA $D8
$DC63:A9 DC	LDA #$DC
$DC65:85 D9	STA $D9
$DC67:A9 40	LDA #$40
$DC69:85 D7	STA $D7	; set curTableNum to #$40 (6-bit table)
$DC6B:20 1E DC	JSR $DC1E
$DC6E:A9 00	LDA #$00
$DC70:F0 13	BEQ $DC85
; control flow target
$DC72:20 E3 D3	JSR $D3E3
$DC75:A5 F8	LDA $F8
$DC77:29 C0	AND #$C0
$DC79:D0 11	BNE $DC8C
$DC7B:A5 F8	LDA $F8
$DC7D:29 03	AND #$03
$DC7F:F0 F1	BEQ $DC72
$DC81:A5 12	LDA $12	; read current selection
$DC83:49 01	EOR #$01	; flip yes/no
; control flow target
$DC85:85 12	STA $12	; store new selection
$DC87:20 B4 DC	JSR $DCB4
$DC8A:30 E6	BMI $DC72
; control flow target
$DC8C:A5 12	LDA $12
$DC8E:48	PHA
$DC8F:0A	ASL
$DC90:0A	ASL
$DC91:09 01	ORA #$01
$DC93:85 03	STA $03
$DC95:20 B9 DD	JSR $DDB9	; sets A = currentLineNumber * 48 (i.e. 2 lines of 24 characters, one line with text, the other with spaces)
$DC98:05 03	ORA $03
$DC9A:AA	TAX
$DC9B:A9 9E	LDA #$9E	; selection arrow
$DC9D:9D 58 04	STA $0458,X
$DCA0:20 0F DD	JSR $DD0F
$DCA3:68	PLA
$DCA4:AA	TAX
$DCA5:60	RTS

; load down arrow or space depending on clock
; control flow target
$DCA6:A0 9F	LDY #$9F	; down arrow for next page?
$DCA8:A5 47	LDA $47	; looks like a clock of some kind
$DCAA:29 20	AND #$20
$DCAC:F0 02	BEQ $DCB0	; if $47 & #$20 == #$00, show down arrow, otherwise don't
; control flow target
$DCAE:A0 7F	LDY #$7F	; space
; control flow target
$DCB0:8A	TXA
$DCB1:4C C8 DC	JMP $DCC8

; control flow target
$DCB4:AA	TAX
$DCB5:20 DC DC	JSR $DCDC	; set $11 = currentLineNumber * 2 + 10
$DCB8:8A	TXA	; at this point A is either #$00 or #$01
$DCB9:0A	ASL
$DCBA:0A	ASL	; at this point A is either #$00 or #$04
$DCBB:48	PHA
$DCBC:49 05	EOR #$05	; partially controls X position of space covering old selection arrow; #$00 -> #$05, #$04 -> #$01
$DCBE:A0 7F	LDY #$7F
$DCC0:20 C8 DC	JSR $DCC8
$DCC3:68	PLA
$DCC4:09 01	ORA #$01	; partially controls X position of selection arrow; #$00 -> #$01, #$04 -> #$05
$DCC6:A0 9E	LDY #$9E	; selection arrow
; control flow target
$DCC8:84 05	STY $05
$DCCA:18	CLC
$DCCB:65 1A	ADC $1A
$DCCD:85 10	STA $10
$DCCF:20 77 D1	JSR $D177
$DCD2:A9 01	LDA #$01
$DCD4:A4 05	LDY $05
$DCD6:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$DCD9:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80

; set $11 = currentLineNumber * 2 + 10
; control flow target
$DCDC:20 AE DE	JSR $DEAE	; A = currentLineNumber * 2 + 9
$DCDF:69 01	ADC #$01	; A = currentLineNumber * 2 + 10
$DCE1:85 11	STA $11	; $11 = currentLineNumber * 2 + 10
$DCE3:60	RTS

; text
$DCE4:08	; text length
$DCE5:7F7FC905137FBE0F	; "  Yes No"

; control flow target
$DCED:28	PLP
; control flow target
$DCEE:08	PHP
$DCEF:90 08	BCC $DCF9
$DCF1:20 DC DC	JSR $DCDC	; set $11 = currentLineNumber * 2 + 10
$DCF4:A2 0C	LDX #$0C
$DCF6:20 A6 DC	JSR $DCA6	; load down arrow or space depending on clock
; control flow target
$DCF9:20 44 DA	JSR $DA44
$DCFC:A5 F8	LDA $F8
$DCFE:29 C0	AND #$C0
$DD00:F0 EB	BEQ $DCED
$DD02:28	PLP
$DD03:90 05	BCC $DD0A
$DD05:A2 0C	LDX #$0C
$DD07:20 AE DC	JSR $DCAE
; control flow target
$DD0A:60	RTS

; control flow target
$DD0B:A5 1C	LDA $1C	; charactersOnCurrentLine
$DD0D:F0 FB	BEQ $DD0A	; if charactersOnCurrentLine == #$00, RTS (i.e. ignore newlines at the start of a line)
; control flow target
$DD0F:A4 1B	LDY $1B	; currentLineNumber
$DD11:C0 03	CPY #$03
$DD13:90 3D	BCC $DD52	; if currentLineNumber < #$03, currentLineNumber++ and RTS; otherwise, we've reached the on-screen text capacity, so scroll the current text up by 2 lines and blank out the bottom 2 lines
$DD15:A2 00	LDX #$00
; control flow target
$DD17:BD 70 04	LDA $0470,X	; copy #$90 bytes (6 lines of #$18 tiles) from $0470 to $0440 (scrolling the displayed text upwards 2 lines)
$DD1A:9D 40 04	STA $0440,X
$DD1D:E8	INX
$DD1E:E0 90	CPX #$90
$DD20:90 F5	BCC $DD17
$DD22:A9 7F	LDA #$7F
; control flow target
$DD24:9D 40 04	STA $0440,X	; copy #$7F into $04D0-$0500 (initializing the next 2 lines of #$18 tiles to spaces)
$DD27:E8	INX
$DD28:E0 C0	CPX #$C0
$DD2A:90 F8	BCC $DD24
$DD2C:A2 00	LDX #$00
; control flow target
$DD2E:86 0F	STX $0F	; currentTextBufferPosition
$DD30:8A	TXA
$DD31:18	CLC
$DD32:69 09	ADC #$09
$DD34:85 11	STA $11	; store currentTextBufferPosition + 9 to $11
$DD36:A5 1A	LDA $1A	; copy $1A to $10
$DD38:85 10	STA $10
$DD3A:20 55 DD	JSR $DD55
$DD3D:86 23	STX $23
$DD3F:A5 0F	LDA $0F	; currentTextBufferPosition
$DD41:4A	LSR
$DD42:90 06	BCC $DD4A	; branch if currentTextBufferPosition is even
$DD44:20 2E D7	JSR $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80
$DD47:20 40 DA	JSR $DA40
; control flow target
$DD4A:A6 0F	LDX $0F	; currentTextBufferPosition
$DD4C:E8	INX
$DD4D:E0 08	CPX #$08
$DD4F:90 DD	BCC $DD2E
$DD51:60	RTS
; control flow target
$DD52:E6 1B	INC $1B	; currentLineNumber
$DD54:60	RTS

; control flow target
$DD55:20 77 D1	JSR $D177
$DD58:BD 2E 07	LDA $072E,X
$DD5B:85 03	STA $03
$DD5D:BD 2F 07	LDA $072F,X
$DD60:85 04	STA $04
$DD62:A5 0F	LDA $0F	; $09 = currentTextBufferPosition * 24
$DD64:0A	ASL
$DD65:0A	ASL
$DD66:0A	ASL
$DD67:85 09	STA $09
$DD69:0A	ASL
$DD6A:18	CLC
$DD6B:65 09	ADC $09
$DD6D:85 09	STA $09
$DD6F:A5 10	LDA $10	; $02 = $09 & #$1F
$DD71:29 1F	AND #$1F
$DD73:85 02	STA $02
$DD75:A9 20	LDA #$20
$DD77:38	SEC
$DD78:E5 02	SBC $02
$DD7A:CD E4 03	CMP $03E4	; maxCharactersPerLine
$DD7D:08	PHP
$DD7E:90 03	BCC $DD83
$DD80:AD E4 03	LDA $03E4	; maxCharactersPerLine
; control flow target
$DD83:20 A4 DD	JSR $DDA4	; save A to $0730,X and then copy A bytes from $0440,Y to $0730,X, starting from Y = $09; update $09 when we're done
$DD86:28	PLP
$DD87:B0 1A	BCS $DDA3
$DD89:A5 04	LDA $04
$DD8B:29 E0	AND #$E0
$DD8D:A8	TAY
$DD8E:A5 03	LDA $03
$DD90:49 04	EOR #$04
$DD92:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$DD95:A5 10	LDA $10
$DD97:29 1F	AND #$1F
$DD99:18	CLC
$DD9A:6D E4 03	ADC $03E4	; maxCharactersPerLine
$DD9D:38	SEC
$DD9E:E9 20	SBC #$20
$DDA0:20 A4 DD	JSR $DDA4	; save A to $0730,X and then copy A bytes from $0440,Y to $0730,X, starting from Y = $09; update $09 when we're done
; control flow target
$DDA3:60	RTS

; save A to $0730,X and then copy A bytes from $0440,Y to $0730,X, starting from Y = $09; update $09 when we're done
; control flow target
$DDA4:85 02	STA $02
$DDA6:20 26 D7	JSR $D726	; STA $0730,X, INX
$DDA9:A4 09	LDY $09
; control flow target
$DDAB:B9 40 04	LDA $0440,Y
$DDAE:C8	INY
$DDAF:20 26 D7	JSR $D726	; STA $0730,X, INX
$DDB2:C6 02	DEC $02
$DDB4:D0 F5	BNE $DDAB
$DDB6:84 09	STY $09
$DDB8:60	RTS

; sets A = currentLineNumber * 48
; in order to not overflow, $1B would have to be <= 15 (#$0F); in practice it will be < 3
; control flow target
$DDB9:A5 1B	LDA $1B	; currentLineNumber
$DDBB:0A	ASL
$DDBC:0A	ASL
$DDBD:0A	ASL
$DDBE:0A	ASL
$DDBF:85 02	STA $02
$DDC1:0A	ASL
$DDC2:18	CLC
$DDC3:65 02	ADC $02
; control flow target
$DDC5:60	RTS

; control flow target
$DDC6:20 FF DD	JSR $DDFF	; pretty sure this is figuring out what the next character to print is
$DDC9:C9 F8	CMP #$F8	; if character to print > #$F8, RTS
$DDCB:B0 F8	BCS $DDC5
$DDCD:A8	TAY	; save A in Y
$DDCE:20 B9 DD	JSR $DDB9	; sets A = currentLineNumber * 48
$DDD1:65 1C	ADC $1C	; charactersOnCurrentLine
$DDD3:85 0F	STA $0F	; currentTextBufferPosition
$DDD5:AA	TAX	; X = currentLineNumber * 48 + charactersOnCurrentLine
$DDD6:98	TYA	; restore A from Y
$DDD7:9D 58 04	STA $0458,X	; print A to screen buffer ($0458 = $0440 + 1 line of #$18 spaces)
$DDDA:20 AE DE	JSR $DEAE	; A = currentLineNumber * 2 + 9
$DDDD:85 11	STA $11
$DDDF:A5 1A	LDA $1A
$DDE1:18	CLC
$DDE2:65 1C	ADC $1C	; charactersOnCurrentLine
$DDE4:85 10	STA $10
$DDE6:20 77 D1	JSR $D177
$DDE9:A9 82	LDA #$82
$DDEB:20 26 D7	JSR $D726	; STA $0730,X, INX
$DDEE:A4 0F	LDY $0F	; currentTextBufferPosition
$DDF0:B9 40 04	LDA $0440,Y
$DDF3:20 26 D7	JSR $D726	; STA $0730,X, INX
$DDF6:B9 58 04	LDA $0458,Y
$DDF9:20 2B D7	JSR $D72B	; STA $0730,X, INX, $23 = X, $0730,X = #$80, $22 = $22 | #$80
$DDFC:A9 00	LDA #$00
$DDFE:60	RTS

; control flow target
$DDFF:C6 19	DEC $19	; numTokensToRead
$DE01:A9 02	LDA #$02
$DE03:24 D7	BIT $D7	; curTableNum
$DE05:70 79	BVS $DE80	; branch if second-highest bit is set, then: if current table is the password table, process next character in password string; else load A with the next byte from curStringAddr, increment curStringAddr
$DE07:D0 54	BNE $DE5D	; if any other bit is set: load A with the next character of hero/heroine name
$DE09:A2 05	LDX #$05	; at this point, curTableNum is #$00 (uppercase); set X to #$05
$DE0B:20 AA D2	JSR $D2AA	; read the next X bits from curStringByte into A
$DE0E:C9 00	CMP #$00
$DE10:D0 09	BNE $DE1B
$DE12:A9 80	LDA #$80	; if A is #$00, toggle highest bit of curTableNum (switch to numbers/symbols table)
; we can get here from 3 places, with A values of #$01 ($DE23), #$02 ($DE4B), and #$80 ($DE12)
; control flow target
$DE14:45 D7	EOR $D7	; curTableNum
$DE16:85 D7	STA $D7	; curTableNum
$DE18:4C FF DD	JMP $DDFF	; BRA $DDFF

; control flow target
$DE1B:C9 1E	CMP #$1E	; if A >= #$1E, we're done with this line?
$DE1D:B0 3B	BCS $DE5A	; so go ORA #$F0 and exit
$DE1F:C9 1B	CMP #$1B	; otherwise, A < #$1E; if A == #$1B, we'll toggle between upper- and lower-case
$DE21:D0 04	BNE $DE27	; if A != #$1B, skip down to $DE27
$DE23:A9 01	LDA #$01	; if A == #$1B, set A up to toggle the lowest bit of curTableNum
$DE25:D0 ED	BNE $DE14	; then go do it (BRA)
; control flow target
$DE27:C9 1C	CMP #$1C	; if A == #$1C
$DE29:F0 11	BEQ $DE3C	; buffer hero/heroine name?
$DE2B:C9 1D	CMP #$1D	; if A != #$1D
$DE2D:D0 03	BNE $DE32	; go print whatever A holds
$DE2F:A9 7F	LDA #$7F	; else load a space
$DE31:60	RTS

; control flow target
$DE32:A4 D7	LDY $D7	; curTableNum
$DE34:30 19	BMI $DE4F	; high bit of curTableNum set (numbers/symbols table?) goes to $DE4F
$DE36:D0 03	BNE $DE3B	; otherwise, if any bit is nonzero, RTS
$DE38:18	CLC		; if we're here, Y == curTableNum == #$00 (uppercase)
$DE39:69 B0	ADC #$B0	; A += #$B0
; control flow target
$DE3B:60	RTS

; control flow target
$DE3C:A2 05	LDX #$05	; set X to #$05
$DE3E:20 AA D2	JSR $D2AA	; read the next X bits from curStringByte into A
$DE41:C6 19	DEC $19	; numTokensToRead
$DE43:0A	ASL		; $18 = A * 6; I thought A could only be #$00 or #$01, but maybe there are other options?
$DE44:85 18	STA $18
$DE46:0A	ASL
$DE47:65 18	ADC $18
$DE49:85 18	STA $18
; control flow target
$DE4B:A9 02	LDA #$02	; set A up to toggle the second-lowest bit of curTableNum
$DE4D:D0 C5	BNE $DE14	; then go do it (BRA)

; control flow target
$DE4F:C9 0B	CMP #$0B
$DE51:90 04	BCC $DE57	; if A < #$0B, go to $DE57 (no change to curTableNum); else: CLC and clear high bit of curTableNum
$DE53:06 D7	ASL $D7	; the effect of these 2 lines is to set both the high bit of curTableNum and carry to 0
$DE55:46 D7	LSR $D7
; control flow target
$DE57:69 9F	ADC #$9F	; whether A < #$0B or not, carry is now 0, so this is A += #$9F (start of numbers/symbols table)
$DE59:60	RTS

; control flow target
$DE5A:09 F0	ORA #$F0
$DE5C:60	RTS

; load A with the next character of hero/heroine name
; at this point, curTableNum is 0bx0xxxxxx with at least 1 x set
; control flow target
$DE5D:E6 19	INC $19	; numTokensToRead
$DE5F:A4 18	LDY $18	; hero = #$00, heroine = #$06
$DE61:B6 E3	LDX $E3,Y	; hero/heroine names
$DE63:E0 3F	CPX #$3F	; if X is #$3F or #$FF, go toggle second-lowest bit of curTableNum and continue with $DDFF loop
$DE65:F0 E4	BEQ $DE4B
$DE67:E0 FF	CPX #$FF
$DE69:F0 E0	BEQ $DE4B
$DE6B:C0 05	CPY #$05	; if Y is #$05 or #$0B, toggle second-lowest bit of curTableNum
$DE6D:F0 04	BEQ $DE73
$DE6F:C0 0B	CPY #$0B
$DE71:D0 06	BNE $DE79	; otherwise, don't toggle it
; control flow target
$DE73:A9 02	LDA #$02
$DE75:45 D7	EOR $D7	; curTableNum
$DE77:85 D7	STA $D7	; curTableNum
; control flow target
$DE79:C8	INY	; $18++
$DE7A:84 18	STY $18
$DE7C:BD F7 EA	LDA $EAF7,X	; 8-bit character lut
$DE7F:60	RTS

; if current table is the password table, process next character in password string; else load A with the next byte from curStringAddr, increment curStringAddr
; if curStringByte is #$06, load A with a space; if it's #$0E, load a newline; increment curStringByte in both cases; else load the next byte from curStringAddr, translate according to password lut, and increment curStringAddr
; at this point, we know curTableNum is 0bx1xxxxxx
; control flow target
$DE80:10 21	BPL $DEA3	; if curTableNum is 0b01xxxxxx, load A with the next byte from curStringAddr, increment curStringAddr
$DE82:A6 17	LDX $17	; else, curTableNum is 0b11xxxxxx (password table), so load curStringByte
$DE84:E8	INX
$DE85:E0 07	CPX #$07
$DE87:F0 13	BEQ $DE9C	; this jumps into the middle of BIT $7FA9 :p
$DE89:E0 0F	CPX #$0F
$DE8B:F0 0A	BEQ $DE97
$DE8D:86 17	STX $17	; update curStringByte
$DE8F:20 A3 DE	JSR $DEA3	; load A with the next byte from curStringAddr, increment curStringAddr
$DE92:A8	TAY
$DE93:B9 F7 EA	LDA $EAF7,Y	; 8-bit character lut
$DE96:60	RTS
; control flow target
$DE97:A2 00	LDX #$00	; at this point, curStringByte is #$0F, so reset to #$00
$DE99:A9 FE	LDA #$FE	; newline?
; well, this is interesting
; when coming from $DE99:
$DE9B:2C A9 7F	BIT $7FA9
; but when coming from $DE87:
$DE9C:A9 7F	LDA #$7F	; at this point, curStringByte is #$07; load a space?
; both paths meet up here:
$DE9E:86 17	STX $17	; update curStringByte
$DEA0:E6 19	INC $19	; numTokensToRead
$DEA2:60	RTS

; load A with the next byte from curStringAddr, increment curStringAddr
; control flow target
$DEA3:A0 00	LDY #$00
$DEA5:B1 D8	LDA ($D8),Y
$DEA7:E6 D8	INC $D8
$DEA9:D0 02	BNE $DEAD
$DEAB:E6 D9	INC $D9
; control flow target
$DEAD:60	RTS

; A = currentLineNumber * 2 + 9
; control flow target
$DEAE:A5 1B	LDA $1B	; currentLineNumber
$DEB0:0A	ASL
$DEB1:18	CLC
$DEB2:69 09	ADC #$09
$DEB4:60	RTS

; control flow target
$DEB5:0A	ASL
$DEB6:85 15	STA $15
$DEB8:20 5B DF	JSR $DF5B
$DEBB:20 4E DF	JSR $DF4E
$DEBE:85 1A	STA $1A
$DEC0:E6 1A	INC $1A
$DEC2:A9 08	LDA #$08
$DEC4:85 11	STA $11
$DEC6:A0 00	LDY #$00
$DEC8:F0 14	BEQ $DEDE
; control flow target
$DECA:D0 02	BNE $DECE
$DECC:A0 06	LDY #$06
; control flow target
$DECE:84 13	STY $13
$DED0:20 E7 DE	JSR $DEE7
$DED3:E6 10	INC $10
$DED5:A0 03	LDY #$03
$DED7:C6 05	DEC $05
$DED9:D0 07	BNE $DEE2
$DEDB:20 E3 D3	JSR $D3E3
; control flow target
$DEDE:A9 02	LDA #$02
$DEE0:85 05	STA $05
; control flow target
$DEE2:C6 12	DEC $12
$DEE4:10 E4	BPL $DECA
$DEE6:60	RTS

; control flow target
$DEE7:20 23 DF	JSR $DF23
$DEEA:A5 1F	LDA $1F
$DEEC:09 80	ORA #$80
$DEEE:20 26 D7	JSR $D726	; STA $0730,X, INX
$DEF1:A5 1F	LDA $1F
$DEF3:85 02	STA $02
$DEF5:4A	LSR
$DEF6:85 03	STA $03
$DEF8:A4 13	LDY $13
$DEFA:4C 06 DF	JMP $DF06

; control flow target
$DEFD:D0 01	BNE $DF00
$DEFF:C8	INY
; control flow target
$DF00:20 1D DF	JSR $DF1D
$DF03:A4 13	LDY $13
$DF05:C8	INY
; control flow target
$DF06:C6 02	DEC $02
$DF08:10 F3	BPL $DEFD
$DF0A:86 23	STX $23
$DF0C:A9 FF	LDA #$FF
$DF0E:9D 30 07	STA $0730,X
; control flow target
$DF11:A9 03	LDA #$03
$DF13:20 3D D1	JSR $D13D
$DF16:C6 03	DEC $03
$DF18:D0 F7	BNE $DF11
$DF1A:4C DC D3	JMP $D3DC	; $22 = #$C0 | $22

; control flow target
$DF1D:B9 72 DF	LDA $DF72,Y
$DF20:4C 26 D7	JMP $D726	; STA $0730,X, INX

; control flow target
$DF23:20 77 D1	JSR $D177
$DF26:A5 11	LDA $11
$DF28:0A	ASL
$DF29:29 38	AND #$38
$DF2B:05 24	ORA $24
$DF2D:85 07	STA $07
$DF2F:60	RTS

; control flow target
$DF30:20 5B DF	JSR $DF5B
$DF33:20 4E DF	JSR $DF4E
$DF36:4C 45 DF	JMP $DF45
; control flow target
$DF39:20 C8 D0	JSR $D0C8
$DF3C:E6 10	INC $10
$DF3E:C6 11	DEC $11
$DF40:D0 07	BNE $DF49
$DF42:20 E3 D3	JSR $D3E3
; control flow target
$DF45:A9 02	LDA #$02
$DF47:85 11	STA $11
; control flow target
$DF49:C6 12	DEC $12
$DF4B:10 EC	BPL $DF39
$DF4D:60	RTS

; control flow target
$DF4E:A5 28	LDA $28
$DF50:18	CLC
$DF51:69 1C	ADC #$1C
$DF53:38	SEC
$DF54:E5 12	SBC $12
$DF56:29 FE	AND #$FE
$DF58:85 10	STA $10
$DF5A:60	RTS

; control flow target
$DF5B:A6 15	LDX $15
$DF5D:BD 6F DF	LDA $DF6F,X
$DF60:85 1F	STA $1F
$DF62:BD 6E DF	LDA $DF6E,X
$DF65:85 12	STA $12
$DF67:38	SEC
$DF68:E9 02	SBC #$02
$DF6A:8D E4 03	STA $03E4	; sets maxCharactersPerLine
$DF6D:60	RTS

; data for $DF5B; first byte gets copied to $12, first byte - 2 gets copied to maxCharactersPerLine, second byte to $1F
$DF6E:1A0A
$DF70:120A
; data for $DF1D
$DF72:ECFC
$DF74:EEDE
$DF76:7FDF
$DF78:EDFD
$DF7A:EF
; offsets for indexing into table of bytes with exactly 1 bit set
$DF7B:04	; used for $DF (location?)
$DF7C:04	; used for $E0 (ones digit of current olive count)
$DF7D:04	; used for $E1 (tens digit of current olive count)
$DF7E:05	; used for $E2 (# of salamander skins)
$DF7F:060606060606	; used for $E3-$E8 (hero's name)
$DF85:060606060606	; used for $E9-$EE (heroine's name)
$DF8B:07	; used for $EF (max HP)
$DF89:0808080808	; used for $F0-$F4 (quest status flags)

; generate a password based on the contents of $DF-$F4 (a total of 136 bits a.k.a. 17 bytes; password text table is 6-bit instead of the usual 5-bit + switching)
; stores string length in $0149, random seed in $014A, checksum in $014B, and 
; control flow target
$DF91:20 DD D7	JSR $D7DD	; ask the RNG for a number
$DF94:29 3F	AND #$3F	; chop it down to 6 bits
$DF96:8D 4A 01	STA $014A	; store it at $014A
$DF99:A9 06	LDA #$06	; initialize remaining bits per character to #$06 (#$05 + 1)
$DF9B:85 02	STA $02	; store it at $02
$DF9D:A0 00	LDY #$00	; initialize saveable data loop counter to #$00
$DF9F:A2 03	LDX #$03	; initialize character index to #$03 (start writing password at $014C, reserving $0149-$014B for other stuff)
; control flow target
$DFA1:84 04	STY $04	; stash saveable data loop counter in $04
$DFA3:B9 DF 00	LDA $DF,Y	; read saveable data
$DFA6:85 05	STA $05	; store it in $05
$DFA8:B9 7B DF	LDA $DF7B,Y	; get the relevant bit table offset
$DFAB:A8	TAY	; transfer the offset to Y so we can use it as an index
$DFAC:B9 36 E3	LDA $E336,Y	; get a byte with exactly 1 bit set
; control flow target
$DFAF:C6 02	DEC $02	; decrement remaining bits per character
$DFB1:10 05	BPL $DFB8	; if we crossed 0 bits remaining, re-initialize remaining bits per character and move to the next character
$DFB3:A0 05	LDY #$05	; re-initialize remaining bits per character to #$05
$DFB5:84 02	STY $02	; store it at $02
$DFB7:E8	INX	; move to the next character of the password
; control flow target
; set C = the interesting bit of the saveable data
$DFB8:18	CLC	; default to C not set
$DFB9:24 05	BIT $05	; test our 1-bit byte against the saveable data in $05
$DFBB:F0 01	BEQ $DFBE	; if bit is not set, we branch and the earlier CLC applies; if bit is set, we don't branch and instead SEC
$DFBD:38	SEC	; set C if bit was set
; control flow target
$DFBE:3E 49 01	ROL $0149,X	; transfer C into $0149,X
$DFC1:4A	LSR	; shift our 1-bit byte to the right
$DFC2:90 EB	BCC $DFAF	; loop over our 1-bit byte until we shifted in a 1
$DFC4:A4 04	LDY $04	; restore saveable data loop counter
$DFC6:C8	INY	; increment saveable data loop counter
$DFC7:C0 16	CPY #$16	; compare saveable data loop counter to #$16
$DFC9:90 D6	BCC $DFA1	; if saveable data loop counter < #$16, loop
$DFCB:A4 02	LDY $02	; load the remaining bits per character
$DFCD:F0 06	BEQ $DFD5	; if there are 0 bits remaining, skip down to $DFD5
; control flow target
$DFCF:1E 49 01	ASL $0149,X	; shift in a 0
$DFD2:88	DEY	; decrement number of remaining bits
$DFD3:D0 FA	BNE $DFCF	; loop until number of remaining bits reaches 0
; control flow target
$DFD5:E8	INX	; move to the next character
$DFD6:86 05	STX $05	; store character index at $05
$DFD8:8E 49 01	STX $0149	; store character index at $0149 (number of characters in Pascal string)
$DFDB:A2 03	LDX #$03
$DFDD:20 0F E0	JSR $E00F	; sum $0149,X from X to $05, EOR it, increment it, then AND #$3F, returning the result in A; X is left at $05 + 1
$DFE0:8D 4B 01	STA $014B	; store the resulting checksum in $014B
$DFE3:A2 01	LDX #$01
; control flow target
$DFE5:E8	INX
$DFE6:8A	TXA
$DFE7:29 03	AND #$03
$DFE9:A8	TAY
$DFEA:BD 49 01	LDA $0149,X	; EOR with the previous character
$DFED:5D 48 01	EOR $0148,X
$DFF0:18	CLC
$DFF1:79 97 E0	ADC $E097,Y	; add a magic number
$DFF4:29 3F	AND #$3F	; chop it down to 6 bits
$DFF6:9D 49 01	STA $0149,X	; store it to $0149,X
$DFF9:E4 05	CPX $05
$DFFB:90 E8	BCC $DFE5	; loop until we reach the character index
$DFFD:A2 01	LDX #$01
; $DFFF is also listed as data
$DFFF:20 0F E0	JSR $E00F	; sum $0149,X from X to $05, EOR it, increment it, then AND #$3F, returning the result in A; X is left at $05 + 1
$E002:9D 49 01	STA $0149,X	; store the resulting checksum in $014A,X - 1
; control flow target
$E005:BD 4A 01	LDA $014A,X	; copy password from $014A,X to $0169,X
$E008:9D 69 01	STA $0169,X
$E00B:CA	DEX
$E00C:10 F7	BPL $E005
$E00E:60	RTS

; sum $0149,X from X to $05, EOR it, increment it, then AND #$3F, returning the result in A; X is left at $05 + 1
; control flow target
$E00F:A9 00	LDA #$00	; initialize A to #$00
; control flow target
$E011:18	CLC
$E012:7D 49 01	ADC $0149,X
$E015:E8	INX
$E016:E4 05	CPX $05
$E018:90 F7	BCC $E011	; this loop sums $0149,X from the original value of X up to the value of $05
$E01A:49 FF	EOR #$FF	; bit-flip A
$E01C:18	CLC
$E01D:69 01	ADC #$01	; A++
$E01F:29 3F	AND #$3F	; chop A down to 6 bits
$E021:60	RTS

; probably password checking
; control flow target
$E022:A2 1A	LDX #$1A
$E024:86 05	STX $05
; control flow target
$E026:BD 69 01	LDA $0169,X
$E029:9D 4A 01	STA $014A,X
$E02C:CA	DEX
$E02D:10 F7	BPL $E026
$E02F:A2 01	LDX #$01
$E031:20 0F E0	JSR $E00F	; sum $0149,X from X to $05, EOR it, increment it, then AND #$3F, returning the result in A; X is left at $05 + 1
$E034:DD 49 01	CMP $0149,X
$E037:D0 5C	BNE $E095
$E039:A2 01	LDX #$01
$E03B:BD 49 01	LDA $0149,X
; control flow target
$E03E:85 04	STA $04
$E040:E8	INX
$E041:8A	TXA
$E042:29 03	AND #$03
$E044:A8	TAY
$E045:BD 49 01	LDA $0149,X
$E048:48	PHA
$E049:38	SEC
$E04A:F9 97 E0	SBC $E097,Y
$E04D:45 04	EOR $04
$E04F:29 3F	AND #$3F
$E051:9D 49 01	STA $0149,X
$E054:68	PLA
$E055:E4 05	CPX $05
$E057:90 E5	BCC $E03E
$E059:A2 02	LDX #$02
$E05B:20 0F E0	JSR $E00F	; sum $0149,X from X to $05, EOR it, increment it, then AND #$3F, returning the result in A; X is left at $05 + 1
$E05E:D0 35	BNE $E095
$E060:A0 00	LDY #$00
$E062:A2 02	LDX #$02
$E064:A9 20	LDA #$20
$E066:85 02	STA $02
; control flow target
$E068:B9 7B DF	LDA $DF7B,Y
$E06B:85 05	STA $05
$E06D:A9 00	LDA #$00
$E06F:85 03	STA $03
; control flow target
$E071:18	CLC
$E072:A5 02	LDA $02
$E074:3D 4A 01	AND $014A,X
$E077:F0 01	BEQ $E07A
$E079:38	SEC
; control flow target
$E07A:26 03	ROL $03
$E07C:46 02	LSR $02
$E07E:90 05	BCC $E085
$E080:E8	INX
$E081:A9 20	LDA #$20
$E083:85 02	STA $02
; control flow target
$E085:C6 05	DEC $05
$E087:D0 E8	BNE $E071
$E089:A5 03	LDA $03
$E08B:99 DF 00	STA $DF,Y	; location?
$E08E:C8	INY
$E08F:C0 16	CPY #$16
$E091:90 D5	BCC $E068
$E093:18	CLC
$E094:60	RTS

; control flow target
$E095:38	SEC
$E096:60	RTS

; data; used during password generation/validation
$E097:12
$E098:26
$E099:38
$E09A:0A

; control flow target
$E09B:20 5A F6	JSR $F65A	; STZ to $8E, $94, $99-$9A, pAPU stuff
$E09E:20 00 D3	JSR $D300	; initialize a bunch of stuff
$E0A1:20 75 D8	JSR $D875
$E0A4:A9 03	LDA #$03
$E0A6:20 00 E6	JSR $E600
$E0A9:A2 BF	LDX #$BF
$E0AB:A9 E3	LDA #$E3
$E0AD:20 A1 CF	JSR $CFA1
$E0B0:A9 DF	LDA #$DF
$E0B2:A0 E3	LDY #$E3
$E0B4:20 D9 D2	JSR $D2D9
$E0B7:A2 3F	LDX #$3F
$E0B9:A9 E3	LDA #$E3
$E0BB:20 34 D1	JSR $D134	; STX $34, STA $35
$E0BE:A9 E8	LDA #$E8
$E0C0:85 06	STA $06
$E0C2:A9 E3	LDA #$E3
$E0C4:85 07	STA $07
$E0C6:A9 10	LDA #$10
$E0C8:85 0D	STA $0D
$E0CA:20 E2 D1	JSR $D1E2
$E0CD:20 AC E2	JSR $E2AC
$E0D0:20 5D D8	JSR $D85D	; copy $D869-$D874 to $0200-$020B
$E0D3:20 92 E1	JSR $E192
$E0D6:20 5B CF	JSR $CF5B
$E0D9:20 F3 E0	JSR $E0F3
$E0DC:20 0F D3	JSR $D30F
$E0DF:20 4D C3	JSR $C34D
$E0E2:20 36 F6	JSR $F636
$E0E5:A9 00	LDA #$00
$E0E7:20 22 E1	JSR $E122
$E0EA:20 00 D3	JSR $D300	; initialize a bunch of stuff
$E0ED:20 C4 C3	JSR $C3C4
$E0F0:4C BC D5	JMP $D5BC

; control flow target
$E0F3:A9 0B	LDA #$0B
$E0F5:20 0D E3	JSR $E30D
$E0F8:D0 26	BNE $E120
$E0FA:A6 23	LDX $23
$E0FC:A9 22	LDA #$22
$E0FE:A0 B0	LDY #$B0
$E100:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$E103:A9 02	LDA #$02
$E105:20 26 D7	JSR $D726	; STA $0730,X, INX
$E108:86 23	STX $23
$E10A:A5 E2	LDA $E2	; salamanderSkins
$E10C:A2 0A	LDX #$0A
$E10E:20 85 D7	JSR $D785	; divides A by X, returning quotient in $02 and remainder in A
$E111:09 A0	ORA #$A0
$E113:A8	TAY
$E114:A5 02	LDA $02
$E116:09 A0	ORA #$A0
$E118:A6 23	LDX $23
$E11A:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$E11D:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80
; control flow target
$E120:60	RTS

; control flow target
$E121:8A	TXA
; control flow target
$E122:85 10	STA $10
$E124:20 81 E2	JSR $E281
; control flow target
$E127:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$E12A:A2 00	LDX #$00
$E12C:A5 F8	LDA $F8
; control flow target
$E12E:0A	ASL
$E12F:B0 07	BCS $E138
$E131:E8	INX
$E132:E0 08	CPX #$08
$E134:90 F8	BCC $E12E
$E136:B0 EF	BCS $E127
; control flow target
$E138:8A	TXA
$E139:20 A2 D7	JSR $D7A2

; data, looks like a jump table
$E13C:7F E1	; $E17F
$E13E:7F E1	; $E17F
$E140:27 E1	; $E127
$E142:A1 E2	; $E2A1
$E144:4C E1	; $E14C
$E146:4C E1	; $E14C
$E148:5F E1	; $E15F
$E14A:6C E1	; $E16C

; control flow target
$E14C:A5 10	LDA $10
$E14E:C9 08	CMP #$08
$E150:90 04	BCC $E156
; control flow target
$E152:A9 03	LDA #$03
$E154:D0 CC	BNE $E122
; control flow target
$E156:38	SEC
$E157:E9 04	SBC #$04
$E159:B0 C7	BCS $E122
$E15B:69 08	ADC #$08
$E15D:D0 C3	BNE $E122
; control flow target
$E15F:A6 10	LDX $10
$E161:CA	DEX
$E162:30 EE	BMI $E152
$E164:E0 03	CPX #$03
$E166:D0 B9	BNE $E121
$E168:A9 08	LDA #$08
$E16A:D0 B6	BNE $E122
; control flow target
$E16C:A6 10	LDX $10
$E16E:E8	INX
$E16F:E0 09	CPX #$09
$E171:D0 04	BNE $E177
$E173:A9 04	LDA #$04
$E175:D0 AB	BNE $E122
; control flow target
$E177:E0 04	CPX #$04
$E179:D0 A6	BNE $E121
$E17B:A9 00	LDA #$00
$E17D:F0 A3	BEQ $E122
; control flow target
$E17F:A5 10	LDA $10
$E181:20 0D E3	JSR $E30D
$E184:F0 09	BEQ $E18F
$E186:A6 10	LDX $10
$E188:20 A6 E1	JSR $E1A6
$E18B:A9 0F	LDA #$0F
$E18D:85 99	STA $99
; control flow target
$E18F:4C 27 E1	JMP $E127
; control flow target
$E192:A6 6E	LDX $6E
$E194:20 9C E1	JSR $E19C
$E197:A6 6F	LDX $6F
$E199:D0 01	BNE $E19C
$E19B:60	RTS

; control flow target
$E19C:A9 00	LDA #$00
$E19E:85 23	STA $23
$E1A0:20 A6 E1	JSR $E1A6
$E1A3:4C BA D4	JMP $D4BA
; control flow target
$E1A6:BD 6F E2	LDA $E26F,X
$E1A9:85 08	STA $08
$E1AB:85 09	STA $09
$E1AD:A9 80	LDA #$80
$E1AF:A0 00	LDY #$00
$E1B1:E0 04	CPX #$04
$E1B3:90 02	BCC $E1B7
$E1B5:C8	INY
$E1B6:6A	ROR
; control flow target
$E1B7:96 6E	STX $6E,Y
$E1B9:E0 06	CPX #$06
$E1BB:D0 12	BNE $E1CF
$E1BD:20 0B E3	JSR $E30B

; unknown - probably code
$E1C0:78	SEI
$E1C1:08	PHP
$E1C2:68	PLA
$E1C3:29 06	AND #$06
$E1C5:0A	ASL
$E1C6:A8	TAY
$E1C7:A9 ED	LDA #$ED
$E1C9:85 02	STA $02
$E1CB:A2 20	LDX #$20
$E1CD:D0 20	BNE $E1EF
; definitely code
; control flow target
$E1CF:86 12	STX $12
$E1D1:84 13	STY $13
$E1D3:85 05	STA $05
$E1D5:A2 03	LDX #$03
$E1D7:86 11	STX $11
; control flow target
$E1D9:20 02 E2	JSR $E202
$E1DC:C6 11	DEC $11
$E1DE:10 F9	BPL $E1D9
$E1E0:A4 13	LDY $13
$E1E2:B9 6B E2	LDA $E26B,Y
$E1E5:85 02	STA $02
$E1E7:BE 6D E2	LDX $E26D,Y
$E1EA:98	TYA
$E1EB:F0 02	BEQ $E1EF
$E1ED:A0 04	LDY #$04
; control flow target
$E1EF:A9 5B	LDA #$5B
$E1F1:85 0B	STA $0B
$E1F3:A9 E2	LDA #$E2
$E1F5:85 0C	STA $0C
$E1F7:A9 13	LDA #$13
$E1F9:85 04	STA $04
$E1FB:A9 08	LDA #$08
$E1FD:85 0A	STA $0A
$E1FF:4C D6 CD	JMP $CDD6
; control flow target
$E202:A9 05	LDA #$05
$E204:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$E207:A9 05	LDA #$05
$E209:20 41 D7	JSR $D741	; given A, sets Y = A << 1, X = $8000,Y, and A = $8001,Y
$E20C:85 07	STA $07
$E20E:8A	TXA
$E20F:69 04	ADC #$04
$E211:85 06	STA $06
$E213:90 02	BCC $E217
$E215:E6 07	INC $07
; control flow target
$E217:A5 11	LDA $11
$E219:0A	ASL
$E21A:0A	ASL
$E21B:0A	ASL
$E21C:0A	ASL
$E21D:05 05	ORA $05
$E21F:A8	TAY
$E220:A9 06	LDA #$06
$E222:A6 23	LDX $23
$E224:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$E227:A9 10	LDA #$10
$E229:20 26 D7	JSR $D726	; STA $0730,X, INX
$E22C:86 23	STX $23
$E22E:A5 12	LDA $12
$E230:0A	ASL
$E231:0A	ASL
$E232:05 11	ORA $11
$E234:AA	TAX
$E235:BD 3F E3	LDA $E33F,X
$E238:A2 10	LDX #$10
$E23A:20 6A D7	JSR $D76A	; multiplies A by X, returning low byte in $03 and high byte in A
$E23D:48	PHA
$E23E:A5 03	LDA $03
$E240:18	CLC
$E241:65 06	ADC $06
$E243:85 02	STA $02
$E245:68	PLA
$E246:65 07	ADC $07
$E248:85 03	STA $03
$E24A:A0 00	LDY #$00
$E24C:A6 23	LDX $23
; control flow target
$E24E:B1 02	LDA ($02),Y
$E250:20 26 D7	JSR $D726	; STA $0730,X, INX
$E253:C8	INY
$E254:C0 10	CPY #$10
$E256:90 F6	BCC $E24E
$E258:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80

; data; it's used but I'm not sure what for
$E25B:68
$E25C:696A
$E25E:6B
$E25F:6C6D6E
$E262:6F5E5F62
$E266:635E
$E268:5F6061D5
$E26C:ED1020
$E26F:0303
$E271:0302
$E273:0203
$E275:0202
$E277:0303
$E279:0203
$E27B:0302
$E27D:0303
$E27F:0303

; control flow target
$E281:A0 00	LDY #$00
$E283:C9 04	CMP #$04
$E285:90 03	BCC $E28A
$E287:E9 04	SBC #$04
$E289:C8	INY
; control flow target
$E28A:AA	TAX
; given X and Y, set $0200 to $E2A8,Y, $0201 to #$27, $0202 to #$03, and $0203 to $E2A2,X
; control flow target
$E28B:B9 A8 E2	LDA $E2A8,Y
$E28E:BC A2 E2	LDY $E2A2,X
; control flow target
$E291:8D 00 02	STA $0200
$E294:8C 03 02	STY $0203
$E297:A9 27	LDA #$27
$E299:8D 01 02	STA $0201
$E29C:A9 03	LDA #$03
$E29E:8D 02 02	STA $0202
; control flow target
$E2A1:60	RTS

; data; it's used but I'm not sure what for
$E2A2:36 56
$E2A4:76 96
$E2A6:B6 A4
$E2A8:44 74 5F
$E2AB:6F

; control flow target
$E2AC:A2 00	LDX #$00
; control flow target
$E2AE:86 05	STX $05
$E2B0:8A	TXA
$E2B1:20 0D E3	JSR $E30D
$E2B4:F0 0B	BEQ $E2C1
$E2B6:A5 05	LDA $05
$E2B8:20 07 E3	JSR $E307
$E2BB:D0 31	BNE $E2EE
$E2BD:A9 1D	LDA #$1D
$E2BF:D0 0A	BNE $E2CB
; control flow target
$E2C1:A9 1F	LDA #$1F
$E2C3:A6 05	LDX $05
$E2C5:E0 0B	CPX #$0B
$E2C7:D0 02	BNE $E2CB
$E2C9:A9 1E	LDA #$1E
; control flow target
$E2CB:48	PHA
$E2CC:A6 05	LDX $05
$E2CE:BD F6 E2	LDA $E2F6,X
$E2D1:48	PHA
$E2D2:29 0F	AND #$0F
$E2D4:A8	TAY
$E2D5:68	PLA
$E2D6:29 F0	AND #$F0
$E2D8:A2 03	LDX #$03
$E2DA:20 6A D7	JSR $D76A	; multiplies A by X, returning low byte in $03 and high byte in A
$E2DD:18	CLC
$E2DE:69 05	ADC #$05
$E2E0:85 04	STA $04
$E2E2:68	PLA
$E2E3:91 03	STA ($03),Y
$E2E5:A6 05	LDX $05
$E2E7:E0 0F	CPX #$0F
$E2E9:D0 05	BNE $E2F0
$E2EB:C8	INY
$E2EC:91 03	STA ($03),Y
; control flow target
$E2EE:A6 05	LDX $05
; control flow target
$E2F0:E8	INX
$E2F1:E0 11	CPX #$11
$E2F3:90 B9	BCC $E2AE
$E2F5:60	RTS

; data; it's used but I'm not sure what for
$E2F6:1416
$E2F8:18
$E2F9:1A
$E2FA:444648
$E2FD:4A
$E2FE:4C7476
$E301:78
$E302:7A
$E303:7C9697
$E306:99

; control flow target
$E307:C9 06	CMP #$06
$E309:D0 08	BNE $E313
; control flow target
$E30B:A9 1C	LDA #$1C
; read quest status flag specified by A into A
; control flow target
$E30D:20 2A E3	JSR $E32A	; given A, makes A have exectly 1 bit set and Y have an offset for $F0
$E310:39 F0 00	AND $F0,Y	; set A to the corresponding bit of $F0,Y
; control flow target
$E313:60	RTS

; unsets quest status flag specified by A
; control flow target
$E314:20 2A E3	JSR $E32A	; given A, makes A have exectly 1 bit set and Y have an offset for $F0
$E317:49 FF	EOR #$FF	; toggle all bits of A
$E319:39 F0 00	AND $F0,Y	; unset quest status flag
$E31C:99 F0 00	STA $F0,Y
$E31F:60	RTS

; sets quest status flag specified by A
; control flow target
$E320:20 2A E3	JSR $E32A	; given A, makes A have exectly 1 bit set and Y have an offset for $F0
$E323:19 F0 00	ORA $F0,Y	; set quest status flag
$E326:99 F0 00	STA $F0,Y
$E329:60	RTS

; control flow target
; $E337 is a lut with values 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80
; so given A=0babcdefgh, this function sets X to 0b00000fgh, A to 0x01 << X, and Y to 0b000abcde
; control flow target
$E32A:A8	TAY
$E32B:29 07	AND #$07
$E32D:AA	TAX
$E32E:98	TYA
$E32F:4A	LSR
$E330:4A	LSR
$E331:4A	LSR
$E332:A8	TAY
$E333:BD 37 E3	LDA $E337,X
$E336:60	RTS

; data; index table for selecting a byte with exactly one bit set
$E337:01
$E338:02
$E339:04
$E33A:08
$E33B:10
$E33C:20
$E33D:40
$E33E:80

; data; it's used but I'm not sure what for
$E33F:00
$E340:01 02
$E342:03 04
$E344:05 06
$E346:07 08
$E348:09 0A
$E34A:0B
$E34B:0C 0D 0E
$E34E:0F101112
$E352:13 14
$E354:15 16
$E356:17 18
$E358:19 1C 1D
$E35B:20 21 22
$E35E:23 20
$E360:21 22
$E362:23 24
$E364:25 26
$E366:27 28
$E368:29 2A
$E36A:2B
$E36B:2C 2D 2E
$E36E:2F303132
$E372:33 34
$E374:7F7F3536
$E378:37 38
$E37A:39 7F 36
$E37D:7F38377F
$E381:39 7F 3C
$E384:3D 3E 3F
$E387:1E 1E EC
$E38A:DE 1E 1E
$E38D:DE DE 1E
$E390:1E DE ED
$E393:FC 7F FC
$E396:7F7FFD7F
$E39A:FD EE DF
$E39D:1E 1E DF
$E3A0:DF1E1EDF
$E3A4:EF1E1E1E
$E3A8:7F1E7F7F
$E3AC:1E 7F 1E
$E3AF:1E 1E 1E
$E3B2:1E 18 19
$E3B5:1A
$E3B6:1B
$E3B7:3A
$E3B8:3B
$E3B9:A0 A0
$E3BB:7F7F7F7F
$E3BF:01 01
$E3C1:01 00
$E3C3:00 01
$E3C5:00 00
$E3C7:01 01
$E3C9:00 01
$E3CB:01 00
$E3CD:01 01
$E3CF:01 01
$E3D1:03 03
$E3D3:03 03
$E3D5:03 03
$E3D7:03 03
$E3D9:03 03
$E3DB:03 00
$E3DD:01 03
$E3DF:08
$E3E0:2C 37 16
$E3E3:28
$E3E4:30 37
$E3E6:30 30
$E3E8:1E 80 1C
$E3EB:1F060408
$E3EF:14 16
$E3F1:13 15
$E3F3:17 12
$E3F5:18
$E3F6:19 0E 02
$E3F9:1B
$E3FA:00 1A
$E3FC:09 01
$E3FE:05 07
$E400:10 0A
$E402:03 0B
$E404:0C 0D 0F
$E407:4FAFC7A6
$E40B:36 98
$E40D:F7 DE
$E40F:FD 5F 5B
$E412:FE 0E 26
$E415:3E 1F 23
$E418:1F34C7C7
$E41C:A6 B6
$E41E:99 F6 6F
$E421:DD 8B F9
$E424:6B
$E425:89 9F
$E427:87 C8
$E429:D7 CD
$E42B:33 F1
$E42D:E9 AD
$E42F:A6 7D
$E431:F9 BF D7
$E434:FC 37 FC
$E437:57 FC
$E439:7C 4C FC
$E43C:3E 46 BE
$E43F:69 8F
$E441:C7 D3
$E443:FE 4F EF
$E446:D3 EC
$E448:9B

; control flow target
$E449:A5 6F	LDA $6F
$E44B:D0 01	BNE $E44E
$E44D:60	RTS

; control flow target
$E44E:0A	ASL
$E44F:AA	TAX
$E450:BD 55 E4	LDA $E455,X
$E453:85 02	STA $02
$E455:BD 56 E4	LDA $E456,X
$E458:85 03	STA $03
$E45A:6C 02 00	JMP ($02)

; looks like a jump table
$E45D:67 E4	; $E467
$E45F:6D E4	; $E46D
$E461:8A E4	; $E48A
$E463:9E E4	; $E49E
$E465:ED E4	; $E4ED

; control flow target
$E467:A2 04	LDX #$04
$E469:A9 14	LDA #$14
$E46B:D0 04	BNE $E471
; control flow target
$E46D:A2 05	LDX #$05
$E46F:A9 0C	LDA #$0C
; control flow target
$E471:C5 F5	CMP $F5
$E473:F0 14	BEQ $E489
$E475:86 70	STX $70
$E477:20 ED F5	JSR $F5ED
$E47A:A9 20	LDA #$20
$E47C:85 02	STA $02
; control flow target
$E47E:20 E3 D3	JSR $D3E3
$E481:C6 02	DEC $02
$E483:D0 F9	BNE $E47E
$E485:A9 01	LDA #$01
$E487:85 FC	STA $FC
; control flow target
$E489:60	RTS

; control flow target
$E48A:20 0B E3	JSR $E30B
$E48D:F0 18	BEQ $E4A7
$E48F:59 F0 00	EOR $F0,Y
$E492:99 F0 00	STA $F0,Y
$E495:A9 02	LDA #$02
$E497:85 2E	STA $2E
$E499:A2 06	LDX #$06
$E49B:4C A6 E1	JMP $E1A6
; control flow target
$E49E:A5 30	LDA $30
$E4A0:D0 05	BNE $E4A7
$E4A2:AD E0 03	LDA $03E0
$E4A5:F0 01	BEQ $E4A8
; control flow target
$E4A7:60	RTS

; control flow target
$E4A8:A2 BF	LDX #$BF
$E4AA:A9 E4	LDA #$E4
$E4AC:20 8A C2	JSR $C28A
$E4AF:B0 F6	BCS $E4A7
$E4B1:A9 0B	LDA #$0B
$E4B3:85 99	STA $99
$E4B5:98	TYA
$E4B6:48	PHA
$E4B7:20 CC E4	JSR $E4CC
$E4BA:68	PLA
$E4BB:A8	TAY
$E4BC:4C 88 F3	JMP $F388

; unknown, probably data
$E4BF:22 0B 2B 08
$E4C3:55 29
$E4C5:49 09
$E4C7:00 0F
$E4C9:00 10
$E4CB:30

; control flow target
$E4CC:A9 0F	LDA #$0F
$E4CE:85 10	STA $10
; control flow target
$E4D0:20 E3 D3	JSR $D3E3
$E4D3:E6 47	INC $47
$E4D5:A5 47	LDA $47
$E4D7:4A	LSR
$E4D8:B0 F6	BCS $E4D0
$E4DA:A5 10	LDA $10
$E4DC:29 03	AND #$03
$E4DE:AA	TAX
$E4DF:BD C8 E4	LDA $E4C8,X
$E4E2:8D 10 07	STA $0710
$E4E5:20 F9 D2	JSR $D2F9	; $22 |= #$01
$E4E8:C6 10	DEC $10
$E4EA:10 E4	BPL $E4D0
$E4EC:60	RTS

; control flow target
$E4ED:20 CC E4	JSR $E4CC
$E4F0:A9 08	LDA #$08
$E4F2:85 70	STA $70
$E4F4:60	RTS

; control flow target
$E4F5:A0 00	LDY #$00
; control flow target
$E4F7:D9 B0 03	CMP $03B0,Y
$E4FA:F0 07	BEQ $E503
$E4FC:C8	INY
$E4FD:C8	INY
$E4FE:C0 20	CPY #$20
$E500:90 F5	BCC $E4F7
$E502:60	RTS

; control flow target
$E503:B9 B1 03	LDA $03B1,Y
$E506:A6 75	LDX $75
$E508:9D 05 04	STA $0405,X
$E50B:60	RTS

; control flow target
$E50C:A2 00	LDX #$00
$E50E:86 1E	STX $1E
$E510:86 1F	STX $1F
$E512:F0 65	BEQ $E579
; control flow target
$E514:A9 07	LDA #$07
$E516:85 1F	STA $1F
$E518:A9 00	LDA #$00
$E51A:85 1E	STA $1E
$E51C:A5 30	LDA $30
$E51E:D0 4F	BNE $E56F
$E520:A2 B0	LDX #$B0
$E522:A9 03	LDA #$03
$E524:A0 20	LDY #$20
$E526:20 D0 D3	JSR $D3D0	; fill (A * 256 + X) with Y #$00's
$E529:A2 12	LDX #$12
$E52B:20 0B F5	JSR $F50B
$E52E:86 10	STX $10
$E530:85 11	STA $11
$E532:A0 00	LDY #$00
$E534:84 12	STY $12
; control flow target
$E536:A9 01	LDA #$01
$E538:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$E53B:B1 10	LDA ($10),Y
$E53D:48	PHA
$E53E:29 7F	AND #$7F
$E540:F0 28	BEQ $E56A
$E542:84 75	STY $75
$E544:A6 12	LDX $12
$E546:9D B0 03	STA $03B0,X
$E549:A5 1E	LDA $1E
$E54B:4A	LSR
$E54C:4A	LSR
$E54D:4A	LSR
$E54E:4A	LSR
$E54F:85 02	STA $02
$E551:A5 1F	LDA $1F
$E553:0A	ASL
$E554:0A	ASL
$E555:0A	ASL
$E556:0A	ASL
$E557:05 02	ORA $02
$E559:9D B1 03	STA $03B1,X
$E55C:E8	INX
$E55D:E8	INX
$E55E:86 12	STX $12
$E560:B1 10	LDA ($10),Y
$E562:AA	TAX
$E563:E8	INX
$E564:E8	INX
$E565:20 79 E5	JSR $E579
$E568:A4 75	LDY $75
; control flow target
$E56A:C8	INY
$E56B:68	PLA
$E56C:10 C8	BPL $E536
$E56E:60	RTS

; control flow target
$E56F:A2 01	LDX #$01
$E571:AD 0B 04	LDA $040B
$E574:29 C0	AND #$C0
$E576:F0 01	BEQ $E579
$E578:E8	INX
; control flow target
$E579:A9 04	LDA #$04
$E57B:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$E57E:8A	TXA
$E57F:20 41 D7	JSR $D741	; given A, sets Y = A << 1, X = $8000,Y, and A = $8001,Y
$E582:A8	TAY
$E583:A9 00	LDA #$00
$E585:85 08	STA $08
$E587:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$E58A:86 09	STX $09
$E58C:85 0A	STA $0A
$E58E:86 04	STX $04
$E590:85 05	STA $05
$E592:18	CLC
$E593:A9 02	LDA #$02
$E595:65 02	ADC $02
$E597:85 02	STA $02
$E599:90 02	BCC $E59D
$E59B:E6 03	INC $03
; control flow target
$E59D:A6 1E	LDX $1E
$E59F:A5 1F	LDA $1F
$E5A1:20 81 E6	JSR $E681
$E5A4:A5 09	LDA $09
$E5A6:18	CLC
$E5A7:65 1E	ADC $1E
$E5A9:85 1E	STA $1E
$E5AB:A5 0A	LDA $0A
$E5AD:65 1F	ADC $1F
$E5AF:85 1F	STA $1F
$E5B1:60	RTS

$E5B2:AA	TAX
$E5B3:BD E7 E5	LDA $E5E7,X
$E5B6:A2 10	LDX #$10
$E5B8:20 6A D7	JSR $D76A	; multiplies A by X, returning low byte in $03 and high byte in A
$E5BB:48	PHA
$E5BC:A5 03	LDA $03
$E5BE:48	PHA
$E5BF:A9 05	LDA #$05
$E5C1:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$E5C4:A9 05	LDA #$05
$E5C6:20 49 E6	JSR $E649
$E5C9:68	PLA
$E5CA:18	CLC
$E5CB:65 02	ADC $02
$E5CD:85 02	STA $02
$E5CF:68	PLA
$E5D0:65 03	ADC $03
$E5D2:85 03	STA $03
$E5D4:A9 40	LDA #$40
$E5D6:85 04	STA $04
$E5D8:A9 00	LDA #$00
$E5DA:85 05	STA $05
$E5DC:A9 80	LDA #$80
$E5DE:85 08	STA $08
$E5E0:A2 C0	LDX #$C0
$E5E2:A9 0F	LDA #$0F
$E5E4:4C 81 E6	JMP $E681

; probably data
$E5E7:00 04
$E5E9:08
$E5EA:0C 10 14
$E5ED:18
$E5EE:20 20 24
$E5F1:28
$E5F2:2C 30 34
$E5F5:36 36
$E5F7:36 3C

; control flow target
$E5F9:A9 00	LDA #$00
$E5FB:20 00 E6	JSR $E600
$E5FE:A9 02	LDA #$02
; control flow target
$E600:18	CLC
; control flow target
$E601:2A	ROL
$E602:85 09	STA $09
$E604:AA	TAX
$E605:BD 33 E6	LDA $E633,X
$E608:F0 21	BEQ $E62B
$E60A:0A	ASL
$E60B:66 08	ROR $08
$E60D:4A	LSR
$E60E:48	PHA
$E60F:4A	LSR
$E610:4A	LSR
$E611:4A	LSR
$E612:4A	LSR
$E613:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$E616:68	PLA
$E617:29 0F	AND #$0F
$E619:20 49 E6	JSR $E649
$E61C:A4 09	LDY $09
$E61E:C0 03	CPY #$03
$E620:B0 06	BCS $E628
$E622:20 A8 E6	JSR $E6A8
$E625:4C 2B E6	JMP $E62B	; BRA
; control flow target
$E628:20 81 E6	JSR $E681
; control flow target
$E62B:E6 09	INC $09
$E62D:A5 09	LDA $09
$E62F:4A	LSR
$E630:B0 CF	BCS $E601
$E632:60	RTS

; data; it's used but I'm not sure what for
$E633:51 52 3E 15 53 54 D5 00
$E63B:56 57 58 59 26 00
$E641:27 00
$E643:5A 63 59 3D 3F 00

; control flow target
$E649:20 41 D7	JSR $D741	; given A, sets Y = A << 1, X = $8000,Y, and A = $8001,Y
$E64C:A8	TAY
$E64D:A9 00	LDA #$00
$E64F:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$E652:86 04	STX $04
$E654:85 05	STA $05
$E656:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$E659:A8	TAY
$E65A:A5 02	LDA $02
$E65C:18	CLC
$E65D:69 04	ADC #$04
$E65F:85 02	STA $02
$E661:90 02	BCC $E665
$E663:E6 03	INC $03
; control flow target
$E665:98	TYA
$E666:60	RTS

; control flow target
$E667:A9 03	LDA #$03
$E669:85 08	STA $08
$E66B:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$E66E:A5 DF	LDA $DF	; location
$E670:20 41 D7	JSR $D741	; given A, sets Y = A << 1, X = $8000,Y, and A = $8001,Y
$E673:86 02	STX $02
$E675:85 03	STA $03
$E677:A2 00	LDX #$00
$E679:86 04	STX $04
$E67B:A9 04	LDA #$04
$E67D:85 05	STA $05
$E67F:A9 10	LDA #$10
; control flow target
$E681:20 9C E6	JSR $E69C
$E684:84 06	STY $06
$E686:A6 04	LDX $04
$E688:F0 02	BEQ $E68C
$E68A:E6 05	INC $05
; control flow target
$E68C:20 CD E6	JSR $E6CD
$E68F:8D 07 20	STA $2007	; VRAM I/O Register
$E692:CA	DEX
$E693:D0 F7	BNE $E68C
$E695:C6 05	DEC $05
$E697:D0 F3	BNE $E68C
$E699:4C F5 D7	JMP $D7F5	; set some PPU/VRAM registers

; control flow target
$E69C:AC 02 20	LDY $2002	; PPU Status Register - read on $2002 triggers reset of high bit and $2005-$2006
$E69F:A0 00	LDY #$00
$E6A1:8D 06 20	STA $2006	; VRAM Address Register #2 - high byte
$E6A4:8E 06 20	STX $2006	; VRAM Address Register #2 - low byte
$E6A7:60	RTS

; control flow target
$E6A8:20 9C E6	JSR $E69C
$E6AB:84 06	STY $06
; control flow target
$E6AD:A2 08	LDX #$08
; control flow target
$E6AF:20 CD E6	JSR $E6CD
$E6B2:8D 07 20	STA $2007	; VRAM I/O Register
$E6B5:9D 30 07	STA $0730,X
$E6B8:CA	DEX
$E6B9:D0 F4	BNE $E6AF
$E6BB:A2 08	LDX #$08
; control flow target
$E6BD:BD 30 07	LDA $0730,X
$E6C0:8D 07 20	STA $2007	; VRAM I/O Register
$E6C3:CA	DEX
$E6C4:D0 F7	BNE $E6BD
$E6C6:C6 04	DEC $04
$E6C8:D0 E3	BNE $E6AD
$E6CA:4C F5 D7	JMP $D7F5	; set some PPU/VRAM registers

; $E6CD-$E6F0: decompression routine for RLE compression used for the title screen graphics (at least; very likely this is used for other things too).
; Basically, each byte stands for itself except for #$81, which indicates that the previous byte should be repeated for the number of times given by the next byte, e.g. 7F 81 05 means 7F 7F 7F 7F 7F.
; A literal #$81 is represented by setting the repeat count to #$00, e.g. 7F 81 00 means 7F 81.
; Note that this routine is similar to the routine at $EC83, but operates on plain bytes instead of variable-bit-width data.
; control flow target
$E6CD:A5 06	LDA $06
$E6CF:D0 19	BNE $E6EA
; control flow target
$E6D1:20 62 D7	JSR $D762	; read the next byte from ($02),Y; update Y and $03 as appropriate
$E6D4:C9 81	CMP #$81
$E6D6:D0 0D	BNE $E6E5	; if we did not read #$81, return the byte
$E6D8:24 08	BIT $08	; not sure what $08 is, but it effectively toggles the RLE behaviour of #$81
$E6DA:30 09	BMI $E6E5	; but if its high bit is set, then just return the byte
$E6DC:20 62 D7	JSR $D762	; otherwise, read the next byte from ($02),Y; update Y and $03 as appropriate
$E6DF:C9 00	CMP #$00	; did we read a #$00?
$E6E1:D0 05	BNE $E6E8	; if not, it's a repeat count, so go handle that
$E6E3:A9 81	LDA #$81	; otherwise, #$8100 means return #$81
; control flow target
$E6E5:85 07	STA $07	; store the byte so we can repeat it if necessary
$E6E7:60	RTS
; control flow target
$E6E8:85 06	STA $06	; store the repeat count
; control flow target
$E6EA:C6 06	DEC $06	; decrement the repeat count
$E6EC:F0 E3	BEQ $E6D1	; if the repeat count is now 0, go read the next byte
$E6EE:A5 07	LDA $07	; otherwise return the previous byte
$E6F0:60	RTS

; swap ROM bank 0 into the swappable RAM bank
; control flow target
$E6F1:A9 00	LDA #$00
$E6F3:85 2D	STA $2D
$E6F5:E6 FD	INC $FD
$E6F7:8D FF FF	STA $FFFF
$E6FA:8D FF FF	STA $FFFF
$E6FD:8D FF FF	STA $FFFF
$E700:8D FF FF	STA $FFFF
$E703:8D FF FF	STA $FFFF
$E706:C6 FD	DEC $FD
$E708:60	RTS

; control flow target
$E709:A5 33	LDA $33
; swap ROM bank specified by A into the swappable RAM bank
; control flow target
$E70B:85 2D	STA $2D
; this happens during IRQ
; control flow target
$E70D:E6 FD	INC $FD
$E70F:8D FF FF	STA $FFFF
$E712:4A	LSR
$E713:8D FF FF	STA $FFFF
$E716:4A	LSR
$E717:8D FF FF	STA $FFFF
$E71A:4A	LSR
$E71B:8D FF FF	STA $FFFF
$E71E:4A	LSR
$E71F:8D FF FF	STA $FFFF
$E722:C6 FD	DEC $FD
$E724:60	RTS

; control flow target
$E725:A9 0E	LDA #$0E	; CHR 8k, PRG 16k, $8000 swappable, veritcal mirroring
$E727:D0 02	BNE $E72B
; control flow target
$E729:A9 0F	LDA #$0F	; CHR 8k, PRG 16k, $8000 swappable, horizontal mirroring
; control flow target
$E72B:A2 05	LDX #$05	; MMC1, so need to write 5 bits one at a time
$E72D:E6 FD	INC $FD
; control flow target
$E72F:8D FF 9F	STA $9FFF	; update mapper config
$E732:4A	LSR
$E733:CA	DEX
$E734:D0 F9	BNE $E72F
$E736:C6 FD	DEC $FD
$E738:60	RTS

; initialize mapper stuff
; control flow target
$E739:20 25 E7	JSR $E725	; update mapper config to vertical mirroring
$E73C:A9 FF	LDA #$FF
$E73E:85 02	STA $02	; set $02 to #$FF
$E740:A9 BF	LDA #$BF	; set A to set CHR Reg 0 to 0
$E742:20 4C E7	JSR $E74C	; and do it
$E745:A9 DF	LDA #$DF	; set A to set CHR Reg 1 to 0
$E747:20 4C E7	JSR $E74C	; and do it
$E74A:A9 FF	LDA #$FF	; set WRAM enabled, PRG Reg to 0
; control flow target
$E74C:85 03	STA $03
$E74E:A9 00	LDA #$00
$E750:A8	TAY
$E751:A2 05	LDX #$05	; MMC1, so need to write 5 bits one at a time
$E753:E6 FD	INC $FD
; control flow target
$E755:91 02	STA ($02),Y
$E757:CA	DEX
$E758:D0 FB	BNE $E755
$E75A:C6 FD	DEC $FD
$E75C:60	RTS

$E75D:A5 4D	LDA $4D
$E75F:F0 0D	BEQ $E76E
$E761:85 7D	STA $7D
$E763:20 11 E8	JSR $E811
$E766:20 87 E8	JSR $E887
$E769:A4 50	LDY $50
$E76B:88	DEY
$E76C:10 70	BPL $E7DE
; control flow target
$E76E:A5 7D	LDA $7D
$E770:D0 21	BNE $E793
$E772:A5 70	LDA $70
$E774:C9 05	CMP #$05
$E776:D0 16	BNE $E78E
$E778:A9 10	LDA #$10
$E77A:20 E9 EF	JSR $EFE9
$E77D:D0 0F	BNE $E78E
$E77F:A9 0E	LDA #$0E
$E781:85 99	STA $99
$E783:A9 D0	LDA #$D0
$E785:85 80	STA $80
$E787:A9 FC	LDA #$FC
$E789:85 86	STA $86
$E78B:E6 7D	INC $7D
$E78D:60	RTS

; control flow target
$E78E:A9 00	LDA #$00
$E790:85 7D	STA $7D
$E792:60	RTS

; control flow target
$E793:A4 7A	LDY $7A
$E795:A5 86	LDA $86
$E797:30 06	BMI $E79F
$E799:A5 82	LDA $82
$E79B:29 04	AND #$04
$E79D:D0 0C	BNE $E7AB
; control flow target
$E79F:84 10	STY $10
$E7A1:84 11	STY $11
$E7A3:A0 00	LDY #$00
$E7A5:20 47 85	JSR $8547	; not in this bank!
$E7A8:4C E2 E7	JMP $E7E2
; control flow target
$E7AB:A5 80	LDA $80
$E7AD:09 06	ORA #$06
$E7AF:85 80	STA $80
$E7B1:A5 79	LDA $79
$E7B3:C9 09	CMP #$09
$E7B5:B0 27	BCS $E7DE
$E7B7:C8	INY
$E7B8:C4 4F	CPY $4F
$E7BA:D0 0C	BNE $E7C8
$E7BC:98	TYA
$E7BD:25 82	AND $82
$E7BF:D0 07	BNE $E7C8
$E7C1:A5 53	LDA $53
$E7C3:85 83	STA $83
$E7C5:20 ED 84	JSR $84ED	; not in this bank!
; control flow target
$E7C8:A4 50	LDY $50
$E7CA:88	DEY
$E7CB:A5 80	LDA $80
$E7CD:38	SEC
$E7CE:E5 65	SBC $65
$E7D0:C9 0C	CMP #$0C
$E7D2:90 0A	BCC $E7DE
$E7D4:C9 14	CMP #$14
$E7D6:B0 06	BCS $E7DE
$E7D8:A9 04	LDA #$04
$E7DA:85 51	STA $51
$E7DC:E6 4D	INC $4D
; control flow target
$E7DE:84 10	STY $10
$E7E0:84 11	STY $11
; control flow target
$E7E2:A9 05	LDA #$05
$E7E4:20 FE 85	JSR $85FE	; not in this bank!
$E7E7:85 82	STA $82
$E7E9:A9 10	LDA #$10
$E7EB:85 07	STA $07
$E7ED:20 D2 85	JSR $85D2	; not in this bank!
$E7F0:A4 4D	LDY $4D
$E7F2:F0 05	BEQ $E7F9
$E7F4:8A	TXA
$E7F5:05 51	ORA $51
$E7F7:85 51	STA $51
; control flow target
$E7F9:20 5D F2	JSR $F25D
$E7FC:A5 11	LDA $11
; control flow target
$E7FE:A0 18	LDY #$18
$E800:20 94 EF	JSR $EF94
$E803:A9 04	LDA #$04
$E805:85 09	STA $09
$E807:20 50 E8	JSR $E850
$E80A:A2 DF	LDX #$DF
$E80C:A9 E8	LDA #$E8
$E80E:4C BC EF	JMP $EFBC
; control flow target
$E811:A5 63	LDA $63
$E813:38	SEC
$E814:E9 10	SBC #$10
$E816:85 7E	STA $7E
$E818:A5 64	LDA $64
$E81A:E9 00	SBC #$00
$E81C:85 7F	STA $7F
$E81E:A5 65	LDA $65
$E820:18	CLC
$E821:69 10	ADC #$10
$E823:85 80	STA $80
; control flow target
$E825:60	RTS

; control flow target
$E826:A5 4D	LDA $4D
$E828:F0 FB	BEQ $E825
$E82A:20 11 E8	JSR $E811
$E82D:A5 7E	LDA $7E
$E82F:85 13	STA $13
$E831:A5 7F	LDA $7F
$E833:85 14	STA $14
$E835:A9 00	LDA #$00
$E837:85 1D	STA $1D
$E839:85 5C	STA $5C
$E83B:85 55	STA $55
$E83D:85 75	STA $75
$E83F:A9 12	LDA #$12
$E841:20 F5 E4	JSR $E4F5
$E844:85 81	STA $81
$E846:A4 50	LDY $50
$E848:88	DEY
$E849:98	TYA
$E84A:20 FE E7	JSR $E7FE
$E84D:4C 0D F2	JMP $F20D
; control flow target
$E850:A5 4D	LDA $4D
$E852:F0 1C	BEQ $E870
$E854:A5 55	LDA $55
$E856:F0 0A	BEQ $E862
$E858:A6 56	LDX $56
; control flow target
$E85A:A0 16	LDY #$16
$E85C:CA	DEX
$E85D:30 02	BMI $E861
$E85F:A0 1E	LDY #$1E
; control flow target
$E861:60	RTS

; control flow target
$E862:24 5C	BIT $5C
$E864:70 07	BVS $E86D
$E866:A0 26	LDY #$26
$E868:A5 62	LDA $62
$E86A:4A	LSR
$E86B:90 02	BCC $E86F
; control flow target
$E86D:A0 2E	LDY #$2E
; control flow target
$E86F:60	RTS

; control flow target
$E870:A6 86	LDX $86
$E872:30 E6	BMI $E85A
$E874:A5 82	LDA $82
$E876:29 04	AND #$04
$E878:F0 E0	BEQ $E85A
$E87A:A5 47	LDA $47
$E87C:29 10	AND #$10
$E87E:4A	LSR
$E87F:09 10	ORA #$10
$E881:69 16	ADC #$16
$E883:A8	TAY
$E884:60	RTS

; data
$E885:20 00

; control flow target
$E887:A5 DF	LDA $DF	; location
$E889:C9 06	CMP #$06
$E88B:D0 06	BNE $E893
$E88D:A5 2F	LDA $2F
$E88F:C9 12	CMP #$12
$E891:F0 45	BEQ $E8D8
; control flow target
$E893:A5 55	LDA $55
$E895:F0 40	BEQ $E8D7
$E897:A4 4F	LDY $4F
$E899:88	DEY
$E89A:B9 85 E8	LDA $E885,Y
$E89D:18	CLC
$E89E:65 7E	ADC $7E
$E8A0:85 04	STA $04
$E8A2:A9 00	LDA #$00
$E8A4:A8	TAY
$E8A5:65 7F	ADC $7F
$E8A7:C9 03	CMP #$03
$E8A9:B0 2C	BCS $E8D7
$E8AB:4A	LSR
$E8AC:66 04	ROR $04
$E8AE:4A	LSR
$E8AF:A5 04	LDA $04
$E8B1:6A	ROR
$E8B2:4A	LSR
$E8B3:4A	LSR
$E8B4:18	CLC
$E8B5:69 E0	ADC #$E0
$E8B7:85 04	STA $04
$E8B9:A9 06	LDA #$06
$E8BB:69 00	ADC #$00
$E8BD:85 05	STA $05
$E8BF:B1 04	LDA ($04),Y
$E8C1:C9 40	CMP #$40
$E8C3:B0 06	BCS $E8CB
$E8C5:AA	TAX
$E8C6:BD C0 04	LDA $04C0,X
$E8C9:10 0C	BPL $E8D7
; control flow target
$E8CB:A5 56	LDA $56
$E8CD:85 86	STA $86
$E8CF:A5 57	LDA $57
$E8D1:85 85	STA $85
$E8D3:A9 00	LDA #$00
$E8D5:85 4D	STA $4D
; control flow target
$E8D7:60	RTS

; control flow target
$E8D8:A5 4F	LDA $4F
$E8DA:25 82	AND $82
$E8DC:D0 ED	BNE $E8CB
$E8DE:60	RTS

; unknown, probably data
$E8DF:80 83
$E8E1:81 84
$E8E3:87 82
$E8E5:85 88
$E8E7:FF 86
$E8E9:89 FF
$E8EB:8C 90
$E8ED:8A 8D
$E8EF:91 8B
$E8F1:85 92
$E8F3:8F 8E
$E8F5:02 00
$E8F7:03 02
$E8F9:03 05
$E8FB:03 08
$E8FD:03 0B
$E8FF:03 0E
$E901:03 11
$E903:02 14
$E905:02 00
$E907:02 02
$E909:02 05
$E90B:02 08
$E90D:02 0B
$E90F:02 0E
$E911:02 11
$E913:02 14

; control flow target
$E915:A9 03	LDA #$03	; pointer table index for new game screen text
$E917:A2 04	LDX #$04
$E919:20 6D E9	JSR $E96D
$E91C:A9 FF	LDA #$FF
$E91E:85 19	STA $19
$E920:A9 07	LDA #$07
$E922:20 3F E9	JSR $E93F
$E925:A2 00	LDX #$00
$E927:20 31 E9	JSR $E931
$E92A:A9 0A	LDA #$0A
$E92C:20 3F E9	JSR $E93F
$E92F:A2 06	LDX #$06
; control flow target
$E931:A0 00	LDY #$00
; control flow target
$E933:B9 69 01	LDA $0169,Y
$E936:95 E3	STA $E3,X
$E938:E8	INX
$E939:C8	INY
$E93A:C0 06	CPY #$06
$E93C:90 F5	BCC $E933
$E93E:60	RTS

; control flow target
$E93F:85 1B	STA $1B
; control flow target
$E941:A9 0F	LDA #$0F
$E943:85 1A	STA $1A
$E945:A9 07	LDA #$07
$E947:85 16	STA $16
$E949:A9 05	LDA #$05
$E94B:85 1D	STA $1D
$E94D:20 62 E9	JSR $E962	; set $0169-$0182 to #$FF
$E950:20 B1 E9	JSR $E9B1
$E953:AD 69 01	LDA $0169
$E956:C9 FF	CMP #$FF
$E958:F0 E7	BEQ $E941
$E95A:60	RTS

; control flow target
$E95B:A9 02	LDA #$02	; pointer table index for continue game screen text
$E95D:A2 03	LDX #$03
$E95F:20 6D E9	JSR $E96D
; set $0169-$0182 to #$FF
; control flow target
$E962:A9 FF	LDA #$FF
$E964:A0 1A	LDY #$1A
; control flow target
$E966:99 69 01	STA $0169,Y
$E969:88	DEY
$E96A:10 FA	BPL $E966
$E96C:60	RTS

; control flow target
$E96D:48	PHA	; save A on the stack
$E96E:8A	TXA
$E96F:48	PHA	; save X on the stack
$E970:20 52 F6	JSR $F652	; STZ to $8E, $94-$97, $99-$9A, pAPU stuff
$E973:20 F9 E5	JSR $E5F9
$E976:68	PLA	; pull old X from the stack
$E977:20 00 EC	JSR $EC00
$E97A:20 6E EC	JSR $EC6E
$E97D:A9 23	LDA #$23
$E97F:A2 C0	LDX #$C0
$E981:20 9C E6	JSR $E69C
$E984:A9 FF	LDA #$FF
; control flow target
$E986:8D 07 20	STA $2007	; VRAM I/O Register
$E989:C8	INY
$E98A:C0 40	CPY #$40
$E98C:90 F8	BCC $E986
$E98E:68	PLA	; pull old A from the stack
$E98F:20 94 D9	JSR $D994	; given A, process the A'th string from the pointer table located at $D99F
$E992:A9 0F	LDA #$0F
$E994:20 ED F5	JSR $F5ED
$E997:20 0A D0	JSR $D00A
$E99A:20 F9 D2	JSR $D2F9	; $22 |= #$01
$E99D:4C 0F D3	JMP $D30F

; control flow target
$E9A0:A9 19	LDA #$19
$E9A2:85 1D	STA $1D
$E9A4:A9 09	LDA #$09
$E9A6:85 1A	STA $1A
$E9A8:85 19	STA $19
$E9AA:A2 06	LDX #$06
$E9AC:86 1B	STX $1B
$E9AE:E8	INX
$E9AF:86 16	STX $16
; control flow target
$E9B1:A2 F7	LDX #$F7
$E9B3:A9 EA	LDA #$EA
$E9B5:86 17	STX $17
$E9B7:85 18	STA $18
$E9B9:A9 00	LDA #$00
$E9BB:85 47	STA $47
$E9BD:85 1C	STA $1C	; charactersOnCurrentLine
$E9BF:85 12	STA $12
$E9C1:85 13	STA $13
$E9C3:85 14	STA $14
; control flow target
$E9C5:20 C0 EA	JSR $EAC0
$E9C8:24 19	BIT $19
$E9CA:30 01	BMI $E9CD
$E9CC:C8	INY
; control flow target
$E9CD:84 11	STY $11
$E9CF:20 A6 DC	JSR $DCA6	; load down arrow or space depending on clock
$E9D2:20 6E EB	JSR $EB6E
$E9D5:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$E9D8:E6 47	INC $47
$E9DA:20 3D EB	JSR $EB3D
$E9DD:CA	DEX
$E9DE:30 06	BMI $E9E6
$E9E0:20 EF E9	JSR $E9EF
$E9E3:4C C5 E9	JMP $E9C5
; control flow target
$E9E6:A5 F8	LDA $F8
$E9E8:29 10	AND #$10
$E9EA:F0 D9	BEQ $E9C5
$E9EC:20 27 EA	JSR $EA27
; control flow target
$E9EF:8A	TXA
$E9F0:20 A2 D7	JSR $D7A2

; data, probably a jump table
$E9F3:0D EA	; $EA0D
$E9F5:53 EA	; $EA53
$E9F7:5D EA	; $EA5D
$E9F9:66 EA	; $EA66
$E9FB:75 EA	; $EA75
$E9FD:87 EA	; $EA87

; control flow target
$E9FF:8A	TXA
$EA00:20 C2 EA	JSR $EAC2
$EA03:24 19	BIT $19
$EA05:30 01	BMI $EA08
$EA07:C8	INY
; control flow target
$EA08:84 11	STY $11
$EA0A:4C AE DC	JMP $DCAE

; control flow target
$EA0D:20 B1 EA	JSR $EAB1
$EA10:B0 1C	BCS $EA2E
$EA12:48	PHA
$EA13:A6 1C	LDX $1C
$EA15:98	TYA
$EA16:9D 69 01	STA $0169,X
$EA19:68	PLA
$EA1A:20 D4 EA	JSR $EAD4
$EA1D:A9 0F	LDA #$0F
$EA1F:85 99	STA $99
$EA21:A6 1C	LDX $1C
$EA23:E4 1D	CPX $1D
$EA25:90 1A	BCC $EA41
; control flow target
$EA27:68	PLA
$EA28:68	PLA
$EA29:A6 1C	LDX $1C
$EA2B:4C FF E9	JMP $E9FF
; control flow target
$EA2E:F0 F7	BEQ $EA27
; control flow target
$EA30:A6 1C	LDX $1C
$EA32:C9 F1	CMP #$F1
$EA34:D0 0F	BNE $EA45
$EA36:E4 1D	CPX $1D
$EA38:F0 18	BEQ $EA52
$EA3A:BD 69 01	LDA $0169,X
$EA3D:C9 FF	CMP #$FF
$EA3F:F0 11	BEQ $EA52
; control flow target
$EA41:E6 1C	INC $1C
$EA43:D0 06	BNE $EA4B
; control flow target
$EA45:CA	DEX
$EA46:30 0A	BMI $EA52
$EA48:86 1C	STX $1C
$EA4A:E8	INX
; control flow target
$EA4B:20 FF E9	JSR $E9FF
$EA4E:A9 00	LDA #$00
$EA50:85 47	STA $47
; control flow target
$EA52:60	RTS

; control flow target
$EA53:A5 F9	LDA $F9
$EA55:29 03	AND #$03
$EA57:F0 F9	BEQ $EA52
$EA59:09 F0	ORA #$F0
$EA5B:D0 D3	BNE $EA30
; control flow target
$EA5D:20 9B EA	JSR $EA9B
$EA60:20 B1 EA	JSR $EAB1
$EA63:B0 09	BCS $EA6E
$EA65:60	RTS

; control flow target
$EA66:20 A5 EA	JSR $EAA5
$EA69:20 B1 EA	JSR $EAB1
$EA6C:90 06	BCC $EA74
; control flow target
$EA6E:A5 13	LDA $13
$EA70:29 FE	AND #$FE
$EA72:85 13	STA $13
; control flow target
$EA74:60	RTS

; control flow target
$EA75:20 7E EA	JSR $EA7E
$EA78:20 B1 EA	JSR $EAB1
$EA7B:B0 F1	BCS $EA6E
$EA7D:60	RTS

; control flow target
$EA7E:A6 13	LDX $13
$EA80:CA	DEX
$EA81:10 15	BPL $EA98
$EA83:A2 09	LDX #$09
$EA85:D0 11	BNE $EA98
; control flow target
$EA87:20 B1 EA	JSR $EAB1
$EA8A:90 03	BCC $EA8F
$EA8C:20 8F EA	JSR $EA8F
; control flow target
$EA8F:A6 13	LDX $13
$EA91:E8	INX
$EA92:E0 0A	CPX #$0A
$EA94:90 02	BCC $EA98
$EA96:A2 00	LDX #$00
; control flow target
$EA98:86 13	STX $13
$EA9A:60	RTS

; control flow target
$EA9B:A6 12	LDX $12
$EA9D:CA	DEX
$EA9E:10 0E	BPL $EAAE
$EAA0:A6 16	LDX $16
$EAA2:CA	DEX
$EAA3:D0 09	BNE $EAAE
; control flow target
$EAA5:A6 12	LDX $12
$EAA7:E8	INX
$EAA8:E4 16	CPX $16
$EAAA:90 02	BCC $EAAE
$EAAC:A2 00	LDX #$00
; control flow target
$EAAE:86 12	STX $12
$EAB0:60	RTS

; control flow target
$EAB1:A5 12	LDA $12
$EAB3:0A	ASL
$EAB4:0A	ASL
$EAB5:65 12	ADC $12
$EAB7:0A	ASL
$EAB8:65 13	ADC $13
$EABA:A8	TAY
$EABB:B1 17	LDA ($17),Y
$EABD:C9 F0	CMP #$F0
$EABF:60	RTS

; control flow target
$EAC0:A5 1C	LDA $1C
; control flow target
$EAC2:A4 1B	LDY $1B
$EAC4:C9 0D	CMP #$0D
$EAC6:90 05	BCC $EACD
$EAC8:C8	INY
$EAC9:C8	INY
$EACA:C8	INY
$EACB:E9 0D	SBC #$0D
; control flow target
$EACD:AA	TAX
$EACE:C9 06	CMP #$06
$EAD0:90 01	BCC $EAD3
$EAD2:E8	INX
; control flow target
$EAD3:60	RTS

; control flow target
$EAD4:85 05	STA $05
$EAD6:20 C0 EA	JSR $EAC0
$EAD9:8A	TXA
$EADA:18	CLC
$EADB:65 1A	ADC $1A
$EADD:85 10	STA $10
$EADF:24 19	BIT $19
$EAE1:30 01	BMI $EAE4
$EAE3:C8	INY
; control flow target
$EAE4:84 11	STY $11
$EAE6:20 77 D1	JSR $D177
$EAE9:A5 05	LDA $05
$EAEB:A0 7F	LDY #$7F
$EAED:A9 82	LDA #$82
$EAEF:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$EAF2:A5 05	LDA $05
$EAF4:4C 2B D7	JMP $D72B	; STA $0730,X, INX, $23 = X, $0730,X = #$80, $22 = $22 | #$80

; data; 5- to 8-bit character lut
; numbers: 0-9
$EAF7:A0A1A2A3A4A5A6A7A8A9
; uppercase letters: A-Z
$EB01:B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7C8C9CA
; lowercase letters: a-z
$EB1B:0102030405060708090A0B0C0D0E0F101112131415161718191A
; punctuation: ?!
$EB35:AAAB
; graphics, the green/blue vines around the heart at the top of the screen
$EB37:F2F2
; graphics, 2 chunks of health bar, last chunk empty
$EB39:F1F1
; graphics, 2 chunks of health bar, both chunks full
$EB3B:F0F0

; control flow target
$EB3D:A2 00	LDX #$00
$EB3F:A5 F9	LDA $F9
$EB41:29 0F	AND #$0F
$EB43:0A	ASL
$EB44:0A	ASL
$EB45:85 02	STA $02
$EB47:A5 F9	LDA $F9
$EB49:29 40	AND #$40
$EB4B:05 F8	ORA $F8
$EB4D:29 C0	AND #$C0
$EB4F:05 02	ORA $02
$EB51:F0 15	BEQ $EB68
; control flow target
$EB53:E8	INX
$EB54:0A	ASL
$EB55:90 FC	BCC $EB53
$EB57:E4 14	CPX $14
$EB59:D0 09	BNE $EB64
$EB5B:C6 15	DEC $15
$EB5D:D0 0C	BNE $EB6B
$EB5F:A9 08	LDA #$08
$EB61:85 15	STA $15
$EB63:60	RTS

; control flow target
$EB64:A9 10	LDA #$10
$EB66:85 15	STA $15
; control flow target
$EB68:86 14	STX $14
$EB6A:60	RTS

; control flow target
$EB6B:A2 00	LDX #$00
$EB6D:60	RTS

; control flow target
$EB6E:A5 13	LDA $13
$EB70:0A	ASL
$EB71:0A	ASL
$EB72:0A	ASL
$EB73:0A	ASL
$EB74:69 28	ADC #$28
$EB76:A8	TAY
$EB77:A5 12	LDA $12
$EB79:0A	ASL
$EB7A:0A	ASL
$EB7B:0A	ASL
$EB7C:0A	ASL
$EB7D:69 70	ADC #$70
$EB7F:4C 91 E2	JMP $E291
; control flow target
$EB82:A9 05	LDA #$05
$EB84:20 00 E6	JSR $E600
$EB87:A9 01	LDA #$01
$EB89:20 00 EC	JSR $EC00
$EB8C:20 6E EC	JSR $EC6E
$EB8F:20 84 D8	JSR $D884
$EB92:20 92 E1	JSR $E192
$EB95:20 5D D8	JSR $D85D	; copy $D869-$D874 to $0200-$020B
$EB98:4C 4D C3	JMP $C34D
; control flow target
$EB9B:20 F9 E5	JSR $E5F9
$EB9E:A9 04	LDA #$04
$EBA0:20 00 E6	JSR $E600
$EBA3:A9 00	LDA #$00
$EBA5:20 00 EC	JSR $EC00
$EBA8:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$EBAB:86 12	STX $12
$EBAD:85 13	STA $13
$EBAF:A9 03	LDA #$03
$EBB1:18	CLC
$EBB2:65 DF	ADC $DF	; location
$EBB4:20 58 D7	JSR $D758	; given A, set X to ($02),(A*2), A to ($02),(A*2+1), and INC $03 as appropriate
$EBB7:86 14	STX $14
$EBB9:85 15	STA $15
$EBBB:20 6E EC	JSR $EC6E
$EBBE:A2 20	LDX #$20
$EBC0:20 1E EC	JSR $EC1E
$EBC3:A6 14	LDX $14
$EBC5:A5 15	LDA $15
$EBC7:20 0D D8	JSR $D80D	; given A and X, process the string located at (A * 256 + X)
$EBCA:20 A1 EC	JSR $ECA1
$EBCD:A9 11	LDA #$11
$EBCF:20 ED F5	JSR $F5ED
$EBD2:20 0F D3	JSR $D30F
$EBD5:A9 00	LDA #$00
$EBD7:85 10	STA $10
; control flow target
$EBD9:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$EBDC:20 FB EB	JSR $EBFB	; A = $F8 & #$10
$EBDF:D0 14	BNE $EBF5
$EBE1:A5 10	LDA $10
$EBE3:29 0C	AND #$0C
$EBE5:4A	LSR
$EBE6:4A	LSR
$EBE7:85 04	STA $04
$EBE9:A4 14	LDY $14
$EBEB:A6 15	LDX $15
$EBED:20 D6 EC	JSR $ECD6
$EBF0:C6 10	DEC $10
$EBF2:4C D9 EB	JMP $EBD9
; control flow target
$EBF5:20 52 F6	JSR $F652	; STZ to $8E, $94-$97, $99-$9A, pAPU stuff
$EBF8:4C 00 D3	JMP $D300	; initialize a bunch of stuff
; A = $F8 & #$10
; control flow target
$EBFB:A5 F8	LDA $F8
$EBFD:29 10	AND #$10
$EBFF:60	RTS

; control flow target
$EC00:48	PHA
$EC01:A9 06	LDA #$06
$EC03:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$EC06:68	PLA
$EC07:A2 00	LDX #$00
$EC09:20 4B D7	JSR $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
$EC0C:A8	TAY
$EC0D:A9 00	LDA #$00
$EC0F:20 54 D7	JSR $D754	; given A, X, and Y, set $02-$03 to X-Y, then set X to ($02),(A*2) and A to ($02),(A*2+1), and INC $03 as appropriate
$EC12:86 06	STX $06
$EC14:85 07	STA $07
$EC16:20 5A D7	JSR $D75A	; given A and Y, set X = ($02),Y, A = ($02),(Y+1), and INC $03 as appropriate
$EC19:86 0D	STX $0D
$EC1B:85 0E	STA $0E
$EC1D:60	RTS

; control flow target
$EC1E:98	TYA
$EC1F:18	CLC
$EC20:65 0D	ADC $0D
$EC22:A4 0E	LDY $0E
$EC24:90 01	BCC $EC27
$EC26:C8	INY
; control flow target
$EC27:86 02	STX $02
$EC29:A2 00	LDX #$00
$EC2B:4C DF D2	JMP $D2DF
; control flow target
$EC2E:A9 20	LDA #$20
$EC30:85 10	STA $10
$EC32:A0 00	LDY #$00
$EC34:84 11	STY $11
$EC36:84 0F	STY $0F
$EC38:84 16	STY $16
$EC3A:B1 06	LDA ($06),Y
$EC3C:E6 06	INC $06
$EC3E:D0 02	BNE $EC42
$EC40:E6 07	INC $07
; control flow target
$EC42:20 CA D2	JSR $D2CA
$EC45:A9 0F	LDA #$0F
$EC47:85 0C	STA $0C
; control flow target
$EC49:A9 40	LDA #$40
$EC4B:85 0B	STA $0B
$EC4D:A5 10	LDA $10
$EC4F:A6 11	LDX $11
$EC51:20 9C E6	JSR $E69C
; control flow target
$EC54:20 83 EC	JSR $EC83
$EC57:8D 07 20	STA $2007	; VRAM I/O Register
$EC5A:C6 0B	DEC $0B
$EC5C:D0 F6	BNE $EC54
$EC5E:A5 11	LDA $11
$EC60:18	CLC
$EC61:69 40	ADC #$40
$EC63:85 11	STA $11
$EC65:90 02	BCC $EC69
$EC67:E6 10	INC $10
; control flow target
$EC69:C6 0C	DEC $0C
$EC6B:D0 DC	BNE $EC49
$EC6D:60	RTS

; control flow target
$EC6E:20 2E EC	JSR $EC2E
$EC71:A9 23	LDA #$23
$EC73:A2 C0	LDX #$C0
$EC75:20 9C E6	JSR $E69C
; control flow target
$EC78:B1 0D	LDA ($0D),Y
$EC7A:8D 07 20	STA $2007	; VRAM I/O Register
$EC7D:C8	INY
$EC7E:C0 40	CPY #$40
$EC80:90 F6	BCC $EC78
$EC82:60	RTS

; $EC83-$ECA0: decompression routine for Huffman + RLE compression used for the shared start/continue screen tilemap.
; Basically, each Huffman string gets mapped to a byte, and then each byte stands for itself except for #$81, which indicates that the previous byte should be repeated for the number of times given by the next byte, e.g. 7F 81 05 means 7F 7F 7F 7F 7F.
; A literal #$81 is represented by setting the repeat count to #$00, e.g. 7F 81 00 means 7F 81.
; Note that this routine is similar to the routine at $E6CD, but operates on variable-bit-width data instead of plain bytes.
; control flow target
$EC83:A5 0F	LDA $0F	; load repeat count
$EC85:D0 13	BNE $EC9A	; if we're still repeating, go repeat. Otherwise...
; control flow target
$EC87:20 8E D2	JSR $D28E	; read a char
$EC8A:C9 81	CMP #$81
$EC8C:D0 07	BNE $EC95	; if we did not read #$81, then return the char
$EC8E:20 8E D2	JSR $D28E	; otherwise, read another char
$EC91:D0 05	BNE $EC98	; if the second char is not #$00, it's a repeat count for the char before the #$81
$EC93:A9 81	LDA #$81	; otherwise, #$8100 means return #$81
; control flow target
$EC95:85 03	STA $03	; store the char so we can repeat it if necessary
$EC97:60	RTS
; control flow target
$EC98:85 0F	STA $0F	; store the repeat count
; control flow target
$EC9A:C6 0F	DEC $0F	; decrement the repeat count
$EC9C:F0 E9	BEQ $EC87	; if the repeat count is now 0, go read the next char
$EC9E:A5 03	LDA $03	; otherwise return the previous char
$ECA0:60	RTS

; control flow target
$ECA1:A9 80	LDA #$80
$ECA3:85 81	STA $81
$ECA5:A2 00	LDX #$00
$ECA7:A0 00	LDY #$00
$ECA9:84 10	STY $10
$ECAB:84 04	STY $04
; control flow target
$ECAD:20 CB EC	JSR $ECCB
$ECB0:20 F2 EC	JSR $ECF2
$ECB3:C8	INY
$ECB4:C8	INY
$ECB5:A5 10	LDA $10
$ECB7:C5 DF	CMP $DF	; location
$ECB9:D0 04	BNE $ECBF
$ECBB:84 14	STY $14
$ECBD:86 15	STX $15
; control flow target
$ECBF:20 D6 EC	JSR $ECD6
$ECC2:E6 10	INC $10
$ECC4:A5 10	LDA $10
$ECC6:C9 08	CMP #$08
$ECC8:90 E3	BCC $ECAD
$ECCA:60	RTS

; control flow target
$ECCB:B1 12	LDA ($12),Y
$ECCD:C8	INY
$ECCE:85 7E	STA $7E
$ECD0:B1 12	LDA ($12),Y
$ECD2:C8	INY
$ECD3:85 80	STA $80
$ECD5:60	RTS

; control flow target
$ECD6:20 CB EC	JSR $ECCB
$ECD9:B1 12	LDA ($12),Y
$ECDB:C8	INY
$ECDC:85 03	STA $03
; control flow target
$ECDE:20 10 ED	JSR $ED10
$ECE1:C8	INY
$ECE2:20 E8 EC	JSR $ECE8
$ECE5:D0 F7	BNE $ECDE
$ECE7:60	RTS

; control flow target
$ECE8:A5 7E	LDA $7E
$ECEA:18	CLC
$ECEB:69 08	ADC #$08
$ECED:85 7E	STA $7E
$ECEF:C6 03	DEC $03
$ECF1:60	RTS

; control flow target
$ECF2:A5 80	LDA $80
$ECF4:18	CLC
$ECF5:69 08	ADC #$08
$ECF7:85 08	STA $08
$ECF9:A9 02	LDA #$02
$ECFB:85 03	STA $03
; control flow target
$ECFD:A5 80	LDA $80
$ECFF:20 12 ED	JSR $ED12
$ED02:C8	INY
$ED03:C8	INY
$ED04:A5 08	LDA $08
$ED06:20 12 ED	JSR $ED12
$ED09:88	DEY
$ED0A:20 E8 EC	JSR $ECE8
$ED0D:D0 EE	BNE $ECFD
$ED0F:60	RTS

; control flow target
$ED10:A5 80	LDA $80
; control flow target
$ED12:9D 00 02	STA $0200,X
$ED15:A5 7E	LDA $7E
$ED17:9D 03 02	STA $0203,X
$ED1A:B1 12	LDA ($12),Y
$ED1C:29 C0	AND #$C0
$ED1E:0A	ASL
$ED1F:2A	ROL
$ED20:2A	ROL
$ED21:05 04	ORA $04
$ED23:9D 02 02	STA $0202,X
$ED26:B1 12	LDA ($12),Y
$ED28:29 3F	AND #$3F
$ED2A:18	CLC
$ED2B:65 81	ADC $81
$ED2D:9D 01 02	STA $0201,X
$ED30:E8	INX
$ED31:E8	INX
$ED32:E8	INX
$ED33:E8	INX
$ED34:60	RTS

; data; it's used but I'm not sure what for
$ED35:0F21
$ED37:E320
$ED39:0760
$ED3B:2000
$ED3D:2006

; control flow target
$ED3F:A9 08	LDA #$08
$ED41:20 00 E6	JSR $E600
; control flow target
$ED44:A9 01	LDA #$01
$ED46:20 00 E6	JSR $E600
$ED49:A9 06	LDA #$06
$ED4B:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$ED4E:A9 05	LDA #$05
$ED50:20 08 D8	JSR $D808	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), messing with $03 if A > #$FD, then process the string located at (($8001),(A*2) + ($8000),(A*2))
$ED53:A9 06	LDA #$06
$ED55:A2 00	LDX #$00
; control flow target
$ED57:86 04	STX $04
$ED59:A2 00	LDX #$00
$ED5B:20 4B D7	JSR $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
$ED5E:86 00	STX $00
$ED60:85 01	STA $01
$ED62:A6 04	LDX $04
$ED64:BD 35 ED	LDA $ED35,X
$ED67:8D 32 07	STA $0732
$ED6A:C9 40	CMP #$40
$ED6C:90 02	BCC $ED70
$ED6E:A9 01	LDA #$01
; control flow target
$ED70:85 02	STA $02
$ED72:BD 36 ED	LDA $ED36,X
$ED75:8D 30 07	STA $0730
$ED78:BD 37 ED	LDA $ED37,X
$ED7B:8D 31 07	STA $0731
$ED7E:BD 38 ED	LDA $ED38,X
$ED81:85 10	STA $10
$ED83:BD 39 ED	LDA $ED39,X
$ED86:85 11	STA $11
$ED88:A0 00	LDY #$00
; control flow target
$ED8A:B1 00	LDA ($00),Y
$ED8C:99 33 07	STA $0733,Y
$ED8F:C8	INY
$ED90:C4 02	CPY $02
$ED92:90 F6	BCC $ED8A
$ED94:A9 FF	LDA #$FF
$ED96:99 33 07	STA $0733,Y
; control flow target
$ED99:20 BA D4	JSR $D4BA
$ED9C:C6 11	DEC $11
$ED9E:F0 10	BEQ $EDB0
$EDA0:A5 10	LDA $10
$EDA2:18	CLC
$EDA3:6D 31 07	ADC $0731
$EDA6:8D 31 07	STA $0731
$EDA9:90 EE	BCC $ED99
$EDAB:EE 30 07	INC $0730
$EDAE:D0 E9	BNE $ED99
; control flow target
$EDB0:60	RTS

; control flow target
$EDB1:20 44 ED	JSR $ED44
$EDB4:A9 08	LDA #$08
$EDB6:20 08 D8	JSR $D808	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), messing with $03 if A > #$FD, then process the string located at (($8001),(A*2) + ($8000),(A*2))
$EDB9:A9 09	LDA #$09
$EDBB:A2 05	LDX #$05
$EDBD:20 57 ED	JSR $ED57
$EDC0:20 C2 D3	JSR $D3C2	; fill $0710-$072F with #$0F
$EDC3:A9 DB	LDA #$DB
$EDC5:A0 EE	LDY #$EE
$EDC7:20 D9 D2	JSR $D2D9
$EDCA:A9 03	LDA #$03
$EDCC:8D 10 07	STA $0710
$EDCF:60	RTS

; control flow target
$EDD0:20 B1 ED	JSR $EDB1
$EDD3:20 B5 EE	JSR $EEB5
$EDD6:A9 0A	LDA #$0A
$EDD8:20 08 D8	JSR $D808	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), messing with $03 if A > #$FD, then process the string located at (($8001),(A*2) + ($8000),(A*2))
$EDDB:20 FF C2	JSR $C2FF
$EDDE:20 0F D3	JSR $D30F
$EDE1:A9 00	LDA #$00
$EDE3:85 10	STA $10
$EDE5:20 02 EE	JSR $EE02
; control flow target
$EDE8:20 EE ED	JSR $EDEE
$EDEB:F0 FB	BEQ $EDE8
$EDED:60	RTS

; control flow target
$EDEE:20 19 D4	JSR $D419	; $21 = $22, STZ to $20,$22,$23,$29,$2A,$FD, wait for IRQ
$EDF1:20 FB EB	JSR $EBFB	; A = $F8 & #$10
$EDF4:D0 16	BNE $EE0C	; if $F8 & #$10 != #$00, RTS
$EDF6:A5 F8	LDA $F8
$EDF8:29 0C	AND #$0C
$EDFA:F0 10	BEQ $EE0C	; else, if $F8 & #$0C == #$00, RTS
$EDFC:A5 10	LDA $10	; else, $10 ^= #$01
$EDFE:49 01	EOR #$01
$EE00:85 10	STA $10
; control flow target
$EE02:09 02	ORA #$02
$EE04:A8	TAY
$EE05:A2 05	LDX #$05
$EE07:20 8B E2	JSR $E28B	; given X and Y, set $0200 to $E2A8,Y, $0201 to #$27, $0202 to #$03, and $0203 to $E2A2,X
$EE0A:A9 00	LDA #$00
; control flow target
$EE0C:60	RTS

; data; it's used but I'm not sure what for
$EE0D:01
$EE0E:02
$EE0F:03
$EE10:02

; control flow target
$EE11:20 67 EE	JSR $EE67
$EE14:A9 00	LDA #$00
$EE16:85 10	STA $10
$EE18:85 47	STA $47
$EE1A:20 02 EE	JSR $EE02
; control flow target
$EE1D:20 EE ED	JSR $EDEE
$EE20:D0 1A	BNE $EE3C
$EE22:E6 47	INC $47
$EE24:A0 06	LDY #$06
$EE26:20 C9 EE	JSR $EEC9	; given Y, swap bank 6 into $8000-$BFFF and execute the Y'th function in the jump table located at $B400
$EE29:A5 47	LDA $47
$EE2B:4A	LSR
$EE2C:4A	LSR
$EE2D:29 03	AND #$03	; table has 4 entries
$EE2F:AA	TAX
$EE30:BD 0D EE	LDA $EE0D,X
$EE33:8D 1A 07	STA $071A
$EE36:20 F9 D2	JSR $D2F9	; $22 |= #$01
$EE39:4C 1D EE	JMP $EE1D	; BRA
; control flow target
$EE3C:20 00 D3	JSR $D300	; initialize a bunch of stuff
$EE3F:A5 10	LDA $10	; must be option selected on title screen; 0 = new game, others = continue game
$EE41:D0 05	BNE $EE48
$EE43:20 15 E9	JSR $E915	; new game
$EE46:B0 17	BCS $EE5F	; $E915 exits when C is set, so this is BRA
; control flow target
$EE48:20 5B E9	JSR $E95B	; continue game
; control flow target
$EE4B:20 A0 E9	JSR $E9A0
$EE4E:20 22 E0	JSR $E022	; check password?
$EE51:90 06	BCC $EE59
$EE53:A9 10	LDA #$10
$EE55:85 99	STA $99
$EE57:D0 F2	BNE $EE4B
; control flow target
$EE59:A5 EF	LDA $EF	; max HP
$EE5B:85 4A	STA $4A	; current HP
$EE5D:E6 DE	INC $DE
; control flow target
$EE5F:A2 02	LDX #$02
$EE61:20 BD EE	JSR $EEBD
$EE64:4C 00 D3	JMP $D300	; initialize a bunch of stuff
; control flow target
$EE67:20 3F ED	JSR $ED3F
$EE6A:A9 02	LDA #$02
$EE6C:20 08 D8	JSR $D808	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), messing with $03 if A > #$FD, then process the string located at (($8001),(A*2) + ($8000),(A*2))
$EE6F:A9 07	LDA #$07
$EE71:20 08 D8	JSR $D808	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), messing with $03 if A > #$FD, then process the string located at (($8001),(A*2) + ($8000),(A*2))
$EE74:20 C2 D3	JSR $D3C2	; fill $0710-$072F with #$0F
$EE77:A9 10	LDA #$10
$EE79:20 ED F5	JSR $F5ED
$EE7C:20 FF C2	JSR $C2FF
$EE7F:A9 B8	LDA #$B8
$EE81:85 FB	STA $FB
$EE83:20 0F D3	JSR $D30F
$EE86:A2 00	LDX #$00
$EE88:20 BD EE	JSR $EEBD
$EE8B:A9 96	LDA #$96
$EE8D:20 0F D4	JSR $D40F
; control flow target
$EE90:A9 03	LDA #$03
$EE92:20 0F D4	JSR $D40F
$EE95:E6 FB	INC $FB
$EE97:A5 FB	LDA $FB
$EE99:C9 F0	CMP #$F0
$EE9B:90 F3	BCC $EE90
$EE9D:A9 00	LDA #$00
$EE9F:85 FB	STA $FB
$EEA1:A9 5A	LDA #$5A
$EEA3:20 0F D4	JSR $D40F
$EEA6:A2 06	LDX #$06
$EEA8:20 BD EE	JSR $EEBD
; control flow target
$EEAB:A6 95	LDX $95
$EEAD:E8	INX
$EEAE:D0 FB	BNE $EEAB
$EEB0:A9 0D	LDA #$0D
$EEB2:20 ED F5	JSR $F5ED
; control flow target
$EEB5:A9 30	LDA #$30
$EEB7:8D 1F 07	STA $071F
$EEBA:4C F9 D2	JMP $D2F9	; $22 |= #$01
; control flow target
$EEBD:A5 2D	LDA $2D
$EEBF:48	PHA
$EEC0:A0 02	LDY #$02
$EEC2:20 C9 EE	JSR $EEC9	; given Y, swap bank 6 into $8000-$BFFF and execute the Y'th function in the jump table located at $B400
$EEC5:68	PLA
$EEC6:4C 0B E7	JMP $E70B	; swap bank given by A into $8000-$BFFF
; given Y, swap bank 6 into $8000-$BFFF and execute the Y'th function in the jump table located at $B400
; control flow target
$EEC9:A9 06	LDA #$06
$EECB:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$EECE:B9 00 B4	LDA $B400,Y
$EED1:85 2B	STA $2B
$EED3:B9 01 B4	LDA $B401,Y
$EED6:85 2C	STA $2C
$EED8:6C 2B 00	JMP ($2B)

; data; it's used but I'm not sure what for
$EEDB:0F0F
$EEDD:040F
$EEDF:0C1C0C
$EEE2:0F0F

; unknown - probably code
$EEE4:20 00 D3	JSR $D300	; initialize a bunch of stuff
$EEE7:20 5C F1	JSR $F15C
$EEEA:A9 09	LDA #$09
$EEEC:20 00 E6	JSR $E600
$EEEF:A9 00	LDA #$00
$EEF1:85 28	STA $28
$EEF3:A9 03	LDA #$03
$EEF5:85 30	STA $30
$EEF7:20 9E C1	JSR $C19E
$EEFA:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$EEFD:20 52 8F	JSR $8F52	; not in this bank!
$EF00:A9 14	LDA #$14
$EF02:20 ED F5	JSR $F5ED
$EF05:A2 18	LDX #$18
$EF07:A9 5E	LDA #$5E
$EF09:A0 EF	LDY #$EF
$EF0B:20 57 EF	JSR $EF57
$EF0E:20 0F D3	JSR $D30F
$EF11:A0 04	LDY #$04
$EF13:20 C9 EE	JSR $EEC9	; given Y, swap bank 6 into $8000-$BFFF and execute the Y'th function in the jump table located at $B400
$EF16:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$EF19:20 E6 8E	JSR $8EE6	; not in this bank!
; control flow target
$EF1C:A6 95	LDX $95
$EF1E:E8	INX
$EF1F:D0 FB	BNE $EF1C
$EF21:A9 0D	LDA #$0D
$EF23:20 ED F5	JSR $F5ED
$EF26:A9 06	LDA #$06
$EF28:8D E2 03	STA $03E2
$EF2B:20 6E DA	JSR $DA6E
$EF2E:A9 3C	LDA #$3C
$EF30:20 0F D4	JSR $D40F
; control flow target
$EF33:20 00 D3	JSR $D300	; initialize a bunch of stuff
$EF36:20 B1 ED	JSR $EDB1
$EF39:A9 0A	LDA #$0A
$EF3B:20 00 E6	JSR $E600
$EF3E:A9 17	LDA #$17
$EF40:20 ED F5	JSR $F5ED
$EF43:A2 20	LDX #$20
$EF45:A9 64	LDA #$64
$EF47:A0 EF	LDY #$EF
$EF49:20 57 EF	JSR $EF57
$EF4C:20 0F D3	JSR $D30F
$EF4F:A0 00	LDY #$00
$EF51:20 C9 EE	JSR $EEC9	; given Y, swap bank 6 into $8000-$BFFF and execute the Y'th function in the jump table located at $B400
$EF54:4C 33 EF	JMP $EF33

; control flow target
$EF57:86 02	STX $02
$EF59:A2 10	LDX #$10
$EF5B:4C DF D2	JMP $D2DF

; unknown, probably data
$EF5E:23 31
$EF60:30 11
$EF62:36 30
$EF64:0F0C170F
$EF68:00 17
$EF6A:0F151523

$EF6E:24 30	BIT $30
; definitely code
$EF70:90 01	BCC $EF73
$EF72:E8	INX
; control flow target
$EF73:84 09	STY $09
$EF75:85 0D	STA $0D
$EF77:86 0E	STX $0E
$EF79:60	RTS

$EF7A:20 8F EF	JSR $EF8F
$EF7D:A5 13	LDA $13
$EF7F:85 16	STA $16
$EF81:A5 14	LDA $14
$EF83:85 17	STA $17
$EF85:60	RTS

$EF86:A5 16	LDA $16
$EF88:85 13	STA $13
$EF8A:A5 17	LDA $17
$EF8C:85 14	STA $14
$EF8E:60	RTS

; control flow target
$EF8F:20 5D F2	JSR $F25D
$EF92:A5 11	LDA $11
; control flow target
$EF94:4A	LSR
$EF95:A9 08	LDA #$08
$EF97:B0 0C	BCS $EFA5
$EF99:98	TYA
$EF9A:18	CLC
$EF9B:65 13	ADC $13
$EF9D:85 13	STA $13
$EF9F:90 02	BCC $EFA3
$EFA1:E6 14	INC $14
; control flow target
$EFA3:A9 F8	LDA #$F8
; control flow target
$EFA5:85 05	STA $05
$EFA7:29 40	AND #$40
$EFA9:85 04	STA $04
$EFAB:60	RTS

$EFAC:A6 80	LDX $80
$EFAE:18	CLC
$EFAF:65 80	ADC $80
$EFB1:85 80	STA $80
$EFB3:8A	TXA
$EFB4:48	PHA
$EFB5:20 C0 EF	JSR $EFC0
$EFB8:68	PLA
$EFB9:85 80	STA $80
$EFBB:60	RTS

; control flow target
$EFBC:86 06	STX $06
$EFBE:85 07	STA $07
; control flow target
$EFC0:A5 14	LDA $14
$EFC2:D0 20	BNE $EFE4
; control flow target
$EFC4:B1 06	LDA ($06),Y
$EFC6:F0 1C	BEQ $EFE4
$EFC8:C8	INY
$EFC9:85 08	STA $08
$EFCB:B1 06	LDA ($06),Y
$EFCD:C8	INY
$EFCE:84 0C	STY $0C
$EFD0:A8	TAY
$EFD1:A5 80	LDA $80
$EFD3:85 02	STA $02
$EFD5:20 3C F0	JSR $F03C
$EFD8:A4 0C	LDY $0C
; control flow target
$EFDA:20 EE EF	JSR $EFEE
$EFDD:C6 09	DEC $09
$EFDF:F0 07	BEQ $EFE8
$EFE1:AA	TAX
$EFE2:F0 E0	BEQ $EFC4
; control flow target
$EFE4:C8	INY
$EFE5:C8	INY
$EFE6:D0 F2	BNE $EFDA
; control flow target
$EFE8:60	RTS

; control flow target
$EFE9:85 05	STA $05
$EFEB:20 5D F2	JSR $F25D
; control flow target
$EFEE:A2 00	LDX #$00
$EFF0:A5 05	LDA $05
$EFF2:10 01	BPL $EFF5
$EFF4:CA	DEX
; control flow target
$EFF5:18	CLC
$EFF6:65 13	ADC $13
$EFF8:85 13	STA $13
$EFFA:8A	TXA
$EFFB:65 14	ADC $14
$EFFD:85 14	STA $14
$EFFF:60	RTS

$F000:86 06	STX $06
$F002:85 07	STA $07
$F004:A5 14	LDA $14
$F006:D0 28	BNE $F030
$F008:AA	TAX
; control flow target
$F009:A5 80	LDA $80
$F00B:18	CLC
$F00C:61 0D	ADC ($0D,X)
$F00E:85 02	STA $02
$F010:B1 06	LDA ($06),Y
$F012:C8	INY
$F013:85 08	STA $08
$F015:B1 06	LDA ($06),Y
$F017:C8	INY
$F018:84 0C	STY $0C
$F01A:A8	TAY
$F01B:20 3C F0	JSR $F03C
$F01E:A4 0C	LDY $0C
; control flow target
$F020:20 EE EF	JSR $EFEE
$F023:E6 0D	INC $0D
$F025:D0 02	BNE $F029
$F027:E6 0E	INC $0E
; control flow target
$F029:C6 09	DEC $09
$F02B:F0 07	BEQ $F034
$F02D:AA	TAX
$F02E:F0 D9	BEQ $F009
; control flow target
$F030:C8	INY
$F031:C8	INY
$F032:D0 EC	BNE $F020
; control flow target
$F034:60	RTS

$F035:18	CLC
$F036:65 80	ADC $80
$F038:85 02	STA $02
$F03A:86 08	STX $08
; control flow target
$F03C:A6 1D	LDX $1D
; control flow target
$F03E:20 52 F0	JSR $F052
$F041:C6 08	DEC $08
$F043:F0 0A	BEQ $F04F
$F045:A5 02	LDA $02
$F047:18	CLC
$F048:69 08	ADC #$08
$F04A:85 02	STA $02
$F04C:C8	INY
$F04D:D0 EF	BNE $F03E
; control flow target
$F04F:86 1D	STX $1D
$F051:60	RTS

; control flow target
$F052:A5 02	LDA $02
; control flow target
$F054:9D 00 03	STA $0300,X
$F057:B1 06	LDA ($06),Y
$F059:C9 FF	CMP #$FF
$F05B:F0 1C	BEQ $F079
$F05D:29 C0	AND #$C0
$F05F:0A	ASL
$F060:2A	ROL
$F061:2A	ROL
$F062:05 04	ORA $04
$F064:9D 02 03	STA $0302,X
$F067:B1 06	LDA ($06),Y
$F069:29 3F	AND #$3F
$F06B:65 81	ADC $81
$F06D:9D 01 03	STA $0301,X
$F070:A5 13	LDA $13
$F072:9D 03 03	STA $0303,X
$F075:E8	INX
$F076:E8	INX
$F077:E8	INX
$F078:E8	INX
; control flow target
$F079:60	RTS

$F07A:86 06	STX $06
$F07C:85 07	STA $07
$F07E:A5 80	LDA $80
$F080:AA	TAX
$F081:18	CLC
$F082:69 08	ADC #$08
$F084:24 04	BIT $04
$F086:30 06	BMI $F08E
$F088:86 08	STX $08
$F08A:85 09	STA $09
$F08C:10 04	BPL $F092
; control flow target
$F08E:85 08	STA $08
$F090:86 09	STX $09
; control flow target
$F092:A9 02	LDA #$02
$F094:85 03	STA $03
$F096:A5 14	LDA $14
$F098:D0 1B	BNE $F0B5
; control flow target
$F09A:A6 1D	LDX $1D
$F09C:A5 08	LDA $08
$F09E:20 54 F0	JSR $F054
$F0A1:C8	INY
$F0A2:C8	INY
$F0A3:A5 09	LDA $09
$F0A5:20 54 F0	JSR $F054
$F0A8:88	DEY
$F0A9:86 1D	STX $1D
; control flow target
$F0AB:20 EE EF	JSR $EFEE
$F0AE:C6 03	DEC $03
$F0B0:F0 06	BEQ $F0B8
$F0B2:AA	TAX
$F0B3:F0 E5	BEQ $F09A
; control flow target
$F0B5:C8	INY
$F0B6:D0 F3	BNE $F0AB
; control flow target
$F0B8:60	RTS

$F0B9:85 04	STA $04
$F0BB:86 02	STX $02
$F0BD:20 E0 F0	JSR $F0E0
$F0C0:A5 04	LDA $04
$F0C2:49 40	EOR #$40
$F0C4:85 04	STA $04
$F0C6:A9 08	LDA #$08
$F0C8:85 05	STA $05
$F0CA:D0 09	BNE $F0D5
$F0CC:18	CLC
$F0CD:65 80	ADC $80
$F0CF:85 02	STA $02
$F0D1:20 E0 F0	JSR $F0E0
$F0D4:C8	INY
; control flow target
$F0D5:20 EE EF	JSR $EFEE
$F0D8:F0 0A	BEQ $F0E4
$F0DA:60	RTS

$F0DB:18	CLC
$F0DC:65 80	ADC $80
$F0DE:85 02	STA $02
; control flow target
$F0E0:A5 14	LDA $14
$F0E2:D0 1E	BNE $F102
; control flow target
$F0E4:A6 1D	LDX $1D
$F0E6:98	TYA
$F0E7:18	CLC
$F0E8:65 81	ADC $81
; control flow target
$F0EA:9D 01 03	STA $0301,X
$F0ED:A5 02	LDA $02
$F0EF:9D 00 03	STA $0300,X
$F0F2:A5 13	LDA $13
$F0F4:9D 03 03	STA $0303,X
$F0F7:A5 04	LDA $04
$F0F9:9D 02 03	STA $0302,X
$F0FC:E8	INX
$F0FD:E8	INX
$F0FE:E8	INX
$F0FF:E8	INX
$F100:86 1D	STX $1D
; control flow target
$F102:60	RTS

$F103:A5 14	LDA $14
$F105:D0 FB	BNE $F102
$F107:A6 1D	LDX $1D
$F109:98	TYA
$F10A:4C EA F0	JMP $F0EA
$F10D:A9 02	LDA #$02
$F10F:85 03	STA $03
$F111:A6 1D	LDX $1D
$F113:A5 14	LDA $14
$F115:D0 29	BNE $F140
; control flow target
$F117:98	TYA
$F118:9D 01 03	STA $0301,X
$F11B:9D 05 03	STA $0305,X
$F11E:A5 02	LDA $02
$F120:9D 00 03	STA $0300,X
$F123:18	CLC
$F124:69 08	ADC #$08
$F126:9D 04 03	STA $0304,X
$F129:A5 13	LDA $13
$F12B:9D 03 03	STA $0303,X
$F12E:9D 07 03	STA $0307,X
$F131:A5 04	LDA $04
$F133:9D 02 03	STA $0302,X
$F136:49 80	EOR #$80
$F138:9D 06 03	STA $0306,X
$F13B:8A	TXA
$F13C:18	CLC
$F13D:69 08	ADC #$08
$F13F:AA	TAX
; control flow target
$F140:C6 03	DEC $03
$F142:F0 15	BEQ $F159
$F144:A5 04	LDA $04
$F146:49 40	EOR #$40
$F148:85 04	STA $04
$F14A:A5 13	LDA $13
$F14C:18	CLC
$F14D:69 08	ADC #$08
$F14F:85 13	STA $13
$F151:A5 14	LDA $14
$F153:69 00	ADC #$00
$F155:85 14	STA $14
$F157:F0 BE	BEQ $F117
; control flow target
$F159:86 1D	STX $1D
$F15B:60	RTS

; control flow target
$F15C:A2 00	LDX #$00
$F15E:A9 04	LDA #$04
$F160:A0 C0	LDY #$C0
$F162:4C D0 D3	JMP $D3D0	; fill (A * 256 + X) with Y #$00's

; control flow target
$F165:A5 30	LDA $30
$F167:D0 34	BNE $F19D
$F169:20 09 E7	JSR $E709
$F16C:A9 00	LDA #$00
$F16E:A8	TAY
; control flow target
$F16F:AA	TAX
$F170:B1 40	LDA ($40),Y
$F172:0A	ASL
$F173:F0 25	BEQ $F19A
$F175:08	PHP
$F176:4A	LSR
$F177:C8	INY
$F178:9D 00 04	STA $0400,X
$F17B:B1 40	LDA ($40),Y
$F17D:C8	INY
$F17E:0A	ASL
$F17F:0A	ASL
$F180:3E 03 04	ROL $0403,X
$F183:0A	ASL
$F184:3E 03 04	ROL $0403,X
$F187:9D 02 04	STA $0402,X
$F18A:B1 40	LDA ($40),Y
$F18C:C8	INY
$F18D:9D 04 04	STA $0404,X
$F190:28	PLP
$F191:B0 07	BCS $F19A
$F193:8A	TXA
$F194:69 10	ADC #$10
$F196:C9 C0	CMP #$C0
$F198:90 D5	BCC $F16F
; control flow target
$F19A:20 1B F5	JSR $F51B
; control flow target
$F19D:A9 00	LDA #$00
$F19F:85 76	STA $76
$F1A1:85 71	STA $71
$F1A3:8D E0 03	STA $03E0
; control flow target
$F1A6:AA	TAX
$F1A7:BD 00 04	LDA $0400,X
$F1AA:F0 11	BEQ $F1BD
$F1AC:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$F1AF:86 75	STX $75
$F1B1:20 8E F2	JSR $F28E
$F1B4:A5 75	LDA $75
$F1B6:18	CLC
$F1B7:69 10	ADC #$10
$F1B9:C9 C0	CMP #$C0
$F1BB:90 E9	BCC $F1A6
; control flow target
$F1BD:60	RTS

; control flow target
$F1BE:A9 00	LDA #$00
$F1C0:85 1D	STA $1D
$F1C2:85 1F	STA $1F
$F1C4:18	CLC
$F1C5:A5 28	LDA $28
$F1C7:65 29	ADC $29
$F1C9:0A	ASL
$F1CA:0A	ASL
$F1CB:26 1F	ROL $1F
$F1CD:0A	ASL
$F1CE:26 1F	ROL $1F
$F1D0:05 2A	ORA $2A
$F1D2:85 1E	STA $1E
$F1D4:20 F1 E6	JSR $E6F1	; swap ROM bank 0 into the swappable RAM bank
$F1D7:20 68 87	JSR $8768	; not in this bank!
$F1DA:A2 00	LDX #$00
; control flow target
$F1DC:BD 00 04	LDA $0400,X
$F1DF:F0 2C	BEQ $F20D
$F1E1:30 73	BMI $F256
$F1E3:85 7C	STA $7C
$F1E5:86 75	STX $75
$F1E7:A0 00	LDY #$00
; control flow target
$F1E9:BD 01 04	LDA $0401,X
$F1EC:E8	INX
$F1ED:99 7D 00	STA $7D,Y
$F1F0:C8	INY
$F1F1:C0 0F	CPY #$0F
$F1F3:90 F4	BCC $F1E9
$F1F5:20 0A 90	JSR $900A	; not in this bank!
$F1F8:A6 75	LDX $75
$F1FA:A0 00	LDY #$00
; control flow target
$F1FC:B9 7D 00	LDA $7D,Y
$F1FF:C8	INY
$F200:9D 01 04	STA $0401,X
$F203:E8	INX
$F204:C0 0F	CPY #$0F
$F206:90 F4	BCC $F1FC
$F208:E8	INX
; control flow target
$F209:E0 C0	CPX #$C0
$F20B:90 CF	BCC $F1DC
; control flow target
$F20D:A5 1D	LDA $1D
$F20F:F0 44	BEQ $F255
$F211:4A	LSR
$F212:4A	LSR
$F213:85 02	STA $02
$F215:A5 76	LDA $76
$F217:18	CLC
$F218:69 05	ADC #$05
$F21A:C5 02	CMP $02
$F21C:90 02	BCC $F220
$F21E:A9 00	LDA #$00
; control flow target
$F220:85 76	STA $76
$F222:0A	ASL
$F223:0A	ASL
$F224:AA	TAX
$F225:A0 58	LDY #$58
; control flow target
$F227:BD 00 03	LDA $0300,X
$F22A:99 00 02	STA $0200,Y
$F22D:BD 01 03	LDA $0301,X
$F230:99 01 02	STA $0201,Y
$F233:BD 02 03	LDA $0302,X
$F236:99 02 02	STA $0202,Y
$F239:BD 03 03	LDA $0303,X
$F23C:99 03 02	STA $0203,Y
$F23F:C6 02	DEC $02
$F241:F0 12	BEQ $F255
$F243:C8	INY
$F244:C8	INY
$F245:C8	INY
$F246:C8	INY
$F247:F0 0C	BEQ $F255
$F249:E8	INX
$F24A:E8	INX
$F24B:E8	INX
$F24C:E8	INX
$F24D:E4 1D	CPX $1D
$F24F:90 D6	BCC $F227
$F251:A2 00	LDX #$00
$F253:F0 D2	BEQ $F227
; control flow target
$F255:60	RTS

; control flow target
$F256:8A	TXA
$F257:18	CLC
$F258:69 10	ADC #$10
$F25A:AA	TAX
$F25B:D0 AC	BNE $F209
; control flow target
$F25D:A5 7E	LDA $7E
$F25F:38	SEC
$F260:E5 1E	SBC $1E
$F262:85 13	STA $13
$F264:A5 7F	LDA $7F
$F266:E5 1F	SBC $1F
$F268:85 14	STA $14
$F26A:60	RTS

$F26B:18	CLC
$F26C:65 7E	ADC $7E
$F26E:A4 7F	LDY $7F
$F270:90 01	BCC $F273
$F272:C8	INY
; control flow target
$F273:38	SEC
$F274:E5 63	SBC $63
$F276:AA	TAX
$F277:98	TYA
$F278:A0 01	LDY #$01
$F27A:E5 64	SBC $64
$F27C:10 0F	BPL $F28D
$F27E:A8	TAY
$F27F:8A	TXA
$F280:49 FF	EOR #$FF
$F282:18	CLC
$F283:69 01	ADC #$01
$F285:AA	TAX
$F286:98	TYA
$F287:A0 00	LDY #$00
$F289:49 FF	EOR #$FF
$F28B:69 00	ADC #$00
; control flow target
$F28D:60	RTS

; control flow target
$F28E:BC 00 04	LDY $0400,X
$F291:84 7C	STY $7C
$F293:B9 BF F2	LDA $F2BF,Y
$F296:30 05	BMI $F29D
$F298:F0 F3	BEQ $F28D
$F29A:4C F5 E4	JMP $E4F5
; control flow target
$F29D:20 A2 D7	JSR $D7A2

; data + unknown
$F2A0:A2 88
$F2A2:8B
$F2A3:8B
$F2A4:A4 94
$F2A6:B0 94
$F2A8:96 99
$F2AA:8F9BDF9C
$F2AE:56 9E
$F2B0:1B
$F2B1:A2 E3
$F2B3:A4 D4
$F2B5:A6 63
$F2B7:B6 72
$F2B9:B6 A2
$F2BB:99 DD 97
$F2BE:BB
$F2BF:BB
$F2C0:80 00
$F2C2:00 00
$F2C4:81 00
$F2C6:00 00
$F2C8:11 00
$F2CA:13 08
$F2CC:17 0A
$F2CE:00 00
$F2D0:00 22
$F2D2:12 01
$F2D4:82 83 83
$F2D7:84 85
$F2D9:86 87
$F2DB:0E 88 89
$F2DE:8B
$F2DF:8C 8A 0B
$F2E2:0A
$F2E3:0F20181E
$F2E7:19 1A 1A
$F2EA:1B
$F2EB:26 1C
$F2ED:1D 24 1F
$F2F0:21 23
$F2F2:25 27
$F2F4:28
$F2F5:00 8E
$F2F7:2A
$F2F8:2B
$F2F9:2B
$F2FA:8D 2C 0C
$F2FD:2D 2D 1A
$F300:03 08
$F302:00 31
$F304:8F8F2F30
$F308:00 06
$F30A:13

; control flow target
$F30B:AD E0 03	LDA $03E0
$F30E:D0 01	BNE $F311
$F310:60	RTS

; control flow target
$F311:A2 00	LDX #$00
$F313:86 23	STX $23
$F315:0A	ASL
$F316:AA	TAX
$F317:BD 25 F3	LDA $F325,X
$F31A:85 02	STA $02
$F31C:BD 26 F3	LDA $F326,X
$F31F:85 03	STA $03
$F321:AC E1 03	LDY $03E1
$F324:6C 02 00	JMP ($02)

; jump table
$F327:88 F3	; $F388
$F329:B6 F3	; $F3B6
$F32B:A8 F4	; $F4A8
$F32D:48 F3	; $F348
$F32F:31 F3	; $F331

; control flow target
$F331:A9 05	LDA #$05
$F333:8D E0 03	STA $03E0
$F336:A9 13	LDA #$13
$F338:8D 19 07	STA $0719
$F33B:A9 03	LDA #$03
$F33D:8D 1A 07	STA $071A
$F340:A9 04	LDA #$04
$F342:8D 1B 07	STA $071B
$F345:4C F9 D2	JMP $D2F9	; $22 |= #$01
; control flow target
$F348:A2 00	LDX #$00
; control flow target
$F34A:20 72 F3	JSR $F372
$F34D:E0 06	CPX #$06
$F34F:90 F9	BCC $F34A
$F351:B0 1C	BCS $F36F
$F353:A6 87	LDX $87
$F355:D0 05	BNE $F35C
$F357:24 71	BIT $71
$F359:70 01	BVS $F35C
$F35B:60	RTS

; control flow target
$F35C:A9 04	LDA #$04
$F35E:8D E0 03	STA $03E0
$F361:20 72 F3	JSR $F372
$F364:86 87	STX $87
$F366:E0 06	CPX #$06
$F368:90 05	BCC $F36F
$F36A:A6 75	LDX $75
$F36C:7E 00 04	ROR $0400,X
; control flow target
$F36F:4C F9 D2	JMP $D2F9	; $22 |= #$01
; control flow target
$F372:8A	TXA
$F373:A8	TAY
$F374:C0 03	CPY #$03
$F376:90 01	BCC $F379
$F378:C8	INY
; control flow target
$F379:C8	INY
$F37A:BD 82 F3	LDA $F382,X
$F37D:99 10 07	STA $0710,Y
$F380:E8	INX
$F381:60	RTS

; unknown, probably data
$F382:0112
$F384:220F
$F386:0010

; control flow target
$F388:A9 01	LDA #$01
$F38A:20 5C F4	JSR $F45C
$F38D:A6 DF	LDX $DF	; location
$F38F:BD 3A F4	LDA $F43A,X
$F392:08	PHP
$F393:29 3F	AND #$3F
$F395:AA	TAX
$F396:91 02	STA ($02),Y
$F398:98	TYA
$F399:18	CLC
$F39A:69 30	ADC #$30
$F39C:A8	TAY
$F39D:90 02	BCC $F3A1
$F39F:E6 03	INC $03
; control flow target
$F3A1:28	PLP
$F3A2:10 01	BPL $F3A5
$F3A4:E8	INX
; control flow target
$F3A5:8A	TXA
$F3A6:91 02	STA ($02),Y
$F3A8:A0 00	LDY #$00
$F3AA:20 F7 F4	JSR $F4F7
$F3AD:20 81 F4	JSR $F481
$F3B0:20 DC F3	JSR $F3DC
$F3B3:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | $#80
; control flow target
$F3B6:A9 02	LDA #$02
$F3B8:20 5C F4	JSR $F45C
$F3BB:A9 27	LDA #$27
$F3BD:A2 04	LDX #$04
; control flow target
$F3BF:91 02	STA ($02),Y
$F3C1:C8	INY
$F3C2:CA	DEX
$F3C3:D0 FA	BNE $F3BF
$F3C5:A0 01	LDY #$01
$F3C7:20 F7 F4	JSR $F4F7
$F3CA:20 81 F4	JSR $F481
$F3CD:A6 23	LDX $23
$F3CF:20 1B F4	JSR $F41B
$F3D2:A9 48	LDA #$48
$F3D4:A0 24	LDY #$24
$F3D6:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$F3D9:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80
; control flow target
$F3DC:A6 23	LDX $23
$F3DE:A4 DF	LDY $DF	; location
$F3E0:B9 43 F4	LDA $F443,Y
$F3E3:10 13	BPL $F3F8
$F3E5:20 EE F3	JSR $F3EE
$F3E8:E6 02	INC $02
$F3EA:D0 02	BNE $F3EE
$F3EC:E6 03	INC $03
; control flow target
$F3EE:20 1B F4	JSR $F41B
$F3F1:A9 C4	LDA #$C4
$F3F3:A0 7F	LDY #$7F
$F3F5:4C 21 D7	JMP $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
; control flow target
$F3F8:20 01 F4	JSR $F401
$F3FB:E6 02	INC $02
$F3FD:D0 02	BNE $F401
$F3FF:E6 03	INC $03
; control flow target
$F401:48	PHA
$F402:20 1B F4	JSR $F41B
$F405:68	PLA
$F406:A8	TAY
$F407:A9 84	LDA #$84
$F409:20 26 D7	JSR $D726	; STA $0730,X, INX
; control flow target
$F40C:B9 4C F4	LDA $F44C,Y
$F40F:C8	INY
$F410:9D 30 07	STA $0730,X
$F413:E8	INX
$F414:98	TYA
$F415:29 03	AND #$03
$F417:D0 F3	BNE $F40C
$F419:98	TYA
$F41A:60	RTS

; control flow target
$F41B:A5 03	LDA $03
$F41D:A4 02	LDY $02
$F41F:4C 21 D7	JMP $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX

; data + unknown
$F422:22580404
$F426:26 16
$F428:56 28
$F42A:1A
$F42B:38
$F42C:58
$F42D:26 80
$F42F:80 A0
$F431:80 A0
$F433:A0 30
$F435:60
$F436:70 20
$F438:80 80
$F43A:3F3FB63F
$F43E:BE 3F 3F
$F441:3F338080
$F445:00 80
$F447:08
$F448:80 80
$F44A:80 80
$F44C:30 31
$F44E:31 31
$F450:32 33
$F452:33 33
$F454:7F7F7F09
$F458:7F7F7F0A

; control flow target
$F45C:8D E0 03	STA $03E0
$F45F:8C E1 03	STY $03E1
$F462:A9 05	LDA #$05
$F464:85 03	STA $03
$F466:B9 2E F4	LDA $F42E,Y
$F469:85 06	STA $06
$F46B:0A	ASL
$F46C:90 02	BCC $F470
$F46E:E6 03	INC $03
; control flow target
$F470:18	CLC
$F471:65 06	ADC $06
$F473:90 02	BCC $F477
$F475:E6 03	INC $03
; control flow target
$F477:85 02	STA $02
$F479:B9 22 F4	LDA $F422,Y
$F47C:85 05	STA $05
$F47E:4A	LSR
$F47F:A8	TAY
$F480:60	RTS

; control flow target
$F481:A9 00	LDA #$00
$F483:85 03	STA $03
$F485:A5 06	LDA $06
$F487:18	CLC
$F488:69 30	ADC #$30
$F48A:0A	ASL
$F48B:26 03	ROL $03
$F48D:0A	ASL
$F48E:26 03	ROL $03
$F490:85 02	STA $02
$F492:A5 05	LDA $05
$F494:29 1F	AND #$1F
$F496:18	CLC
$F497:65 02	ADC $02
$F499:85 02	STA $02
$F49B:A9 20	LDA #$20
$F49D:24 05	BIT $05
$F49F:F0 02	BEQ $F4A3
$F4A1:A9 24	LDA #$24
; control flow target
$F4A3:65 03	ADC $03
$F4A5:85 03	STA $03
$F4A7:60	RTS

; control flow target
$F4A8:A9 03	LDA #$03
$F4AA:20 5C F4	JSR $F45C
$F4AD:A9 3C	LDA #$3C
$F4AF:91 02	STA ($02),Y
$F4B1:C8	INY
$F4B2:A9 13	LDA #$13
$F4B4:91 02	STA ($02),Y
$F4B6:A0 02	LDY #$02
$F4B8:20 F7 F4	JSR $F4F7
$F4BB:20 81 F4	JSR $F481
$F4BE:A6 23	LDX $23
$F4C0:20 1B F4	JSR $F41B
$F4C3:A0 00	LDY #$00
$F4C5:20 DD F4	JSR $F4DD
$F4C8:A5 02	LDA $02
$F4CA:18	CLC
$F4CB:69 20	ADC #$20
$F4CD:A8	TAY
$F4CE:A9 00	LDA #$00
$F4D0:65 03	ADC $03
$F4D2:20 21 D7	JSR $D721	; STA $0730,X, INX, TYA, STA $0730,X, INX
$F4D5:A0 04	LDY #$04
$F4D7:20 DD F4	JSR $F4DD
$F4DA:4C 2E D7	JMP $D72E	; $23 = X, $0730,X = #$80, $22 = $22 | #$80

; control flow target
$F4DD:A9 04	LDA #$04
$F4DF:20 26 D7	JSR $D726	; STA $0730,X, INX
; control flow target
$F4E2:B9 EF F4	LDA $F4EF,Y
$F4E5:20 26 D7	JSR $D726	; STA $0730,X, INX
$F4E8:C8	INY
$F4E9:98	TYA
$F4EA:29 03	AND #$03
$F4EC:D0 F4	BNE $F4E2
$F4EE:60	RTS

; data
$F4EF:69 6C
$F4F1:6B
$F4F2:01 0D
$F4F4:0C 0C 36

; control flow target
$F4F7:A5 05	LDA $05
$F4F9:38	SEC
$F4FA:E5 28	SBC $28
$F4FC:D9 08 F5	CMP $F508,Y
$F4FF:B0 06	BCS $F507
$F501:C9 21	CMP #$21
$F503:90 02	BCC $F507
$F505:68	PLA
$F506:68	PLA
; control flow target
$F507:60	RTS

; data
$F508:FFF8FC

; control flow target
$F50B:A9 01	LDA #$01
$F50D:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$F510:8A	TXA
$F511:18	CLC
$F512:65 DF	ADC $DF	; location
$F514:0A	ASL
$F515:AA	TAX
$F516:A5 2F	LDA $2F
$F518:4C 4B D7	JMP $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
; control flow target
$F51B:A2 06	LDX #$06
$F51D:20 0B F5	JSR $F50B
$F520:48	PHA
$F521:A0 11	LDY #$11
$F523:20 31 F5	JSR $F531
$F526:68	PLA
$F527:AA	TAX
$F528:C8	INY
$F529:20 31 F5	JSR $F531
$F52C:A9 01	LDA #$01
$F52E:4C DE D3	JMP $D3DE	; $22 = A | $22

; control flow target
$F531:BD 3F F5	LDA $F53F,X
$F534:E8	INX
$F535:99 10 07	STA $0710,Y
$F538:C8	INY
$F539:98	TYA
$F53A:29 03	AND #$03
$F53C:D0 F3	BNE $F531
$F53E:60	RTS

; data
$F53F:0222
$F541:300F
$F543:18
$F544:28
$F545:0F302804
$F549:1528
$F54B:0F23300F
$F54F:0010
$F551:0F132408
$F555:28
$F556:3703
$F558:2330
$F55A:0F06160F
$F55E:1628
$F560:0F140000
$F564:1410
$F566:0F22310F
$F56A:1434
$F56C:08
$F56D:2737
$F56F:0626
$F571:300F
$F573:2438
$F575:0F2C3808
$F579:1728
$F57B:0F1C2B0F
$F57F:2337
$F581:0F24300F
$F585:1729
$F587:0F13380F
$F58B:0038
$F58D:142C
$F58F:300A
$F591:1A
$F592:28
$F593:0300
$F595:3316
$F597:2519
$F599:0F10300F
$F59D:1230
$F59F:08
$F5A0:18
$F5A1:300F
$F5A3:0F0F0031
$F5A7:3000
$F5A9:2131
$F5AB:0201
$F5AD:0208
$F5AF:0406
$F5B1:0407
$F5B3:0505
$F5B5:FFA91620
$F5B9:EDF54C
$F5BC:F1E6

; control flow target
$F5BE:A6 30	LDX $30
$F5C0:CA	DEX
$F5C1:D0 04	BNE $F5C7
$F5C3:A9 0E	LDA #$0E
$F5C5:D0 26	BNE $F5ED
; control flow target
$F5C7:A5 DF	LDA $DF	; location
$F5C9:C9 0B	CMP #$0B
$F5CB:D0 08	BNE $F5D5
$F5CD:24 F4	BIT $F4
$F5CF:50 04	BVC $F5D5
$F5D1:A9 18	LDA #$18
$F5D3:D0 18	BNE $F5ED
; control flow target
$F5D5:A2 00	LDX #$00
; control flow target
$F5D7:A5 DF	LDA $DF	; location
$F5D9:DD AB F5	CMP $F5AB,X
$F5DC:90 0F	BCC $F5ED
$F5DE:D0 07	BNE $F5E7
$F5E0:A5 2F	LDA $2F
$F5E2:DD AC F5	CMP $F5AC,X
$F5E5:F0 04	BEQ $F5EB
; control flow target
$F5E7:E8	INX
$F5E8:E8	INX
$F5E9:D0 EC	BNE $F5D7
; control flow target
$F5EB:A9 13	LDA #$13
; control flow target
$F5ED:C5 F5	CMP $F5
$F5EF:F0 44	BEQ $F635
; control flow target
$F5F1:85 F5	STA $F5
$F5F3:A9 06	LDA #$06
$F5F5:20 0B E7	JSR $E70B	; swap bank given by A into $8000-$BFFF
$F5F8:A2 02	LDX #$02
$F5FA:A5 F5	LDA $F5
$F5FC:20 4B D7	JSR $D74B	; given A and X, set $02-$03 to $8000,X-$8001,X, then set X to ($8000),(A*2) and A to ($8001),(A*2), and INC $03 as appropriate
$F5FF:86 AD	STX $AD
$F601:85 AE	STA $AE
$F603:20 52 F6	JSR $F652	; STZ to $8E, $94-$97, $99-$9A, pAPU stuff
$F606:A0 03	LDY #$03
$F608:A2 00	LDX #$00
; control flow target
$F60A:C0 02	CPY #$02
$F60C:B0 08	BCS $F616
$F60E:A9 FF	LDA #$FF
$F610:99 2B 01	STA $012B,Y
$F613:99 43 01	STA $0143,Y
; control flow target
$F616:8A	TXA
$F617:99 9D 00	STA $9D,Y
$F61A:99 19 01	STA $0119,Y
$F61D:99 1D 01	STA $011D,Y
$F620:B9 AC F8	LDA $F8AC,Y
$F623:99 21 01	STA $0121,Y
$F626:88	DEY
$F627:10 E1	BPL $F60A
$F629:20 7F F7	JSR $F77F
; control flow target
$F62C:A9 03	LDA #$03
; control flow target
$F62E:85 8E	STA $8E
$F630:A9 0F	LDA #$0F
$F632:8D 15 40	STA $4015	; pAPU Sound/Vertical Clock Signal Register
; control flow target
$F635:60	RTS

; control flow target
$F636:A9 01	LDA #$01
$F638:D0 F4	BNE $F62E
$F63A:A5 F5	LDA $F5
$F63C:C9 15	CMP #$15
$F63E:F0 F5	BEQ $F635
$F640:C9 0C	CMP #$0C
$F642:F0 F1	BEQ $F635
$F644:C9 14	CMP #$14
$F646:F0 ED	BEQ $F635
$F648:A9 15	LDA #$15
$F64A:20 F1 F5	JSR $F5F1
$F64D:68	PLA
$F64E:68	PLA
$F64F:4C F1 E6	JMP $E6F1	; swap ROM bank 0 into the swappable RAM bank

; control flow target
$F652:A9 00	LDA #$00	; STZ to $95-$97
$F654:85 95	STA $95
$F656:85 96	STA $96
$F658:85 97	STA $97
; this happens during IRQ
; control flow target
$F65A:A9 00	LDA #$00	; STZ to $8E, $94, $99-$9A, pAPU stuff
$F65C:85 8E	STA $8E
$F65E:85 94	STA $94
$F660:85 99	STA $99
$F662:85 9A	STA $9A
$F664:8D 11 40	STA $4011	; pAPU Delta Modulation D/A Register
$F667:8D 15 40	STA $4015	; pAPU Channel Control
; control flow target
$F66A:60	RTS

; this happens during IRQ
; control flow target
$F66B:A5 8E	LDA $8E
$F66D:F0 FB	BEQ $F66A
$F66F:A9 06	LDA #$06
$F671:20 0D E7	JSR $E70D
$F674:A5 99	LDA $99
$F676:F0 50	BEQ $F6C8
$F678:C5 9A	CMP $9A
$F67A:90 48	BCC $F6C4
$F67C:85 9A	STA $9A
$F67E:0A	ASL
$F67F:A8	TAY
$F680:B9 1B FA	LDA $FA1B,Y
$F683:85 8F	STA $8F
$F685:B9 1C FA	LDA $FA1C,Y
$F688:85 90	STA $90
$F68A:A0 00	LDY #$00
$F68C:B1 8F	LDA ($8F),Y
$F68E:85 91	STA $91
$F690:05 94	ORA $94
$F692:85 94	STA $94
$F694:C8	INY
$F695:A2 00	LDX #$00
; control flow target
$F697:46 91	LSR $91
$F699:90 23	BCC $F6BE
$F69B:B1 8F	LDA ($8F),Y
$F69D:C8	INY
$F69E:95 CF	STA $CF,X
$F6A0:B1 8F	LDA ($8F),Y
$F6A2:C8	INY
$F6A3:95 D0	STA $D0,X
$F6A5:E0 04	CPX #$04
$F6A7:B0 15	BCS $F6BE
$F6A9:8A	TXA
$F6AA:48	PHA
$F6AB:4A	LSR
$F6AC:AA	TAX
$F6AD:A9 FF	LDA #$FF
$F6AF:9D 2B 01	STA $012B,X
$F6B2:9D 2F 01	STA $012F,X
$F6B5:9D 47 01	STA $0147,X
$F6B8:A9 00	LDA #$00
$F6BA:95 A1	STA $A1,X
$F6BC:68	PLA
$F6BD:AA	TAX
; control flow target
$F6BE:E8	INX
$F6BF:E8	INX
$F6C0:E0 08	CPX #$08
$F6C2:90 D3	BCC $F697
; control flow target
$F6C4:A9 00	LDA #$00
$F6C6:85 99	STA $99
; control flow target
$F6C8:A5 9A	LDA $9A
$F6CA:F0 56	BEQ $F722
$F6CC:A9 00	LDA #$00
$F6CE:85 9C	STA $9C
$F6D0:A5 97	LDA $97
$F6D2:48	PHA
$F6D3:A9 88	LDA #$88
$F6D5:A0 07	LDY #$07
; control flow target
$F6D7:24 94	BIT $94
$F6D9:F0 40	BEQ $F71B
$F6DB:85 9B	STA $9B
$F6DD:A9 00	LDA #$00
$F6DF:85 97	STA $97
$F6E1:98	TYA
$F6E2:29 03	AND #$03
$F6E4:0A	ASL
$F6E5:0A	ASL
$F6E6:85 93	STA $93
$F6E8:B6 9D	LDX $9D,Y
$F6EA:F0 05	BEQ $F6F1
$F6EC:CA	DEX
$F6ED:96 9D	STX $9D,Y
$F6EF:D0 21	BNE $F712
; control flow target
$F6F1:84 92	STY $92
$F6F3:4A	LSR
$F6F4:09 20	ORA #$20
$F6F6:AA	TAX
$F6F7:20 AB F7	JSR $F7AB
$F6FA:A5 97	LDA $97
$F6FC:F0 14	BEQ $F712
$F6FE:A6 93	LDX $93
$F700:B9 A5 F8	LDA $F8A5,Y
$F703:9D 00 40	STA $4000,X	; probably some pAPU register
$F706:A5 97	LDA $97
$F708:45 94	EOR $94
$F70A:85 94	STA $94
$F70C:D0 0B	BNE $F719
$F70E:85 9A	STA $9A
$F710:F0 0D	BEQ $F71F
; control flow target
$F712:C0 06	CPY #$06
$F714:B0 03	BCS $F719
$F716:20 AC F9	JSR $F9AC
; control flow target
$F719:A5 9B	LDA $9B
; control flow target
$F71B:88	DEY
$F71C:4A	LSR
$F71D:90 B8	BCC $F6D7
; control flow target
$F71F:68	PLA
$F720:85 97	STA $97
; control flow target
$F722:A5 8E	LDA $8E
$F724:4A	LSR
$F725:F0 48	BEQ $F76F
$F727:A5 97	LDA $97
; control flow target
$F729:05 96	ORA $96
$F72B:05 95	ORA $95
$F72D:85 98	STA $98
$F72F:A9 88	LDA #$88
$F731:A0 03	LDY #$03
; control flow target
$F733:24 98	BIT $98
$F735:D0 22	BNE $F759
$F737:85 9B	STA $9B
$F739:25 94	AND $94
$F73B:85 9C	STA $9C
$F73D:98	TYA
$F73E:0A	ASL
$F73F:0A	ASL
$F740:85 93	STA $93
$F742:B6 9D	LDX $9D,Y
$F744:F0 05	BEQ $F74B
$F746:CA	DEX
$F747:96 9D	STX $9D,Y
$F749:D0 05	BNE $F750
; control flow target
$F74B:84 92	STY $92
$F74D:20 A6 F7	JSR $F7A6
; control flow target
$F750:C0 02	CPY #$02
$F752:B0 03	BCS $F757
$F754:20 AC F9	JSR $F9AC
; control flow target
$F757:A5 9B	LDA $9B
; control flow target
$F759:4A	LSR
$F75A:88	DEY
$F75B:10 D6	BPL $F733
$F75D:A5 95	LDA $95
$F75F:C9 FF	CMP #$FF
$F761:F0 17	BEQ $F77A
$F763:05 96	ORA $96
$F765:C9 FF	CMP #$FF
$F767:F0 16	BEQ $F77F
$F769:05 97	ORA $97
$F76B:C9 FF	CMP #$FF
$F76D:F0 05	BEQ $F774
; control flow target
$F76F:A5 2D	LDA $2D
$F771:4C 0D E7	JMP $E70D

; this happens during IRQ
; control flow target
$F774:A9 00	LDA #$00
$F776:85 97	STA $97
$F778:F0 AF	BEQ $F729
; control flow target
$F77A:20 5A F6	JSR $F65A	; STZ to $8E, $94, $99-$9A, pAPU stuff
$F77D:F0 F0	BEQ $F76F
; control flow target
$F77F:A5 95	LDA $95
$F781:85 93	STA $93
$F783:A9 00	LDA #$00
$F785:85 96	STA $96
$F787:A8	TAY
; control flow target
$F788:46 93	LSR $93
$F78A:B0 16	BCS $F7A2
$F78C:AA	TAX
$F78D:B1 AD	LDA ($AD),Y
$F78F:95 AF	STA $AF,X
$F791:C8	INY
$F792:B1 AD	LDA ($AD),Y
$F794:95 B0	STA $B0,X
$F796:C8	INY
$F797:8A	TXA
; control flow target
$F798:18	CLC
$F799:69 08	ADC #$08
$F79B:C9 20	CMP #$20
$F79D:90 E9	BCC $F788
$F79F:4C 6F F7	JMP $F76F

; this happens during IRQ
; control flow target
$F7A2:C8	INY
$F7A3:C8	INY
$F7A4:D0 F2	BNE $F798
; this happens during IRQ
; control flow target
$F7A6:19 19 01	ORA $0119,Y
$F7A9:0A	ASL
$F7AA:AA	TAX
; control flow target
$F7AB:20 79 F8	JSR $F879
$F7AE:C9 0C	CMP #$0C
$F7B0:90 06	BCC $F7B8
$F7B2:20 38 F8	JSR $F838
$F7B5:B0 F4	BCS $F7AB
$F7B7:60	RTS

; this happens during IRQ
; control flow target
$F7B8:BE 09 01	LDX $0109,Y
$F7BB:96 9D	STX $9D,Y
$F7BD:86 8F	STX $8F
$F7BF:A6 9C	LDX $9C
$F7C1:D0 56	BNE $F819
$F7C3:24 9B	BIT $9B
$F7C5:30 53	BMI $F81A
$F7C7:0A	ASL
$F7C8:AA	TAX
$F7C9:BD 95 F9	LDA $F995,X
$F7CC:85 90	STA $90
$F7CE:BD 94 F9	LDA $F994,X
$F7D1:BE 11 01	LDX $0111,Y
$F7D4:F0 06	BEQ $F7DC
; control flow target
$F7D6:46 90	LSR $90
$F7D8:6A	ROR
$F7D9:CA	DEX
$F7DA:D0 FA	BNE $F7D6
; control flow target
$F7DC:A6 93	LDX $93
$F7DE:9D 02 40	STA $4002,X	; probably some pAPU register
$F7E1:A5 90	LDA $90
$F7E3:09 08	ORA #$08
$F7E5:9D 03 40	STA $4003,X	; probably some pAPU register
$F7E8:24 9B	BIT $9B
$F7EA:70 3D	BVS $F829
$F7EC:B9 29 01	LDA $0129,Y
$F7EF:9D 01 40	STA $4001,X	; probably some pAPU register
$F7F2:A9 00	LDA #$00
$F7F4:BE 2B 01	LDX $012B,Y
$F7F7:E0 03	CPX #$03
$F7F9:90 06	BCC $F801
$F7FB:99 2B 01	STA $012B,Y
$F7FE:99 A7 00	STA $A7,Y
; control flow target
$F801:BE 3B 01	LDX $013B,Y
$F804:86 90	STX $90
$F806:85 91	STA $91
$F808:A2 08	LDX #$08
; control flow target
$F80A:46 8F	LSR $8F
$F80C:90 02	BCC $F810
$F80E:65 90	ADC $90
; control flow target
$F810:6A	ROR
$F811:66 91	ROR $91
$F813:CA	DEX
$F814:D0 F4	BNE $F80A
$F816:99 A5 00	STA $A5,Y
; control flow target
$F819:60	RTS

; this happens during IRQ
; control flow target
$F81A:8D 0E 40	STA $400E	; pAPU Noise Frequency Register #1
$F81D:AD 24 01	LDA $0124
$F820:8D 0C 40	STA $400C	; pAPU Noise Control Register #1
$F823:A9 08	LDA #$08
$F825:8D 0F 40	STA $400F	; pAPU Noise Frequency Register #2
$F828:60	RTS

; this happens during IRQ
; control flow target
$F829:AD 23 01	LDA $0123
$F82C:8D 08 40	STA $4008	; pAPU Triangle Control Register #1
$F82F:60	RTS

; this happens during IRQ
; control flow target
$F830:38	SEC
$F831:E9 20	SBC #$20
$F833:99 09 01	STA $0109,Y
$F836:38	SEC
$F837:60	RTS

; this happens during IRQ
; control flow target
$F838:C9 20	CMP #$20
$F83A:B0 F4	BCS $F830
$F83C:38	SEC
$F83D:E9 0C	SBC #$0C
$F83F:0A	ASL
$F840:A8	TAY
$F841:B9 51 F8	LDA $F851,Y
$F844:85 8F	STA $8F
$F846:B9 52 F8	LDA $F852,Y
$F849:85 90	STA $90
$F84B:A4 92	LDY $92
$F84D:38	SEC
$F84E:6C 8F 00	JMP ($8F)

; jump table
$F851:82 F8	; $F882
$F853:C5 F8	; $F8C5
$F855:CC F8	; $F8CC
$F857:D6 F8	; $F8D6
$F859:E0 F8	; $F8E0
$F85B:FF F8	; $F8FF
$F85D:06 F9	; $F906
$F85F:0D F9	; $F90D
$F861:14 F9	; $F914
$F863:F8 F8	; $F8F8
$F865:22 F9	; $F922
$F867:38 F9	; $F938
$F869:44 F9	; $F944
$F86B:5E F9	; $F95E
$F86D:8C F9	; $F98C
$F86F:84 F9	; $F984
$F871:7C F9	; $F97C
$F873:B4 F8	; $F8B4
$F875:BE F8	; $F8BE
$F877:1B F9	; $F91B

; this happens during IRQ
; control flow target
$F879:A1 AF	LDA ($AF,X)
$F87B:F6 AF	INC $AF,X
$F87D:D0 02	BNE $F881
$F87F:F6 B0	INC $B0,X
; control flow target
$F881:60	RTS

; this happens during IRQ
; control flow target
$F882:B9 09 01	LDA $0109,Y
$F885:99 9D 00	STA $9D,Y
$F888:A5 9C	LDA $9C
$F88A:D0 08	BNE $F894
$F88C:A6 93	LDX $93
$F88E:B9 A5 F8	LDA $F8A5,Y
$F891:9D 00 40	STA $4000,X	; probably some pAPU register
; control flow target
$F894:A5 9B	LDA $9B
$F896:29 03	AND #$03
$F898:F0 09	BEQ $F8A3
$F89A:A9 80	LDA #$80
$F89C:99 2B 01	STA $012B,Y
$F89F:0A	ASL
$F8A0:99 A7 00	STA $A7,Y
; control flow target
$F8A3:18	CLC
$F8A4:60	RTS

; data
$F8A5:3030
$F8A7:0030
$F8A9:3030
$F8AB:0030
$F8AD:3000
$F8AF:0030
$F8B1:3000
$F8B3:00

; this happens during IRQ
; control flow target
$F8B4:20 79 F8	JSR $F879
$F8B7:19 AC F8	ORA $F8AC,Y
$F8BA:99 21 01	STA $0121,Y
$F8BD:60	RTS

; this happens during IRQ
; control flow target
$F8BE:20 79 F8	JSR $F879
$F8C1:99 29 01	STA $0129,Y
$F8C4:60	RTS

; this happens during IRQ
; control flow target
$F8C5:20 79 F8	JSR $F879
$F8C8:99 11 01	STA $0111,Y
$F8CB:60	RTS

; this happens during IRQ
; control flow target
$F8CC:A9 00	LDA #$00
$F8CE:79 11 01	ADC $0111,Y
$F8D1:99 11 01	STA $0111,Y
$F8D4:38	SEC
$F8D5:60	RTS

; this happens during IRQ
; control flow target
$F8D6:B9 11 01	LDA $0111,Y
$F8D9:E9 01	SBC #$01
$F8DB:99 11 01	STA $0111,Y
$F8DE:38	SEC
$F8DF:60	RTS

; this happens during IRQ
; control flow target
$F8E0:20 79 F8	JSR $F879
$F8E3:99 31 01	STA $0131,Y
$F8E6:20 79 F8	JSR $F879
$F8E9:99 33 01	STA $0133,Y
$F8EC:20 79 F8	JSR $F879
$F8EF:99 39 01	STA $0139,Y
$F8F2:20 79 F8	JSR $F879
$F8F5:99 3B 01	STA $013B,Y
; control flow target
$F8F8:20 79 F8	JSR $F879
$F8FB:99 41 01	STA $0141,Y
$F8FE:60	RTS

; this happens during IRQ
; control flow target
$F8FF:20 79 F8	JSR $F879
$F902:99 31 01	STA $0131,Y
$F905:60	RTS

; this happens during IRQ
; control flow target
$F906:20 79 F8	JSR $F879
$F909:99 33 01	STA $0133,Y
$F90C:60	RTS

; this happens during IRQ
; control flow target
$F90D:20 79 F8	JSR $F879
$F910:99 39 01	STA $0139,Y
$F913:60	RTS

; this happens during IRQ
; control flow target
$F914:20 79 F8	JSR $F879
$F917:99 3B 01	STA $013B,Y
$F91A:60	RTS

; this happens during IRQ
; control flow target
$F91B:20 79 F8	JSR $F879
$F91E:99 43 01	STA $0143,Y
$F921:60	RTS

; this happens during IRQ
; control flow target
$F922:20 79 F8	JSR $F879
$F925:95 B1	STA $B1,X
$F927:20 79 F8	JSR $F879
$F92A:95 B2	STA $B2,X
$F92C:B9 19 01	LDA $0119,Y
$F92F:69 00	ADC #$00
$F931:99 19 01	STA $0119,Y
$F934:E8	INX
$F935:E8	INX
$F936:38	SEC
$F937:60	RTS

; this happens during IRQ
; control flow target
$F938:B9 19 01	LDA $0119,Y
$F93B:E9 01	SBC #$01
$F93D:99 19 01	STA $0119,Y
$F940:CA	DEX
$F941:CA	DEX
$F942:38	SEC
$F943:60	RTS

; this happens during IRQ
; control flow target
$F944:20 79 F8	JSR $F879
$F947:99 1D 01	STA $011D,Y
$F94A:B9 19 01	LDA $0119,Y
$F94D:69 00	ADC #$00
$F94F:99 19 01	STA $0119,Y
; control flow target
$F952:B5 AF	LDA $AF,X
$F954:95 B1	STA $B1,X
$F956:B5 B0	LDA $B0,X
$F958:95 B2	STA $B2,X
$F95A:E8	INX
$F95B:E8	INX
$F95C:38	SEC
$F95D:60	RTS

; this happens during IRQ
; control flow target
$F95E:CA	DEX
$F95F:CA	DEX
$F960:B9 1D 01	LDA $011D,Y
$F963:E9 01	SBC #$01
$F965:99 1D 01	STA $011D,Y
$F968:D0 E8	BNE $F952
$F96A:B9 19 01	LDA $0119,Y
$F96D:E9 01	SBC #$01
$F96F:99 19 01	STA $0119,Y
$F972:B5 B1	LDA $B1,X
$F974:95 AF	STA $AF,X
$F976:B5 B2	LDA $B2,X
$F978:95 B0	STA $B0,X
$F97A:38	SEC
$F97B:60	RTS

; this happens during IRQ
; control flow target
$F97C:A5 9B	LDA $9B
$F97E:05 95	ORA $95
$F980:85 95	STA $95
$F982:18	CLC
$F983:60	RTS

; this happens during IRQ
; control flow target
$F984:A5 9B	LDA $9B
$F986:05 96	ORA $96
$F988:85 96	STA $96
$F98A:18	CLC
$F98B:60	RTS

; this happens during IRQ
; control flow target
$F98C:A5 9B	LDA $9B
$F98E:05 97	ORA $97
$F990:85 97	STA $97
$F992:18	CLC
$F993:60	RTS

; data
$F994:B006
$F996:5006
$F998:F405A0
$F99B:054C
$F99D:0500
$F99F:05B8
$F9A1:0474
$F9A3:0434
$F9A5:04F8
$F9A7:03C0
$F9A9:0388
$F9AB:03

; this happens during IRQ
; control flow target
$F9AC:BE 2B 01	LDX $012B,Y
$F9AF:30 45	BMI $F9F6
$F9B1:F0 17	BEQ $F9CA
$F9B3:CA	DEX
$F9B4:F0 41	BEQ $F9F7
$F9B6:CA	DEX
$F9B7:F0 56	BEQ $FA0F
$F9B9:B9 A7 00	LDA $A7,Y
$F9BC:38	SEC
$F9BD:F9 41 01	SBC $0141,Y
$F9C0:B0 25	BCS $F9E7
$F9C2:A9 80	LDA #$80
$F9C4:99 2B 01	STA $012B,Y
$F9C7:0A	ASL
$F9C8:F0 1D	BEQ $F9E7
; control flow target
$F9CA:B9 31 01	LDA $0131,Y
$F9CD:18	CLC
$F9CE:79 A7 00	ADC $A7,Y
$F9D1:B0 05	BCS $F9D8
$F9D3:D9 43 01	CMP $0143,Y
$F9D6:90 08	BCC $F9E0
; control flow target
$F9D8:A9 01	LDA #$01
$F9DA:99 2B 01	STA $012B,Y
$F9DD:B9 43 01	LDA $0143,Y
; control flow target
$F9E0:B6 A5	LDX $A5,Y
$F9E2:F0 03	BEQ $F9E7
$F9E4:CA	DEX
$F9E5:96 A5	STX $A5,Y
; control flow target
$F9E7:99 A7 00	STA $A7,Y
$F9EA:4A	LSR
$F9EB:4A	LSR
$F9EC:4A	LSR
$F9ED:4A	LSR
$F9EE:19 21 01	ORA $0121,Y
$F9F1:A6 93	LDX $93
$F9F3:9D 00 40	STA $4000,X	; probably some pAPU register
; control flow target
$F9F6:60	RTS

; this happens during IRQ
; control flow target
$F9F7:B9 A7 00	LDA $A7,Y
$F9FA:38	SEC
$F9FB:F9 33 01	SBC $0133,Y
$F9FE:90 05	BCC $FA05
$FA00:D9 39 01	CMP $0139,Y
$FA03:B0 DB	BCS $F9E0
; control flow target
$FA05:A9 02	LDA #$02
$FA07:99 2B 01	STA $012B,Y
$FA0A:B9 39 01	LDA $0139,Y
$FA0D:90 D1	BCC $F9E0
; control flow target
$FA0F:B6 A5	LDX $A5,Y
$FA11:F0 04	BEQ $FA17
$FA13:CA	DEX
$FA14:96 A5	STX $A5,Y
$FA16:60	RTS

; this happens during IRQ
; control flow target
$FA17:A9 03	LDA #$03
$FA19:99 2B 01	STA $012B,Y
$FA1C:60	RTS

; data
$FA1D:3FFA	; $FA3F
$FA1F:57FA	; $FA57
$FA21:5AFA	; $FA5A
$FA23:4EFA	; $FA4E
$FA25:42FA	; $FA42
$FA27:45FA	; $FA45
$FA29:5DFA	; $FA5D
$FA2B:4BFA	; $FA4B
$FA2D:48FA	; $FA48
$FA2F:51FA	; $FA51
$FA31:54FA	; $FA54
$FA33:60FA	; $FA60
$FA35:63FA	; $FA63
$FA37:66FA	; $FA66
$FA39:6BFA	; $FA6B
$FA3B:6EFA	; $FA6E
$FA3D:71FA	; $FA71

$FA3F:88
$FA40:8BFA	; $FA8B

$FA42:22
$FA43:74FA	; $FA74

$FA45:88
$FA46:92FA	; $FA92

$FA48:22
$FA49:9AFA	; $FA9A

$FA4B:22
$FA4C:20FB	; $FB20

$FA4E:22
$FA4F:BEFA	; $FABE

$FA51:22
$FA52:D7FA	; $FAD7

$FA54:22
$FA55:F5FA	; $FAF5

$FA57:88
$FA58:3EFB	; $FB3E

$FA5A:88
$FA5B:58FB	; $FB58

$FA5D:22
$FA5E:65FB	; $FB65

$FA60:22
$FA61:C9FB	; $FBC9

$FA63:88
$FA64:F7FB	; $FBF7

$FA66:AA
$FA67:03FC	; $FC03
$FA69:17FC	; $FC17

$FA6B:22
$FA6C:29FC	; $FC29

$FA6E:22
$FA6F:3BFC	; $FC3B

$FA71:22
$FA72:56FC	; $FC56

$FA74:1D80
$FA76:1E0010
$FA79:FF01FF20
$FA7D:100D
$FA7F:0421
$FA81:0709
$FA83:0709
$FA85:0709
$FA87:0E4002
$FA8A:1A

$FA8B:1D3622
$FA8E:0203
$FA90:08
$FA91:1A

$FA92:1D0324
$FA95:0A
$FA96:0508
$FA98:031A

$FA9A:1D8010
$FA9D:FA
$FA9E:FA
$FA9F:FA
$FAA0:1414
$FAA2:1ED422
$FAA5:0D0404
$FAA8:0D0100
$FAAB:0D0404
$FAAE:0D0100
$FAB1:0D0404
$FAB4:0D0100
$FAB7:0D0404
$FABA:0D0100
$FABD:1A

$FABE:1D8010
$FAC1:FF01FF14
$FAC5:141E
$FAC7:CC0D03
$FACA:2100
$FACC:0204
$FACE:0E0002
$FAD1:040E
$FAD3:0002
$FAD5:041A

$FAD7:1D8010
$FADA:40
$FADB:7DFAFA
$FADE:641E
$FAE0:000D
$FAE2:0325
$FAE4:0004
$FAE6:070B
$FAE8:0E2302
$FAEB:0402
$FAED:0402
$FAEF:0402
$FAF1:0402
$FAF3:041A

$FAF5:1D4010
$FAF8:FFFFFF14
$FAFC:FF1EBD0D
$FB00:0024
$FB02:040B
$FB04:040B
$FB06:040B
$FB08:040B
$FB0A:040B
$FB0C:040B
$FB0E:040B
$FB10:040B
$FB12:040B
$FB14:040B
$FB16:040B
$FB18:040B
$FB1A:040B
$FB1C:040E
$FB1E:001A

$FB20:1D0010
$FB23:FF01FFFF
$FB27:FF1E0021
$FB2B:0D0209
$FB2E:0F0B0E0A
$FB32:0F090F0B
$FB36:0E0A0F
$FB39:090B
$FB3B:0A
$FB3C:091A

$FB3E:1D0322
$FB41:0102
$FB43:0304
$FB45:0506
$FB47:0708
$FB49:090A
$FB4B:0B
$FB4C:0C0D1A
$FB4F:0202
$FB51:0202
$FB53:0202
$FB55:0202
$FB57:1A

$FB58:1D0328
$FB5B:0D2406
$FB5E:0504
$FB60:0302
$FB62:0202
$FB64:1A

$FB65:1D4010
$FB68:FFFFFFC8
$FB6C:FA
$FB6D:1E9E0D
$FB70:0121
$FB72:0409
$FB74:050A
$FB76:0007
$FB78:0204
$FB7A:0102
$FB7C:0001
$FB7E:1E950D
$FB81:0408
$FB83:0F080E07
$FB87:0F070E06
$FB8B:0F060E05
$FB8F:0F050E04
$FB93:0F040E03
$FB97:0F030E02
$FB9B:0F020E01
$FB9F:0F011D80
$FBA3:08
$FBA4:0F080E07
$FBA8:0F070E06
$FBAC:0F06050F
$FBB0:050E
$FBB2:020F
$FBB4:020E
$FBB6:010F
$FBB8:010E
$FBBA:000F
$FBBC:000B
$FBBE:0F0B0E08
$FBC2:0F080E07
$FBC6:0F071A

$FBC9:1D
$FBCA:C010
$FBCC:FFFFFFFF
$FBD0:FA
$FBD1:1E9D0D
$FBD4:0024
$FBD6:0407
$FBD8:0407
$FBDA:0407
$FBDC:0407
$FBDE:0407
$FBE0:0407
$FBE2:0407
$FBE4:0407
$FBE6:0509
$FBE8:0509
$FBEA:0509
$FBEC:0509
$FBEE:070B
$FBF0:070B
$FBF2:070B
$FBF4:070B
$FBF6:1A

$FBF7:1D0330
$FBFA:08
$FBFB:0706
$FBFD:0508
$FBFF:0706
$FC01:051A

$FC03:1D0010
$FC06:FF00FFFF
$FC0A:FF1EB540
$FC0E:0C0D05
$FC11:3002
$FC13:0C0C03
$FC16:1A

$FC17:1D3F24
$FC1A:0A
$FC1B:0B
$FC1C:0A
$FC1D:2407
$FC1F:0605
$FC21:0403
$FC23:0202
$FC25:023C
$FC27:011A

$FC29:10FF
$FC2B:40
$FC2C:8040
$FC2E:101D
$FC30:801E
$FC32:000D
$FC34:0522
$FC36:0004
$FC38:3007
$FC3A:1A

$FC3B:1D801E
$FC3E:0011
$FC40:FF0D0221
$FC44:000F
$FC46:000E
$FC48:000F
$FC4A:000E
$FC4C:000F
$FC4E:000E
$FC50:000F
$FC52:000E
$FC54:001A

$FC56:1D0010
$FC59:FF00FFFF
$FC5D:001E
$FC5F:9418
$FC61:140D
$FC63:0322
$FC65:0709
$FC67:1A

$FC68:191C

; free space!
$FC6A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FC7A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FC8A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FC9A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FCAA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FCBA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FCCA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FCDA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FCEA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FCFA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD0A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD1A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD2A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD3A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD4A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD5A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD6A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD7A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD8A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FD9A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FDAA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FDBA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FDCA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FDDA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FDEA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FDFA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE0A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE1A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE2A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE3A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE4A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE5A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE6A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE7A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE8A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FE9A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FEAA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FEBA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FECA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FEDA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FEEA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FEFA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF0A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF1A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF2A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF3A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF4A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF5A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF6A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF7A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF8A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FF9A:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FFAA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FFBA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$FFCA:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

; reset vector
$FF8A:EE FB FF	INC $FFFB
$FF8D:4C 02 C0	JMP $C002

; data + unknown
$FFE0:42 42
$FFE2:34 37
$FFE4:39 35 36
$FFE7:2D 31 35
$FFEA:34 34
$FFEC:30 00
$FFEE:00 00
$FFF0:00 00
$FFF2:00 00
$FFF4:38
$FFF5:04 01
$FFF7:06 9C
$FFF9:21 30
$FFFB:D4 DA
$FFFD:FFFFFF