80/8A36: 78 SEI 80/8A37: 18 CLC 80/8A38: FB XCE 80/8A39: 9011 BCC $8A4C 80/8A3B: C230 REP #$30 80/8A3D: 7B TDC 80/8A3E: D00C BNE $8A4C 80/8A40: A2368A LDX #$8A36 80/8A43: ECFCFF CPX $FFFC 80/8A46: D004 BNE $8A4C 80/8A48: 5C4C8A80 JMP $808A4C 80/8A4C: C230 REP #$30 80/8A4E: BA TSX 80/8A4F: 9B TXY 80/8A50: A2F71F LDX #$1FF7 80/8A53: 9A TXS 80/8A54: E220 SEP #$20 80/8A56: A901 LDA #$01 80/8A58: 8D0D42 STA $420D 80/8A5B: A980 LDA #$80 80/8A5D: 8D0021 STA $2100 80/8A60: 9C0042 STZ $4200 80/8A63: 9C0B42 STZ $420B 80/8A66: 9C0C42 STZ $420C 80/8A69: C230 REP #$30 80/8A6B: ADFC1F LDA $1FFC 80/8A6E: C9454C CMP #$4C45 80/8A71: D008 BNE $8A7B 80/8A73: ADFE1F LDA $1FFE 80/8A76: C94D30 CMP #$304D 80/8A79: F028 BEQ $8AA3 80/8A7B: 88 DEY 80/8A7C: B90000 LDA $0000,Y 80/8A7F: 1A INC A 80/8A80: CDFCFF CMP $FFFC 80/8A83: F025 BEQ $8AAA 80/8A85: A20000 LDX #$0000 80/8A88: BD0000 LDA $0000,X 80/8A8B: 29FF00 AND #$00FF 80/8A8E: C96C00 CMP #$006C 80/8A91: F01F BEQ $8AB2 80/8A93: C94C00 CMP #$004C 80/8A96: F031 BEQ $8AC9 80/8A98: C96000 CMP #$0060 80/8A9B: F036 BEQ $8AD3 80/8A9D: E8 INX 80/8A9E: E0FE1F CPX #$1FFE 80/8AA1: D0E5 BNE $8A88 80/8AA3: 4B PHK 80/8AA4: 4B PHK 80/8AA5: 68 PLA 80/8AA6: F002 BEQ $8AAA 80/8AA8: 8049 BRA $8AF3 80/8AAA: A90000 LDA #$0000 80/8AAD: 5B TCD 80/8AAE: 22CAAF8A JSR $8AAFCA 80/8AB2: BC0100 LDY $0001,X 80/8AB5: C0FCFF CPY #$FFFC 80/8AB8: F0F0 BEQ $8AAA 80/8ABA: C0FF1F CPY #$1FFF 80/8ABD: B0DE BCS $8A9D 80/8ABF: B90000 LDA $0000,Y 80/8AC2: C9368A CMP #$8A36 80/8AC5: F0E3 BEQ $8AAA 80/8AC7: 80D4 BRA $8A9D 80/8AC9: BC0100 LDY $0001,X 80/8ACC: C0368A CPY #$8A36 80/8ACF: F0D9 BEQ $8AAA 80/8AD1: 80CA BRA $8A9D 80/8AD3: 8A TXA 80/8AD4: 5B TCD 80/8AD5: A00000 LDY #$0000 80/8AD8: A96061 LDA #$6160 80/8ADB: DD0000 CMP $0000,X 80/8ADE: D00F BNE $8AEF 80/8AE0: 18 CLC 80/8AE1: 690202 ADC #$0202 80/8AE4: E8 INX 80/8AE5: E8 INX 80/8AE6: C8 INY 80/8AE7: C8 INY 80/8AE8: C02000 CPY #$0020 80/8AEB: D0EE BNE $8ADB 80/8AED: 80BB BRA $8AAA 80/8AEF: 7B TDC 80/8AF0: AA TAX 80/8AF1: 80AA BRA $8A9D 80/8AF3: A90000 LDA #$0000 80/8AF6: 5B TCD 80/8AF7: 2200B08A JSR $8AB000 80/8AFB: 8DF81F STA $1FF8 80/8AFE: 8DFA1F STA $1FFA 80/8B01: A9454C LDA #$4C45 80/8B04: 8DFC1F STA $1FFC 80/8B07: A94D30 LDA #$304D 80/8B0A: 8DFE1F STA $1FFE 80/8B0D: F4007E PEA $7E00 80/8B10: AB PLB 80/8B11: AB PLB 80/8B12: A2F61F LDX #$1FF6 80/8B15: 9E0000 STZ $0000,X 80/8B18: CA DEX 80/8B19: CA DEX 80/8B1A: 10F9 BPL $8B15 80/8B1C: A2FE1F LDX #$1FFE 80/8B1F: 9E0020 STZ $2000,X 80/8B22: 9E0040 STZ $4000,X 80/8B25: 9E0060 STZ $6000,X 80/8B28: 9E0080 STZ $8000,X 80/8B2B: 9E00A0 STZ $A000,X 80/8B2E: 9E00C0 STZ $C000,X 80/8B31: 9E00E0 STZ $E000,X 80/8B34: CA DEX 80/8B35: CA DEX 80/8B36: 10E7 BPL $8B1F 80/8B38: F4007F PEA $7F00 80/8B3B: AB PLB 80/8B3C: AB PLB 80/8B3D: A2FE1F LDX #$1FFE 80/8B40: 9E0000 STZ $0000,X 80/8B43: 9E0020 STZ $2000,X 80/8B46: 9E0040 STZ $4000,X 80/8B49: 9E0060 STZ $6000,X 80/8B4C: 9E0080 STZ $8000,X 80/8B4F: 9E00A0 STZ $A000,X 80/8B52: 9E00C0 STZ $C000,X 80/8B55: 9E00E0 STZ $E000,X 80/8B58: CA DEX 80/8B59: CA DEX 80/8B5A: 10E4 BPL $8B40 80/8B5C: 4B PHK 80/8B5D: AB PLB 80/8B5E: C230 REP #$30 80/8B60: A90918 LDA #$1809 80/8B63: 8D0043 STA $4300 80/8B66: A90080 LDA #$8000 80/8B69: 8D0343 STA $4303 80/8B6C: A9738B LDA #$8B73 80/8B6F: 8D0243 STA $4302 80/8B72: A90000 LDA #$0000 80/8B75: 8D0543 STA $4305 80/8B78: 9C1621 STZ $2116 80/8B7B: E220 SEP #$20 80/8B7D: A901 LDA #$01 80/8B7F: 8D0B42 STA $420B 80/8B82: C220 REP #$20 80/8B84: 203089 JSR $8930 80/8B87: 22D08B80 JSR $808BD0 80/8B8B: A92800 LDA #$0028 80/8B8E: 85E0 STA $E0 80/8B90: A90A00 LDA #$000A 80/8B93: 85E2 STA $E2 80/8B95: A905A6 LDA #$A605 80/8B98: 85D3 STA $D3 80/8B9A: A9D982 LDA #$82D9 80/8B9D: 85D5 STA $D5 80/8B9F: A93BA6 LDA #$A63B 80/8BA2: 85D7 STA $D7 80/8BA4: 4CC88B JMP $8BC8 80/8BA7: C230 REP #$30 80/8BA9: A2F71F LDX #$1FF7 80/8BAC: 9A TXS 80/8BAD: E220 SEP #$20 80/8BAF: A980 LDA #$80 80/8BB1: 8D0021 STA $2100 80/8BB4: 9C0042 STZ $4200 80/8BB7: 9C0B42 STZ $420B 80/8BBA: 9C0C42 STZ $420C 80/8BBD: C230 REP #$30 80/8BBF: 4C0D8B JMP $8B0D 80/8BC2: C230 REP #$30 80/8BC4: 22F68280 JSR $8082F6 80/8BC8: C230 REP #$30 80/8BCA: F4C18B PEA $8BC1 80/8BCD: 6CD700 JMP ($00D7)
Battle nmi vector 80/D207: 08 PHP 80/D208: E220 SEP #$20 80/D20A: A980 LDA #$80 80/D20C: 8D0021 STA $2100 80/D20F: A900 LDA #$00 80/D211: 8F0C4200 STA $00420C 80/D215: C220 REP #$20 80/D217: 226FC29B JSR $9BC26F //Nmi Dma 80/D21B: 22789F9C JSR $9C9F78 //Stop motion {debug} 80/D21F: 228CD59C JSR $9CD58C //uselesss 80/D223: 229AA09B JSR $9BA09A //battle script? copy 7FE33B-->7FE36B 80/D227: 22C3EA9C JSR $9CEAC3 //Init Ram ?? 80/D22B: 22C4AC80 JSR $80ACC4 // 80/D22F: 227C8080 JSR $80807C //DMA oam table, color table 80/D233: 2295AC80 JSR $80AC95 //BG2 HDma (box) 80/D237: 22C38080 JSR $8080C3 //Update PPU regs 80/D23B: 229C8D80 JSR $808D9C //Update sound 80/D23F: 22028080 JSR $808002 //Read pad 80/D243: 2283A782 JSR $82A783 80/D247: AF78FC7F LDA $7FFC78 //hide sprite 80/D24B: 890100 BIT #$0001 80/D24E: F006 BEQ $D256 80/D250: 228C9F9C JSR $9C9F8C 80/D254: 8004 BRA $D25A 80/D256: 22FB8380 JSR $8083FB //Init 2nd oam table 80/D25A: E220 SEP #$20 80/D25C: A900 LDA #$00 80/D25E: 8FD0E17F STA $7FE1D0 80/D262: C220 REP #$20 80/D264: 220FA580 JSR $80A50F //nmi sub mode 80/D268: 22DFA580 JSR $80A5DF //mode 80/D26C: 22288380 JSR $808328 //Init oam table 80/D270: 222C9380 JSR $80932C 80/D274: 28 PLP 80/D275: 60 RTS Ứng dụng org $80D21B LDA $E8 AND #$0020 BEQ + SEP #$20 LDA #$02 STA $7FFC78 REP #$20 BRA end_debug + LDA $E8 AND #$0010 BEQ + SEP #$20 LDA #$00 STA $7FFC78 REP #$20 BRA end_debug + LDA $7FFC78 BIT #$0002 BEQ end_debug SEP #$20 EOR #$03 STA $7FFC78 REP #$20 end_debug: RTL
Battle script 9B/A6C1: AD3F18 LDA $183F //Battle script starts 9B/A6C4: 8530 STA $30 9B/A6C6: AD3E18 LDA $183E // 9B/A6C9: 38 SEC 9B/A6CA: E90200 SBC #$0002 9B/A6CD: 852F STA $2F 9B/A6CF: A00200 LDY #$0002 9B/A6D2: B72F LDA [$2F],Y 9B/A6D4: C9FD00 CMP #$00FD 9B/A6D7: D019 BNE $A6F2 9B/A6D9: AD3E18 LDA $183E 9B/A6DC: 18 CLC 9B/A6DD: 690200 ADC #$0002 9B/A6E0: 8D3E18 STA $183E 9B/A6E3: AD4018 LDA $1840 9B/A6E6: 690000 ADC #$0000 9B/A6E9: E220 SEP #$20 9B/A6EB: 8D4018 STA $1840 9B/A6EE: C220 REP #$20 9B/A6F0: 80CF BRA $A6C1 9B/A6F2: E220 SEP #$20 9B/A6F4: C9FE CMP #$FE 9B/A6F6: D009 BNE $A701 9B/A6F8: C220 REP #$20 9B/A6FA: 2280F69C JSR $9CF680 9B/A6FE: 4CA9A9 JMP $A9A9 9B/A701: C220 REP #$20 9B/A703: A00000 LDY #$0000 9B/A706: AD3D18 LDA $183D 9B/A709: 890200 BIT #$0002 9B/A70C: F003 BEQ $A711 9B/A70E: 4CE5A9 JMP $A9E5 9B/A711: AD3D18 LDA $183D 9B/A714: 892000 BIT #$0020 9B/A717: D01B BNE $A734 9B/A719: B72F LDA [$2F],Y 9B/A71B: 898000 BIT #$0080 9B/A71E: D014 BNE $A734 9B/A720: 891000 BIT #$0010 9B/A723: F00F BEQ $A734 9B/A725: E220 SEP #$20 9B/A727: AD4118 LDA $1841 9B/A72A: 0980 ORA #$80 9B/A72C: 8D4118 STA $1841 9B/A72F: C220 REP #$20 9B/A731: 4CE5A9 JMP $A9E5 9B/A734: E62F INC $2F 9B/A736: A00200 LDY #$0002 9B/A739: E220 SEP #$20 9B/A73B: B72F LDA [$2F],Y 9B/A73D: 8D4418 STA $1844 9B/A740: C220 REP #$20 9B/A742: A00000 LDY #$0000 9B/A745: E220 SEP #$20 9B/A747: AD4118 LDA $1841 9B/A74A: 2980 AND #$80 9B/A74C: 8D4118 STA $1841 9B/A74F: C220 REP #$20 9B/A751: E62F INC $2F 9B/A753: B72F LDA [$2F],Y 9B/A755: C9FFFF CMP #$FFFF 9B/A758: D010 BNE $A76A 9B/A75A: E220 SEP #$20 9B/A75C: AD3D18 LDA $183D 9B/A75F: 0902 ORA #$02 9B/A761: 8D3D18 STA $183D 9B/A764: C220 REP #$20 9B/A766: 38 SEC 9B/A767: 4CE5A9 JMP $A9E5 9B/A76A: C9FFFE CMP #$FEFF 9B/A76D: D025 BNE $A794 9B/A76F: E220 SEP #$20 9B/A771: AD3D18 LDA $183D 9B/A774: 0902 ORA #$02 9B/A776: 8D3D18 STA $183D 9B/A779: C220 REP #$20 9B/A77B: 22BA989C JSR $9C98BA 9B/A77F: B00F BCS $A790 9B/A781: 20C0A6 JSR $A6C0 9B/A784: E220 SEP #$20 9B/A786: AD3D18 LDA $183D 9B/A789: 0910 ORA #$10 9B/A78B: 8D3D18 STA $183D 9B/A78E: C220 REP #$20 9B/A790: 38 SEC 9B/A791: 4CE5A9 JMP $A9E5 9B/A794: 890100 BIT #$0001 9B/A797: F003 BEQ $A79C 9B/A799: 4C05A8 JMP $A805 9B/A79C: AF5AFC7F LDA $7FFC5A 9B/A7A0: 898000 BIT #$0080 //Holy weapon flash 9B/A7A3: F01C BEQ $A7C1 9B/A7A5: A94300 LDA #$0043 9B/A7A8: 2255A49C JSR $9CA455 9B/A7AC: A20000 LDX #$0000 9B/A7AF: 22F48496 JSR $9684F4 9B/A7B3: AF5AFC7F LDA $7FFC5A 9B/A7B7: 297FFF AND #$FF7F 9B/A7BA: 8F5AFC7F STA $7FFC5A 9B/A7BE: 4CE5A9 JMP $A9E5 9B/A7C1: A90000 LDA #$0000 9B/A7C4: 8D4618 STA $1846 9B/A7C7: A94300 LDA #$0043 9B/A7CA: 8D4818 STA $1848 9B/A7CD: E220 SEP #$20 9B/A7CF: AD4518 LDA $1845 9B/A7D2: 297F AND #$7F 9B/A7D4: 8D4518 STA $1845 9B/A7D7: 18 CLC 9B/A7D8: 20CBE2 JSR $E2CB 9B/A7DB: A90000 LDA #$0000 9B/A7DE: 8FA9E17F STA $7FE1A9 9B/A7E2: A95618 LDA #$1856 9B/A7E5: 8FA8E17F STA $7FE1A8 9B/A7E9: A90000 LDA #$0000 9B/A7EC: 8FAFE17F STA $7FE1AF 9B/A7F0: A99918 LDA #$1899 9B/A7F3: 8FAEE17F STA $7FE1AE 9B/A7F7: 22ACD59B JSR $9BD5AC 9B/A7FB: B003 BCS $A800 9B/A7FD: 4CE5A9 JMP $A9E5 9B/A800: A20000 LDX #$0000 9B/A803: 8067 BRA $A86C 9B/A805: AF5AFC7F LDA $7FFC5A 9B/A809: 894000 BIT #$0040 9B/A80C: F01C BEQ $A82A 9B/A80E: A94300 LDA #$0043 9B/A811: 2255A49C JSR $9CA455 9B/A815: A24300 LDX #$0043 9B/A818: 22F48496 JSR $9684F4 9B/A81C: AF5AFC7F LDA $7FFC5A 9B/A820: 29BFFF AND #$FFBF 9B/A823: 8F5AFC7F STA $7FFC5A 9B/A827: 4CE5A9 JMP $A9E5 9B/A82A: A94300 LDA #$0043 9B/A82D: 8D4618 STA $1846 9B/A830: A90000 LDA #$0000 9B/A833: 8D4818 STA $1848 9B/A836: E220 SEP #$20 9B/A838: AD4518 LDA $1845 9B/A83B: 0980 ORA #$80 9B/A83D: 8D4518 STA $1845 9B/A840: 38 SEC 9B/A841: 20CBE2 JSR $E2CB 9B/A844: A90000 LDA #$0000 9B/A847: 8FAFE17F STA $7FE1AF 9B/A84B: A95618 LDA #$1856 9B/A84E: 8FAEE17F STA $7FE1AE 9B/A852: A90000 LDA #$0000 9B/A855: 8FA9E17F STA $7FE1A9 9B/A859: A99918 LDA #$1899 9B/A85C: 8FA8E17F STA $7FE1A8 9B/A860: 22C9D59B JSR $9BD5C9 9B/A864: B003 BCS $A869 9B/A866: 4CE5A9 JMP $A9E5 9B/A869: A24300 LDX #$0043 9B/A86C: 22D9BF9B JSR $9BBFD9 9B/A870: 226BE39B JSR $9BE36B 9B/A874: AF5AFC7F LDA $7FFC5A 9B/A878: 890400 BIT #$0004 9B/A87B: D009 BNE $A886 9B/A87D: B72F LDA [$2F],Y 9B/A87F: 890200 BIT #$0002 9B/A882: F02B BEQ $A8AF 9B/A884: 8007 BRA $A88D 9B/A886: 2240AD9B JSR $9BAD40 9B/A88A: 4CA9A9 JMP $A9A9 9B/A88D: B72F LDA [$2F],Y 9B/A88F: 890800 BIT #$0008 9B/A892: F014 BEQ $A8A8 9B/A894: E220 SEP #$20 9B/A896: AD4118 LDA $1841 9B/A899: 0908 ORA #$08 9B/A89B: 8D4118 STA $1841 9B/A89E: AD3D18 LDA $183D 9B/A8A1: 0940 ORA #$40 9B/A8A3: 8D3D18 STA $183D 9B/A8A6: C220 REP #$20 9B/A8A8: 2228AD9B JSR $9BAD28 9B/A8AC: 4CA9A9 JMP $A9A9 9B/A8AF: E220 SEP #$20 9B/A8B1: B72F LDA [$2F],Y 9B/A8B3: 8920 BIT #$20 9B/A8B5: F009 BEQ $A8C0 9B/A8B7: AD4318 LDA $1843 9B/A8BA: 0901 ORA #$01 9B/A8BC: C220 REP #$20 9B/A8BE: 805A BRA $A91A 9B/A8C0: AD4318 LDA $1843 9B/A8C3: 29FE8D AND #$8DFE 9B/A8C6: 4318 EOR $18,S 9B/A8C8: C220 REP #$20 9B/A8CA: B72F LDA [$2F],Y 9B/A8CC: 894000 BIT #$0040 9B/A8CF: F015 BEQ $A8E6 9B/A8D1: E00000 CPX #$0000 9B/A8D4: D005 BNE $A8DB 9B/A8D6: ADBC1A LDA $1ABC 9B/A8D9: 8003 BRA $A8DE 9B/A8DB: ADCE1A LDA $1ACE 9B/A8DE: 29F000 AND #$00F0 9B/A8E1: C90000 CMP #$0000 9B/A8E4: D034 BNE $A91A 9B/A8E6: 22A3AF9B JSR $9BAFA3 9B/A8EA: A50D LDA $0D 9B/A8EC: C91000 CMP #$0010 9B/A8EF: 9029 BCC $A91A 9B/A8F1: A50D LDA $0D 9B/A8F3: C93C00 CMP #$003C 9B/A8F6: B009 BCS $A901 9B/A8F8: A90100 LDA #$0001 9B/A8FB: 8FAEF57F STA $7FF5AE 9B/A8FF: 8020 BRA $A921 9B/A901: A52F LDA $2F 9B/A903: 48 PHA 9B/A904: A530 LDA $30 9B/A906: 48 PHA 9B/A907: 2258AD9B JSR $9BAD58 9B/A90B: 68 PLA 9B/A90C: 8530 STA $30 9B/A90E: 68 PLA 9B/A90F: 852F STA $2F 9B/A911: A90200 LDA #$0002 9B/A914: 8FAEF57F STA $7FF5AE 9B/A918: 8007 BRA $A921 9B/A91A: A90000 LDA #$0000 9B/A91D: 8FAEF57F STA $7FF5AE 9B/A921: E220 SEP #$20 9B/A923: AD3D18 LDA $183D 9B/A926: 29BF AND #$BF 9B/A928: 8D3D18 STA $183D 9B/A92B: AD4118 LDA $1841 9B/A92E: 29BF AND #$BF 9B/A930: 8D4118 STA $1841 9B/A933: C220 REP #$20 9B/A935: B72F LDA [$2F],Y 9B/A937: 890800 BIT #$0008 9B/A93A: D003 BNE $A93F 9B/A93C: 4C53A9 JMP $A953 9B/A93F: E220 SEP #$20 9B/A941: AD4118 LDA $1841 9B/A944: 0908 ORA #$08 9B/A946: 8D4118 STA $1841 9B/A949: AD3D18 LDA $183D 9B/A94C: 0940 ORA #$40 9B/A94E: 8D3D18 STA $183D 9B/A951: C220 REP #$20 9B/A953: E220 SEP #$20 9B/A955: AD4118 LDA $1841 9B/A958: 0910 ORA #$10 9B/A95A: 8D4118 STA $1841 9B/A95D: C220 REP #$20 9B/A95F: 2240B89B JSR $9BB840 9B/A963: B044 BCS $A9A9 9B/A965: BD5218 LDA $1852,X 9B/A968: 890400 BIT #$0004 9B/A96B: F006 BEQ $A973 9B/A96D: 224BAC9B JSR $9BAC4B 9B/A971: 8036 BRA $A9A9 9B/A973: B72F LDA [$2F],Y 9B/A975: 890400 BIT #$0004 9B/A978: F029 BEQ $A9A3 9B/A97A: 891000 BIT #$0010 9B/A97D: F012 BEQ $A991 9B/A97F: 2204AC9B JSR $9BAC04 9B/A983: E220 SEP #$20 9B/A985: AD4118 LDA $1841 9B/A988: 0940 ORA #$40 9B/A98A: 8D4118 STA $1841 9B/A98D: C220 REP #$20 9B/A98F: 8018 BRA $A9A9 9B/A991: 2298AB9B JSR $9BAB98 9B/A995: E220 SEP #$20 9B/A997: AD4118 LDA $1841 9B/A99A: 0940 ORA #$40 9B/A99C: 8D4118 STA $1841 9B/A99F: C220 REP #$20 9B/A9A1: 8006 BRA $A9A9 9B/A9A3: 2213AB9B JSR $9BAB13 9B/A9A7: 8000 BRA $A9A9 9B/A9A9: AD3E18 LDA $183E 9B/A9AC: 18 CLC 9B/A9AD: 690200 ADC #$0002 9B/A9B0: 8D3E18 STA $183E 9B/A9B3: AD4018 LDA $1840 9B/A9B6: 690000 ADC #$0000 9B/A9B9: E220 SEP #$20 9B/A9BB: 8D4018 STA $1840 9B/A9BE: C220 REP #$20 9B/A9C0: 20E6A9 JSR $A9E6 9B/A9C3: AD3F18 LDA $183F 9B/A9C6: 8530 STA $30 9B/A9C8: AD3E18 LDA $183E 9B/A9CB: 852F STA $2F 9B/A9CD: A00000 LDY #$0000 9B/A9D0: B72F LDA [$2F],Y 9B/A9D2: C9FFFF CMP #$FFFF 9B/A9D5: D00E BNE $A9E5 9B/A9D7: E220 SEP #$20 9B/A9D9: AF87E17F LDA $7FE187 9B/A9DD: 0901 ORA #$01 9B/A9DF: 8F87E17F STA $7FE187 9B/A9E3: C220 REP #$20 9B/A9E5: 60 RTS Ứng dụng
Battle script 9B/DA77: DA PHX 9B/DA78: 5A PHY 9B/DA79: 0A ASL A 9B/DA7A: A8 TAY 9B/DA7B: B732 LDA [$32],Y 9B/DA7D: A8 TAY //action ptr 9B/DA7E: E00000 CPX #$0000 9B/DA81: D015 BNE $DA98 9B/DA83: E220 SEP #$20 9B/DA85: B732 LDA [$32],Y 9B/DA87: C97F CMP #$7F 9B/DA89: F022 BEQ $DAAD 9B/DA8B: C220 REP #$20 9B/DA8D: B732 LDA [$32],Y 9B/DA8F: 18 CLC //player atk phase 9B/DA90: 2217DA9B JSR $9BDA17 9B/DA94: C8 INY 9B/DA95: C8 INY 9B/DA96: 80EB BRA $DA83 9B/DA98: E220 SEP #$20 9B/DA9A: B732 LDA [$32],Y 9B/DA9C: C97F CMP #$7F 9B/DA9E: F00D BEQ $DAAD 9B/DAA0: C220 REP #$20 9B/DAA2: B732 LDA [$32],Y 9B/DAA4: 38 SEC //enemy atk phase 9B/DAA5: 2217DA9B JSR $9BDA17 9B/DAA9: C8 INY 9B/DAAA: C8 INY 9B/DAAB: 80EB BRA $DA98 9B/DAAD: C220 REP #$20 9B/DAAF: 7A PLY 9B/DAB0: FA PLX 9B/DAB1: 6B RTL
Load battle background 9B/82EB: AF26427E LDA $7E4226 //background index 9B/82EF: 8DA31A STA $1AA3 9B/82F2: AFC6417E LDA $7E41C6 9B/82F6: 8DA11A STA $1AA1 9B/82F9: AFAE417E LDA $7E41AE 9B/82FD: E220 SEP #$20 9B/82FF: 8DA51A STA $1AA5 9B/8302: C220 REP #$20 9B/8304: AF5AFC7F LDA $7FFC5A 9B/8308: 890200 BIT #$0002 9B/830B: F019 BEQ $8326 9B/830D: A90000 LDA #$0000 9B/8310: 8FD6417E STA $7E41D6 9B/8314: A9FFFF LDA #$FFFF 9B/8317: 8FD4417E STA $7E41D4 9B/831B: A90000 LDA #$0000 9B/831E: 8FB0417E STA $7E41B0 9B/8322: 8FB3417E STA $7E41B3 9B/8326: 60 RTS 9B/8398: ADA31A LDA $1AA3 //background index 9B/839B: 20118D JSR $8D11 9B/839E: 204E8D JSR $8D4E 9B/83A1: 20508E JSR $8E50 9B/83A4: FA PLX 9B/83A5: 60 RTS 9B/8DB6: DA PHX 9B/8DB7: 08 PHP 9B/8DB8: 48 PHA 9B/8DB9: AFAC417E LDA $7E41AC 9B/8DBD: 29FF00 AND #$00FF 9B/8DC0: C90200 CMP #$0002 9B/8DC3: 8006 BRA $8DCB 9B/8DC5: A21801 LDX #$0118 9B/8DC8: 68 PLA 9B/8DC9: 8029 BRA $8DF4 9B/8DCB: 68 PLA 9B/8DCC: 29FF00 AND #$00FF 9B/8DCF: C92C00 CMP #$002C 9B/8DD2: 9003 BCC $8DD7 9B/8DD4: A90000 LDA #$0000 9B/8DD7: AA TAX 9B/8DD8: 22898196 JSR $968189 9B/8DDC: 9006 BCC $8DE4 9B/8DDE: 8A TXA 9B/8DDF: 18 CLC 9B/8DE0: 692C00 ADC #$002C 9B/8DE3: AA TAX 9B/8DE4: BFF6C58A LDA $8AC5F6,X //load background 9B/8DE8: 29FF00 AND #$00FF 9B/8DEB: 0A ASL A 9B/8DEC: 48 PHA 9B/8DED: 0A ASL A 9B/8DEE: 0A ASL A 9B/8DEF: 18 CLC 9B/8DF0: 6301 ADC $01,S 9B/8DF2: AA TAX 9B/8DF3: 68 PLA 9B/8DF4: BFC0C48A LDA $8AC4C0,X 9B/8DF8: 852F STA $2F 9B/8DFA: BFC1C48A LDA $8AC4C1,X 9B/8DFE: 8530 STA $30 9B/8E00: BFC3C48A LDA $8AC4C3,X 9B/8E04: 8532 STA $32 9B/8E06: BFC4C48A LDA $8AC4C4,X 9B/8E0A: 8533 STA $33 9B/8E0C: BFC6C48A LDA $8AC4C6,X 9B/8E10: 8535 STA $35 9B/8E12: BFC7C48A LDA $8AC4C7,X 9B/8E16: 8536 STA $36 9B/8E18: 28 PLP 9B/8E19: 9033 BCC $8E4E 9B/8E1B: BFC9C48A LDA $8AC4C9,X 9B/8E1F: 890100 BIT #$0001 9B/8E22: F01C BEQ $8E40 9B/8E24: AFAC417E LDA $7E41AC 9B/8E28: 29FF00 AND #$00FF 9B/8E2B: C90200 CMP #$0002 9B/8E2E: F010 BEQ $8E40 9B/8E30: E220 SEP #$20 9B/8E32: AFB4E17F LDA $7FE1B4 9B/8E36: 0901 ORA #$01 9B/8E38: 8FB4E17F STA $7FE1B4 9B/8E3C: C220 REP #$20 9B/8E3E: 800E BRA $8E4E 9B/8E40: E220 SEP #$20 9B/8E42: AFB4E17F LDA $7FE1B4 9B/8E46: 29FE AND #$FE 9B/8E48: 8FB4E17F STA $7FE1B4 9B/8E4C: C220 REP #$20 9B/8E4E: FA PLX 9B/8E4F: 6B RTL
Load sprite function 9B/8000: 205680 JSR $8056 //init ram 9B/8003: 22AA959C JSR $9C95AA //sound 9B/8007: 206D80 JSR $806D //write register 9B/800A: 22D7A49B JSR $9BA4D7 //check weapon 9B/800E: 203182 JSR $8231 //check class, distance, wpn, haikei 9B/8011: 2227839B JSR $9B8327 //keikenchi 9B/8015: 200481 JSR $8104 //draw stuffs 9B/8018: 22AEA59B JSR $9BA5AE 9B/801C: 22FF829C JSR $9C82FF 9B/8020: 206383 JSR $8363 9B/8023: 20A683 JSR $83A6 9B/8026: 203F89 JSR $893F 9B/8029: 220AD99B JSR $9BD90A 9B/802D: 220AD99B JSR $9BD90A 9B/8031: 22E98D9C JSR $9C8DE9 9B/8035: 22AA8E9C JSR $9C8EAA 9B/8039: 2236C99C JSR $9CC936 9B/803D: 220AD69C JSR $9CD60A 9B/8041: 2251999B JSR $9B9951 9B/8045: 222CD69C JSR $9CD62C 9B/8049: 220C9A9C JSR $9C9A0C 9B/804D: 22A49C9C JSR $9C9CA4 9B/8051: 225C9E9C JSR $9C9E5C 9B/8055: 6B RTL 9B/8104: 9C241A STZ $1A24 9B/8107: 9C9B1A STZ $1A9B 9B/810A: A90000 LDA #$0000 9B/810D: 8FA1FC7F STA $7FFCA1 9B/8111: A90000 LDA #$0000 9B/8114: 8F98E17F STA $7FE198 9B/8118: A90001 LDA #$0100 9B/811B: 8F99E17F STA $7FE199 9B/811F: 9CCA1A STZ $1ACA 9B/8122: 9CCA1A STZ $1ACA 9B/8125: A90000 LDA #$0000 9B/8128: 8F9FE07F STA $7FE09F 9B/812C: 8FB5E17F STA $7FE1B5 9B/8130: E220 SEP #$20 9B/8132: 8FA7E17F STA $7FE1A7 9B/8136: 8F87E17F STA $7FE187 9B/813A: 8FB0F57F STA $7FF5B0 9B/813E: 8F78FC7F STA $7FFC78 9B/8142: 8F9DFC7F STA $7FFC9D 9B/8146: 8F71FC7F STA $7FFC71 9B/814A: 8F72FC7F STA $7FFC72 9B/814E: 8F92E17F STA $7FE192 9B/8152: 8F94E17F STA $7FE194 9B/8156: 8F96E17F STA $7FE196 9B/815A: 8F97E17F STA $7FE197 9B/815E: 85A7 STA $A7 9B/8160: 85A8 STA $A8 9B/8162: 85A9 STA $A9 9B/8164: 85AA STA $AA 9B/8166: 8FC3E47F STA $7FE4C3 9B/816A: 8FC4E47F STA $7FE4C4 9B/816E: 8FDCE47F STA $7FE4DC 9B/8172: AFB4E17F LDA $7FE1B4 9B/8176: 0908 ORA #$08 9B/8178: 29FB AND #$FB 9B/817A: 8FB4E17F STA $7FE1B4 9B/817E: A910 LDA #$10 9B/8180: 8F70FC7F STA $7FFC70 9B/8184: A9E0 LDA #$E0 9B/8186: 8FEFE37F STA $7FE3EF 9B/818A: 8FEEE37F STA $7FE3EE 9B/818E: 8FEDE37F STA $7FE3ED 9B/8192: A903 LDA #$03 9B/8194: 8FCDE47F STA $7FE4CD 9B/8198: 9C3D18 STZ $183D //end flag 9B/819B: 9C4118 STZ $1841 9B/819E: 9C211A STZ $1A21 9B/81A1: 9CA219 STZ $19A2 9B/81A4: 9CD519 STZ $19D5 9B/81A7: C220 REP #$20 9B/81A9: 22DFA39B JSR $9BA3DF //brightness 00 9B/81AD: 22EADC9C JSR $9CDCEA //init ram 00 9B/81B1: 22A7EA9C JSR $9CEAA7 //init ram 00 9B/81B5: 226EEB9C JSR $9CEB6E //scroll? 9B/81B9: 2204989C JSR $9C9804 //write end flag 9B/81BD: 2231999C JSR $9C9931 //sprite invisible 9B/81C1: 22A6F79C JSR $9CF7A6 //init big shield 9B/81C5: 229A9E9C JSR $9C9E9A //init menu frame shake 9B/81C9: A90202 LDA #$0202 9B/81CC: 8FF1E17F STA $7FE1F1 9B/81D0: A91212 LDA #$1212 9B/81D3: 8FF3E17F STA $7FE1F3 9B/81D7: A90606 LDA #$0606 9B/81DA: 8FF5E17F STA $7FE1F5 9B/81DE: A98000 LDA #$0080 9B/81E1: 49FFFF EOR #$FFFF 9B/81E4: 1A INC A 9B/81E5: 29FF00 AND #$00FF 9B/81E8: 8FC9E17F STA $7FE1C9 9B/81EC: A9007E LDA #$7E00 9B/81EF: 8D3F18 STA $183F 9B/81F2: A98C42 LDA #$428C 9B/81F5: 8D3E18 STA $183E //24 bit pointer to battle script 9B/81F8: 2284C99B JSR $9BC984 //init relative pos 9B/81FC: 22F8D89B JSR $9BD8F8 //init battle script 9B/8200: 22A2A49C JSR $9CA4A2 //init ram 9B/8204: 22C1CA9C JSR $9CCAC1 //init ram 9B/8208: 2283EE9C JSR $9CEE83 //init ram 9B/820C: 2213A29C JSR $9CA213 //init ram 9B/8210: 22C6B89C JSR $9CB8C6 //init ram 9B/8214: 220DBD9C JSR $9CBD0D ///init ram 9B/8218: 2278A19B JSR $9BA178 //draw wpn 9B/821C: 22F9A19B JSR $9BA1F9 //draw class 9B/8220: 2268B79B JSR $9BB768 9B/8224: 2232959C JSR $9C9532 //menu frame color mask 9B/8228: 22ABA39B JSR $9BA3AB //dma 9B/822C: 22BFA39B JSR $9BA3BF //dma 9B/8230: 60 RTS 9B/A1F9: E220 SEP #$20 9B/A1FB: ADBD1A LDA $1ABD //teki class 9B/A1FE: 8FB7E17F STA $7FE1B7 9B/A202: ADCE1A LDA $1ACE 9B/A205: 4A LSR A 9B/A206: 4A LSR A 9B/A207: 4A LSR A 9B/A208: 4A LSR A 9B/A209: 8FB8E17F STA $7FE1B8 9B/A20D: ADBF1A LDA $1ABF 9B/A210: 8FB9E17F STA $7FE1B9 9B/A214: ADCD1A LDA $1ACD //distance atk 9B/A217: 8FBAE17F STA $7FE1BA 9B/A21B: C220 REP #$20 9B/A21D: 227AA29B JSR $9BA27A //class gfx 9B/A221: 900E BCC $A231 9B/A223: E220 SEP #$20 9B/A225: ADCE1A LDA $1ACE 9B/A228: 290F AND #$0F 9B/A22A: 0990 ORA #$90 9B/A22C: 8DCE1A STA $1ACE 9B/A22F: C220 REP #$20 9B/A231: AFB7E17F LDA $7FE1B7 9B/A235: 8FBBE17F STA $7FE1BB 9B/A239: AFB9E17F LDA $7FE1B9 9B/A23D: 8FBDE17F STA $7FE1BD 9B/A241: E220 SEP #$20 9B/A243: ADAB1A LDA $1AAB 9B/A246: 8FB7E17F STA $7FE1B7 9B/A24A: ADBC1A LDA $1ABC 9B/A24D: 4A LSR A 9B/A24E: 4A LSR A 9B/A24F: 4A LSR A 9B/A250: 4A LSR A 9B/A251: 8FB8E17F STA $7FE1B8 9B/A255: ADAD1A LDA $1AAD 9B/A258: 8FB9E17F STA $7FE1B9 9B/A25C: ADBB1A LDA $1ABB //battle class 9B/A25F: 8FBAE17F STA $7FE1BA 9B/A263: C220 REP #$20 9B/A265: 227AA29B JSR $9BA27A 9B/A269: 900E BCC $A279 9B/A26B: E220 SEP #$20 9B/A26D: ADBC1A LDA $1ABC 9B/A270: 290F AND #$0F 9B/A272: 0990 ORA #$90 9B/A274: 8DBC1A STA $1ABC 9B/A277: C220 REP #$20 9B/A279: 6B RTL 9B/A27A: DA PHX 9B/A27B: 5A PHY 9B/A27C: 2271A39B JSR $9BA371 //check dancer 9B/A280: 9004 BCC $A286 //not dancer 9B/A282: 18 CLC 9B/A283: 4C6CA3 JMP $A36C 9B/A286: E220 SEP #$20 9B/A288: A20000 LDX #$0000 9B/A28B: A00000 LDY #$0000 9B/A28E: AFB7E17F LDA $7FE1B7 //chukan class //class 9B/A292: DFF6DF8A CMP $8ADFF6,X //#$01: social knight 9B/A296: F00A BEQ $A2A2 9B/A298: C00100 CPY #$0001 9B/A29B: 9003 BCC $A2A0 9B/A29D: 4C28A3 JMP $A328 9B/A2A0: 8052 BRA $A2F4 9B/A2A2: C00100 CPY #$0001 9B/A2A5: B003 BCS $A2AA 9B/A2A7: A00100 LDY #$0001 9B/A2AA: AFBAE17F LDA $7FE1BA 9B/A2AE: DFF9DF8A CMP $8ADFF9,X 9B/A2B2: F007 BEQ $A2BB 9B/A2B4: C00200 CPY #$0002 9B/A2B7: B06F BCS $A328 9B/A2B9: 8039 BRA $A2F4 9B/A2BB: C00200 CPY #$0002 9B/A2BE: B003 BCS $A2C3 9B/A2C0: A00200 LDY #$0002 9B/A2C3: BFF8DF8A LDA $8ADFF8,X 9B/A2C7: C900 CMP #$00 9B/A2C9: F011 BEQ $A2DC 9B/A2CB: AFB9E17F LDA $7FE1B9 9B/A2CF: DFF8DF8A CMP $8ADFF8,X 9B/A2D3: F007 BEQ $A2DC 9B/A2D5: C00300 CPY #$0003 9B/A2D8: B04E BCS $A328 9B/A2DA: 8018 BRA $A2F4 9B/A2DC: C00300 CPY #$0003 9B/A2DF: B003 BCS $A2E4 9B/A2E1: A00300 LDY #$0003 9B/A2E4: AFB8E17F LDA $7FE1B8 //distance atk 9B/A2E8: C909 CMP #$09 9B/A2EA: F019 BEQ $A305 9B/A2EC: DFF7DF8A CMP $8ADFF7,X 9B/A2F0: D002 BNE $A2F4 9B/A2F2: 8011 BRA $A305 9B/A2F4: C220 REP #$20 9B/A2F6: 8A TXA 9B/A2F7: 18 CLC 9B/A2F8: 690800 ADC #$0008 9B/A2FB: AA TAX 9B/A2FC: E220 SEP #$20 9B/A2FE: E0A808 CPX #$08A8 9B/A301: 908B BCC $A28E 9B/A303: 8046 BRA $A34B 9B/A305: BFFADF8A LDA $8ADFFA,X //weapon atk pattern 9B/A309: 8FB7E17F STA $7FE1B7 //weapon atk pattern 9B/A30D: BFFBDF8A LDA $8ADFFB,X 9B/A311: 8FB8E17F STA $7FE1B8 9B/A315: BFFCDF8A LDA $8ADFFC,X 9B/A319: 8FB9E17F STA $7FE1B9 9B/A31D: BFFDDF8A LDA $8ADFFD,X //Main part pallet 9B/A321: 8FBAE17F STA $7FE1BA 9B/A325: 18 CLC 9B/A326: 8044 BRA $A36C 9B/A328: BFF2DF8A LDA $8ADFF2,X 9B/A32C: 8FB7E17F STA $7FE1B7 //chukan class 9B/A330: BFF3DF8A LDA $8ADFF3,X 9B/A334: 8FB8E17F STA $7FE1B8 9B/A338: BFF4DF8A LDA $8ADFF4,X 9B/A33C: 8FB9E17F STA $7FE1B9 9B/A340: BFF5DF8A LDA $8ADFF5,X 9B/A344: 8FBAE17F STA $7FE1BA 9B/A348: 38 SEC 9B/A349: 8021 BRA $A36C 9B/A34B: AFFADF8A LDA $8ADFFA 9B/A34F: 8FB7E17F STA $7FE1B7 //chukan class 9B/A353: AFFBDF8A LDA $8ADFFB 9B/A357: 8FB8E17F STA $7FE1B8 9B/A35B: AFFCDF8A LDA $8ADFFC 9B/A35F: 8FB9E17F STA $7FE1B9 9B/A363: AFFDDF8A LDA $8ADFFD 9B/A367: 8FBAE17F STA $7FE1BA 9B/A36B: 38 SEC 9B/A36C: C220 REP #$20 9B/A36E: 7A PLY 9B/A36F: FA PLX 9B/A370: 6B RTL
Class Dancer 9B/A371: DA PHX 9B/A372: 5A PHY 9B/A373: AFB7E17F LDA $7FE1B7 //chukan class //class 9B/A377: 29FF00 AND #$00FF 9B/A37A: C92D00 CMP #$002D //dancer 9B/A37D: D009 BNE $A388 9B/A37F: AF5AFC7F LDA $7FFC5A 9B/A383: 890400 BIT #$0004 //dance 9B/A386: D003 BNE $A38B 9B/A388: 18 CLC 9B/A389: 801D BRA $A3A8 9B/A38B: E220 SEP #$20 9B/A38D: A959 LDA #$59 9B/A38F: 8FB7E17F STA $7FE1B7 //chukan class 9B/A393: A963 LDA #$63 9B/A395: 8FB8E17F STA $7FE1B8 9B/A399: A945 LDA #$45 9B/A39B: 8FB9E17F STA $7FE1B9 9B/A39F: A92D LDA #$2D 9B/A3A1: 8FBAE17F STA $7FE1BA 9B/A3A5: C220 REP #$20 9B/A3A7: 38 SEC //dancer 9B/A3A8: 7A PLY 9B/A3A9: FA PLX 9B/A3AA: 6B RTL
Một số công cụ như FE4 Editor, FE5 editor cho phép người dùng tùy chỉnh một số thứ (hạn chế) trong game. Chẳng hạn như chỉnh class của nhân vật, cho nhân vật mang thứ vũ khí mà vốn class đó không mang được. Tuy nhiên nếu cho nhân vật mang vũ khí mà vốn không mang được thì khi vào trận đấu sẽ không thấy được class mà ta định chỉnh, thay vào đó chỉ thấy class Social Knight không mang vũ khí gì. Việc này được giải thích qua routine bên dưới. 9B/A288: A20000 LDX #$0000 9B/A28B: A00000 LDY #$0000 9B/A28E: AFB7E17F LDA $7FE1B7 //chukan class //class 9B/A292: DFF6DF8A CMP $8ADFF6,X //#$01: social knight 9B/A296: F00A BEQ $A2A2 9B/A298: C00100 CPY #$0001 9B/A29B: 9003 BCC $A2A0 9B/A29D: 4C28A3 JMP $A328 9B/A2A0: 8052 BRA $A2F4 9B/A2A2: C00100 CPY #$0001 9B/A2A5: B003 BCS $A2AA 9B/A2A7: A00100 LDY #$0001 9B/A2AA: AFBAE17F LDA $7FE1BA 9B/A2AE: DFF9DF8A CMP $8ADFF9,X 9B/A2B2: F007 BEQ $A2BB 9B/A2B4: C00200 CPY #$0002 9B/A2B7: B06F BCS $A328 9B/A2B9: 8039 BRA $A2F4 9B/A2BB: C00200 CPY #$0002 9B/A2BE: B003 BCS $A2C3 9B/A2C0: A00200 LDY #$0002 9B/A2C3: BFF8DF8A LDA $8ADFF8,X 9B/A2C7: C900 CMP #$00 9B/A2C9: F011 BEQ $A2DC 9B/A2CB: AFB9E17F LDA $7FE1B9 9B/A2CF: DFF8DF8A CMP $8ADFF8,X 9B/A2D3: F007 BEQ $A2DC 9B/A2D5: C00300 CPY #$0003 9B/A2D8: B04E BCS $A328 9B/A2DA: 8018 BRA $A2F4 9B/A2DC: C00300 CPY #$0003 9B/A2DF: B003 BCS $A2E4 9B/A2E1: A00300 LDY #$0003 9B/A2E4: AFB8E17F LDA $7FE1B8 //distance atk 9B/A2E8: C909 CMP #$09 9B/A2EA: F019 BEQ $A305 9B/A2EC: DFF7DF8A CMP $8ADFF7,X 9B/A2F0: D002 BNE $A2F4 9B/A2F2: 8011 BRA $A305 9B/A2F4: C220 REP #$20 9B/A2F6: 8A TXA 9B/A2F7: 18 CLC 9B/A2F8: 690800 ADC #$0008 9B/A2FB: AA TAX 9B/A2FC: E220 SEP #$20 9B/A2FE: E0A808 CPX #$08A8 9B/A301: 908B BCC $A28E 9B/A303: 8046 BRA $A34B 9B/A305: BFFADF8A LDA $8ADFFA,X //weapon atk pattern 9B/A309: 8FB7E17F STA $7FE1B7 //weapon atk pattern 9B/A30D: BFFBDF8A LDA $8ADFFB,X 9B/A311: 8FB8E17F STA $7FE1B8 9B/A315: BFFCDF8A LDA $8ADFFC,X 9B/A319: 8FB9E17F STA $7FE1B9 9B/A31D: BFFDDF8A LDA $8ADFFD,X //Main part pallet 9B/A321: 8FBAE17F STA $7FE1BA 9B/A325: 18 CLC 9B/A326: 8044 BRA $A36C 9B/A328: BFF2DF8A LDA $8ADFF2,X 9B/A32C: 8FB7E17F STA $7FE1B7 //chukan class 9B/A330: BFF3DF8A LDA $8ADFF3,X 9B/A334: 8FB8E17F STA $7FE1B8 9B/A338: BFF4DF8A LDA $8ADFF4,X 9B/A33C: 8FB9E17F STA $7FE1B9 9B/A340: BFF5DF8A LDA $8ADFF5,X 9B/A344: 8FBAE17F STA $7FE1BA 9B/A348: 38 SEC 9B/A349: 8021 BRA $A36C 9B/A34B: AFFADF8A LDA $8ADFFA 9B/A34F: 8FB7E17F STA $7FE1B7 //chukan class 9B/A353: AFFBDF8A LDA $8ADFFB 9B/A357: 8FB8E17F STA $7FE1B8 9B/A35B: AFFCDF8A LDA $8ADFFC 9B/A35F: 8FB9E17F STA $7FE1B9 9B/A363: AFFDDF8A LDA $8ADFFD 9B/A367: 8FBAE17F STA $7FE1BA 9B/A36B: 38 SEC 9B/A36C: C220 REP #$20 9B/A36E: 7A PLY 9B/A36F: FA PLX 9B/A370: 6B RTL $7FE1B7 là địa chỉ Ram tạm thời chứa giá trị class của nhân vật. Routine này khởi đầu bằng việc đọc class nhân vật tại $7FE1B7 rồi so sánh với giá trị trong ma trận class trong Rom. FE4, FE5 sử dụng bảng ma trận class như dưới đây, mỗi class gồm 8 byte. Byte 1: Class ID Byte 2: loại vũ khí (00: kiếm, 01: thương, 02: búa, 03: cung, 05: thương ném, 06: búa ném, 07: ma pháp, 08: gậy phép) Byte 3: unit đặc biệt Byte 4: giới tính (00: nam, 01: nữ) Byte 5: graphic của class Byte 6: anime ID của main part (phần ngựa đối với class kỵ binh, hoặc phần người đối với class bộ binh) Byte 7: anime ID của sub part (phần kỵ sĩ đối với class kỵ binh, các thành phần phụ khác của class bộ binh như áo choàng) Byte 8: pallet màu của nhân vật/class đó Có thể hình dung bảng ma trận như sau: ......................... Paladin-kiếm-00-nam-graphic1-mainanime1-subanime1-color1 Paladin-thương-00-nam-graphic1-mainanime2-subanime2-color1 Paladin-thương ném-00-nam-graphic1-mainaime3-subanime3-color1 Paladin-kiếm-00-nữ-graphic2-mainaime4-subanime4-color2 Paladin-thương-00-nữ-graphic2-mainaime5-subanỉmẹ6-color2 Paladin-thương ném-00-nữ-graphic2-mainaimê5-subanime6-color2 ........................... Routine trên so sánh class ID trong Ram với class ID trong bảng ma trận, nếu khớp ID thì sẽ so sánh tiếp loại vũ khí, giới tính, unit đặc thù. Nếu tất cả các giá trị đều khớp thì sẽ lấy graphic/animation tương ứng từ ma trận. Do đó, tuy cùng một class nhưng nếu nhân vật cầm vũ khí khác nhau sẽ có animation khác nhau. Hoặc tuy cùng một class nhưng có giới tính khác nhau thì sẽ cho ra graphic/animation khác nhau. Nếu bạn chỉnh cho nhân vật có class ID không nằm trong ma trận trên, hoặc vũ khí không nằm trong ma trận trên thì game sẽ chọn class Social Knight, là class ID đầu tiên của bảng ma trận để hiển thị.
9B/D8C9: DA PHX 9B/D8CA: 48 PHA 9B/D8CB: BD5118 LDA $1851,X 9B/D8CE: 898000 BIT #$0080 //kage bunshin 9B/D8D1: F021 BEQ $D8F4 9B/D8D3: AF9FE07F LDA $7FE09F 9B/D8D7: 890100 BIT #$0001 9B/D8DA: F018 BEQ $D8F4 9B/D8DC: AE4818 LDX $1848 9B/D8DF: BD5618 LDA $1856,X 9B/D8E2: 29FF01 AND #$01FF 9B/D8E5: 38 SEC 9B/D8E6: E301 SBC $01,S 9B/D8E8: 18 CLC 9B/D8E9: 7D5618 ADC $1856,X 9B/D8EC: 29FF01 AND #$01FF 9B/D8EF: 8301 STA $01,S 9B/D8F1: 38 SEC 9B/D8F2: 8001 BRA $D8F5 9B/D8F4: 18 CLC 9B/D8F5: 68 PLA 9B/D8F6: FA PLX 9B/D8F7: 6B RTL
Text routine $95/8233 95/8233: 8B PHB 95/8234: 08 PHP 95/8235: 4B PHK 95/8236: AB PLB 95/8237: C230 REP #$30 95/8239: A90000 LDA #$0000 95/823C: 8D2E18 STA $182E 95/823F: A91000 LDA #$0010 95/8242: 1CE917 TRB $17E9 95/8245: A900C0 LDA #$C000 95/8248: 1CE917 TRB $17E9 95/824B: 204583 JSR $8345 95/824E: B040 BCS $8290 95/8250: ADEF17 LDA $17EF 95/8253: F03B BEQ $8290 95/8255: C9FFFF CMP #$FFFF //A pressed 95/8258: F021 BEQ $827B 95/825A: ADE917 LDA $17E9 95/825D: 894000 BIT #$0040 95/8260: D00F BNE $8271 95/8262: 20D182 JSR $82D1 //check $17E9 95/8265: 9005 BCC $826C 95/8267: 20FA82 JSR $82FA 95/826A: 801F BRA $828B 95/826C: 201483 JSR $8314 //check input A 95/826F: B01F BCS $8290 // A pressed 95/8271: 202483 JSR $8324 //check $17E9 95/8274: B01A BCS $8290 95/8276: CEEF17 DEC $17EF //wait 95/8279: D015 BNE $8290 95/827B: 20E685 JSR $85E6 //init draw buffer 95/827E: AE0818 LDX $1808 95/8281: AD0B18 LDA $180B 95/8284: 8530 STA $30 95/8286: AD0A18 LDA $180A 95/8289: 852F STA $2F 95/828B: 20AB82 JSR $82AB //main text routine 95/828E: 90EE BCC $827E 95/8290: 22D09895 JSR $9598D0 //kuchi paku 95/8294: 207788 JSR $8877 95/8297: 22599695 JSR $959659 //text del type , hdma table write 95/829B: AD0618 LDA $1806 95/829E: 490100 EOR #$0001 95/82A1: 8D0618 STA $1806 95/82A4: 22A49895 JSR $9598A4 95/82A8: 28 PLP 95/82A9: AB PLB 95/82AA: 6B RTL 95/8345: AE0818 LDX $1808 95/8348: ADEF17 LDA $17EF //wait 95/834B: C9FFFF CMP #$FFFF //A pressed 95/834E: F008 BEQ $8358 95/8350: C90100 CMP #$0001 95/8353: F003 BEQ $8358 95/8355: 4CD283 JMP $83D2 95/8358: ADE917 LDA $17E9 95/835B: 890004 BIT #$0400 95/835E: F01F BEQ $837F 95/8360: EEF317 INC $17F3 95/8363: ADF317 LDA $17F3 95/8366: 29FF7F AND #$7FFF 95/8369: CDF117 CMP $17F1 95/836C: 9064 BCC $83D2 95/836E: 9CF317 STZ $17F3 95/8371: BFCB457E LDA $7E45CB,X 95/8375: 18 CLC 95/8376: 690100 ADC #$0001 95/8379: 9FCB457E STA $7E45CB,X 95/837D: 8053 BRA $83D2 95/837F: BFCB457E LDA $7E45CB,X 95/8383: 290F00 AND #$000F 95/8386: F04A BEQ $83D2 95/8388: ADF117 LDA $17F1 95/838B: F01F BEQ $83AC 95/838D: EEF317 INC $17F3 95/8390: ADF317 LDA $17F3 95/8393: 29FF7F AND #$7FFF 95/8396: CDF117 CMP $17F1 95/8399: 9034 BCC $83CF 95/839B: 9CF317 STZ $17F3 95/839E: BFCB457E LDA $7E45CB,X 95/83A2: 18 CLC 95/83A3: 690100 ADC #$0001 95/83A6: 9FCB457E STA $7E45CB,X 95/83AA: 800C BRA $83B8 95/83AC: BFCB457E LDA $7E45CB,X 95/83B0: 18 CLC 95/83B1: 690200 ADC #$0002 95/83B4: 9FCB457E STA $7E45CB,X 95/83B8: 290F00 AND #$000F 95/83BB: F012 BEQ $83CF 95/83BD: BFCB457E LDA $7E45CB,X 95/83C1: 290E00 AND #$000E 95/83C4: C90E00 CMP #$000E 95/83C7: D006 BNE $83CF 95/83C9: 207F8A JSR $8A7F 95/83CC: 20158C JSR $8C15 95/83CF: 38 SEC 95/83D0: 8001 BRA $83D3 95/83D2: 18 CLC 95/83D3: 60 RTS //kuchi paku 95/98D0: ADE917 LDA $17E9 95/98D3: 892000 BIT #$0020 95/98D6: F055 BEQ $992D 95/98D8: 891000 BIT #$0010 95/98DB: D016 BNE $98F3 95/98DD: AF92457E LDA $7E4592 95/98E1: F04A BEQ $992D 95/98E3: C90800 CMP #$0008 95/98E6: B012 BCS $98FA 95/98E8: AF92457E LDA $7E4592 95/98EC: 3A DEC A 95/98ED: 8F92457E STA $7E4592 95/98F1: 803A BRA $992D 95/98F3: A90F00 LDA #$000F 95/98F6: 8F92457E STA $7E4592 95/98FA: AF92457E LDA $7E4592 95/98FE: 3A DEC A 95/98FF: 8F92457E STA $7E4592 95/9903: A5DB LDA $DB 95/9905: 890700 BIT #$0007 95/9908: D02A BNE $9934 95/990A: 4A LSR A 95/990B: 4A LSR A 95/990C: 4A LSR A 95/990D: 290F00 AND #$000F 95/9910: AA TAX 95/9911: BF359995 LDA $959935,X 95/9915: 29FF00 AND #$00FF 95/9918: 8FD3457E STA $7E45D3 95/991C: AE0818 LDX $1808 95/991F: D006 BNE $9927 95/9921: 8F8E457E STA $7E458E 95/9925: 800D BRA $9934 95/9927: 8F90457E STA $7E4590 95/992B: 8007 BRA $9934 95/992D: A90000 LDA #$0000 95/9930: 8FD3457E STA $7E45D3 95/9934: 6B RTL 95/9659: AFB6457E LDA $7E45B6 95/965D: 8530 STA $30 95/965F: AFB5457E LDA $7E45B5 95/9663: 852F STA $2F 95/9665: DC2F00 JMP [$002F] 95/9668: 8B PHB 95/9669: 08 PHP 95/966A: 4B PHK 95/966B: AB PLB 95/966C: A9007E LDA #$7E00 95/966F: 8530 STA $30 95/9671: A06E48 LDY #$486E 95/9674: AD0618 LDA $1806 95/9677: 290100 AND #$0001 95/967A: D003 BNE $967F 95/967C: A0EE48 LDY #$48EE 95/967F: 842F STY $2F 95/9681: A00000 LDY #$0000 95/9684: AFBC457E LDA $7E45BC 95/9688: 38 SEC 95/9689: E97CE7 SBC #$E77C 95/968C: 4A LSR A 95/968D: 4A LSR A 95/968E: 4A LSR A 95/968F: 4A LSR A 95/9690: 4A LSR A 95/9691: 4A LSR A 95/9692: 48 PHA 95/9693: 0A ASL A 95/9694: 0A ASL A 95/9695: 0A ASL A 95/9696: C97F00 CMP #$007F 95/9699: 9017 BCC $96B2 95/969B: F015 BEQ $96B2 95/969D: 48 PHA 95/969E: A592 LDA $92 95/96A0: 850B STA $0B 95/96A2: A594 LDA $94 95/96A4: 850D STA $0D 95/96A6: A97F00 LDA #$007F 95/96A9: 224B9895 JSR $95984B 95/96AD: 68 PLA 95/96AE: 38 SEC 95/96AF: E97F00 SBC #$007F 95/96B2: 48 PHA 95/96B3: A592 LDA $92 95/96B5: 850B STA $0B 95/96B7: A594 LDA $94 95/96B9: 850D STA $0D 95/96BB: 68 PLA 95/96BC: 224B9895 JSR $95984B 95/96C0: 225C9895 JSR $95985C 95/96C4: 8532 STA $32 95/96C6: 38 SEC 95/96C7: E91000 SBC #$0010 95/96CA: CFCB457E CMP $7E45CB 95/96CE: B079 BCS $9749 95/96D0: 8538 STA $38 95/96D2: A592 LDA $92 95/96D4: 18 CLC 95/96D5: 690000 ADC #$0000 95/96D8: 850B STA $0B 95/96DA: A532 LDA $32 95/96DC: AA TAX 95/96DD: AFCB457E LDA $7E45CB 95/96E1: 38 SEC 95/96E2: E538 SBC $38 95/96E4: 22729895 JSR $959872 95/96E8: 8A TXA 95/96E9: F05E BEQ $9749 95/96EB: 8535 STA $35 95/96ED: 18 CLC 95/96EE: 6594 ADC $94 95/96F0: 850D STA $0D 95/96F2: A532 LDA $32 95/96F4: 38 SEC 95/96F5: E535 SBC $35 95/96F7: 224B9895 JSR $95984B 95/96FB: A535 LDA $35 95/96FD: C91000 CMP #$0010 95/9700: 901B BCC $971D 95/9702: A592 LDA $92 95/9704: 18 CLC 95/9705: 690000 ADC #$0000 95/9708: 850B STA $0B 95/970A: A535 LDA $35 95/970C: 38 SEC 95/970D: E532 SBC $32 95/970F: 18 CLC 95/9710: 6594 ADC $94 95/9712: 850D STA $0D 95/9714: A535 LDA $35 95/9716: 29F0FF AND #$FFF0 95/9719: 224B9895 JSR $95984B 95/971D: A535 LDA $35 95/971F: 290F00 AND #$000F 95/9722: 8535 STA $35 95/9724: F035 BEQ $975B 95/9726: A592 LDA $92 95/9728: 18 CLC 95/9729: 690000 ADC #$0000 95/972C: 850B STA $0B 95/972E: A535 LDA $35 95/9730: 38 SEC 95/9731: E532 SBC $32 95/9733: 18 CLC 95/9734: 6594 ADC $94 95/9736: 3A DEC A 95/9737: 3A DEC A 95/9738: 3A DEC A 95/9739: 3A DEC A 95/973A: 850D STA $0D 95/973C: A90100 LDA #$0001 95/973F: 224B9895 JSR $95984B 95/9743: C635 DEC $35 95/9745: D0DF BNE $9726 95/9747: 8012 BRA $975B 95/9749: A592 LDA $92 95/974B: 18 CLC 95/974C: 690000 ADC #$0000 95/974F: 850B STA $0B 95/9751: A594 LDA $94 95/9753: 850D STA $0D 95/9755: A532 LDA $32 95/9757: 224B9895 JSR $95984B 95/975B: 68 PLA 95/975C: 850B STA $0B 95/975E: AFC4457E LDA $7E45C4 95/9762: 29FF00 AND #$00FF 95/9765: 18 CLC 95/9766: 650B ADC $0B 95/9768: 850B STA $0B 95/976A: ADE917 LDA $17E9 95/976D: 890010 BIT #$1000 95/9770: D003 BNE $9775 95/9772: 4C3298 JMP $9832 95/9775: AFD5457E LDA $7E45D5 95/9779: 38 SEC 95/977A: E97CE7 SBC #$E77C 95/977D: 4A LSR A 95/977E: 4A LSR A 95/977F: 4A LSR A 95/9780: 4A LSR A 95/9781: 4A LSR A 95/9782: 4A LSR A 95/9783: 38 SEC 95/9784: E50B SBC $0B 95/9786: 0A ASL A 95/9787: 0A ASL A 95/9788: 0A ASL A 95/9789: 48 PHA 95/978A: A592 LDA $92 95/978C: 850B STA $0B 95/978E: A594 LDA $94 95/9790: 850D STA $0D 95/9792: 68 PLA 95/9793: 224B9895 JSR $95984B 95/9797: 22679895 JSR $959867 95/979B: 8532 STA $32 95/979D: 38 SEC 95/979E: E91000 SBC #$0010 95/97A1: CFE4457E CMP $7E45E4 95/97A5: B079 BCS $9820 95/97A7: 8538 STA $38 95/97A9: A592 LDA $92 95/97AB: 18 CLC 95/97AC: 690000 ADC #$0000 95/97AF: 850B STA $0B 95/97B1: A532 LDA $32 95/97B3: AA TAX 95/97B4: AFE4457E LDA $7E45E4 95/97B8: 38 SEC 95/97B9: E538 SBC $38 95/97BB: 22729895 JSR $959872 95/97BF: 8A TXA 95/97C0: F05E BEQ $9820 95/97C2: 8535 STA $35 95/97C4: 18 CLC 95/97C5: 6594 ADC $94 95/97C7: 850D STA $0D 95/97C9: A532 LDA $32 95/97CB: 38 SEC 95/97CC: E535 SBC $35 95/97CE: 224B9895 JSR $95984B 95/97D2: A535 LDA $35 95/97D4: C91000 CMP #$0010 95/97D7: 901B BCC $97F4 95/97D9: A592 LDA $92 95/97DB: 18 CLC 95/97DC: 690000 ADC #$0000 95/97DF: 850B STA $0B 95/97E1: A535 LDA $35 95/97E3: 38 SEC 95/97E4: E532 SBC $32 95/97E6: 18 CLC 95/97E7: 6594 ADC $94 95/97E9: 850D STA $0D 95/97EB: A535 LDA $35 95/97ED: 29F0FF AND #$FFF0 95/97F0: 224B9895 JSR $95984B 95/97F4: A535 LDA $35 95/97F6: 290F00 AND #$000F 95/97F9: 8535 STA $35 95/97FB: F035 BEQ $9832 95/97FD: A592 LDA $92 95/97FF: 18 CLC 95/9800: 690000 ADC #$0000 95/9803: 850B STA $0B 95/9805: A535 LDA $35 95/9807: 38 SEC 95/9808: E532 SBC $32 95/980A: 18 CLC 95/980B: 6594 ADC $94 95/980D: 3A DEC A 95/980E: 3A DEC A 95/980F: 3A DEC A 95/9810: 3A DEC A 95/9811: 850D STA $0D 95/9813: A90100 LDA #$0001 95/9816: 224B9895 JSR $95984B 95/981A: C635 DEC $35 95/981C: D0DF BNE $97FD 95/981E: 8012 BRA $9832 95/9820: A592 LDA $92 95/9822: 18 CLC 95/9823: 690000 ADC #$0000 95/9826: 850B STA $0B 95/9828: A594 LDA $94 95/982A: 850D STA $0D 95/982C: A532 LDA $32 95/982E: 224B9895 JSR $95984B 95/9832: A90100 LDA #$0001 95/9835: 48 PHA 95/9836: A592 LDA $92 95/9838: 850B STA $0B 95/983A: A594 LDA $94 95/983C: 850D STA $0D 95/983E: 68 PLA 95/983F: 224B9895 JSR $95984B 95/9843: A90000 LDA #$0000 95/9846: 972F STA [$2F],Y 95/9848: 28 PLP 95/9849: AB PLB 95/984A: 6B RTL 95/984B: 972F STA [$2F],Y 95/984D: C8 INY 95/984E: A50B LDA $0B 95/9850: 972F STA [$2F],Y 95/9852: C8 INY 95/9853: C8 INY 95/9854: A50D LDA $0D 95/9856: 3A DEC A 95/9857: 972F STA [$2F],Y 95/9859: C8 INY 95/985A: C8 INY 95/985B: 6B RTL 95/85E6: ADFC17 LDA $17FC 95/85E9: F04F BEQ $863A 95/85EB: ADF517 LDA $17F5 95/85EE: F003 BEQ $85F3 95/85F0: 824A00 BRL $863D 95/85F3: ADFC17 LDA $17FC 95/85F6: F042 BEQ $863A 95/85F8: C90800 CMP #$0008 95/85FB: B003 BCS $8600 95/85FD: 823D00 BRL $863D 95/8600: AA TAX 95/8601: 290700 AND #$0007 95/8604: 8DFC17 STA $17FC 95/8607: 8A TXA 95/8608: 4A LSR A 95/8609: 4A LSR A 95/860A: 4A LSR A 95/860B: A8 TAY 95/860C: 8A TXA 95/860D: 29F800 AND #$00F8 95/8610: 0A ASL A 95/8611: 0A ASL A 95/8612: AA TAX 95/8613: CA DEX 95/8614: CA DEX 95/8615: 5A PHY 95/8616: A01000 LDY #$0010 95/8619: BF0E467E LDA $7E460E,X 95/861D: 9FEE457E STA $7E45EE,X 95/8621: CA DEX 95/8622: CA DEX 95/8623: 88 DEY 95/8624: D0F3 BNE $8619 95/8626: DA PHX 95/8627: AE0818 LDX $1808 95/862A: 201785 JSR $8517 95/862D: 203A85 JSR $853A 95/8630: FA PLX 95/8631: 7A PLY 95/8632: 88 DEY 95/8633: D0E0 BNE $8615 95/8635: 201F89 JSR $891F 95/8638: 8003 BRA $863D 95/863A: 201989 JSR $8919 //init draw buffer $7E45EE 95/863D: 60 RTS 95/82AB: A00000 LDY #$0000 95/82AE: B72F LDA [$2F],Y //read ptr 95/82B0: 29FF00 AND #$00FF 95/82B3: C91000 CMP #$0010 95/82B6: B003 BCS $82BB 95/82B8: 4C0A8B JMP $8B0A //control code 95/82BB: 20DB84 JSR $84DB //tile render, write map 95/82BE: 9010 BCC $82D0 95/82C0: 08 PHP 95/82C1: ADFA17 LDA $17FA 95/82C4: C9BF00 CMP #$00BF 95/82C7: F006 BEQ $82CF 95/82C9: A91000 LDA #$0010 95/82CC: 0CE917 TSB $17E9 95/82CF: 28 PLP 95/82D0: 60 RTS 95/82D1: ADE917 LDA $17E9 95/82D4: 898000 BIT #$0080 95/82D7: D01F BNE $82F8 95/82D9: ADEB17 LDA $17EB 95/82DC: D01A BNE $82F8 95/82DE: A5E8 LDA $E8 95/82E0: 890090 BIT #$9000 95/82E3: F013 BEQ $82F8 95/82E5: ADBA04 LDA $04BA 95/82E8: D00E BNE $82F8 95/82EA: AD3618 LDA $1836 95/82ED: 29FF00 AND #$00FF 95/82F0: C90300 CMP #$0003 95/82F3: F003 BEQ $82F8 95/82F5: 38 SEC 95/82F6: 8001 BRA $82F9 95/82F8: 18 CLC 95/82F9: 60 RTS 95/82FA: 22069195 JSR $959106 95/82FE: A90400 LDA #$0004 95/8301: 1CE917 TRB $17E9 95/8304: 9CEB17 STZ $17EB 95/8307: A90095 LDA #$9500 95/830A: 8530 STA $30 95/830C: A91283 LDA #$8312 95/830F: 852F STA $2F 95/8311: 60 RTS 95/84DB: 9CEB17 STZ $17EB 95/84DE: A90200 LDA #$0002 95/84E1: 0CE917 TSB $17E9 95/84E4: 20C585 JSR $85C5 //tile render 95/84E7: 206485 JSR $8564 //write tile map 95/84EA: EE0A18 INC $180A //inc ptr 95/84ED: ADEF17 LDA $17EF 95/84F0: C9FFFF CMP #$FFFF 95/84F3: F008 BEQ $84FD 95/84F5: ADED17 LDA $17ED 95/84F8: 8DEF17 STA $17EF 95/84FB: 38 SEC 95/84FC: 60 RTS 95/84FD: ADE917 LDA $17E9 95/8500: 890002 BIT #$0200 95/8503: F00B BEQ $8510 95/8505: EEF517 INC $17F5 95/8508: ADF517 LDA $17F5 95/850B: CDF717 CMP $17F7 95/850E: 9005 BCC $8515 95/8510: 9CF517 STZ $17F5 95/8513: 80E6 BRA $84FB 95/8515: 18 CLC 95/8516: 60 RTS 95/85C5: 5A PHY 95/85C6: DA PHX 95/85C7: ADF917 LDA $17F9 95/85CA: 29FF00 AND #$00FF 95/85CD: EB XBA 95/85CE: 850B STA $0B //tile pro 95/85D0: A00000 LDY #$0000 95/85D3: B72F LDA [$2F],Y //read txt 95/85D5: 29FF00 AND #$00FF 95/85D8: 050B ORA $0B //kanji base 95/85DA: 8DFA17 STA $17FA 95/85DD: 203E86 JSR $863E //font render 95/85E0: 204A87 JSR $874A 95/85E3: FA PLX 95/85E4: 7A PLY 95/85E5: 60 RTS 95/863E: ADF917 LDA $17F9 95/8641: 29FF00 AND #$00FF 95/8644: 48 PHA 95/8645: EB XBA 95/8646: 850D STA $0D 95/8648: 68 PLA 95/8649: 090010 ORA #$1000 95/864C: 22B79995 JSR $9599B7 //kanji base shori 95/8650: 850B STA $0B 95/8652: A00000 LDY #$0000 95/8655: B72F LDA [$2F],Y 95/8657: 29FF00 AND #$00FF 95/865A: 38 SEC 95/865B: E91000 SBC #$0010 95/865E: 18 CLC 95/865F: 650D ADC $0D 95/8661: 38 SEC 95/8662: E50B SBC $0B 95/8664: 48 PHA 95/8665: 2900FE AND #$FE00 95/8668: 4A LSR A 95/8669: 18 CLC 95/866A: 6FB0457E ADC $7E45B0 95/866E: 8533 STA $33 95/8670: 68 PLA 95/8671: 29FF01 AND #$01FF 95/8674: 0A ASL A 95/8675: 48 PHA 95/8676: 290F00 AND #$000F 95/8679: 0A ASL A 95/867A: 0A ASL A 95/867B: 0A ASL A 95/867C: 0A ASL A 95/867D: 8532 STA $32 95/867F: 68 PLA 95/8680: 29F0FF AND #$FFF0 95/8683: 0A ASL A 95/8684: 0A ASL A 95/8685: 0A ASL A 95/8686: 0A ASL A 95/8687: 0A ASL A 95/8688: 18 CLC 95/8689: 6532 ADC $32 95/868B: 6FAF457E ADC $7E45AF 95/868F: 8532 STA $32 95/8691: ADFC17 LDA $17FC //shift 95/8694: 29F800 AND #$00F8 95/8697: 0A ASL A 95/8698: 0A ASL A 95/8699: AA TAX 95/869A: A00000 LDY #$0000 //upper left 95/869D: B732 LDA [$32],Y 95/869F: 207389 JSR $8973 //shift right 95/86A2: BFEE457E LDA $7E45EE,X 95/86A6: 050B ORA $0B 95/86A8: 9FEE457E STA $7E45EE,X 95/86AC: BF0E467E LDA $7E460E,X 95/86B0: 050D ORA $0D 95/86B2: 9F0E467E STA $7E460E,X 95/86B6: E8 INX 95/86B7: E8 INX 95/86B8: C8 INY 95/86B9: C8 INY 95/86BA: C01000 CPY #$0010 95/86BD: D0DE BNE $869D 95/86BF: ADFC17 LDA $17FC 95/86C2: 29F800 AND #$00F8 95/86C5: 0A ASL A 95/86C6: 0A ASL A 95/86C7: AA TAX 95/86C8: A00001 LDY #$0100 //lower left 95/86CB: B732 LDA [$32],Y //font ptr 95/86CD: 207389 JSR $8973 95/86D0: BFFE457E LDA $7E45FE,X // 95/86D4: 050B ORA $0B 95/86D6: 9FFE457E STA $7E45FE,X 95/86DA: BF1E467E LDA $7E461E,X 95/86DE: 050D ORA $0D 95/86E0: 9F1E467E STA $7E461E,X 95/86E4: E8 INX 95/86E5: E8 INX 95/86E6: C8 INY 95/86E7: C8 INY 95/86E8: C01001 CPY #$0110 95/86EB: D0DE BNE $86CB 95/86ED: ADFC17 LDA $17FC 95/86F0: 29F800 AND #$00F8 95/86F3: 0A ASL A 95/86F4: 0A ASL A 95/86F5: AA TAX 95/86F6: A01000 LDY #$0010 95/86F9: B732 LDA [$32],Y 95/86FB: 207389 JSR $8973 95/86FE: BF0E467E LDA $7E460E,X 95/8702: 050B ORA $0B 95/8704: 9F0E467E STA $7E460E,X 95/8708: BF2E467E LDA $7E462E,X 95/870C: 050D ORA $0D 95/870E: 9F2E467E STA $7E462E,X 95/8712: E8 INX 95/8713: E8 INX 95/8714: C8 INY 95/8715: C8 INY 95/8716: C02000 CPY #$0020 95/8719: D0DE BNE $86F9 95/871B: ADFC17 LDA $17FC 95/871E: 29F800 AND #$00F8 95/8721: 0A ASL A 95/8722: 0A ASL A 95/8723: AA TAX 95/8724: A01001 LDY #$0110 95/8727: B732 LDA [$32],Y 95/8729: 207389 JSR $8973 95/872C: BF1E467E LDA $7E461E,X 95/8730: 050B ORA $0B 95/8732: 9F1E467E STA $7E461E,X 95/8736: BF3E467E LDA $7E463E,X 95/873A: 050D ORA $0D 95/873C: 9F3E467E STA $7E463E,X 95/8740: E8 INX 95/8741: E8 INX 95/8742: C8 INY 95/8743: C8 INY 95/8744: C02001 CPY #$0120 95/8747: D0DE BNE $8727 95/8749: 60 RTS 95/99B7: DA PHX 95/99B8: A60B LDX $0B 95/99BA: DA PHX 95/99BB: A60D LDX $0D 95/99BD: DA PHX 95/99BE: 48 PHA 95/99BF: 29FF00 AND #$00FF 95/99C2: 850B STA $0B 95/99C4: 68 PLA 95/99C5: EB XBA 95/99C6: 29FF00 AND #$00FF 95/99C9: 850D STA $0D 95/99CB: A20800 LDX #$0008 95/99CE: A90000 LDA #$0000 95/99D1: 460B LSR $0B 95/99D3: 9003 BCC $99D8 95/99D5: 18 CLC 95/99D6: 650D ADC $0D 95/99D8: 060D ASL $0D 95/99DA: CA DEX 95/99DB: D0F4 BNE $99D1 95/99DD: FA PLX 95/99DE: 860D STX $0D 95/99E0: FA PLX 95/99E1: 860B STX $0B 95/99E3: FA PLX 95/99E4: 6B RTL 95/8973: DA PHX 95/8974: 48 PHA 95/8975: EB XBA 95/8976: 2900FF AND #$FF00 95/8979: 850F STA $0F 95/897B: 68 PLA 95/897C: 2900FF AND #$FF00 95/897F: 8511 STA $11 95/8981: ADFC17 LDA $17FC //shift 95/8984: 290700 AND #$0007 95/8987: AA TAX 95/8988: F007 BEQ $8991 95/898A: 460F LSR $0F 95/898C: 4611 LSR $11 95/898E: CA DEX 95/898F: D0F9 BNE $898A 95/8991: A50F LDA $0F 95/8993: EB XBA 95/8994: 29FF00 AND #$00FF 95/8997: 850B STA $0B 95/8999: A511 LDA $11 95/899B: 2900FF AND #$FF00 95/899E: 050B ORA $0B 95/89A0: 850B STA $0B 95/89A2: A50F LDA $0F 95/89A4: 29FF00 AND #$00FF 95/89A7: 850D STA $0D 95/89A9: A511 LDA $11 95/89AB: EB XBA 95/89AC: 2900FF AND #$FF00 95/89AF: 050D ORA $0D 95/89B1: 850D STA $0D 95/89B3: FA PLX 95/89B4: 60 RTS 95/874A: ADF917 LDA $17F9 // kanji base 95/874D: 29FF00 AND #$00FF 95/8750: 48 PHA 95/8751: EB XBA 95/8752: 850D STA $0D 95/8754: 68 PLA 95/8755: 090010 ORA #$1000 95/8758: 22B79995 JSR $9599B7 //kanji base shori 95/875C: 850B STA $0B 95/875E: A00000 LDY #$0000 95/8761: B72F LDA [$2F],Y 95/8763: 29FF00 AND #$00FF 95/8766: 38 SEC 95/8767: E91000 SBC #$0010 95/876A: 18 CLC 95/876B: 650D ADC $0D 95/876D: 38 SEC 95/876E: E50B SBC $0B 95/8770: A8 TAY 95/8771: AFB3457E LDA $7E45B3 95/8775: 8533 STA $33 95/8777: AFB2457E LDA $7E45B2 95/877B: 8532 STA $32 95/877D: B732 LDA [$32],Y //width ptr 95/877F: 29FF00 AND #$00FF 95/8782: 20B887 JSR $87B8 95/8785: 48 PHA 95/8786: 18 CLC 95/8787: 6DFC17 ADC $17FC 95/878A: 8DFC17 STA $17FC 95/878D: 68 PLA 95/878E: 18 CLC 95/878F: 6DFE17 ADC $17FE //total width 95/8792: 8DFE17 STA $17FE 95/8795: ADFC17 LDA $17FC 95/8798: 3A DEC A 95/8799: 29F800 AND #$00F8 95/879C: 0A ASL A 95/879D: 0A ASL A 95/879E: 18 CLC 95/879F: 692000 ADC #$0020 95/87A2: 8D2E18 STA $182E 95/87A5: AE0818 LDX $1808 95/87A8: BFC9457E LDA $7E45C9,X //tile slot 95/87AC: 0A ASL A 95/87AD: 0A ASL A 95/87AE: 0A ASL A 95/87AF: 18 CLC 95/87B0: 7FBF457E ADC $7E45BF,X //BG3 tile vram adr, X=0 top, X=19 bottom 95/87B4: 8D3018 STA $1830 95/87B7: 60 RTS 95/87B8: 48 PHA //keep width 95/87B9: A00000 LDY #$0000 95/87BC: B72F LDA [$2F],Y //current char 95/87BE: 29FF00 AND #$00FF 95/87C1: 850B STA $0B //current char 95/87C3: C8 INY 95/87C4: B72F LDA [$2F],Y //next char 95/87C6: 29FF00 AND #$00FF 95/87C9: C91000 CMP #$0010 95/87CC: B016 BCS $87E4 95/87CE: C90000 CMP #$0000 95/87D1: D006 BNE $87D9 //next char pause 95/87D3: C8 INY 95/87D4: B72F LDA [$2F],Y 95/87D6: 29FF00 AND #$00FF 95/87D9: C90900 CMP #$0009 //next next char kana 95/87DC: D046 BNE $8824 95/87DE: C8 INY 95/87DF: B72F LDA [$2F],Y 95/87E1: 29FF00 AND #$00FF 95/87E4: 850D STA $0D //next real char 95/87E6: 38 SEC 95/87E7: E91000 SBC #$0010 95/87EA: AA TAX 95/87EB: ADF917 LDA $17F9 //kanji base 95/87EE: 29FF00 AND #$00FF 95/87F1: D031 BNE $8824 95/87F3: BF509F95 LDA $959F50,X //00 table 95/87F7: 29FF00 AND #$00FF 95/87FA: D025 BNE $8821 95/87FC: A50D LDA $0D 95/87FE: 38 SEC 95/87FF: E91000 SBC #$0010 95/8802: 0A ASL A 95/8803: AA TAX 95/8804: A90095 LDA #$9500 95/8807: 8536 STA $36 95/8809: BF84A295 LDA $95A284,X 95/880D: 8535 STA $35 95/880F: A0FFFF LDY #$FFFF 95/8812: C8 INY 95/8813: B735 LDA [$35],Y 95/8815: C90002 CMP #$0200 95/8818: F00A BEQ $8824 95/881A: 29FF00 AND #$00FF 95/881D: C50B CMP $0B 95/881F: D0F1 BNE $8812 95/8821: 18 CLC 95/8822: 8001 BRA $8825 95/8824: 38 SEC 95/8825: 68 PLA 95/8826: E90000 SBC #$0000 95/8829: 60 RTS 95/8564: BFBD457E LDA $7E45BD,X 95/8568: 8533 STA $33 95/856A: BFBC457E LDA $7E45BC,X 95/856E: 18 CLC 95/856F: 7FC5457E ADC $7E45C5,X 95/8573: 8532 STA $32 95/8575: 9FC7457E STA $7E45C7,X 95/8579: BFBF457E LDA $7E45BF,X 95/857D: 38 SEC 95/857E: EFBA457E SBC $7E45BA 95/8582: 4A LSR A 95/8583: 4A LSR A 95/8584: 4A LSR A 95/8585: 850B STA $0B 95/8587: BFC9457E LDA $7E45C9,X 95/858B: 18 CLC 95/858C: 650B ADC $0B 95/858E: 6D0418 ADC $1804 //tile pro 95/8591: 850B STA $0B 95/8593: ADFC17 LDA $$17FC //shift 95/8596: 3A DEC A 95/8597: 4A LSR A 95/8598: 4A LSR A 95/8599: 4A LSR A 95/859A: 48 PHA 95/859B: A50B LDA $0B 95/859D: A00000 LDY #$0000 95/85A0: 9732 STA [$32],Y //write tile pro base 95/85A2: 1A INC A 95/85A3: A04000 LDY #$0040 95/85A6: 9732 STA [$32],Y //tile pro base bottom 95/85A8: A50B LDA $0B 95/85AA: 2900FC AND #$FC00 95/85AD: 850D STA $0D 95/85AF: A50B LDA $0B 95/85B1: 18 CLC 95/85B2: 690200 ADC #$0002 95/85B5: 29FF03 AND #$03FF 95/85B8: 050D ORA $0D 95/85BA: 850B STA $0B 95/85BC: E632 INC $32 95/85BE: E632 INC $32 95/85C0: 68 PLA 95/85C1: 3A DEC A 95/85C2: 10D6 BPL $859A 95/85C4: 60 RTS 95/8877: AD2E18 LDA $182E 95/887A: D001 BNE $887D 95/887C: 60 RTS 95/887D: 20BD8A JSR $8ABD //write sfx 95/8880: 8006 BRA $8888 95/8882: AD2E18 LDA $182E 95/8885: D001 BNE $8888 95/8887: 60 RTS 95/8888: AE0818 LDX $1808 95/888B: BFC9457E LDA $7E45C9,X 95/888F: 0A ASL A 95/8890: 0A ASL A 95/8891: 0A ASL A 95/8892: AD3018 LDA $1830 //bg3 tile vram adr 95/8895: 38 SEC 95/8896: FFBF457E SBC $7E45BF,X 95/889A: 4A LSR A 95/889B: 4A LSR A 95/889C: 4A LSR A 95/889D: 850B STA $0B 95/889F: AD2E18 LDA $182E 95/88A2: 4A LSR A 95/88A3: 4A LSR A 95/88A4: 4A LSR A 95/88A5: 4A LSR A 95/88A6: 18 CLC 95/88A7: 650B ADC $0B 95/88A9: 38 SEC 95/88AA: E90004 SBC #$0400 95/88AD: B003 BCS $88B2 95/88AF: A90000 LDA #$0000 95/88B2: 850B STA $0B 95/88B4: A8 TAY 95/88B5: AD2E18 LDA $182E 95/88B8: 4A LSR A 95/88B9: 4A LSR A 95/88BA: 4A LSR A 95/88BB: 4A LSR A 95/88BC: 38 SEC 95/88BD: E50B SBC $0B 95/88BF: AA TAX 95/88C0: 5A PHY 95/88C1: DA PHX 95/88C2: A9007E LDA #$7E00 95/88C5: 8530 STA $30 95/88C7: A9EE45 LDA #$45EE 95/88CA: 852F STA $2F 95/88CC: 98 TYA 95/88CD: 0A ASL A 95/88CE: 0A ASL A 95/88CF: 0A ASL A 95/88D0: 0A ASL A 95/88D1: 850B STA $0B 95/88D3: AD2E18 LDA $182E 95/88D6: 38 SEC 95/88D7: E50B SBC $0B 95/88D9: 850B STA $0B 95/88DB: AD3018 LDA $1830 95/88DE: 850D STA $0D 95/88E0: 22F9AE80 JSR $80AEF9 95/88E4: FA PLX 95/88E5: 7A PLY 95/88E6: 98 TYA 95/88E7: F029 BEQ $8912 95/88E9: A9007E LDA #$7E00 95/88EC: 8530 STA $30 95/88EE: 8A TXA 95/88EF: 0A ASL A 95/88F0: 0A ASL A 95/88F1: 0A ASL A 95/88F2: 0A ASL A 95/88F3: 18 CLC 95/88F4: 69EE45 ADC #$45EE 95/88F7: 852F STA $2F 95/88F9: 98 TYA 95/88FA: 0A ASL A 95/88FB: 0A ASL A 95/88FC: 0A ASL A 95/88FD: 0A ASL A 95/88FE: 850B STA $0B 95/8900: 8A TXA 95/8901: 0A ASL A 95/8902: 0A ASL A 95/8903: 0A ASL A 95/8904: 18 CLC 95/8905: 6D3018 ADC $1830 95/8908: 38 SEC 95/8909: E90020 SBC #$2000 95/890C: 850D STA $0D 95/890E: 22F9AE80 JSR $80AEF9 95/8912: A90000 LDA #$0000 95/8915: 8D2E18 STA $182E 95/8918: 60 RTS 95/8888: AE0818 LDX $1808 95/888B: BFC9457E LDA $7E45C9,X 95/888F: 0A ASL A 95/8890: 0A ASL A 95/8891: 0A ASL A 95/8892: AD3018 LDA $1830 //bg3 tile vram adr 95/8895: 38 SEC 95/8896: FFBF457E SBC $7E45BF,X 95/889A: 4A LSR A 95/889B: 4A LSR A 95/889C: 4A LSR A 95/889D: 850B STA $0B 95/889F: AD2E18 LDA $182E 95/88A2: 4A LSR A 95/88A3: 4A LSR A 95/88A4: 4A LSR A 95/88A5: 4A LSR A 95/88A6: 18 CLC 95/88A7: 650B ADC $0B 95/88A9: 38 SEC 95/88AA: E90004 SBC #$0400 95/88AD: B003 BCS $88B2 95/88AF: A90000 LDA #$0000 95/88B2: 850B STA $0B 95/88B4: A8 TAY 95/88B5: AD2E18 LDA $182E 95/88B8: 4A LSR A 95/88B9: 4A LSR A 95/88BA: 4A LSR A 95/88BB: 4A LSR A 95/88BC: 38 SEC 95/88BD: E50B SBC $0B 95/88BF: AA TAX 95/88C0: 5A PHY 95/88C1: DA PHX 95/88C2: A9007E LDA #$7E00 95/88C5: 8530 STA $30 95/88C7: A9EE45 LDA #$45EE //tile buffer adr 95/88CA: 852F STA $2F 95/88CC: 98 TYA 95/88CD: 0A ASL A 95/88CE: 0A ASL A 95/88CF: 0A ASL A 95/88D0: 0A ASL A 95/88D1: 850B STA $0B 95/88D3: AD2E18 LDA $182E 95/88D6: 38 SEC 95/88D7: E50B SBC $0B 95/88D9: 850B STA $0B 95/88DB: AD3018 LDA $1830 95/88DE: 850D STA $0D 95/88E0: 22F9AE80 JSR $80AEF9 //write tile, map dma adr 95/88E4: FA PLX 95/88E5: 7A PLY 95/88E6: 98 TYA 95/88E7: F029 BEQ $8912 95/88E9: A9007E LDA #$7E00 95/88EC: 8530 STA $30 95/88EE: 8A TXA 95/88EF: 0A ASL A 95/88F0: 0A ASL A 95/88F1: 0A ASL A 95/88F2: 0A ASL A 95/88F3: 18 CLC 95/88F4: 69EE45 ADC #$45EE 95/88F7: 852F STA $2F 95/88F9: 98 TYA 95/88FA: 0A ASL A 95/88FB: 0A ASL A 95/88FC: 0A ASL A 95/88FD: 0A ASL A 95/88FE: 850B STA $0B 95/8900: 8A TXA 95/8901: 0A ASL A 95/8902: 0A ASL A 95/8903: 0A ASL A 95/8904: 18 CLC 95/8905: 6D3018 ADC $1830 95/8908: 38 SEC 95/8909: E90020 SBC #$2000 95/890C: 850D STA $0D 95/890E: 22F9AE80 JSR $80AEF9 95/8912: A90000 LDA #$0000 95/8915: 8D2E18 STA $182E 95/8918: 60 RTS
95/8B0A: B72F LDA [$2F],Y 95/8B0C: 29FF00 AND #$00FF 95/8B0F: C90000 CMP #$0000 95/8B12: D00A BNE $8B1E 95/8B14: E62F INC $2F 95/8B16: B72F LDA [$2F],Y 95/8B18: 29FF00 AND #$00FF 95/8B1B: D001 BNE $8B1E 95/8B1D: EA NOP 95/8B1E: A00100 LDY #$0001 95/8B21: 48 PHA 95/8B22: A530 LDA $30 95/8B24: 8D0B18 STA $180B 95/8B27: A52F LDA $2F 95/8B29: 1A INC A 95/8B2A: 8D0A18 STA $180A 95/8B2D: 68 PLA 95/8B2E: 850B STA $0B 95/8B30: A50B LDA $0B 95/8B32: C93C00 CMP #$003C 95/8B35: 3002 BMI $8B39 95/8B37: 80FE BRA $8B37 95/8B39: 0A ASL A 95/8B3A: AA TAX 95/8B3B: FC3F8B JSR ($8B3F,X) 95/8B3E: 60 RTS 95/8B3F: dw D98B dw B78B dw D98B dw 248C dw 2A8C dw C88B dw 268E dw 3F8E dw 7A91 dw 6190 dw 6790 dw 6D90 dw 7390 dw 7990 dw 7F90 dw 748E dw 228D dw 308D dw 3E8D dw 4C8D dw A18D dw D98D dw E78D dw F58D dw FB8D dw 018E dw 588E dw 0A8D dw 668E dw 748E dw 5091 dw 5E91 dw 6C91 dw D98E dw D98E dw B78E dw 5C8F dw 658F dw 6E8F dw 7D8F dw 5D90 control code 02: line 95/8BD9: AE0818 LDX $1808 95/8BDC: ADE917 LDA $17E9 95/8BDF: 890004 BIT #$0400 95/8BE2: F01A BEQ $8BFE 95/8BE4: ADF317 LDA $17F3 95/8BE7: 890080 BIT #$8000 95/8BEA: D009 BNE $8BF5 95/8BEC: BFCB457E LDA $7E45CB,X 95/8BF0: 290F00 AND #$000F 95/8BF3: F009 BEQ $8BFE 95/8BF5: CE0A18 DEC $180A 95/8BF8: 20158C JSR $8C15 95/8BFB: 38 SEC 95/8BFC: 8016 BRA $8C14 95/8BFE: 227B9295 JSR $95927B 95/8C02: ADE917 LDA $17E9 95/8C05: 890004 BIT #$0400 95/8C08: F009 BEQ $8C13 95/8C0A: A90080 LDA #$8000 95/8C0D: 0CF317 TSB $17F3 95/8C10: 207F8A JSR $8A7F 95/8C13: 38 SEC 95/8C14: 60 RTS 95/927B: AE0818 LDX $1808 95/927E: 20B589 JSR $89B5 95/9281: 201F82 JSR $821F 95/9284: 6B RTL control code 03: clear 95/9285: AE0818 LDX $1808 95/9288: 20288A JSR $8A28 95/928B: 6B RTL 95/8A28: DA PHX 95/8A29: BFBD457E LDA $7E45BD,X 95/8A2D: 8533 STA $33 95/8A2F: 8536 STA $36 95/8A31: BFBC457E LDA $7E45BC,X 95/8A35: 8532 STA $32 95/8A37: 18 CLC 95/8A38: 694000 ADC #$0040 95/8A3B: 8535 STA $35 95/8A3D: BFC4457E LDA $7E45C4,X 95/8A41: 29FF00 AND #$00FF 95/8A44: 4A LSR A 95/8A45: A8 TAY 95/8A46: BFC3457E LDA $7E45C3,X 95/8A4A: 29FF00 AND #$00FF 95/8A4D: AA TAX 95/8A4E: 5A PHY 95/8A4F: DA PHX 95/8A50: AD0218 LDA $1802 95/8A53: A00000 LDY #$0000 95/8A56: 9732 STA [$32],Y 95/8A58: 9735 STA [$35],Y 95/8A5A: C8 INY 95/8A5B: C8 INY 95/8A5C: CA DEX 95/8A5D: D0F7 BNE $8A56 95/8A5F: A532 LDA $32 95/8A61: 18 CLC 95/8A62: 698000 ADC #$0080 95/8A65: 8532 STA $32 95/8A67: A535 LDA $35 95/8A69: 18 CLC 95/8A6A: 698000 ADC #$0080 95/8A6D: 8535 STA $35 95/8A6F: FA PLX 95/8A70: 7A PLY 95/8A71: 88 DEY 95/8A72: D0DA BNE $8A4E 95/8A74: FA PLX 95/8A75: DA PHX 95/8A76: 22D38095 JSR $9580D3 95/8A7A: 201989 JSR $8919 95/8A7D: FA PLX 95/8A7E: 60 RTS 95/80D3: A90000 LDA #$0000 95/80D6: 9FC5457E STA $7E45C5,X 95/80DA: 9FC7457E STA $7E45C7,X 95/80DE: 9FC9457E STA $7E45C9,X 95/80E2: 9FCB457E STA $7E45CB,X 95/80E6: 8FF51700 STA $0017F5 95/80EA: 8FFC1700 STA $0017FC 95/80EE: 8FFE1700 STA $0017FE 95/80F2: 6B RTL 95/8919: DA PHX 95/891A: A20000 LDX #$0000 95/891D: 8004 BRA $8923 95/891F: DA PHX 95/8920: A22000 LDX #$0020 95/8923: A90000 LDA #$0000 95/8926: 9FEE457E STA $7E45EE,X 95/892A: 9FF0457E STA $7E45F0,X 95/892E: 9FF2457E STA $7E45F2,X 95/8932: 9FF4457E STA $7E45F4,X 95/8936: 9FF6457E STA $7E45F6,X 95/893A: 9FF8457E STA $7E45F8,X 95/893E: 9FFA457E STA $7E45FA,X 95/8942: 9FFC457E STA $7E45FC,X 95/8946: 9FFE457E STA $7E45FE,X 95/894A: 9F00467E STA $7E4600,X 95/894E: 9F02467E STA $7E4602,X 95/8952: 9F04467E STA $7E4604,X 95/8956: 9F06467E STA $7E4606,X 95/895A: 9F08467E STA $7E4608,X 95/895E: 9F0A467E STA $7E460A,X 95/8962: 9F0C467E STA $7E460C,X 95/8966: 8A TXA 95/8967: 18 CLC 95/8968: 692000 ADC #$0020 95/896B: AA TAX 95/896C: E08002 CPX #$0280 95/896F: 90B2 BCC $8923 95/8971: FA PLX 95/8972: 60 RTS control code 04: scroll 95/8C2A: ADEB17 LDA $17EB 95/8C2D: 0A ASL A 95/8C2E: AA TAX 95/8C2F: BF468C95 LDA $958C46,X 95/8C33: 853E STA $3E 95/8C35: F43A8C PEA $8C3A 95/8C38: 6C3E00 JMP ($003E) 95/8C3B: CE0A18 DEC $180A 95/8C3E: EEEB17 INC $17EB 95/8C41: 20158C JSR $8C15 95/8C44: 38 SEC 95/8C45: 60 RTS 95/8C8D: 227B9295 JSR $95927B 95/8C91: AE0818 LDX $1808 95/8C94: BFC4457E LDA $7E45C4,X 95/8C98: 29FF00 AND #$00FF 95/8C9B: 4A LSR A 95/8C9C: CDEB17 CMP $17EB 95/8C9F: D006 BNE $8CA7 95/8CA1: A92000 LDA #$0020 95/8CA4: 8DEB17 STA $17EB 95/8CA7: 60 RTS 95/927B: AE0818 LDX $1808 95/927E: 20B589 JSR $89B5 95/9281: 201F82 JSR $821F 95/9284: 6B RTL 95/821F: ADEF17 LDA $17EF 95/8222: C9FFFF CMP #$FFFF 95/8225: F00B BEQ $8232 95/8227: 29FFFF AND #$FFFF 95/822A: D006 BNE $8232 95/822C: ADED17 LDA $17ED 95/822F: 8DEF17 STA $17EF 95/8232: 60 RTS 95/89B5: BFC5457E LDA $7E45C5,X 95/89B9: 2980FF AND #$FF80 95/89BC: 18 CLC 95/89BD: 698000 ADC #$0080 95/89C0: 9FC5457E STA $7E45C5,X 95/89C4: 204685 JSR $8546 95/89C7: BFC9457E LDA $7E45C9,X 95/89CB: 4A LSR A 95/89CC: 8525 STA $25 95/89CE: BFC3457E LDA $7E45C3,X 95/89D2: 29FF00 AND #$00FF 95/89D5: 8527 STA $27 95/89D7: 2218AB80 JSR $80AB18 95/89DB: E220 SEP #$20 95/89DD: A525 LDA $25 95/89DF: 1A INC A 95/89E0: DFC4457E CMP $7E45C4,X 95/89E4: 9002 BCC $89E8 95/89E6: A900 LDA #$00 95/89E8: EB XBA 95/89E9: BFC3457E LDA $7E45C3,X 95/89ED: C220 REP #$20 95/89EF: 22B79995 JSR $9599B7 95/89F3: 0A ASL A 95/89F4: 9FC9457E STA $7E45C9,X 95/89F8: 202385 JSR $8523 95/89FB: ADE917 LDA $17E9 95/89FE: 890004 BIT #$0400 95/8A01: D01B BNE $8A1E 95/8A03: ADF117 LDA $17F1 95/8A06: F00A BEQ $8A12 95/8A08: BFCB457E LDA $7E45CB,X 95/8A0C: 18 CLC 95/8A0D: 690100 ADC #$0001 95/8A10: 8008 BRA $8A1A 95/8A12: BFCB457E LDA $7E45CB,X 95/8A16: 18 CLC 95/8A17: 690200 ADC #$0002 95/8A1A: 9FCB457E STA $7E45CB,X 95/8A1E: A90000 LDA #$0000 95/8A21: 8DFC17 STA $17FC 95/8A24: 8DF517 STA $17F5 95/8A27: 60 RTS 95/99B7: DA PHX 95/99B8: A60B LDX $0B 95/99BA: DA PHX 95/99BB: A60D LDX $0D 95/99BD: DA PHX 95/99BE: 48 PHA 95/99BF: 29FF00 AND #$00FF 95/99C2: 850B STA $0B 95/99C4: 68 PLA 95/99C5: EB XBA 95/99C6: 29FF00 AND #$00FF 95/99C9: 850D STA $0D 95/99CB: A20800 LDX #$0008 95/99CE: A90000 LDA #$0000 95/99D1: 460B LSR $0B 95/99D3: 9003 BCC $99D8 95/99D5: 18 CLC 95/99D6: 650D ADC $0D 95/99D8: 060D ASL $0D 95/99DA: CA DEX 95/99DB: D0F4 BNE $99D1 95/99DD: FA PLX 95/99DE: 860D STX $0D 95/99E0: FA PLX 95/99E1: 860B STX $0B 95/99E3: FA PLX 95/99E4: 6B RTL control code 05: end 95/8BC8: AD0D18 LDA $180D 95/8BCB: D006 BNE $8BD3 95/8BCD: 22869195 JSR $959186 95/8BD1: 38 SEC 95/8BD2: 60 RTS 95/9186: ADEB17 LDA $17EB 95/9189: 0A ASL A 95/918A: AA TAX 95/918B: BF9F9195 LDA $95919F,X 95/918F: 853E STA $3E 95/9191: F49691 PEA $9196 95/9194: 6C3E00 JMP ($003E) 95/9197: CE0A18 DEC $180A 95/919A: 20158C JSR $8C15 95/919D: 38 SEC 95/919E: 6B RTL control code 08: pause 95/917A: 22169695 JSR $959616 95/917E: 38 SEC 95/917F: 60 RTS 95/9616: A90200 LDA #$0002 95/9619: 1CE917 TRB $17E9 95/961C: A90400 LDA #$0004 95/961F: 0CE917 TSB $17E9 95/9622: A90100 LDA #$0001 95/9625: 8DEF17 STA $17EF 95/9628: 6B RTL
Event 8C/8097: AD9617 LDA $1796 //event block address 8C/809A: 853C STA $3C 8C/809C: AD9517 LDA $1795 8C/809F: 853B STA $3B 8C/80A1: AC9317 LDY $1793 //event block index 8C/80A4: 801A BRA $80C0 8C/80A6: C8 INY 8C/80A7: 8C9317 STY $1793 8C/80AA: 5A PHY 8C/80AB: 0A ASL A 8C/80AC: A8 TAY 8C/80AD: B9FF80 LDA $80FF,Y //event pointer 8C/80B0: 7A PLY 8C/80B1: 853E STA $3E 8C/80B3: F4B880 PEA $80B8 8C/80B6: 6C3E00 JMP ($003E) //jump to event 8C/80B9: 9005 BCC $80C0 8C/80BB: 8C9317 STY $1793 8C/80BE: 8016 BRA $80D6 8C/80C0: B73B LDA [$3B],Y //load event 8C/80C2: 29FF00 AND #$00FF 8C/80C5: 20D780 JSR $80D7 //check special event 8C/80C8: B00C BCS $80D6 8C/80CA: 29FF00 AND #$00FF 8C/80CD: C9FC00 CMP #$00FC 8C/80D0: D0D4 BNE $80A6 8C/80D2: C8 INY 8C/80D3: 8C9317 STY $1793 8C/80D6: 60 RTS 8C80FF: event pointer 00: 852a 01: 8df1 02: 852f 03: 853a 04: 854e 05: 8562 06: 856e 07: 8583 08: 8598 09: 85bf 0a: 85e1 0b: 8608 0c: 862a 0d: 8641 0e: 8658 0f: 867d 10: 8696 11: 86ac 12: 86c9 13: 86ec 14: 870b 15: 8732 16: 874f 17: 8769 18: 879a 19: 87b5 1a: 87cd 1b: 87fa 1c: 8832 1d: 886f 1e: 8ca6 1f: 8ccc 20: 8cea 21: 8d19 22: 8d43 23: 8d6d 24: 8d93 25: 8dc5 26: 8c52 27: 8c7c 28: 88a6 29: 88cc 2a: 88f6 2b: 88fe 2c: 892f 2d: 897e 2e: 8a75 2f: 8a97 30: 8aba 31: 89a4 32: 89d6 33: 89f5 34: 8a10 35: 8a2f 36: 8a4b 37: 8add 38: 8af4 39: 8b1a 3a: 8b83 3b: 8ba1 3c: 8bb7 3d: 8bde 3e: 8c08 3f: 8df3 40: 8e16 41: 8eaa 42: 8ff0 43: 8ffb 44: 908e 45: 9530 46: 955a 47: 0000 48: 2cad 49: 8917 4a: 0004 4b: 11f0 4c: 3520 4d: a984 4e: 0002 4f: 2c2c 50: f017 51: 0909 52: 0004 53: 2c1c 54: 3817 55: 0180 56: 6018 57: 2208 58: 8461 59: 228c 5a: 80f3 5b: 2295 5c: 8127 5d: 2895 5e: ad60 5f: 172c 60: 0089 61: d060 62: ad2d 63: 04ba 64: 28d0 65: e8a5 66: 0089 67: f010 68: a921 69: 4000 6a: 2c0c 6b: a917 6c: 0002 6d: 2e8d 6e: 2217 6f: 8461 70: ad8c 71: 172c 72: 0089 73: d080 74: a907 75: 00e0 76: 4922 77: 808c 78: 6038 79: 6018 7a: c208 7b: ad30 7c: 172c 7d: 0089 7e: f080 7f: 2206 80: 826c 81: 808c 82: a966 83: 1791 84: 0ec9 85: f000 86: ad58 87: 172c 88: 0089 89: d080 8a: a514 8b: 297b 8c: 00ff 8d: 0df0 8e: 8089 8f: d000 90: e208 91: c620 92: c27b 93: 8020 94: ad42 95: 0345 96: ff29 97: d000 98: ad3a 99: 0448 9a: ff29 9b: d000 9c: e232 9d: a920 9e: 8580 9f: c27b a0: 2220 a1: 8412 a2: a98c a3: 0000 a4: 7a22 a5: 8293 a6: 01a9 a7: 2200 a8: 937a a9: a982 aa: 0000 ab: 9922 ac: 829b ad: 01a9 ae: 2200 af: 9b99 b0: 2282 b1: 965a b2: a985 b3: 0001 b4: 2e8d b5: 2817 b6: 086b b7: 30c2 b8: 02ad b9: c903 ba: 000c bb: 1fd0 bc: 57af bd: 7ffc be: 8089 bf: d000 c0: af27 c1: e4b8 c2: 897f c3: 0080 c4: 0df0 c5: 38ad c6: c918 c7: 002d c8: 16f0 c9: 2ec9 ca: f000 cb: 2211 cc: a4c6 cd: a99b ce: 00e0 cf: 4922 d0: 808c d1: 03a9 d2: 8d00 d3: 172e d4: 6b28 d5: c208 d6: 2230 d7: 8412 d8: 228c d9: 9d67 da: 229a db: 800b dc: a995 dd: 0001 de: 2e8d df: 2817 e0: 086b e1: 30c2 e2: 7ba5 e3: 8089 e4: d000 e5: ad05 e6: 04ba e7: 52d0 e8: 1222 e9: 8c84 ea: 00a9 eb: 8d00 ec: 172e ed: 939c ee: ad17 ef: 179c f0: 27f0 f1: 2cad f2: 4817 f3: 2c9c f4: ad17 f5: 179c f6: 2f85 f7: 9dad f8: 8517 f9: 2230 fa: 9601 fb: 688c fc: 0029 fd: 8520 fe: ad0b ff: 172c 8C/80D7: 48 PHA 8C/80D8: DA PHX 8C/80D9: 5A PHY 8C/80DA: 48 PHA 8C/80DB: A9008C LDA #$8C00 8C/80DE: 8530 STA $30 8C/80E0: A9F780 LDA #$80F7 8C/80E3: 852F STA $2F 8C/80E5: 68 PLA 8C/80E6: 22FACC8C JSR $8CCCFA 8C/80EA: 9007 BCC $80F3 8C/80EC: 8D2E17 STA $172E 8C/80EF: 22EB9385 JSR $8593EB //end event block 8C/80F3: 7A PLY 8C/80F4: FA PLX 8C/80F5: 68 PLA 8C/80F6: 60 RTS $8C:80F7 FF 04 FE 05 FD 07 00 00 8C/CCFA: 5A PHY 8C/CCFB: A40B LDY $0B 8C/CCFD: 5A PHY 8C/CCFE: 29FF00 AND #$00FF 8C/CD01: 850B STA $0B 8C/CD03: A00000 LDY #$0000 8C/CD06: B72F LDA [$2F],Y 8C/CD08: 29FF00 AND #$00FF 8C/CD0B: D009 BNE $CD16 8C/CD0D: C8 INY 8C/CD0E: B72F LDA [$2F],Y //8C80F7 8C/CD10: 29FF00 AND #$00FF 8C/CD13: F012 BEQ $CD27 8C/CD15: 88 DEY 8C/CD16: C50B CMP $0B 8C/CD18: D009 BNE $CD23 8C/CD1A: C8 INY 8C/CD1B: B72F LDA [$2F],Y 8C/CD1D: 29FF00 AND #$00FF 8C/CD20: 38 SEC 8C/CD21: 8005 BRA $CD28 8C/CD23: C8 INY 8C/CD24: C8 INY 8C/CD25: 80DF BRA $CD06 8C/CD27: 18 CLC 8C/CD28: 7A PLY 8C/CD29: 840B STY $0B 8C/CD2B: 7A PLY 8C/CD2C: 6B RTL 85/93EB: 08 PHP 85/93EC: C230 REP #$30 85/93EE: A90000 LDA #$0000 85/93F1: 2295A482 JSR $82A495 85/93F5: A90100 LDA #$0001 85/93F8: 2295A482 JSR $82A495 85/93FC: A90200 LDA #$0002 85/93FF: 2295A482 JSR $82A495 85/9403: E220 SEP #$20 85/9405: A900 LDA #$00 85/9407: 85A6 STA $A6 85/9409: 28 PLP 85/940A: 6B RTL
Event: 11- 30-05-00 yy yy yy : write 24 bit text pointer yy yy yy to $000530 10 - 2F-05-00 yy yy: write 16 bit text pointer to $00052F 11- 6D-00-00 xx xx xx: write 24 bit adr to $6D 1B-zz zz zz 00 00: JML to zz zz zz, A = 0000 0c86ac b7 3b LDA [$3b],Y 0c86ae 85 41 STA $41 0c86b0 c8 INY 0c86b1 b7 3b LDA [$3b],Y 0c86b3 85 42 STA $42 0c86b5 c8 INY 0c86b6 c8 INY 0c86b7 b7 3b LDA [$3b],Y 0c86b9 87 41 STA [$41] 0c86bb c8 INY 0c86bc e6 41 INC $41 0c86be b7 3b LDA [$3b],Y 0c86c0 87 41 STA [$41] 0c86c2 c8 INY 0c86c3 c8 INY 0c86c4 8c 93 17 STY $1793 ; 0c86c7 18 CLC 0c86c8 60 RTS Title text 95/8461: 08 PHP 95/8462: DA PHX 95/8463: 5A PHY 95/8464: A90000 LDA #$0000 95/8467: 8DFE17 STA $17FE 95/846A: A20000 LDX #$0000 95/846D: AD0B18 LDA $180B 95/8470: 8530 STA $30 95/8472: AD0A18 LDA $180A 95/8475: 852F STA $2F 95/8477: A00000 LDY #$0000 95/847A: B72F LDA [$2F],Y //title text 95/847C: 29FF00 AND #$00FF 95/847F: C91000 CMP #$0010 95/8482: B00C BCS $8490 95/8484: C90100 CMP #$0001 //end 95/8487: F00F BEQ $8498 95/8489: 200A8B JSR $8B0A //control code 95/848C: 90DC BCC $846A 95/848E: 8008 BRA $8498 95/8490: 204A87 JSR $874A //check kanji base 95/8493: EE0A18 INC $180A 95/8496: 80D2 BRA $846A 95/8498: 7A PLY 95/8499: FA PLX 95/849A: 28 PLP 95/849B: 6B RTL
//Title Centering 9A/82B7: BD5D06 LDA $065D,X 9A/82BA: 852F STA $2F 9A/82BC: BD7D06 LDA $067D,X 9A/82BF: 8530 STA $30 9A/82C1: 226BBB8A JSR $8ABB6B 9A/82C5: 09000C ORA #$0C00 9A/82C8: 48 PHA 9A/82C9: BD5D06 LDA $065D,X 9A/82CC: 852F STA $2F 9A/82CE: BD7D06 LDA $067D,X 9A/82D1: 8530 STA $30 9A/82D3: A90008 LDA #$0800 9A/82D6: 850B STA $0B 9A/82D8: A90200 LDA #$0002 9A/82DB: 850D STA $0D 9A/82DD: A90200 LDA #$0002 9A/82E0: 850F STA $0F 9A/82E2: A90000 LDA #$0000 9A/82E5: 8511 STA $11 9A/82E7: FA PLX 9A/82E8: 223DCC94 JSR $94CC3D 9A/82EC: 6B RTL 8A/BB6B: 08 PHP 8A/BB6C: C230 REP #$30 8A/BB6E: DA PHX 8A/BB6F: 5A PHY 8A/BB70: A530 LDA $30 8A/BB72: 8D0B18 STA $180B 8A/BB75: A52F LDA $2F 8A/BB77: 8D0A18 STA $180A 8A/BB7A: A52F LDA $2F 8A/BB7C: 48 PHA 8A/BB7D: A530 LDA $30 8A/BB7F: 48 PHA 8A/BB80: 22618495 JSL $958461 8A/BB84: 68 PLA 8A/BB85: 8530 STA $30 8A/BB87: 68 PLA 8A/BB88: 852F STA $2F 8A/BB8A: A90001 LDA #$0100 8A/BB8D: 38 SEC 8A/BB8E: EDFE17 SBC $17FE //subtract total width 8A/BB91: 18 CLC 8A/BB92: 690400 ADC #$0004 8A/BB95: 4A LSR A 8A/BB96: 4A LSR A 8A/BB97: 4A LSR A 8A/BB98: 4A LSR A 8A/BB99: 7A PLY 8A/BB9A: FA PLX 8A/BB9B: 28 PLP 8A/BB9C: 6B RTL
Kaiwa background color math -----------COLOR FADE BG----------- 8E/ECF6: E220 SEP #$20 8E/ECF8: BDFD06 LDA $06FD,X //7E0719 = 7e 8E/ECFB: 8534 STA $34 8E/ECFD: C220 REP #$20 8E/ECFF: BDDD06 LDA $06DD,X //7E06F9 = 4BF8 8E/ED02: 8532 STA $32 8E/ED04: 6430 STZ $30 8E/ED06: BD3D06 LDA $063D,X 8E/ED09: 852F STA $2F //color buffer 8E/ED0B: BD5D06 LDA $065D,X //color slot no. 8E/ED0E: 3A DEC A 8E/ED0F: 0A ASL A 8E/ED10: A8 TAY 8E/ED11: 6435 STZ $35 8E/ED13: 2030ED JSR $ED30 8E/ED16: B002 BCS $ED1A 8E/ED18: E635 INC $35 8E/ED1A: 972F STA [$2F],Y 8E/ED1C: 88 DEY 8E/ED1D: 88 DEY 8E/ED1E: 10F3 BPL $ED13 8E/ED20: FE1D07 INC $071D,X //=00 8E/ED23: A535 LDA $35 8E/ED25: F007 BEQ $ED2E 8E/ED27: DE7D06 DEC $067D,X 8E/ED2A: F002 BEQ $ED2E 8E/ED2C: 18 CLC 8E/ED2D: 6B RTL 8E/ED2E: 38 SEC 8E/ED2F: 6B RTL 8E/ED30: B72F LDA [$2F],Y //read final color slot 8E/ED32: 29FF7F AND #$7FFF 8E/ED35: 850B STA $0B 8E/ED37: B732 LDA [$32],Y //7E4BF8 + Y =7E:4C96 = 0842 8E/ED39: 29FF7F AND #$7FFF 8E/ED3C: 850D STA $0D 8E/ED3E: DA PHX 8E/ED3F: 5A PHY 8E/ED40: BDFE06 LDA $06FE,X //ram 071a 8E/ED43: 29FF00 AND #$00FF 8E/ED46: F01D BEQ $ED65 8E/ED48: A92000 LDA #$0020 8E/ED4B: 8DD717 STA $17D7 8E/ED4E: BD1D07 LDA $071D,X 8E/ED51: A60B LDX $0B 8E/ED53: A40D LDY $0D 8E/ED55: 22699C97 JSR $979C69 8E/ED59: 840B STY $0B 8E/ED5B: C50B CMP $0B 8E/ED5D: F003 BEQ $ED62 8E/ED5F: 18 CLC 8E/ED60: 8007 BRA $ED69 8E/ED62: 38 SEC 8E/ED63: 8004 BRA $ED69 8E/ED65: 228D8B8E JSR $8E8B8D 8E/ED69: 7A PLY 8E/ED6A: FA PLX 8E/ED6B: 60 RTS 8E/8B8D: A50B LDA $0B //current color slot 8E/8B8F: 29FF7F AND #$7FFF 8E/8B92: 850B STA $0B 8E/8B94: A50D LDA $0D //7E4BF8 + Y 8E/8B96: 29FF7F AND #$7FFF 8E/8B99: 850D STA $0D 8E/8B9B: C50B CMP $0B 8E/8B9D: F068 BEQ $8C07 8E/8B9F: 291F00 AND #$001F 8E/8BA2: 850F STA $0F 8E/8BA4: A50D LDA $0D //7E4BF8 + Y 8E/8BA6: 29E003 AND #$03E0 8E/8BA9: 8511 STA $11 8E/8BAB: A50D LDA $0D //7E4BF8 + Y 8E/8BAD: 29007C AND #$7C00 8E/8BB0: 8513 STA $13 8E/8BB2: A50B LDA $0B //current color slot 8E/8BB4: 291F00 AND #$001F 8E/8BB7: C50F CMP $0F 8E/8BB9: F012 BEQ $8BCD 8E/8BBB: 3008 BMI $8BC5 8E/8BBD: A50B LDA $0B //current color slot 8E/8BBF: 38 SEC 8E/8BC0: E90200 SBC #$0002 8E/8BC3: 850B STA $0B //current color slot 8E/8BC5: A50B LDA $0B 8E/8BC7: 18 CLC 8E/8BC8: 690100 ADC #$0001 8E/8BCB: 850B STA $0B //current color slot 8E/8BCD: A50B LDA $0B 8E/8BCF: 29E003 AND #$03E0 8E/8BD2: C511 CMP $11 8E/8BD4: F012 BEQ $8BE8 8E/8BD6: 3008 BMI $8BE0 8E/8BD8: A50B LDA $0B //current color slot 8E/8BDA: 38 SEC 8E/8BDB: E94000 SBC #$0040 8E/8BDE: 850B STA $0B 8E/8BE0: A50B LDA $0B //current color slot 8E/8BE2: 18 CLC 8E/8BE3: 692000 ADC #$0020 8E/8BE6: 850B STA $0B 8E/8BE8: A50B LDA $0B 8E/8BEA: 29007C AND #$7C00 8E/8BED: C513 CMP $13 8E/8BEF: F012 BEQ $8C03 8E/8BF1: 3008 BMI $8BFB 8E/8BF3: A50B LDA $0B 8E/8BF5: 38 SEC 8E/8BF6: E90008 SBC #$0800 8E/8BF9: 850B STA $0B 8E/8BFB: A50B LDA $0B 8E/8BFD: 18 CLC 8E/8BFE: 690004 ADC #$0400 8E/8C01: 850B STA $0B //current color slot 8E/8C03: A50B LDA $0B 8E/8C05: 18 CLC 8E/8C06: 6B RTL 8E/8C07: A50B LDA $0B 8E/8C09: 38 SEC 8E/8C0A: 6B RTL 97/9C69: 48 PHA 97/9C6A: 48 PHA 97/9C6B: DA PHX 97/9C6C: 5A PHY 97/9C6D: A301 LDA $01,S 97/9C6F: 291F00 AND #$001F 97/9C72: A8 TAY 97/9C73: A303 LDA $03,S 97/9C75: 291F00 AND #$001F 97/9C78: AA TAX 97/9C79: A305 LDA $05,S 97/9C7B: 20C59C JSR $9CC5 97/9C7E: 8307 STA $07,S 97/9C80: A301 LDA $01,S 97/9C82: 0A ASL A 97/9C83: 0A ASL A 97/9C84: 0A ASL A 97/9C85: EB XBA 97/9C86: 291F00 AND #$001F 97/9C89: A8 TAY 97/9C8A: A303 LDA $03,S 97/9C8C: 0A ASL A 97/9C8D: 0A ASL A 97/9C8E: 0A ASL A 97/9C8F: EB XBA 97/9C90: 291F00 AND #$001F 97/9C93: AA TAX 97/9C94: A305 LDA $05,S 97/9C96: 20C59C JSR $9CC5 97/9C99: 0A ASL A 97/9C9A: 0A ASL A 97/9C9B: 0A ASL A 97/9C9C: 0A ASL A 97/9C9D: 0A ASL A 97/9C9E: 0307 ORA $07,S 97/9CA0: 8307 STA $07,S 97/9CA2: A301 LDA $01,S 97/9CA4: 4A LSR A 97/9CA5: 4A LSR A 97/9CA6: EB XBA 97/9CA7: 291F00 AND #$001F 97/9CAA: A8 TAY 97/9CAB: A303 LDA $03,S 97/9CAD: 4A LSR A 97/9CAE: 4A LSR A 97/9CAF: EB XBA 97/9CB0: 291F00 AND #$001F 97/9CB3: AA TAX 97/9CB4: A305 LDA $05,S 97/9CB6: 20C59C JSR $9CC5 97/9CB9: 0A ASL A 97/9CBA: 0A ASL A 97/9CBB: EB XBA 97/9CBC: 0307 ORA $07,S 97/9CBE: 8307 STA $07,S 97/9CC0: 7A PLY 97/9CC1: FA PLX 97/9CC2: 68 PLA 97/9CC3: 68 PLA 97/9CC4: 6B RTL 97/9CC5: C90000 CMP #$0000 97/9CC8: D002 BNE $9CCC 97/9CCA: 8A TXA 97/9CCB: 60 RTS 97/9CCC: 3A DEC A 97/9CCD: CDD717 CMP $17D7 97/9CD0: D002 BNE $9CD4 97/9CD2: 98 TYA 97/9CD3: 60 RTS 97/9CD4: DA PHX 97/9CD5: 1A INC A 97/9CD6: 850D STA $0D 97/9CD8: 98 TYA 97/9CD9: 38 SEC 97/9CDA: E301 SBC $01,S 97/9CDC: 850B STA $0B 97/9CDE: 1004 BPL $9CE4 97/9CE0: 49FFFF EOR #$FFFF 97/9CE3: 1A INC A 97/9CE4: EB XBA 97/9CE5: 2900FF AND #$FF00 97/9CE8: 8F044200 STA $004204 97/9CEC: E221 SEP #$21 97/9CEE: ADD717 LDA $17D7 97/9CF1: E50D SBC $0D 97/9CF3: 1A INC A 97/9CF4: 8F064200 STA $004206 97/9CF8: C220 REP #$20 97/9CFA: EB XBA 97/9CFB: EB XBA 97/9CFC: EA NOP 97/9CFD: EA NOP 97/9CFE: AF144200 LDA $004214 97/9D02: 240B BIT $0B 97/9D04: 1004 BPL $9D0A 97/9D06: 49FFFF EOR #$FFFF 97/9D09: 1A INC A 97/9D0A: 850B STA $0B 97/9D0C: 68 PLA 97/9D0D: EB XBA 97/9D0E: 18 CLC 97/9D0F: 650B ADC $0B 97/9D11: EB XBA 97/9D12: 29FF00 AND #$00FF 97/9D15: 60 RTS