;;; Gamestate 06h/1Fh/28h ;;; ; Loading game data / Set up new game / Transition to demo $828000 08 PHP $828001 C2 30 REP #$30 $828003 AD 98 09 LDA $0998 [$7E:0998] $828006 C9 28 00 CMP #$0028 $828009 D0 12 BNE $12 [$801D] $82800B 20 9B 81 JSR $819B [$81:819B] $82800E 20 E2 82 JSR $82E2 [$81:82E2] $828011 20 C5 82 JSR $82C5 [$81:82C5] $828014 22 0D E0 91 JSL $91E00D[$91:E00D] $828018 20 79 86 JSR $8679 [$81:8679] $82801B 80 42 BRA $42 [$805F] $82801D AF 14 D9 7E LDA $7ED914[$7E:D914] $828021 C9 05 00 CMP #$0005 $828024 F0 28 BEQ $28 [$804E] $828026 C9 1F 00 CMP #$001F $828029 F0 16 BEQ $16 [$8041] $82802B C9 22 00 CMP #$0022 $82802E F0 02 BEQ $02 [$8032] $828030 80 1C BRA $1C [$804E] ; Transition to demo $828032 9C 9F 07 STZ $079F [$7E:079F] $828035 A9 12 00 LDA #$0012 $828038 8D 8B 07 STA $078B [$7E:078B] $82803B 22 8C 85 80 JSL $80858C[$80:858C] ; Load mirror of current area's map explored $82803F 80 0D BRA $0D [$804E] ; Setting up new game $828041 A9 06 00 LDA #$0006 $828044 8D 9F 07 STA $079F [$7E:079F] $828047 9C 8B 07 STZ $078B [$7E:078B] $82804A 22 93 9E 80 JSL $809E93[$80:9E93] ; Clear timer RAM ; Loading game data $82804E 20 9B 81 JSR $819B [$82:819B] $828051 20 E2 82 JSR $82E2 [$82:82E2] $828054 20 C5 82 JSR $82C5 [$82:82C5] $828057 22 0D E0 91 JSL $91E00D[$91:E00D] $82805B 22 37 C4 80 JSL $80C437[$80:C437] ; Load new save/elevator $82805F 22 7B A0 80 JSL $80A07B[$80:A07B] $828063 22 79 9A 80 JSL $809A79[$80:9A79] ; HUD routine when game is loading $828067 22 84 97 A0 JSL $A09784[$A0:9784] ; RTL $82806B 08 PHP $82806C C2 30 REP #$30 $82806E A0 20 00 LDY #$0020 $828071 A2 00 00 LDX #$0000 $828074 BF 80 C1 7E LDA $7EC180,x[$7E:C180] $828078 9F 80 C3 7E STA $7EC380,x[$7E:C380] $82807C E8 INX $82807D E8 INX $82807E 88 DEY $82807F 88 DEY $828080 D0 F2 BNE $F2 [$8074] $828082 28 PLP $828083 A9 01 00 LDA #$0001 $828086 8D 23 07 STA $0723 [$7E:0723] $828089 8D 25 07 STA $0725 [$7E:0725] $82808C 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $828090 22 00 80 86 JSL $868000[$86:8000] ; Enable E/R projectiles $828094 22 AD 83 84 JSL $8483AD[$84:83AD] ; Enable PLM processing $828098 22 C2 C4 8D JSL $8DC4C2[$8D:C4C2] ; Enable palette FX $82809C 22 88 82 88 JSL $888288[$88:8288] ; Enable HDMA $8280A0 22 00 80 87 JSL $878000[$87:8000] ; Enable misc. animations (spikes, FX1) $8280A4 22 0F 8E 90 JSL $908E0F[$90:8E0F] ; Something to do with setting $0AD2 FX3-related $8280A8 AD 98 09 LDA $0998 [$7E:0998] $8280AB C9 28 00 CMP #$0028 $8280AE D0 03 BNE $03 [$80B3] $8280B0 4C 46 81 JMP $8146 [$82:8146] $8280B3 AF 14 D9 7E LDA $7ED914[$7E:D914] $8280B7 C9 22 00 CMP #$0022 $8280BA D0 37 BNE $37 [$80F3] $8280BC A9 05 00 LDA #$0005 $8280BF 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $8280C3 A9 0F 00 LDA #$000F $8280C6 8D A0 0D STA $0DA0 [$7E:0DA0] $8280C9 22 D7 8C A0 JSL $A08CD7[$A0:8CD7] $8280CD 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $8280D1 CE A0 0D DEC $0DA0 [$7E:0DA0] $8280D4 10 F3 BPL $F3 [$80C9] $8280D6 EE 98 09 INC $0998 [$7E:0998] $8280D9 08 PHP $8280DA C2 30 REP #$30 $8280DC A0 00 02 LDY #$0200 ;\ $8280DF A2 00 00 LDX #$0000 ;| ;| $8280E2 BF 00 C2 7E LDA $7EC200,x[$7E:C200] ;| $8280E6 9F 00 C0 7E STA $7EC000,x[$7E:C000] ;| $8280EA E8 INX ;} $7EC200..C3FF -> $7EC000..C1FF $8280EB E8 INX ;| $8280EC 88 DEY ;| $8280ED 88 DEY ;| $8280EE D0 F2 BNE $F2 [$80E2] ;/ $8280F0 28 PLP $8280F1 28 PLP $8280F2 60 RTS $8280F3 A9 06 00 LDA #$0006 $8280F6 8D A0 0D STA $0DA0 [$7E:0DA0] $8280F9 22 D7 8C A0 JSL $A08CD7[$A0:8CD7] $8280FD 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $828101 CE A0 0D DEC $0DA0 [$7E:0DA0] $828104 10 F3 BPL $F3 [$80F9] $828106 A9 07 00 LDA #$0007 $828109 8D 98 09 STA $0998 [$7E:0998] $82810C 08 PHP $82810D C2 30 REP #$30 $82810F A0 00 02 LDY #$0200 $828112 A2 00 00 LDX #$0000 $828115 BF 00 C2 7E LDA $7EC200,x[$7E:C200] $828119 9F 00 C0 7E STA $7EC000,x[$7E:C000] $82811D E8 INX $82811E E8 INX $82811F 88 DEY $828120 88 DEY $828121 D0 F2 BNE $F2 [$8115] $828123 28 PLP $828124 AF 14 D9 7E LDA $7ED914[$7E:D914] $828128 C9 1F 00 CMP #$001F $82812B D0 10 BNE $10 [$813D] $82812D A9 00 00 LDA #$0000 $828130 8F BE C1 7E STA $7EC1BE[$7E:C1BE] $828134 A9 08 00 LDA #$0008 ;\ #$E8CD into $0A42, #$E8DC into $0A44, Samus facing forward, JSL $91F433, $91FB08, $91DEBA. $828137 22 84 F0 90 JSL $90F084[$90:F084] ;} #$EB52 into $0A5C, update $0A20 - $0A27, JSL $868027 with Y = #$A387 then Y = #$A39D, JSL 82E118 $82813B 28 PLP $82813C 60 RTS $82813D A9 09 00 LDA #$0009 ;\ JSL $8DC4E9, Y = #$E1F4 (no suits), #$E1F8 (varia), or #$E1FC (grav). Samus facing forward $828140 22 84 F0 90 JSL $90F084[$90:F084] ;} JSL $91DEBA, $91F433. Set Samus's animation to frame 2, delay 3 $828144 28 PLP $828145 60 RTS ; Demo branch $828146 A9 06 00 LDA #$0006 ;\ $828149 8D A0 0D STA $0DA0 [$7E:0DA0] ;} $0DA0 = 6 $82814C 22 D7 8C A0 JSL $A08CD7[$A0:8CD7] $828150 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $828154 CE A0 0D DEC $0DA0 [$7E:0DA0] ; --$0DA0 $828157 10 F3 BPL $F3 [$814C] ; If [$0DA0] > 0: loop $828159 AD 57 1F LDA $1F57 [$7E:1F57] ;\ $82815C 3A DEC A ;| $82815D 85 12 STA $12 [$7E:0012] ;| $82815F 0A ASL A ;| $828160 0A ASL A ;| $828161 0A ASL A ;| $828162 65 12 ADC $12 [$7E:0012] ;| $828164 0A ASL A ;| $828165 85 12 STA $12 [$7E:0012] ;| $828167 AD 55 1F LDA $1F55 [$7E:1F55] ;| $82816A 0A ASL A ;} Execute [[$876C + demo set * 2] + (demo scene index - 1) * 12h + 10h] $82816B AA TAX ;| $82816C BD 6C 87 LDA $876C,x ;| $82816F 18 CLC ;| $828170 65 12 ADC $12 [$7E:0012] ;| $828172 AA TAX ;| $828173 BD 10 00 LDA $0010,x ;| $828176 85 12 STA $12 [$7E:0012] ;| $828178 A2 00 00 LDX #$0000 ;| $82817B FC 12 00 JSR ($0012,x) ;/ $82817E EE 98 09 INC $0998 [$7E:0998] ; Gamestate = 29h (transition to demo) $828181 08 PHP $828182 C2 30 REP #$30 $828184 A0 00 02 LDY #$0200 ;\ $828187 A2 00 00 LDX #$0000 ;| ;| $82818A BF 00 C2 7E LDA $7EC200,x[$7E:C880] ;| $82818E 9F 00 C0 7E STA $7EC000,x[$7E:C680] ;| $828192 E8 INX ;} $7E:C000..C1FF = [$7E:C200..C3FF] $828193 E8 INX ;| $828194 88 DEY ;| $828195 88 DEY ;| $828196 D0 F2 BNE $F2 [$818A] ;/ $828198 28 PLP $828199 28 PLP $82819A 60 RTS $82819B 08 PHP $82819C 20 A4 81 JSR $81A4 [$82:81A4] $82819F 20 DD 81 JSR $81DD [$82:81DD] $8281A2 28 PLP $8281A3 60 RTS $8281A4 08 PHP $8281A5 E2 30 SEP #$30 $8281A7 A9 01 LDA #$01 $8281A9 8D 00 42 STA $4200 [$7E:4200] $8281AC 85 84 STA $84 [$7E:0084] $8281AE 9C 01 42 STZ $4201 [$7E:4201] $8281B1 9C 02 42 STZ $4202 [$7E:4202] $8281B4 9C 03 42 STZ $4203 [$7E:4203] $8281B7 9C 04 42 STZ $4204 [$7E:4204] $8281BA 9C 05 42 STZ $4205 [$7E:4205] $8281BD 9C 06 42 STZ $4206 [$7E:4206] $8281C0 9C 07 42 STZ $4207 [$7E:4207] $8281C3 9C 08 42 STZ $4208 [$7E:4208] $8281C6 9C 09 42 STZ $4209 [$7E:4209] $8281C9 9C 0A 42 STZ $420A [$7E:420A] $8281CC 9C 0B 42 STZ $420B [$7E:420B] $8281CF 9C 0C 42 STZ $420C [$7E:420C] $8281D2 64 85 STZ $85 [$7E:0085] $8281D4 A9 01 LDA #$01 $8281D6 8D 0D 42 STA $420D [$7E:420D] $8281D9 85 86 STA $86 [$7E:0086] $8281DB 28 PLP $8281DC 60 RTS $8281DD 08 PHP $8281DE E2 30 SEP #$30 $8281E0 A9 80 LDA #$80 $8281E2 8D 00 21 STA $2100 [$7E:2100] $8281E5 85 51 STA $51 [$7E:0051] $8281E7 A9 03 LDA #$03 $8281E9 8D 01 21 STA $2101 [$7E:2101] $8281EC 85 52 STA $52 [$7E:0052] $8281EE 9C 02 21 STZ $2102 [$7E:2102] $8281F1 64 53 STZ $53 [$7E:0053] $8281F3 A9 80 LDA #$80 $8281F5 8D 03 21 STA $2103 [$7E:2103] $8281F8 85 54 STA $54 [$7E:0054] $8281FA 9C 04 21 STZ $2104 [$7E:2104] $8281FD 9C 04 21 STZ $2104 [$7E:2104] $828200 A9 09 LDA #$09 $828202 8D 05 21 STA $2105 [$7E:2105] $828205 85 55 STA $55 [$7E:0055] $828207 9C 06 21 STZ $2106 [$7E:2106] $82820A 64 57 STZ $57 [$7E:0057] $82820C 64 5D STZ $5D [$7E:005D] $82820E 9C 0B 21 STZ $210B [$7E:210B] $828211 A9 04 LDA #$04 $828213 85 5E STA $5E [$7E:005E] $828215 8D 0C 21 STA $210C [$7E:210C] $828218 A9 51 LDA #$51 $82821A 85 58 STA $58 [$7E:0058] $82821C 8D 07 21 STA $2107 [$7E:2107] $82821F A9 49 LDA #$49 $828221 85 59 STA $59 [$7E:0059] $828223 8D 08 21 STA $2108 [$7E:2108] $828226 A9 5A LDA #$5A $828228 85 5A STA $5A [$7E:005A] $82822A 8D 09 21 STA $2109 [$7E:2109] $82822D A9 00 LDA #$00 $82822F 85 5C STA $5C [$7E:005C] $828231 8D 0A 21 STA $210A [$7E:210A] $828234 9C 15 21 STZ $2115 [$7E:2115] $828237 9C 23 21 STZ $2123 [$7E:2123] $82823A 64 60 STZ $60 [$7E:0060] $82823C 9C 23 21 STZ $2123 [$7E:2123] $82823F 64 60 STZ $60 [$7E:0060] $828241 9C 24 21 STZ $2124 [$7E:2124] $828244 64 61 STZ $61 [$7E:0061] $828246 9C 25 21 STZ $2125 [$7E:2125] $828249 64 62 STZ $62 [$7E:0062] $82824B 9C 26 21 STZ $2126 [$7E:2126] $82824E 64 63 STZ $63 [$7E:0063] $828250 9C 27 21 STZ $2127 [$7E:2127] $828253 64 64 STZ $64 [$7E:0064] $828255 9C 28 21 STZ $2128 [$7E:2128] $828258 64 65 STZ $65 [$7E:0065] $82825A 9C 29 21 STZ $2129 [$7E:2129] $82825D 64 66 STZ $66 [$7E:0066] $82825F 9C 2A 21 STZ $212A [$7E:212A] $828262 64 67 STZ $67 [$7E:0067] $828264 9C 2B 21 STZ $212B [$7E:212B] $828267 64 68 STZ $68 [$7E:0068] $828269 A9 17 LDA #$17 $82826B 8D 2C 21 STA $212C [$7E:212C] $82826E 85 69 STA $69 [$7E:0069] $828270 9C 2E 21 STZ $212E [$7E:212E] $828273 64 6C STZ $6C [$7E:006C] $828275 A9 00 LDA #$00 $828277 8D 2D 21 STA $212D [$7E:212D] $82827A 85 6B STA $6B [$7E:006B] $82827C 9C 2F 21 STZ $212F [$7E:212F] $82827F 64 6D STZ $6D [$7E:006D] $828281 9C 30 21 STZ $2130 [$7E:2130] $828284 64 6E STZ $6E [$7E:006E] $828286 9C 31 21 STZ $2131 [$7E:2131] $828289 64 71 STZ $71 [$7E:0071] $82828B A9 E0 LDA #$E0 $82828D 8D 32 21 STA $2132 [$7E:2132] $828290 A9 00 LDA #$00 $828292 8D 33 21 STA $2133 [$7E:2133] $828295 85 77 STA $77 [$7E:0077] $828297 C2 30 REP #$30 $828299 9C 90 05 STZ $0590 [$7E:0590] $82829C A9 00 00 LDA #$0000 $82829F A2 00 30 LDX #$3000 $8282A2 A0 FE 07 LDY #$07FE $8282A5 22 F6 83 80 JSL $8083F6[$80:83F6] ; 16-bit write Y bytes of A to $7E:X $8282A9 A9 6F 00 LDA #$006F $8282AC A2 00 40 LDX #$4000 $8282AF A0 FE 07 LDY #$07FE $8282B2 22 F6 83 80 JSL $8083F6[$80:83F6] ; 16-bit write Y bytes of A to $7E:X $8282B6 A9 0F 2C LDA #$2C0F $8282B9 A2 00 40 LDX #$4000 $8282BC A0 FE 00 LDY #$00FE $8282BF 22 F6 83 80 JSL $8083F6[$80:83F6] ; 16-bit write Y bytes of A to $7E:X $8282C3 28 PLP $8282C4 60 RTS $8282C5 08 PHP $8282C6 E2 30 SEP #$30 $8282C8 08 PHP $8282C9 C2 30 REP #$30 $8282CB A0 00 02 LDY #$0200 $8282CE A2 00 00 LDX #$0000 $8282D1 BF 00 80 9A LDA $9A8000,x[$9A:8000] $8282D5 9F 00 C0 7E STA $7EC000,x[$7E:C000] $8282D9 E8 INX $8282DA E8 INX $8282DB 88 DEY $8282DC 88 DEY $8282DD D0 F2 BNE $F2 [$82D1] $8282DF 28 PLP $8282E0 28 PLP $8282E1 60 RTS $8282E2 08 PHP $8282E3 E2 30 SEP #$30 $8282E5 A9 00 LDA #$00 $8282E7 8D 16 21 STA $2116 [$7E:2116] $8282EA A9 40 LDA #$40 $8282EC 8D 17 21 STA $2117 [$7E:2117] $8282EF A9 80 LDA #$80 $8282F1 8D 15 21 STA $2115 [$7E:2115] $8282F4 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $8282F8 db 01, 01, 18, 00, B2, 9A, 00, 20 $828300 A9 02 LDA #$02 $828302 8D 0B 42 STA $420B [$7E:420B] $828305 A9 00 LDA #$00 $828307 8D 16 21 STA $2116 [$7E:2116] $82830A A9 60 LDA #$60 $82830C 8D 17 21 STA $2117 [$7E:2117] $82830F A9 80 LDA #$80 $828311 8D 15 21 STA $2115 [$7E:2115] $828314 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828318 db 01, 01, 18, 00, D2, 9A, 00, 40 $828320 A9 02 LDA #$02 $828322 8D 0B 42 STA $420B [$7E:420B] $828325 A9 00 LDA #$00 $828327 8D 16 21 STA $2116 [$7E:2116] $82832A A9 50 LDA #$50 $82832C 8D 17 21 STA $2117 [$7E:2117] $82832F A9 80 LDA #$80 $828331 8D 15 21 STA $2115 [$7E:2115] $828334 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828338 db 01, 01, 18, 00, 40, 7E, 00, 10 $828340 A9 02 LDA #$02 $828342 8D 0B 42 STA $420B [$7E:420B] $828345 A9 00 LDA #$00 $828347 8D 16 21 STA $2116 [$7E:2116] $82834A A9 58 LDA #$58 $82834C 8D 17 21 STA $2117 [$7E:2117] $82834F A9 80 LDA #$80 $828351 8D 15 21 STA $2115 [$7E:2115] $828354 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828358 db 01, 01, 18, 00, 40, 7E, 00, 08 $828360 A9 02 LDA #$02 $828362 8D 0B 42 STA $420B [$7E:420B] $828365 28 PLP $828366 60 RTS ;;; Gamestate 20h ;;; ; Made it to Ceres elevator $828367 08 PHP $828368 C2 30 REP #$30 $82836A AD 43 09 LDA $0943 [$7E:0943] $82836D F0 04 BEQ $04 [$8373] $82836F 22 6C 9F 80 JSL $809F6C[$80:9F6C] ; Draw timer $828373 20 44 8B JSR $8B44 [$82:8B44] $828376 CE A0 0A DEC $0AA0 [$7E:0AA0] $828379 F0 02 BEQ $02 [$837D] $82837B 10 09 BPL $09 [$8386] $82837D EE 98 09 INC $0998 [$7E:0998] $828380 9C 23 07 STZ $0723 [$7E:0723] $828383 9C 25 07 STZ $0725 [$7E:0725] $828386 28 PLP $828387 60 RTS ;;; Gamestate 21h ;;; ; Blackout from Ceres $828388 08 PHP $828389 C2 30 REP #$30 $82838B AD 43 09 LDA $0943 [$7E:0943] $82838E F0 04 BEQ $04 [$8394] $828390 22 6C 9F 80 JSL $809F6C[$80:9F6C] ; Draw timer $828394 20 44 8B JSR $8B44 [$82:8B44] $828397 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $82839B E2 20 SEP #$20 $82839D A5 51 LDA $51 [$7E:0051] $82839F C9 80 CMP #$80 $8283A1 F0 04 BEQ $04 [$83A7] $8283A3 C2 20 REP #$20 $8283A5 28 PLP $8283A6 60 RTS $8283A7 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $8283AB C2 20 REP #$20 $8283AD 22 9E 82 88 JSL $88829E[$88:829E] $8283B1 22 5F 98 80 JSL $80985F[$80:985F] ; Disable horizontal and vertical timer interrupts $8283B5 9C 82 19 STZ $1982 [$7E:1982] $8283B8 64 AB STZ $AB [$7E:00AB] $8283BA E2 20 SEP #$20 $8283BC 64 6E STZ $6E [$7E:006E] $8283BE 64 71 STZ $71 [$7E:0071] $8283C0 A9 10 LDA #$10 $8283C2 85 69 STA $69 [$7E:0069] $8283C4 64 6B STZ $6B [$7E:006B] $8283C6 64 6C STZ $6C [$7E:006C] $8283C8 64 6D STZ $6D [$7E:006D] $8283CA A9 09 LDA #$09 $8283CC 85 55 STA $55 [$7E:0055] $8283CE C2 20 REP #$20 $8283D0 9C 23 07 STZ $0723 [$7E:0723] $8283D3 9C 25 07 STZ $0725 [$7E:0725] $8283D6 A9 22 00 LDA #$0022 $8283D9 8F 14 D9 7E STA $7ED914[$7E:D914] $8283DD 8D 98 09 STA $0998 [$7E:0998] $8283E0 AD 52 09 LDA $0952 [$7E:0952] $8283E3 22 00 80 81 JSL $818000[$81:8000] $8283E7 A9 1B C1 LDA #$C11B $8283EA 8D 51 1F STA $1F51 [$7E:1F51] $8283ED 9C 3F 09 STZ $093F [$7E:093F] $8283F0 9C 43 09 STZ $0943 [$7E:0943] $8283F3 A9 00 00 LDA #$0000 $8283F6 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $8283FA A9 02 00 LDA #$0002 $8283FD 22 21 90 80 JSL $809021[$80:9021] ; Sound library 1, $0653 = 0Fh $828401 A9 71 00 LDA #$0071 $828404 22 A3 90 80 JSL $8090A3[$80:90A3] ; Sound library 2, $0653 = 0Fh $828408 A9 01 00 LDA #$0001 $82840B 22 25 91 80 JSL $809125[$80:9125] ; Sound library 3, $0653 = 0Fh $82840F 28 PLP $828410 60 RTS ;;; Gamestate 23h ;;; ; Time up $828411 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Gamestate 24h ;;; ; Whiting out from time up $828431 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Gamestate 26h ;;; ; Samus escapes from Zebes $8284BD 08 PHP $8284BE C2 30 REP #$30 $8284C0 20 44 8B JSR $8B44 [$82:8B44] $8284C3 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $8284C7 E2 20 SEP #$20 $8284C9 A5 51 LDA $51 [$7E:0051] $8284CB C9 80 CMP #$80 $8284CD F0 04 BEQ $04 [$84D3] $8284CF C2 20 REP #$20 $8284D1 28 PLP $8284D2 60 RTS $8284D3 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $8284D7 C2 20 REP #$20 $8284D9 22 9E 82 88 JSL $88829E[$88:829E] $8284DD 22 5F 98 80 JSL $80985F[$80:985F] ; Disable horizontal and vertical timer interrupts $8284E1 9C 82 19 STZ $1982 [$7E:1982] $8284E4 E2 20 SEP #$20 $8284E6 64 6E STZ $6E [$7E:006E] $8284E8 64 71 STZ $71 [$7E:0071] $8284EA A9 10 LDA #$10 $8284EC 85 69 STA $69 [$7E:0069] $8284EE 64 6B STZ $6B [$7E:006B] $8284F0 64 6C STZ $6C [$7E:006C] $8284F2 64 6D STZ $6D [$7E:006D] $8284F4 A9 09 LDA #$09 $8284F6 85 55 STA $55 [$7E:0055] $8284F8 C2 20 REP #$20 $8284FA 9C 23 07 STZ $0723 [$7E:0723] $8284FD 9C 25 07 STZ $0725 [$7E:0725] $828500 A9 27 00 LDA #$0027 $828503 8D 98 09 STA $0998 [$7E:0998] $828506 A9 80 D4 LDA #$D480 $828509 8D 51 1F STA $1F51 [$7E:1F51] $82850C 9C 43 09 STZ $0943 [$7E:0943] $82850F A9 00 00 LDA #$0000 $828512 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $828516 A9 02 00 LDA #$0002 $828519 22 21 90 80 JSL $809021[$80:9021] ; Sound library 1, $0653 = 0Fh $82851D A9 71 00 LDA #$0071 $828520 22 A3 90 80 JSL $8090A3[$80:90A3] ; Sound library 2, $0653 = 0Fh $828524 A9 01 00 LDA #$0001 $828527 22 25 91 80 JSL $809125[$80:9125] ; Sound library 3, $0653 = 0Fh $82852B 28 PLP $82852C 60 RTS ;;; Gamestate 29h ;;; ; Transition to demo $82852D 08 PHP $82852E C2 30 REP #$30 $828530 20 44 8B JSR $8B44 [$82:8B44] ; Main gameplay $828533 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $828537 22 B9 84 88 JSL $8884B9[$88:84B9] ; Handle background $82853B EE 98 09 INC $0998 [$82:0998] ; Increment game state $82853E E2 20 SEP #$20 $828540 A9 0F LDA #$0F ;\ $828542 85 51 STA $51 [$7E:0051] ;} Turn screen off $828544 C2 20 REP #$20 $828546 28 PLP $828547 60 RTS ;;; Gamestate 2Ah ;;; ; Playing demo $828548 08 PHP $828549 C2 30 REP #$30 $82854B 20 44 8B JSR $8B44 [$82:8B44] ; Main gameplay $82854E A5 8F LDA $8F [$7E:008F] ;\ $828550 F0 08 BEQ $08 [$855A] ;} If newly pressed buttons: $828552 A9 01 00 LDA #$0001 ;\ $828555 8D EC 0D STA $0DEC [$82:0DEC] ;} $0DEC = 1 $828558 80 20 BRA $20 [$857A] ; Else (no newly pressed buttons): $82855A CE 53 1F DEC $1F53 [$82:1F53] ; Decrement demo scene timer $82855D F0 02 BEQ $02 [$8561] ;\ $82855F 10 30 BPL $30 [$8591] ;} If strictly positive: return $828561 9C EC 0D STZ $0DEC [$82:0DEC] ; $0DEC = 0 $828564 A2 5A 00 LDX #$005A ; Timer = 90 $828567 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $82856B A5 8F LDA $8F [$7E:008F] ;\ $82856D D0 05 BNE $05 [$8574] ;} If newly pressed buttons: branch to $8574 $82856F CA DEX ; Decrement timer $828570 D0 F5 BNE $F5 [$8567] ; If timer != 0: loop $828572 80 06 BRA $06 [$857A] ; Branch to $857A $828574 A9 01 00 LDA #$0001 ;\ $828577 8D EC 0D STA $0DEC [$7E:0DEC] ;} $0DEC = 1 $82857A EE 98 09 INC $0998 [$82:0998] ; Increment game state $82857D 9C F5 05 STZ $05F5 [$82:05F5] ; Enable sounds $828580 E2 20 SEP #$20 $828582 A9 80 LDA #$80 ;\ $828584 85 51 STA $51 [$7E:0051] ;} Enable screen with minimum brightness $828586 C2 20 REP #$20 $828588 A9 01 00 LDA #$0001 ;\ $82858B 8D 23 07 STA $0723 [$82:0723] ;} Set screen fade in delay to 1 frame $82858E 8D 25 07 STA $0725 [$82:0725] ;/ $828591 28 PLP $828592 60 RTS ;;; Gamestate 2Bh ;;; ; Transition from demo $828593 08 PHP $828594 C2 30 REP #$30 $828596 AD EC 0D LDA $0DEC [$82:0DEC] ;\ $828599 C9 01 00 CMP #$0001 ;} If [$0DEC] != 1: $82859C F0 03 BEQ $03 [$85A1] ;/ $82859E 20 37 86 JSR $8637 [$82:8637] ; Next demo $8285A1 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI $8285A5 EE 98 09 INC $0998 [$82:0998] ; Increment game state $8285A8 9C 23 07 STZ $0723 [$82:0723] ;\ $8285AB 9C 25 07 STZ $0725 [$82:0725] ;} Disable screen fade $8285AE 22 9E 82 88 JSL $88829E[$88:829E] ; Clear DMA queue $8285B2 22 5F 98 80 JSL $80985F[$80:985F] ; Disable horizontal and vertical timer interrupts $8285B6 9C 82 19 STZ $1982 [$82:1982] ; Clear FX1 'A' $8285B9 64 AB STZ $AB [$7E:00AB] ; Clear interrupt index $8285BB 64 A7 STZ $A7 [$7E:00A7] ; Clear next interrupt index $8285BD 22 CD C4 8D JSL $8DC4CD[$8D:C4CD] ; Disable glow $8285C1 22 D8 C4 8D JSL $8DC4D8[$8D:C4D8] ; Clear glow data $8285C5 A9 1F 1C LDA #$1C1F ;\ $8285C8 3A DEC A ;| $8285C9 3A DEC A ;| $8285CA 38 SEC ;| $8285CB E9 8D 19 SBC #$198D ;| $8285CE AA TAX ;} Clear ER projectile data ;| $8285CF 9E 8D 19 STZ $198D,x[$82:1C1D] ;| $8285D2 CA DEX ;| $8285D3 CA DEX ;| $8285D4 10 F9 BPL $F9 [$85CF] ;/ $8285D6 A9 98 09 LDA #$0998 ;\ $8285D9 3A DEC A ;| $8285DA 3A DEC A ;| $8285DB 38 SEC ;| $8285DC E9 7C 07 SBC #$077C ;| $8285DF AA TAX ;} Clear $077C..0997 (lots of things) ;| $8285E0 9E 7C 07 STZ $077C,x[$82:0996] ;| $8285E3 CA DEX ;| $8285E4 CA DEX ;| $8285E5 10 F9 BPL $F9 [$85E0] ;/ $8285E7 E2 20 SEP #$20 $8285E9 64 6E STZ $6E [$7E:006E] $8285EB 64 71 STZ $71 [$7E:0071] $8285ED A9 10 LDA #$10 $8285EF 85 69 STA $69 [$7E:0069] $8285F1 64 6B STZ $6B [$7E:006B] $8285F3 64 6C STZ $6C [$7E:006C] $8285F5 64 6D STZ $6D [$7E:006D] $8285F7 C2 20 REP #$20 $8285F9 28 PLP $8285FA 60 RTS ;;; Gamestate 2Ch ;;; ; Transition from demo $8285FB 08 PHP $8285FC C2 30 REP #$30 $8285FE A9 01 00 LDA #$0001 ;\ $828601 8D 98 09 STA $0998 [$82:0998] ;} Gamestate = 01 (opening) $828604 AD EC 0D LDA $0DEC [$82:0DEC] ;\ $828607 30 26 BMI $26 [$862F] ;} If [$0DEC] < 0: $828609 D0 12 BNE $12 [$861D] ; If [$0DEC] == 0: $82860B A9 00 00 LDA #$0000 ;\ $82860E 22 C1 8F 80 JSL $808FC1[$80:8FC1] ;} Set audio to 0000 $828612 9C F5 05 STZ $05F5 [$82:05F5] ; Enable sounds $828615 A9 68 9B LDA #$9B68 ;\ $828618 8D 51 1F STA $1F51 [$82:1F51] ;} $1F51 = $9B68 $82861B 28 PLP $82861C 60 RTS $82861D 22 87 9B 8B JSL $8B9B87[$8B:9B87] ; Execute subroutine $8B:9B87 $828621 A9 02 00 LDA #$0002 ;\ $828624 8D 53 1A STA $1A53 [$82:1A53] ;} $1A53 = 2 $828627 A9 47 9A LDA #$9A47 ;\ $82862A 8D 51 1F STA $1F51 [$82:1F51] ;} $1F51 = $9A47 $82862D 28 PLP $82862E 60 RTS $82862F A9 28 00 LDA #$0028 ;\ $828632 8D 98 09 STA $0998 [$82:0998] ;} Gamestate = 28h (transition to demo) $828635 28 PLP $828636 60 RTS ;;; Next demo ;;; $828637 08 PHP $828638 C2 30 REP #$30 $82863A AD 57 1F LDA $1F57 [$82:1F57] ;\ $82863D 0A ASL A ;| $82863E 0A ASL A ;| $82863F 0A ASL A ;| $828640 6D 57 1F ADC $1F57 [$82:1F57] ;| $828643 0A ASL A ;| $828644 85 12 STA $12 [$7E:0012] ;| $828646 AD 55 1F LDA $1F55 [$82:1F55] ;} A = [[$876C + demo set * 2] + demo scene index * 12h] $828649 0A ASL A ;| $82864A AA TAX ;| $82864B BD 6C 87 LDA $876C,x[$82:876C] ;| $82864E 18 CLC ;| $82864F 65 12 ADC $12 [$7E:0012] ;| $828651 AA TAX ;| $828652 BD 00 00 LDA $0000,x[$82:8786] ;/ $828655 C9 FF FF CMP #$FFFF ;\ $828658 D0 17 BNE $17 [$8671] ;} If A != FFFFh: $0DEC = 8000h and return $82865A 9C EC 0D STZ $0DEC [$82:0DEC] ; $0DEC = 0 $82865D AD 55 1F LDA $1F55 [$82:1F55] ;\ $828660 1A INC A ;} A = demo set + 1 $828661 CD 59 1F CMP $1F59 [$82:1F59] ;\ $828664 90 03 BCC $03 [$8669] ;} If A >= last unlocked set: $828666 A9 00 00 LDA #$0000 ; A = 0 $828669 8D 55 1F STA $1F55 [$82:1F55] ; $1F55 = A $82866C 9C 57 1F STZ $1F57 [$82:1F57] ; Demo scene = 0 $82866F 28 PLP $828670 60 RTS $828671 A9 00 80 LDA #$8000 $828674 8D EC 0D STA $0DEC [$82:0DEC] $828677 28 PLP $828678 60 RTS ;;; ;;; $828679 08 PHP $82867A C2 30 REP #$30 $82867C 9C 8D 07 STZ $078D [$82:078D] $82867F AD 57 1F LDA $1F57 [$82:1F57] $828682 0A ASL A $828683 0A ASL A $828684 0A ASL A $828685 6D 57 1F ADC $1F57 [$82:1F57] $828688 0A ASL A $828689 85 12 STA $12 [$7E:0012] $82868B AD 55 1F LDA $1F55 [$82:1F55] $82868E 0A ASL A $82868F AA TAX $828690 BD 6C 87 LDA $876C,x[$82:876C] $828693 18 CLC $828694 65 12 ADC $12 [$7E:0012] $828696 AA TAX $828697 BD 00 00 LDA $0000,x[$82:8774] $82869A 8D 9B 07 STA $079B [$82:079B] $82869D BD 02 00 LDA $0002,x[$82:8776] $8286A0 8D 8D 07 STA $078D [$82:078D] $8286A3 BD 04 00 LDA $0004,x[$82:8778] $8286A6 8D 8F 07 STA $078F [$82:078F] $8286A9 BD 06 00 LDA $0006,x[$82:877A] $8286AC 8D 11 09 STA $0911 [$82:0911] $8286AF 8D 1D 09 STA $091D [$82:091D] $8286B2 BD 08 00 LDA $0008,x[$82:877C] $8286B5 8D 15 09 STA $0915 [$82:0915] $8286B8 8D 1F 09 STA $091F [$82:091F] $8286BB BD 0A 00 LDA $000A,x[$82:877E] $8286BE 18 CLC $8286BF 6D 15 09 ADC $0915 [$82:0915] $8286C2 8D FA 0A STA $0AFA [$82:0AFA] $8286C5 8D 14 0B STA $0B14 [$82:0B14] $8286C8 AD 11 09 LDA $0911 [$82:0911] $8286CB 18 CLC $8286CC 69 80 00 ADC #$0080 $8286CF 18 CLC $8286D0 7D 0C 00 ADC $000C,x[$82:8780] $8286D3 8D F6 0A STA $0AF6 [$82:0AF6] $8286D6 8D 10 0B STA $0B10 [$82:0B10] $8286D9 BD 0E 00 LDA $000E,x[$82:8782] $8286DC 8D 53 1F STA $1F53 [$82:1F53] $8286DF 8B PHB $8286E0 E2 20 SEP #$20 $8286E2 A9 8F LDA #$8F $8286E4 48 PHA $8286E5 AB PLB $8286E6 AE 9B 07 LDX $079B [$8F:079B] $8286E9 BD 01 00 LDA $0001,x[$8F:91F9] $8286EC 8D 9F 07 STA $079F [$8F:079F] $8286EF C2 20 REP #$20 $8286F1 AB PLB $8286F2 64 B1 STZ $B1 [$7E:00B1] $8286F4 64 B3 STZ $B3 [$7E:00B3] $8286F6 EE 57 1F INC $1F57 [$82:1F57] $8286F9 A2 00 00 LDX #$0000 $8286FC A9 FF FF LDA #$FFFF $8286FF 9F 30 D8 7E STA $7ED830,x[$7E:D830] $828703 9F 70 D8 7E STA $7ED870,x[$7E:D870] $828707 9F F0 D8 7E STA $7ED8F0,x[$7E:D8F0] $82870B 9F 08 D9 7E STA $7ED908,x[$7E:D908] $82870F 9F F8 D8 7E STA $7ED8F8,x[$7E:D8F8] $828713 9F 00 D9 7E STA $7ED900,x[$7E:D900] $828717 A9 00 00 LDA #$0000 $82871A 9F B0 D8 7E STA $7ED8B0,x[$7E:D8B0] $82871E 9F 20 D8 7E STA $7ED820,x[$7E:D820] $828722 9F 28 D8 7E STA $7ED828,x[$7E:D828] $828726 E8 INX $828727 E8 INX $828728 E0 08 00 CPX #$0008 $82872B 30 CF BMI $CF [$86FC] $82872D A9 FF FF LDA #$FFFF $828730 9F 30 D8 7E STA $7ED830,x[$7E:D838] $828734 9F 70 D8 7E STA $7ED870,x[$7E:D878] $828738 A9 00 00 LDA #$0000 $82873B 9F B0 D8 7E STA $7ED8B0,x[$7E:D8B8] $82873F E8 INX $828740 E8 INX $828741 E0 40 00 CPX #$0040 $828744 30 E7 BMI $E7 [$872D] $828746 A9 00 00 LDA #$0000 $828749 A2 00 00 LDX #$0000 $82874C 9F 52 CD 7E STA $7ECD52,x[$7E:CD52] $828750 E8 INX $828751 E8 INX $828752 E0 00 06 CPX #$0600 $828755 30 F5 BMI $F5 [$874C] $828757 A9 00 00 LDA #$0000 $82875A 8D D4 09 STA $09D4 [$82:09D4] $82875D 8D D6 09 STA $09D6 [$82:09D6] $828760 8D C0 09 STA $09C0 [$82:09C0] $828763 8F 14 D9 7E STA $7ED914[$7E:D914] $828767 8D F7 05 STA $05F7 [$82:05F7] $82876A 28 PLP $82876B 60 RTS ;;; Demo data ;;; ; Pointers to demo data $82876C dw 8774, 87E2, 8850, 88BE ; ___________________________________________________ MDB ; | _____________________________________________ DDB ; | | _______________________________________ door slot ; | | | _________________________________ screen X position ; | | | | ___________________________ screen Y position ; | | | | | _____________________ Samus Y offset from top of screen ; | | | | | | _______________ Samus X offset from centre of screen ; | | | | | | | _________ length of demo ; | | | | | | | | ___ pointer to code ; | | | | | | | | | $828774 dw 91F8, 896A, 0001, 0400, 0400, 0040, 0001, 04D3, 8925, 91F8, 896A, 0001, 0400, 0400, 0040, 0001, 04D3, 8925, 9F11, 8EAA, 0001, 0000, 0000, 006B, FFD2, 0151, 8924, 9D9C, 8DC6, 0000, 0100, 0000, 00BB, FFE0, 017A, 8924, B106, 970E, 0000, 0700, 0000, 008B, 0048, 01A4, 8924, AFFB, 9792, 0001, 0000, 0000, 008B, FFC2, 01BC, 8924, 9D19, 8E7A, 0000, 0200, 0600, 0099, 0027, 0265, 891A, FFFF $8287E2 dw A408, A36C, 0000, 0100, 0100, 008B, 0056, 01FD, 8924, 9C5E, 8CCA, 0003, 0200, 0000, 008B, 0049, 019A, 8924, 9E52, 8DEA, 0003, 0500, 0300, 00AB, FFE2, 0117, 8924, AF14, 967E, 0002, 0300, 0000, 008B, 004B, 03CA, 8924, 9879, 8982, 0003, 0000, 0000, 00BB, FFF1, 00D5, 8924, 9CB3, 8DD2, 0001, 0400, 0200, 0080, 0005, 0317, 8924, FFFF $828850 dw CC6F, A21C, 0003, 0200, 0000, 0060, 0004, 02EF, 8924, 91F8, 896A, 0001, 0300, 0400, 00B0, 0000, 00C7, 8925, A56B, 919E, 0001, 0000, 0100, 008B, FFD2, 02D3, 8924, A322, 90EA, 0000, 0000, 0700, 008B, FFAA, 0164, 8924, A59F, 91B6, 0001, 0000, 0100, 008B, FFBF, 013F, 892B, A66A, 91F2, 0001, 0000, 0000, 008B, FFB1, 0197, 8932, FFFF $8288BE dw 91F8, 890A, 0000, 0600, 0200, 0080, 0030, 0100, 8925, D0B9, A474, 0000, 0200, 0000, 00AB, 0000, 0332, 8924, 91F8, 890A, 0000, 0600, 0200, 007B, 0020, 0185, 8925, 9AD9, 8D42, 0001, 0000, 0400, 008B, FFB7, 018A, 8924, 91F8, 890A, 0000, 0600, 0200, 008B, 0004, 0200, 8925, FFFF ;;; ;;; $82891A E2 20 SEP #$20 $82891C A9 00 LDA #$00 $82891E 8F 41 CD 7E STA $7ECD41[$7E:CD41] $828922 C2 20 REP #$20 $828924 60 RTS ;;; ;;; $828925 A9 4A 00 LDA #$004A $828928 85 59 STA $59 [$7E:0059] $82892A 60 RTS ;;; ;;; $82892B A9 3C 00 LDA #$003C $82892E 8D B2 0F STA $0FB2 [$82:0FB2] $828931 60 RTS ;;; ;;; $828932 E2 20 SEP #$20 $828934 A9 01 LDA #$01 $828936 8F 29 D8 7E STA $7ED829[$7E:D829] $82893A C2 20 REP #$20 $82893C 60 RTS ;;; Main game loop ;;; $82893D 4B PHK $82893E AB PLB $82893F C2 20 REP #$20 $828941 9C 98 09 STZ $0998 [$7E:0998] $828944 9C F4 0D STZ $0DF4 [$7E:0DF4] $828947 58 CLI $828948 08 PHP $828949 C2 30 REP #$30 $82894B 22 B9 84 88 JSL $8884B9[$88:84B9] ; Handle background $82894F 22 11 81 80 JSL $808111[$80:8111] ; Generate new random number $828953 22 1A 8B 80 JSL $808B1A[$80:8B1A] ; Clear OAM high x bits and sizes $828957 9C 90 05 STZ $0590 [$7E:0590] ; Clear OAM index $82895A 9C 1D 07 STZ $071D [$7E:071D] ; Clear reload Samus sprite flags $82895D 9C 1F 07 STZ $071F [$7E:071F] ;\ $828960 9C 21 07 STZ $0721 [$7E:0721] ;} Clear Samus sprite DMA data pointers $828963 AD 98 09 LDA $0998 [$7E:0998] ;\ $828966 29 FF 00 AND #$00FF ;| $828969 0A ASL A ;} Run gamestate dependant code $82896A AA TAX ;| $82896B FC 81 89 JSR ($8981,x)[$82:8AE4] ;/ $82896E 22 EF 89 82 JSL $8289EF[$82:89EF] ; Sound effects $828972 22 6E 89 80 JSL $80896E[$80:896E] ; Clear OAM (sprites to Y=F0h) $828976 22 B0 8A 82 JSL $828AB0[$82:8AB0] ; A lot of debug stuff, and put $8B into $0DFE $82897A 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $82897E 28 PLP $82897F 80 C7 BRA $C7 [$8948] $828981 dw 8AE4, 8B08, EB9F, 8B0D, 89E5, 89EA, 8000, 8B20, 8B44, E169, E1B7, E288, 8CCF, 8CEF, 90C8, 90E8, 9324, 9367, 93A1, DC80, DCE0, DD71, DD87, DD9A, DDAF, DDC7, 89E0, DC10, 8B3F, 89DB, 8B0E, 8000, 8367, 8388, 8B0E, 8411, 8431, 8B0E, 84BD, 8B13, 8000, 852D, 8548, 8593, 85FB ;;; Gamestate 1Dh ;;; ; Debug menu (end/continue) $8289DB 22 F4 8C 81 JSL $818CF4[$81:8CF4] $8289DF 60 RTS ;;; Gamestate 1Ah ;;; ; Game over screen $8289E0 22 AE 90 81 JSL $8190AE[$81:90AE] $8289E4 60 RTS ;;; Gamestate 04h ;;; ; Save game menus $8289E5 22 FB 93 81 JSL $8193FB[$81:93FB] $8289E9 60 RTS ;;; Gamestate 05h ;;; ; Loading game map view $8289EA 22 3E 9E 81 JSL $819E3E[$81:9E3E] $8289EE 60 RTS ;;; Sound effects ;;; $8289EF 08 PHP $8289F0 E2 30 SEP #$30 $8289F2 AD 86 06 LDA $0686 [$7E:0686] $8289F5 3A DEC A $8289F6 10 13 BPL $13 [$8A0B] $8289F8 A0 00 LDY #$00 $8289FA 5A PHY $8289FB B9 49 06 LDA $0649,y[$7E:0649] $8289FE 0A ASL A $8289FF AA TAX $828A00 FC 22 8A JSR ($8A22,x)[$82:8A2C] $828A03 7A PLY $828A04 C8 INY $828A05 C0 03 CPY #$03 $828A07 90 F1 BCC $F1 [$89FA] $828A09 28 PLP $828A0A 6B RTL $828A0B 8D 86 06 STA $0686 [$7E:0686] $828A0E 9C 41 21 STZ $2141 [$7E:2141] $828A11 9C 4D 06 STZ $064D [$7E:064D] $828A14 9C 42 21 STZ $2142 [$7E:2142] $828A17 9C 4E 06 STZ $064E [$7E:064E] $828A1A 9C 43 21 STZ $2143 [$7E:2143] $828A1D 9C 4F 06 STZ $064F [$7E:064F] $828A20 28 PLP $828A21 6B RTL $828A22 dw 8A2C, 8A55, 8A6C, 8A7C $828A2C BB TYX $828A2D BD 43 06 LDA $0643,x[$7E:0643] $828A30 DD 46 06 CMP $0646,x[$7E:0646] $828A33 F0 1C BEQ $1C [$8A51] $828A35 BF 52 8A 82 LDA $828A52,x[$82:8A54] $828A39 18 CLC $828A3A 7D 43 06 ADC $0643,x[$7E:0645] $828A3D A8 TAY $828A3E B9 56 06 LDA $0656,y[$7E:0676] $828A41 9D 41 21 STA $2141,x[$7E:2143] $828A44 9D 4D 06 STA $064D,x[$7E:064F] $828A47 C8 INY $828A48 98 TYA $828A49 29 0F AND #$0F $828A4B 9D 43 06 STA $0643,x[$7E:0645] $828A4E FE 49 06 INC $0649,x[$7E:064B] $828A51 60 RTS $828A52 db 00, 10, 20 $828A55 BB TYX $828A56 BD 4D 06 LDA $064D,x[$7E:064F] $828A59 DD 41 21 CMP $2141,x[$7E:2143] $828A5C F0 05 BEQ $05 [$8A63] $828A5E 9D 41 21 STA $2141,x[$7E:2143] $828A61 80 08 BRA $08 [$8A6B] $828A63 FE 49 06 INC $0649,x[$7E:064B] $828A66 A9 02 LDA #$02 $828A68 9D 50 06 STA $0650,x[$7E:0652] $828A6B 60 RTS $828A6C BB TYX $828A6D DE 50 06 DEC $0650,x[$7E:0652] $828A70 D0 09 BNE $09 [$8A7B] $828A72 9E 41 21 STZ $2141,x[$7E:2143] $828A75 9E 4D 06 STZ $064D,x[$7E:064F] $828A78 FE 49 06 INC $0649,x[$7E:064B] $828A7B 60 RTS $828A7C BB TYX $828A7D BD 4D 06 LDA $064D,x[$7E:064F] $828A80 DD 41 21 CMP $2141,x[$7E:2143] $828A83 F0 05 BEQ $05 [$8A8A] $828A85 9D 41 21 STA $2141,x[$7E:2143] $828A88 80 05 BRA $05 [$8A8F] $828A8A 9E 49 06 STZ $0649,x[$7E:064B] $828A8D 80 9D BRA $9D [$8A2C] $828A8F 60 RTS $828A9A 08 PHP $828A9B C2 20 REP #$20 $828A9D 9C 43 06 STZ $0643 [$7E:0643] $828AA0 9C 45 06 STZ $0645 [$7E:0645] $828AA3 9C 47 06 STZ $0647 [$7E:0647] $828AA6 9C 49 06 STZ $0649 [$7E:0649] $828AA9 E2 20 SEP #$20 $828AAB 9C 4B 06 STZ $064B [$7E:064B] $828AAE 28 PLP $828AAF 6B RTL $828AB0 08 PHP $828AB1 C2 30 REP #$30 $828AB3 AD C5 05 LDA $05C5 [$7E:05C5] $828AB6 29 00 40 AND #$4000 $828AB9 F0 10 BEQ $10 [$8ACB] $828ACB AD F4 0D LDA $0DF4 [$7E:0DF4] $828ACE F0 0D BEQ $0D [$8ADD] $828ADD A5 8B LDA $8B [$7E:008B] $828ADF 8D FE 0D STA $0DFE [$7E:0DFE] $828AE2 28 PLP $828AE3 6B RTL ;;; Gamestate 00h ;;; ; Reset/Start $828AE4 9C F8 0D STZ $0DF8 [$7E:0DF8] $828AE7 9C FA 0D STZ $0DFA [$7E:0DFA] $828AEA 9C FC 0D STZ $0DFC [$7E:0DFC] $828AED A9 68 9B LDA #$9B68 $828AF0 8D 51 1F STA $1F51 [$7E:1F51] $828AF3 9C 55 1F STZ $1F55 [$7E:1F55] $828AF6 AD 59 1F LDA $1F59 [$7E:1F59] $828AF9 C9 04 00 CMP #$0004 $828AFC D0 06 BNE $06 [$8B04] $828B04 EE 98 09 INC $0998 [$7E:0998] $828B07 60 RTS ;;; Gamestate 01h ;;; ; Opening $828B08 22 22 9A 8B JSL $8B9A22[$8B:9A22] $828B0C 60 RTS ;;; Gamestate 03h ;;; $828B0D 60 RTS ;;; Gamestate 1Eh/22h/25h ;;; ; Set up entirely new game with cutscenes / Ceres goes boom, Samus goes to Zebes / Ceres goes boom with Samus $828B0E 22 5B A3 8B JSL $8BA35B[$8B:A35B] $828B12 60 RTS ;;; Gamestate 27h ;;; ; Ending and credits $828B13 22 43 D4 8B JSL $8BD443[$8B:D443] $828B17 60 RTS ;;; Gamestate 07h ;;; ; Setting game up after loading the game $828B20 08 PHP $828B21 C2 30 REP #$30 $828B23 20 44 8B JSR $8B44 [$82:8B44] $828B26 22 4D 89 80 JSL $80894D[$80:894D] ; Handle fading in $828B2A E2 20 SEP #$20 $828B2C A5 51 LDA $51 [$7E:0051] $828B2E C9 0F CMP #$0F $828B30 D0 0B BNE $0B [$8B3D] $828B32 C2 20 REP #$20 $828B34 9C 23 07 STZ $0723 [$7E:0723] $828B37 9C 25 07 STZ $0725 [$7E:0725] $828B3A EE 98 09 INC $0998 [$7E:0998] $828B3D 28 PLP $828B3E 60 RTS ;;; Gamestate 1Ch ;;; $828B3F ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Gamestate 08h ;;; ; Main gameplay $828B44 08 PHP $828B45 C2 30 REP #$30 $828B47 22 B6 8E A0 JSL $A08EB6[$A0:8EB6] ; Determine which enemies to process $828B4B 22 09 98 B4 JSL $B49809[$B4:9809] ; Debug functions. Does nothing worthwhile normally $828B4F 29 FF FF AND #$FFFF $828B52 D0 4C BNE $4C [$8BA0] ; Debug branch $828B54 22 27 C5 8D JSL $8DC527[$8D:C527] ; Special background lighting. Very rarely used $828B58 22 92 E6 90 JSL $90E692[$90:E692] ; JSR ($0A42) - handles controller input for game physics $828B5C AD 12 0E LDA $0E12 [$7E:0E12] ; Debug enabled only $828B5F D0 04 BNE $04 [$8B65] $828B61 22 85 97 A0 JSL $A09785[$A0:9785] ; Bomb jump routine $828B65 22 D4 8F A0 JSL $A08FD4[$A0:8FD4] ; Enemy routines (but can still be killed by power bombs) $828B69 22 22 E7 90 JSL $90E722[$90:E722] ; Handles Samus' movements and pausing? JSR ($0A44) $828B6D 22 04 81 86 JSL $868104[$86:8104] ; Handles enemy/room projectiles/objects $828B71 22 B4 85 84 JSL $8485B4[$84:85B4] ; Handles PLMs $828B75 22 64 80 87 JSL $878064[$87:8064] ; Handle misc. animations (spikes, FX1) $828B79 AD 12 0E LDA $0E12 [$7E:0E12] $828B7C D0 0C BNE $0C [$8B8A] $828B7E 22 94 98 A0 JSL $A09894[$A0:9894] ; Enemy/Room projectiles/objects collisions with Samus. Only does default routine, no customizable options $828B82 22 6C 99 A0 JSL $A0996C[$A0:996C] ; Enemy/Room projectiles/objects collisions with Samus' projectiles $828B86 22 06 A3 A0 JSL $A0A306[$A0:A306] ; Process enemy power bomb interaction $828B8A 22 EC 94 90 JSL $9094EC[$90:94EC] ; Room scrolling $828B8E AF 06 80 80 LDA $808006[$80:8006] ; Debug scrolling $828B92 F0 04 BEQ $04 [$8B98] $828B94 22 AC A9 80 JSL $80A9AC[$80:A9AC] ; Debug scrolling position saving/loading $828B98 22 4D 88 A0 JSL $A0884D[$A0:884D] ; Something for sprites and sounds $828B9C 22 26 97 A0 JSL $A09726[$A0:9726] ; Something for the graphic update table $828BA0 22 44 9B 80 JSL $809B44[$80:9B44] ; Status bar stuff $828BA4 22 AB A3 80 JSL $80A3AB[$80:A3AB] ; Handles the movement of layer 1 and 2 $828BA8 22 BD E8 8F JSL $8FE8BD[$8F:E8BD] ; Handles background graphics $828BAC 20 69 DB JSR $DB69 [$82:DB69] ; Handles game time. And kills Samus (!) $828BAF 22 87 86 A0 JSL $A08687[$A0:8687] ; Handle room shaking $828BB3 22 69 91 A0 JSL $A09169[$A0:9169] ; Handles Samus getting hurt? $828BB7 28 PLP $828BB8 60 RTS $828BB9 08 PHP $828BBA C2 30 REP #$30 $828BBC A2 0E 00 LDX #$000E $828BBF 9E 9D 1A STZ $1A9D,x[$7E:1AAB] $828BC2 9E FD 1A STZ $1AFD,x[$7E:1B0B] $828BC5 CA DEX $828BC6 CA DEX $828BC7 10 F6 BPL $F6 [$8BBF] $828BC9 28 PLP $828BCA 60 RTS $828BCB 08 PHP $828BCC C2 30 REP #$30 $828BCE DA PHX $828BCF 8D 93 1A STA $1A93 [$7E:1A93] $828BD2 BB TYX $828BD3 A0 0E 00 LDY #$000E $828BD6 B9 FD 1A LDA $1AFD,y[$7E:1B0B] $828BD9 F0 08 BEQ $08 [$8BE3] $828BDB 88 DEY $828BDC 88 DEY $828BDD 10 F7 BPL $F7 [$8BD6] $828BE3 C2 30 REP #$30 $828BE5 BD 02 00 LDA $0002,x[$82:F4BA] $828BE8 99 0D 1B STA $1B0D,y[$7E:1B1B] $828BEB BD 04 00 LDA $0004,x[$82:F4BC] $828BEE 99 FD 1A STA $1AFD,y[$7E:1B0B] $828BF1 A9 01 00 LDA #$0001 $828BF4 99 1D 1B STA $1B1D,y[$7E:1B2B] $828BF7 A9 00 00 LDA #$0000 $828BFA 99 9D 1A STA $1A9D,y[$7E:1AAB] $828BFD A9 00 00 LDA #$0000 $828C00 99 2D 1B STA $1B2D,y[$7E:1B3B] $828C03 99 DD 1A STA $1ADD,y[$7E:1AEB] $828C06 99 ED 1A STA $1AED,y[$7E:1AFB] $828C09 FC 00 00 JSR ($0000,x)[$82:F296] $828C0C FA PLX $828C0D 28 PLP $828C0E 18 CLC $828C0F 60 RTS $828C10 60 RTS $828C11 08 PHP $828C12 C2 30 REP #$30 $828C14 A2 0E 00 LDX #$000E $828C17 8E 8F 1A STX $1A8F [$7E:1A8F] $828C1A BD FD 1A LDA $1AFD,x[$7E:1B0B] $828C1D F0 06 BEQ $06 [$8C25] $828C1F 20 2B 8C JSR $8C2B [$82:8C2B] $828C22 AE 8F 1A LDX $1A8F [$7E:1A8F] $828C25 CA DEX $828C26 CA DEX $828C27 10 EE BPL $EE [$8C17] $828C29 28 PLP $828C2A 60 RTS $828C2B FC 0D 1B JSR ($1B0D,x)[$82:F2A9] $828C2E AE 8F 1A LDX $1A8F [$7E:1A8F] $828C31 DE 1D 1B DEC $1B1D,x[$7E:1B2B] $828C34 D0 23 BNE $23 [$8C59] $828C36 BC FD 1A LDY $1AFD,x[$7E:1B0B] $828C39 B9 00 00 LDA $0000,y[$82:F442] $828C3C 10 0A BPL $0A [$8C48] $828C3E 85 12 STA $12 [$7E:0012] $828C40 C8 INY $828C41 C8 INY $828C42 F4 38 8C PEA $8C38 $828C45 6C 12 00 JMP ($0012)[$82:8C6E] $828C48 9D 1D 1B STA $1B1D,x[$7E:1B2B] $828C4B B9 02 00 LDA $0002,y[$82:F444] $828C4E 9D 9D 1A STA $1A9D,x[$7E:1AAB] $828C51 98 TYA $828C52 18 CLC $828C53 69 04 00 ADC #$0004 $828C56 9D FD 1A STA $1AFD,x[$7E:1B0B] $828C59 60 RTS $828C5A C2 30 REP #$30 $828C5C 9E 9D 1A STZ $1A9D,x[$7E:1AA9] $828C5F 9E FD 1A STZ $1AFD,x[$7E:1B09] $828C62 68 PLA $828C63 60 RTS $828C6E C2 30 REP #$30 $828C70 B9 00 00 LDA $0000,y[$82:F484] $828C73 9D 0D 1B STA $1B0D,x[$7E:1B19] $828C76 C8 INY $828C77 C8 INY $828C78 60 RTS $828C82 C2 30 REP #$30 $828C84 B9 00 00 LDA $0000,y[$82:F454] $828C87 A8 TAY $828C88 60 RTS $828CA1 08 PHP $828CA2 C2 30 REP #$30 $828CA4 8B PHB $828CA5 A2 0E 00 LDX #$000E $828CA8 BD 9D 1A LDA $1A9D,x[$7E:1AAB] $828CAB F0 1B BEQ $1B [$8CC8] $828CAD F4 00 82 PEA $8200 $828CB0 AB PLB $828CB1 AB PLB $828CB2 BC 9D 1A LDY $1A9D,x[$7E:1AAB] $828CB5 BD CD 1A LDA $1ACD,x[$7E:1ADB] $828CB8 85 16 STA $16 [$7E:0016] $828CBA BD AD 1A LDA $1AAD,x[$7E:1ABB] $828CBD 85 14 STA $14 [$7E:0014] $828CBF BD BD 1A LDA $1ABD,x[$7E:1ACB] $828CC2 85 12 STA $12 [$7E:0012] $828CC4 22 9F 87 81 JSL $81879F[$81:879F] $828CC8 CA DEX $828CC9 CA DEX $828CCA 10 DC BPL $DC [$8CA8] $828CCC AB PLB $828CCD 28 PLP $828CCE 60 RTS ;;; Gamestate 0Ch ;;; ; Pausing (normal gameplay but darkening) $828CCF 08 PHP $828CD0 C2 30 REP #$30 $828CD2 20 44 8B JSR $8B44 [$82:8B44] ; Main engine for main gameplay $828CD5 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $828CD9 A5 51 LDA $51 [$7E:0051] ; Screen brightness $828CDB 29 0F 00 AND #$000F $828CDE D0 0D BNE $0D [$8CED] ; If screen isn't fully black, don't pause $828CE0 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $828CE4 9C 23 07 STZ $0723 [$7E:0723] $828CE7 9C 25 07 STZ $0725 [$7E:0725] $828CEA EE 98 09 INC $0998 [$7E:0998] ; Set next game state for pausing $828CED 28 PLP $828CEE 60 RTS ;;; Gamestate 0Dh ;;; ; Paused, loading pause screen $828CEF 08 PHP $828CF0 C2 30 REP #$30 $828CF2 8B PHB $828CF3 4B PHK $828CF4 AB PLB $828CF5 22 93 82 88 JSL $888293[$88:8293] $828CF9 E2 20 SEP #$20 $828CFB A9 00 LDA #$00 $828CFD 85 85 STA $85 [$7E:0085] $828CFF 8D 0C 42 STA $420C [$7E:420C] $828D02 C2 20 REP #$20 $828D04 22 0B 80 87 JSL $87800B[$87:800B] $828D08 20 51 8D JSR $8D51 [$82:8D51] $828D0B 08 PHP $828D0C 8B PHB $828D0D 4B PHK $828D0E F4 13 8D PEA $8D13 $828D11 DC 01 06 JML [$0601][$88:83E1] $828D14 AB PLB $828D15 28 PLP $828D16 22 17 BE 82 JSL $82BE17[$82:BE17] $828D1A 20 BD 8D JSR $8DBD [$82:8DBD] $828D1D 22 75 8E 82 JSL $828E75[$82:8E75] $828D21 22 DA 8E 82 JSL $828EDA[$82:8EDA] $828D25 22 C3 93 82 JSL $8293C3[$82:93C3] ; Updates/loads the map and area $828D29 20 D4 8F JSR $8FD4 [$82:8FD4] $828D2C 20 09 90 JSR $9009 [$82:9009] $828D2F A9 01 00 LDA #$0001 $828D32 8D 23 07 STA $0723 [$7E:0723] $828D35 8D 25 07 STA $0725 [$7E:0725] $828D38 9C 4D 07 STZ $074D [$7E:074D] $828D3B A9 01 00 LDA #$0001 $828D3E 8D 3B 07 STA $073B [$7E:073B] $828D41 9C FD 05 STZ $05FD [$7E:05FD] $828D44 9C FF 05 STZ $05FF [$7E:05FF] $828D47 22 11 A2 80 JSL $80A211[$80:A211] ; Add VRAM $5880..677F = 184Eh $828D4B EE 98 09 INC $0998 [$7E:0998] ; Set next game state for pausing $828D4E AB PLB $828D4F 28 PLP $828D50 60 RTS ;;; ;;; $828D51 08 PHP $828D52 E2 20 SEP #$20 $828D54 A9 01 LDA #$01 $828D56 8D 16 21 STA $2116 [$7E:2116] $828D59 A5 59 LDA $59 [$7E:0059] $828D5B 29 FC AND #$FC $828D5D 8D 17 21 STA $2117 [$7E:2117] $828D60 A9 81 LDA #$81 $828D62 8D 10 43 STA $4310 [$7E:4310] $828D65 A9 39 LDA #$39 $828D67 8D 11 43 STA $4311 [$7E:4311] $828D6A A9 5C LDA #$5C $828D6C 8D 12 43 STA $4312 [$7E:4312] $828D6F A9 DF LDA #$DF $828D71 8D 13 43 STA $4313 [$7E:4313] $828D74 A9 7E LDA #$7E $828D76 8D 14 43 STA $4314 [$7E:4314] $828D79 A9 00 LDA #$00 $828D7B 8D 15 43 STA $4315 [$7E:4315] $828D7E A9 10 LDA #$10 $828D80 8D 16 43 STA $4316 [$7E:4316] $828D83 9C 17 43 STZ $4317 [$7E:4317] $828D86 9C 18 43 STZ $4318 [$7E:4318] $828D89 9C 19 43 STZ $4319 [$7E:4319] $828D8C 9C 1A 43 STZ $431A [$7E:431A] $828D8F A9 02 LDA #$02 $828D91 8D 0B 42 STA $420B [$7E:420B] $828D94 28 PLP $828D95 60 RTS ;;; ;;; $828D96 08 PHP $828D97 E2 20 SEP #$20 $828D99 A9 00 LDA #$00 $828D9B 8D 16 21 STA $2116 [$7E:2116] $828D9E A5 59 LDA $59 [$7E:0059] $828DA0 29 FC AND #$FC $828DA2 8D 17 21 STA $2117 [$7E:2117] $828DA5 A9 80 LDA #$80 $828DA7 8D 15 21 STA $2115 [$7E:2115] $828DAA 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828DAE db 01, 01, 18, 5C, DF, 7E, 00, 10 $828DB6 A9 02 LDA #$02 $828DB8 8D 0B 42 STA $420B [$7E:420B] $828DBB 28 PLP $828DBC 60 RTS ;;; ;;; $828DBD 08 PHP $828DBE E2 20 SEP #$20 $828DC0 A5 58 LDA $58 [$7E:0058] $828DC2 8D 65 07 STA $0765 [$7E:0765] $828DC5 A5 59 LDA $59 [$7E:0059] $828DC7 8D 66 07 STA $0766 [$7E:0766] $828DCA A5 5A LDA $5A [$7E:005A] $828DCC 8D 67 07 STA $0767 [$7E:0767] $828DCF A5 5D LDA $5D [$7E:005D] $828DD1 8D 68 07 STA $0768 [$7E:0768] $828DD4 A5 5E LDA $5E [$7E:005E] $828DD6 8D 69 07 STA $0769 [$7E:0769] $828DD9 A5 52 LDA $52 [$7E:0052] $828DDB 8D 6A 07 STA $076A [$7E:076A] $828DDE A5 B1 LDA $B1 [$7E:00B1] $828DE0 8D 6B 07 STA $076B [$7E:076B] $828DE3 A5 B5 LDA $B5 [$7E:00B5] $828DE5 8D 6C 07 STA $076C [$7E:076C] $828DE8 A5 B9 LDA $B9 [$7E:00B9] $828DEA 8D 6D 07 STA $076D [$7E:076D] $828DED A5 B3 LDA $B3 [$7E:00B3] $828DEF 8D 6E 07 STA $076E [$7E:076E] $828DF2 A5 B7 LDA $B7 [$7E:00B7] $828DF4 8D 6F 07 STA $076F [$7E:076F] $828DF7 A5 BB LDA $BB [$7E:00BB] $828DF9 8D 70 07 STA $0770 [$7E:0770] $828DFC A5 55 LDA $55 [$7E:0055] $828DFE 8D 71 07 STA $0771 [$7E:0771] $828E01 AD 1B 09 LDA $091B [$7E:091B] $828E04 8D 72 07 STA $0772 [$7E:0772] $828E07 AD 1C 09 LDA $091C [$7E:091C] $828E0A 8D 73 07 STA $0773 [$7E:0773] $828E0D A5 57 LDA $57 [$7E:0057] $828E0F 8D 74 07 STA $0774 [$7E:0774] $828E12 A5 71 LDA $71 [$7E:0071] $828E14 8D 75 07 STA $0775 [$7E:0775] $828E17 28 PLP $828E18 60 RTS $828E19 08 PHP $828E1A E2 20 SEP #$20 $828E1C AD 72 07 LDA $0772 [$7E:0772] $828E1F 8D 1B 09 STA $091B [$7E:091B] $828E22 AD 73 07 LDA $0773 [$7E:0773] $828E25 8D 1C 09 STA $091C [$7E:091C] $828E28 AD 71 07 LDA $0771 [$7E:0771] $828E2B 85 55 STA $55 [$7E:0055] $828E2D AD 70 07 LDA $0770 [$7E:0770] $828E30 85 BB STA $BB [$7E:00BB] $828E32 AD 6F 07 LDA $076F [$7E:076F] $828E35 85 B7 STA $B7 [$7E:00B7] $828E37 AD 6E 07 LDA $076E [$7E:076E] $828E3A 85 B3 STA $B3 [$7E:00B3] $828E3C AD 6D 07 LDA $076D [$7E:076D] $828E3F 85 B9 STA $B9 [$7E:00B9] $828E41 AD 6C 07 LDA $076C [$7E:076C] $828E44 85 B5 STA $B5 [$7E:00B5] $828E46 AD 6B 07 LDA $076B [$7E:076B] $828E49 85 B1 STA $B1 [$7E:00B1] $828E4B AD 6A 07 LDA $076A [$7E:076A] $828E4E 85 52 STA $52 [$7E:0052] $828E50 AD 69 07 LDA $0769 [$7E:0769] $828E53 85 5E STA $5E [$7E:005E] $828E55 AD 68 07 LDA $0768 [$7E:0768] $828E58 85 5D STA $5D [$7E:005D] $828E5A AD 67 07 LDA $0767 [$7E:0767] $828E5D 85 5A STA $5A [$7E:005A] $828E5F AD 66 07 LDA $0766 [$7E:0766] $828E62 85 59 STA $59 [$7E:0059] $828E64 AD 65 07 LDA $0765 [$7E:0765] $828E67 85 58 STA $58 [$7E:0058] $828E69 AD 74 07 LDA $0774 [$7E:0774] $828E6C 85 57 STA $57 [$7E:0057] $828E6E AD 75 07 LDA $0775 [$7E:0775] $828E71 85 71 STA $71 [$7E:0071] $828E73 28 PLP $828E74 60 RTS $828E75 08 PHP $828E76 E2 30 SEP #$30 $828E78 A9 00 LDA #$00 $828E7A 8D 16 21 STA $2116 [$7E:2116] $828E7D A9 00 LDA #$00 $828E7F 8D 17 21 STA $2117 [$7E:2117] $828E82 A9 80 LDA #$80 $828E84 8D 15 21 STA $2115 [$7E:2115] $828E87 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828E8B db 01, 01, 18, 00, 80, B6, 00, 40 $828E93 A9 02 LDA #$02 $828E95 8D 0B 42 STA $420B [$7E:420B] $828E98 A9 00 LDA #$00 $828E9A 8D 16 21 STA $2116 [$7E:2116] $828E9D A9 20 LDA #$20 $828E9F 8D 17 21 STA $2117 [$7E:2117] $828EA2 A9 80 LDA #$80 $828EA4 8D 15 21 STA $2115 [$7E:2115] $828EA7 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828EAB db 01, 01, 18, 00, C0, B6, 00, 20 $828EB3 A9 02 LDA #$02 $828EB5 8D 0B 42 STA $420B [$7E:420B] $828EB8 A9 00 LDA #$00 $828EBA 8D 16 21 STA $2116 [$7E:2116] $828EBD A9 40 LDA #$40 $828EBF 8D 17 21 STA $2117 [$7E:2117] $828EC2 A9 80 LDA #$80 $828EC4 8D 15 21 STA $2115 [$7E:2115] $828EC7 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828ECB db 01, 01, 18, 00, B2, 9A, 00, 20 $828ED3 A9 02 LDA #$02 $828ED5 8D 0B 42 STA $420B [$7E:420B] $828ED8 28 PLP $828ED9 6B RTL $828EDA 08 PHP $828EDB E2 30 SEP #$30 $828EDD A9 00 LDA #$00 $828EDF 8D 16 21 STA $2116 [$7E:2116] $828EE2 A9 38 LDA #$38 $828EE4 8D 17 21 STA $2117 [$7E:2117] $828EE7 A9 80 LDA #$80 $828EE9 8D 15 21 STA $2115 [$7E:2115] $828EEC 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828EF0 db 01, 01, 18, 00, E0, B6, 00, 08 $828EF8 A9 02 LDA #$02 $828EFA 8D 0B 42 STA $420B [$7E:420B] $828EFD A9 00 LDA #$00 $828EFF 8D 81 21 STA $2181 [$7E:2181] $828F02 A9 34 LDA #$34 $828F04 8D 82 21 STA $2182 [$7E:2182] $828F07 A9 7E LDA #$7E $828F09 8D 83 21 STA $2183 [$7E:2183] $828F0C 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828F10 db 01, 00, 80, 00, E4, B6, 00, 04 $828F18 A9 02 LDA #$02 $828F1A 8D 0B 42 STA $420B [$7E:420B] $828F1D A9 00 LDA #$00 $828F1F 8D 81 21 STA $2181 [$7E:2181] $828F22 A9 38 LDA #$38 $828F24 8D 82 21 STA $2182 [$7E:2182] $828F27 A9 7E LDA #$7E $828F29 8D 83 21 STA $2183 [$7E:2183] $828F2C 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $828F30 db 01, 00, 80, 00, E8, B6, 00, 08 $828F38 A9 02 LDA #$02 $828F3A 8D 0B 42 STA $420B [$7E:420B] $828F3D C2 30 REP #$30 $828F3F A0 39 C6 LDY #$C639 $828F42 A2 D8 01 LDX #$01D8 $828F45 A9 11 00 LDA #$0011 $828F48 85 14 STA $14 [$7E:0014] $828F4A A9 08 00 LDA #$0008 $828F4D 85 12 STA $12 [$7E:0012] $828F4F B9 00 00 LDA $0000,y[$82:C639] $828F52 9F 00 30 7E STA $7E3000,x[$7E:31D8] $828F56 E8 INX $828F57 E8 INX $828F58 C8 INY $828F59 C8 INY $828F5A C6 12 DEC $12 [$7E:0012] $828F5C D0 F1 BNE $F1 [$8F4F] $828F5E 8A TXA $828F5F 18 CLC $828F60 69 10 00 ADC #$0010 $828F63 AA TAX $828F64 C6 14 DEC $14 [$7E:0014] $828F66 D0 E2 BNE $E2 [$8F4A] $828F68 20 0C B2 JSR $B20C [$82:B20C] $828F6B 20 70 8F JSR $8F70 [$82:8F70] $828F6E 28 PLP $828F6F 6B RTL ;;; Writes the number next to your reserve amount in the pause screen ;;; $828F70 08 PHP $828F71 C2 30 REP #$30 $828F73 AD D4 09 LDA $09D4 [$7E:09D4] $828F76 F0 5A BEQ $5A [$8FD2] $828F78 AD D6 09 LDA $09D6 [$7E:09D6] $828F7B 8D 04 42 STA $4204 [$7E:4204] $828F7E E2 20 SEP #$20 $828F80 A9 64 LDA #$64 $828F82 8D 06 42 STA $4206 [$7E:4206] $828F85 EA NOP $828F86 EA NOP $828F87 EA NOP $828F88 EA NOP $828F89 EA NOP $828F8A EA NOP $828F8B EA NOP $828F8C EA NOP $828F8D EA NOP $828F8E AD 14 42 LDA $4214 [$7E:4214] $828F91 85 2A STA $2A [$7E:002A] $828F93 AD 15 42 LDA $4215 [$7E:4215] $828F96 85 2B STA $2B [$7E:002B] $828F98 AD 16 42 LDA $4216 [$7E:4216] $828F9B 8D 04 42 STA $4204 [$7E:4204] $828F9E AD 17 42 LDA $4217 [$7E:4217] $828FA1 8D 05 42 STA $4205 [$7E:4205] $828FA4 A9 0A LDA #$0A $828FA6 8D 06 42 STA $4206 [$7E:4206] $828FA9 C2 20 REP #$20 $828FAB EA NOP $828FAC EA NOP $828FAD EA NOP $828FAE EA NOP $828FAF EA NOP $828FB0 EA NOP $828FB1 EA NOP $828FB2 AD 16 42 LDA $4216 [$7E:4216] $828FB5 18 CLC $828FB6 69 04 08 ADC #$0804 $828FB9 8F 14 3B 7E STA $7E3B14[$7E:3B14] $828FBD AD 14 42 LDA $4214 [$7E:4214] $828FC0 18 CLC $828FC1 69 04 08 ADC #$0804 $828FC4 8F 12 3B 7E STA $7E3B12[$7E:3B12] $828FC8 A5 2A LDA $2A [$7E:002A] $828FCA 18 CLC $828FCB 69 04 08 ADC #$0804 $828FCE 8F 10 3B 7E STA $7E3B10[$7E:3B10] $828FD2 28 PLP $828FD3 60 RTS $828FD4 08 PHP $828FD5 E2 30 SEP #$30 $828FD7 08 PHP $828FD8 C2 30 REP #$30 $828FDA A0 00 02 LDY #$0200 $828FDD A2 00 00 LDX #$0000 $828FE0 BF 00 C0 7E LDA $7EC000,x[$7E:C000] $828FE4 9F 00 33 7E STA $7E3300,x[$7E:3300] $828FE8 E8 INX $828FE9 E8 INX $828FEA 88 DEY $828FEB 88 DEY $828FEC D0 F2 BNE $F2 [$8FE0] $828FEE 28 PLP $828FEF 08 PHP $828FF0 C2 30 REP #$30 $828FF2 A0 00 02 LDY #$0200 $828FF5 A2 00 00 LDX #$0000 $828FF8 BF 00 F0 B6 LDA $B6F000,x[$B6:F000] $828FFC 9F 00 C0 7E STA $7EC000,x[$7E:C000] $829000 E8 INX $829001 E8 INX $829002 88 DEY $829003 88 DEY $829004 D0 F2 BNE $F2 [$8FF8] $829006 28 PLP $829007 28 PLP $829008 60 RTS $829009 08 PHP $82900A 8B PHB $82900B 4B PHK $82900C AB PLB $82900D 20 9A A0 JSR $A09A [$82:A09A] $829010 20 F7 A0 JSR $A0F7 [$82:A0F7] $829013 20 2B A1 JSR $A12B [$82:A12B] $829016 20 96 A7 JSR $A796 [$82:A796] $829019 20 4D A8 JSR $A84D [$82:A84D] $82901C 20 C4 9E JSR $9EC4 [$82:9EC4] $82901F A9 80 00 LDA #$0080 $829022 20 27 9E JSR $9E27 [$82:9E27] $829025 AB PLB $829026 28 PLP $829027 60 RTS $829028 20 F7 A0 JSR $A0F7 [$82:A0F7] $82902B 20 C4 9E JSR $9EC4 [$82:9EC4] $82902E AD AE 05 LDA $05AE [$7E:05AE] $829031 38 SEC $829032 ED AC 05 SBC $05AC [$7E:05AC] $829035 4A LSR A $829036 18 CLC $829037 6D AC 05 ADC $05AC [$7E:05AC] $82903A 38 SEC $82903B E9 80 00 SBC #$0080 $82903E 85 B1 STA $B1 [$7E:00B1] $829040 AD F6 0A LDA $0AF6 [$7E:0AF6] $829043 29 00 FF AND #$FF00 $829046 EB XBA $829047 18 CLC $829048 6D A1 07 ADC $07A1 [$7E:07A1] $82904B 0A ASL A $82904C 0A ASL A $82904D 0A ASL A $82904E 38 SEC $82904F E5 B1 SBC $B1 [$7E:00B1] $829051 85 12 STA $12 [$7E:0012] $829053 A9 E0 00 LDA #$00E0 $829056 38 SEC $829057 E5 12 SBC $12 [$7E:0012] $829059 10 0B BPL $0B [$9066] $829066 A9 20 00 LDA #$0020 $829069 38 SEC $82906A E5 12 SBC $12 [$7E:0012] $82906C 85 12 STA $12 [$7E:0012] $82906E 30 07 BMI $07 [$9077] $829077 AD B2 05 LDA $05B2 [$7E:05B2] $82907A 38 SEC $82907B ED B0 05 SBC $05B0 [$7E:05B0] $82907E 4A LSR A $82907F 18 CLC $829080 69 10 00 ADC #$0010 $829083 18 CLC $829084 6D B0 05 ADC $05B0 [$7E:05B0] $829087 85 12 STA $12 [$7E:0012] $829089 A9 70 00 LDA #$0070 $82908C 38 SEC $82908D E5 12 SBC $12 [$7E:0012] $82908F 29 F8 FF AND #$FFF8 $829092 49 FF FF EOR #$FFFF $829095 1A INC A $829096 85 B3 STA $B3 [$7E:00B3] $829098 AD FA 0A LDA $0AFA [$7E:0AFA] $82909B EB XBA $82909C 29 FF 00 AND #$00FF $82909F 18 CLC $8290A0 6D A3 07 ADC $07A3 [$7E:07A3] $8290A3 1A INC A $8290A4 0A ASL A $8290A5 0A ASL A $8290A6 0A ASL A $8290A7 38 SEC $8290A8 E5 B3 SBC $B3 [$7E:00B3] $8290AA 85 12 STA $12 [$7E:0012] $8290AC A9 40 00 LDA #$0040 $8290AF 38 SEC $8290B0 E5 12 SBC $12 [$7E:0012] $8290B2 30 13 BMI $13 [$90C7] $8290C7 6B RTL ;;; Gamestate 0Eh ;;; ; Paused, loading pause screen $8290C8 08 PHP $8290C9 C2 30 REP #$30 $8290CB 22 2B B6 82 JSL $82B62B[$82:B62B] $8290CF 22 4D 89 80 JSL $80894D[$80:894D] ; Handle fading in $8290D3 E2 20 SEP #$20 $8290D5 A5 51 LDA $51 [$7E:0051] ; Screen brightness $8290D7 C9 0F CMP #$0F $8290D9 D0 0B BNE $0B [$90E6] ; If not fully bright, skip changing states $8290DB C2 20 REP #$20 $8290DD 9C 23 07 STZ $0723 [$7E:0723] $8290E0 9C 25 07 STZ $0725 [$7E:0725] $8290E3 EE 98 09 INC $0998 [$7E:0998] ; Set next game state for pausing $8290E6 28 PLP $8290E7 60 RTS ;;; Gamestate 0Fh ;;; ; Paused, map and item screens $8290E8 8B PHB $8290E9 4B PHK $8290EA AB PLB $8290EB A9 03 00 LDA #$0003 ;\ $8290EE 22 46 81 80 JSL $808146[$80:8146] ;} Update held input (for three frames) $8290F2 22 FF 90 82 JSL $8290FF[$82:90FF] ; Main pause routine $8290F6 22 44 9B 80 JSL $809B44[$80:9B44] ; HUD routine when game is paused/running $8290FA 20 2B A9 JSR $A92B [$82:A92B] ; Causes the flashing palettes for the selection box on the status screen, the arrows on the map, etc $8290FD AB PLB $8290FE 60 RTS ;;; Main pause routine ;;; $8290FF 08 PHP $829100 8B PHB $829101 4B PHK $829102 AB PLB $829103 C2 30 REP #$30 $829105 AD 27 07 LDA $0727 [$7E:0727] ; Pause index $829108 0A ASL A $829109 AA TAX $82910A FC 10 91 JSR ($9110,x)[$82:9120] ; Run pause index dependant code $82910D AB PLB $82910E 28 PLP $82910F 6B RTL $829110 dw 9120, 9142, 9156, 91AB, 9231, 9186, 91D7, 9200 ;;; Map screen ;;; $829120 C2 30 REP #$30 $829122 20 05 A5 JSR $A505 [$82:A505] $829125 20 B7 A5 JSR $A5B7 [$82:A5B7] $829128 22 34 B9 82 JSL $82B934[$82:B934] $82912C 22 5D 92 82 JSL $82925D[$82:925D] $829130 20 C8 B9 JSR $B9C8 [$82:B9C8] $829133 22 72 B6 82 JSL $82B672[$82:B672] $829137 22 30 BB 82 JSL $82BB30[$82:BB30] $82913B A9 00 00 LDA #$0000 $82913E 8D 63 07 STA $0763 [$7E:0763] $829141 60 RTS ;;; Status screen ;;; $829142 64 B1 STZ $B1 [$7E:00B1] $829144 64 B3 STZ $B3 [$7E:00B3] $829146 20 4F AC JSR $AC4F [$82:AC4F] $829149 20 05 A5 JSR $A505 [$82:A505] $82914C 20 B7 A5 JSR $A5B7 [$82:A5B7] $82914F A9 01 00 LDA #$0001 $829152 8D 63 07 STA $0763 [$7E:0763] $829155 60 RTS ;;; Map out ;;; $829156 22 30 BB 82 JSL $82BB30[$82:BB30] $82915A 20 C8 B9 JSR $B9C8 [$82:B9C8] $82915D 22 72 B6 82 JSL $82B672[$82:B672] $829161 20 6D A5 JSR $A56D [$82:A56D] $829164 A9 00 00 LDA #$0000 $829167 8D 63 07 STA $0763 [$7E:0763] $82916A 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $82916E E2 20 SEP #$20 $829170 A5 51 LDA $51 [$7E:0051] $829172 C9 80 CMP #$80 $829174 D0 0F BNE $0F [$9185] $829176 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $82917A C2 20 REP #$20 $82917C 9C 23 07 STZ $0723 [$7E:0723] $82917F 9C 25 07 STZ $0725 [$7E:0725] $829182 EE 27 07 INC $0727 [$7E:0727] $829185 60 RTS ;;; Status out ;;; $829186 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load status ;;; $8291AB C2 30 REP #$30 $8291AD 22 30 BB 82 JSL $82BB30[$82:BB30] $8291B1 20 47 AB JSR $AB47 [$82:AB47] $8291B4 22 22 AC 82 JSL $82AC22[$82:AC22] $8291B8 A9 01 00 LDA #$0001 $8291BB 8D 63 07 STA $0763 [$7E:0763] $8291BE 20 15 A6 JSR $A615 [$82:A615] $8291C1 9C 3F 07 STZ $073F [$7E:073F] $8291C4 AD 0C C1 LDA $C10C [$82:C10C] $8291C7 8D 2B 07 STA $072B [$7E:072B] $8291CA A9 01 00 LDA #$0001 $8291CD 8D 23 07 STA $0723 [$7E:0723] $8291D0 8D 25 07 STA $0725 [$7E:0725] $8291D3 EE 27 07 INC $0727 [$7E:0727] $8291D6 60 RTS ;;; Load map ;;; $8291D7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Map in ;;; $829200 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Status in ;;; $829231 20 67 B2 JSR $B267 [$82:B267] $829234 20 A2 B2 JSR $B2A2 [$82:B2A2] $829237 A9 01 00 LDA #$0001 $82923A 8D 63 07 STA $0763 [$7E:0763] $82923D 22 4D 89 80 JSL $80894D[$80:894D] ; Handle fading in $829241 E2 20 SEP #$20 $829243 A5 51 LDA $51 [$7E:0051] $829245 C9 0F CMP #$0F $829247 D0 13 BNE $13 [$925C] $829249 C2 20 REP #$20 $82924B 9C 23 07 STZ $0723 [$7E:0723] $82924E 9C 25 07 STZ $0725 [$7E:0725] $829251 AD 53 07 LDA $0753 [$7E:0753] $829254 F0 03 BEQ $03 [$9259] $829256 A9 01 00 LDA #$0001 $829259 8D 27 07 STA $0727 [$7E:0727] $82925C 60 RTS ;;; Map scrolling ;;; $82925D 08 PHP $82925E 8B PHB $82925F 4B PHK $829260 AB PLB $829261 C2 30 REP #$30 $829263 AD FD 05 LDA $05FD [$7E:05FD] ; Direction pressed in map screen $829266 0A ASL A $829267 AA TAX $829268 FC 6E 92 JSR ($926E,x)[$82:9278] ; Execute direction dependant code $82926B AB PLB $82926C 28 PLP $82926D 6B RTL $82926E dw 9278, 928E, 92BD, 92CA, 92D7 ;;; Map scrolling: no direction ;;; $829278 A9 04 00 LDA #$0004 $82927B 8D FB 05 STA $05FB [$7E:05FB] ; Controls map speed? $82927E 60 RTS ;;; ;;; ; Returns: X = [$05FB] ? [$05FF] : [$05FF] + 20h $82927F AE FF 05 LDX $05FF [$7E:05FF] $829282 AD FB 05 LDA $05FB [$7E:05FB] $829285 D0 06 BNE $06 [$928D] $829287 8A TXA $829288 18 CLC $829289 69 20 00 ADC #$0020 $82928C AA TAX $82928D 60 RTS ;;; Map scrolling: Left ;;; $82928E 20 7F 92 JSR $927F [$82:927F] $829291 A5 B1 LDA $B1 [$7E:00B1] $829293 38 SEC $829294 FD E4 92 SBC $92E4,x[$82:92E4] $829297 85 B1 STA $B1 [$7E:00B1] ; Direction independant code $829299 EE FF 05 INC $05FF [$7E:05FF] $82929C EE FF 05 INC $05FF [$7E:05FF] $82929F AD FF 05 LDA $05FF [$7E:05FF] $8292A2 29 0F 00 AND #$000F $8292A5 D0 15 BNE $15 [$92BC] $8292A7 A9 36 00 LDA #$0036 ;\ $8292AA 22 49 90 80 JSL $809049[$80:9049] ;} Play scrolling sound $8292AE 9C FD 05 STZ $05FD [$7E:05FD] $8292B1 9C FF 05 STZ $05FF [$7E:05FF] $8292B4 AD FB 05 LDA $05FB [$7E:05FB] $8292B7 F0 03 BEQ $03 [$92BC] $8292B9 CE FB 05 DEC $05FB [$7E:05FB] $8292BC 60 RTS ;;; Map scrolling: Right ;;; $8292BD 20 7F 92 JSR $927F [$82:927F] $8292C0 BD E4 92 LDA $92E4,x[$82:92E4] $8292C3 18 CLC $8292C4 65 B1 ADC $B1 [$7E:00B1] $8292C6 85 B1 STA $B1 [$7E:00B1] $8292C8 80 CF BRA $CF [$9299] ;;; Map scrolling: Up $8292CA 20 7F 92 JSR $927F [$82:927F] $8292CD A5 B3 LDA $B3 [$7E:00B3] $8292CF 38 SEC $8292D0 FD E4 92 SBC $92E4,x[$82:92E4] $8292D3 85 B3 STA $B3 [$7E:00B3] $8292D5 80 C2 BRA $C2 [$9299] ;;; Map scrolling: Down $8292D7 20 7F 92 JSR $927F [$82:927F] $8292DA BD E4 92 LDA $92E4,x[$82:92E4] $8292DD 18 CLC $8292DE 65 B3 ADC $B3 [$7E:00B3] $8292E0 85 B3 STA $B3 [$7E:00B3] $8292E2 80 B5 BRA $B5 [$9299] $8292E4 dw 0000, 0000, 0000, 0008, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000 $829304 dw 0000, 0000, 0000, 0008, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000 ;;; Gamestate 10h ;;; ; Unpausing (loading normal gameplay) $829324 08 PHP $829325 C2 30 REP #$30 $829327 22 F1 A5 82 JSL $82A5F1[$82:A5F1] $82932B 20 4B 93 JSR $934B [$82:934B] $82932E 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $829332 E2 20 SEP #$20 $829334 A5 51 LDA $51 [$7E:0051] $829336 C9 80 CMP #$80 $829338 D0 0F BNE $0F [$9349] $82933A 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $82933E C2 20 REP #$20 $829340 9C 23 07 STZ $0723 [$7E:0723] $829343 9C 25 07 STZ $0725 [$7E:0725] $829346 EE 98 09 INC $0998 [$7E:0998] $829349 28 PLP $82934A 60 RTS ;;; ;;; $82934B AD 63 07 LDA $0763 [$7E:0763] $82934E C9 01 00 CMP #$0001 $829351 F0 0B BEQ $0B [$935E] $829353 22 30 BB 82 JSL $82BB30[$82:BB30] $829357 22 72 B6 82 JSL $82B672[$82:B672] $82935B 4C C8 B9 JMP $B9C8 [$82:B9C8] $82935E 20 67 B2 JSR $B267 [$82:B267] $829361 20 A2 B2 JSR $B2A2 [$82:B2A2] $829364 4C 6D A5 JMP $A56D [$82:A56D] ;;; Gamestate 11h ;;; ; Unpausing (loading normal gameplay) $829367 08 PHP $829368 C2 30 REP #$30 $82936A 20 BE A2 JSR $A2BE [$82:A2BE] $82936D 20 E3 A2 JSR $A2E3 [$82:A2E3] $829370 22 49 A1 80 JSL $80A149[$80:A149] $829374 20 19 8E JSR $8E19 [$82:8E19] $829377 20 96 8D JSR $8D96 [$82:8D96] $82937A C2 30 REP #$30 $82937C A9 01 00 LDA #$0001 $82937F 8D 23 07 STA $0723 [$7E:0723] $829382 8D 25 07 STA $0725 [$7E:0725] $829385 08 PHP $829386 8B PHB $829387 4B PHK $829388 F4 8D 93 PEA $938D $82938B DC 04 06 JML [$0604][$88:83E1] $82938E 22 88 82 88 JSL $888288[$88:8288] $829392 22 00 80 87 JSL $878000[$87:8000] $829396 22 2F BE 82 JSL $82BE2F[$82:BE2F] $82939A AB PLB $82939B 28 PLP $82939C EE 98 09 INC $0998 [$7E:0998] $82939F 28 PLP $8293A0 60 RTS ;;; Gamestate 12h ;;; ; Unpausing (normal gameplay but brightening) $8293A1 08 PHP $8293A2 C2 30 REP #$30 $8293A4 20 44 8B JSR $8B44 [$82:8B44] $8293A7 22 4D 89 80 JSL $80894D[$80:894D] ; Handle fading in $8293AB E2 20 SEP #$20 $8293AD A5 51 LDA $51 [$7E:0051] $8293AF C9 0F CMP #$0F $8293B1 D0 0E BNE $0E [$93C1] $8293B3 C2 20 REP #$20 $8293B5 9C 23 07 STZ $0723 [$7E:0723] $8293B8 9C 25 07 STZ $0725 [$7E:0725] $8293BB A9 08 00 LDA #$0008 $8293BE 8D 98 09 STA $0998 [$7E:0998] $8293C1 28 PLP $8293C2 60 RTS ;;; Updates the area and map in the map screen ;;; $8293C3 08 PHP $8293C4 8B PHB $8293C5 4B PHK $8293C6 AB PLB $8293C7 C2 30 REP #$30 $8293C9 A5 BD LDA $BD [$7E:00BD] $8293CB 85 B1 STA $B1 [$7E:00B1] $8293CD A5 BF LDA $BF [$7E:00BF] $8293CF 85 B3 STA $B3 [$7E:00B3] $8293D1 E2 30 SEP #$30 $8293D3 A9 00 LDA #$00 $8293D5 8D 16 21 STA $2116 [$7E:2116] $8293D8 A9 30 LDA #$30 $8293DA 8D 17 21 STA $2117 [$7E:2117] $8293DD A9 80 LDA #$80 $8293DF 8D 15 21 STA $2115 [$7E:2115] $8293E2 20 3D 94 JSR $943D [$82:943D] $8293E5 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $8293E9 db 01, 01, 18, 00, 40, 7E, 00, 10 $8293F1 A9 02 LDA #$02 $8293F3 8D 0B 42 STA $420B [$7E:420B] $8293F6 A9 AA LDA #$AA $8293F8 8D 16 21 STA $2116 [$7E:2116] $8293FB A9 38 LDA #$38 $8293FD 8D 17 21 STA $2117 [$7E:2117] $829400 A9 80 LDA #$80 $829402 8D 15 21 STA $2115 [$7E:2115] $829405 A9 01 LDA #$01 $829407 8D 10 43 STA $4310 [$7E:4310] $82940A A9 18 LDA #$18 $82940C 8D 11 43 STA $4311 [$7E:4311] $82940F A9 18 LDA #$18 $829411 8D 15 43 STA $4315 [$7E:4315] $829414 A9 00 LDA #$00 $829416 8D 16 43 STA $4316 [$7E:4316] $829419 C2 30 REP #$30 $82941B AD 9F 07 LDA $079F [$7E:079F] $82941E C9 07 00 CMP #$0007 $829421 30 03 BMI $03 [$9426] $829426 0A ASL A $829427 AA TAX $829428 BD 5F 96 LDA $965F,x[$82:9661] $82942B 8D 12 43 STA $4312 [$7E:4312] $82942E E2 20 SEP #$20 $829430 A9 82 LDA #$82 $829432 8D 14 43 STA $4314 [$7E:4314] $829435 A9 02 LDA #$02 $829437 8D 0B 42 STA $420B [$7E:420B] $82943A AB PLB $82943B 28 PLP $82943C 6B RTL $82943D 08 PHP $82943E C2 30 REP #$30 $829440 AD 9F 07 LDA $079F [$7E:079F] $829443 C9 07 00 CMP #$0007 $829446 30 03 BMI $03 [$944B] $82944B 85 12 STA $12 [$7E:0012] $82944D 0A ASL A $82944E 18 CLC $82944F 65 12 ADC $12 [$7E:0012] $829451 AA TAX $829452 BD 4A 96 LDA $964A,x[$82:964D] $829455 85 00 STA $00 [$7E:0000] $829457 BD 4C 96 LDA $964C,x[$82:964F] $82945A 85 02 STA $02 [$7E:0002] $82945C A9 00 40 LDA #$4000 $82945F 85 03 STA $03 [$7E:0003] $829461 A9 7E 00 LDA #$007E $829464 85 05 STA $05 [$7E:0005] $829466 A5 12 LDA $12 [$7E:0012] $829468 0A ASL A $829469 AA TAX $82946A A9 82 00 LDA #$0082 $82946D 85 08 STA $08 [$7E:0008] $82946F BF 17 97 82 LDA $829717,x[$82:9719] $829473 85 06 STA $06 [$7E:0006] $829475 AE 9F 07 LDX $079F [$7E:079F] $829478 BF 08 D9 7E LDA $7ED908,x[$7E:D909] $82947C 29 FF 00 AND #$00FF $82947F D0 3B BNE $3B [$94BC] $829481 E2 20 SEP #$20 $829483 A0 00 00 LDY #$0000 $829486 A2 00 00 LDX #$0000 $829489 64 12 STZ $12 [$7E:0012] $82948B 18 CLC $82948C 3E F7 07 ROL $07F7,x[$7E:07F7] $82948F B0 1D BCS $1D [$94AE] $829491 C2 20 REP #$20 $829493 A9 1F 00 LDA #$001F $829496 97 03 STA [$03],y[$7E:4000] $829498 E2 20 SEP #$20 $82949A C8 INY $82949B C8 INY $82949C E6 12 INC $12 [$7E:0012] $82949E A5 12 LDA $12 [$7E:0012] $8294A0 C9 08 CMP #$08 $8294A2 30 E8 BMI $E8 [$948C] $8294A4 64 12 STZ $12 [$7E:0012] $8294A6 E8 INX $8294A7 E0 00 01 CPX #$0100 $8294AA 30 E0 BMI $E0 [$948C] $8294AC 28 PLP $8294AD 60 RTS $8294AE FE F7 07 INC $07F7,x[$7E:081E] $8294B1 C2 30 REP #$30 $8294B3 B7 00 LDA [$00],y[$B5:8274] $8294B5 29 FF FB AND #$FBFF $8294B8 97 03 STA [$03],y[$7E:4274] $8294BA 80 DC BRA $DC [$9498] $8294BC C2 30 REP #$30 $8294BE A7 06 LDA [$06] [$82:9727] $8294C0 EB XBA $8294C1 85 26 STA $26 [$7E:0026] $8294C3 E6 06 INC $06 [$7E:0006] $8294C5 E6 06 INC $06 [$7E:0006] $8294C7 A9 00 00 LDA #$0000 $8294CA 85 0B STA $0B [$7E:000B] $8294CC A9 F7 07 LDA #$07F7 $8294CF 85 09 STA $09 [$7E:0009] $8294D1 A7 09 LDA [$09] [$7E:07F7] $8294D3 EB XBA $8294D4 85 28 STA $28 [$7E:0028] $8294D6 E6 09 INC $09 [$7E:0009] $8294D8 E6 09 INC $09 [$7E:0009] $8294DA A0 00 00 LDY #$0000 $8294DD A2 10 00 LDX #$0010 $8294E0 B7 00 LDA [$00],y[$B5:9000] $8294E2 06 28 ASL $28 [$7E:0028] $8294E4 90 07 BCC $07 [$94ED] $8294E6 29 FF FB AND #$FBFF $8294E9 06 26 ASL $26 [$7E:0026] $8294EB 80 07 BRA $07 [$94F4] $8294ED 06 26 ASL $26 [$7E:0026] $8294EF B0 03 BCS $03 [$94F4] $8294F1 A9 1F 00 LDA #$001F $8294F4 97 03 STA [$03],y[$7E:4000] $8294F6 CA DEX $8294F7 D0 15 BNE $15 [$950E] $8294F9 A2 10 00 LDX #$0010 $8294FC A7 06 LDA [$06] [$82:9729] $8294FE EB XBA $8294FF 85 26 STA $26 [$7E:0026] $829501 E6 06 INC $06 [$7E:0006] $829503 E6 06 INC $06 [$7E:0006] $829505 A7 09 LDA [$09] [$7E:07F9] $829507 EB XBA $829508 85 28 STA $28 [$7E:0028] $82950A E6 09 INC $09 [$7E:0009] $82950C E6 09 INC $09 [$7E:0009] $82950E C8 INY $82950F C8 INY $829510 C0 00 10 CPY #$1000 $829513 30 CB BMI $CB [$94E0] $829515 28 PLP $829516 60 RTS $829517 E2 30 SEP #$30 $829519 A9 33 LDA #$33 $82951B 85 5D STA $5D [$7E:005D] $82951D A9 13 LDA #$13 $82951F 85 69 STA $69 [$7E:0069] $829521 A9 D8 LDA #$D8 $829523 85 B3 STA $B3 [$7E:00B3] $829525 A9 FF LDA #$FF $829527 85 B4 STA $B4 [$7E:00B4] $829529 C2 30 REP #$30 $82952B 4B PHK $82952C AB PLB $82952D AD 9F 07 LDA $079F [$7E:079F] $829530 C9 07 00 CMP #$0007 $829533 30 03 BMI $03 [$9538] $829538 85 12 STA $12 [$7E:0012] $82953A 0A ASL A $82953B 18 CLC $82953C 65 12 ADC $12 [$7E:0012] $82953E AA TAX $82953F BD 4A 96 LDA $964A,x[$82:964A] $829542 85 00 STA $00 [$7E:0000] $829544 BD 4C 96 LDA $964C,x[$82:964C] $829547 85 02 STA $02 [$7E:0002] $829549 A9 00 30 LDA #$3000 $82954C 85 03 STA $03 [$7E:0003] $82954E A9 7E 00 LDA #$007E $829551 85 05 STA $05 [$7E:0005] $829553 A5 12 LDA $12 [$7E:0012] $829555 0A ASL A $829556 AA TAX $829557 A9 82 00 LDA #$0082 $82955A 85 08 STA $08 [$7E:0008] $82955C BF 17 97 82 LDA $829717,x[$82:9717] $829560 85 06 STA $06 [$7E:0006] $829562 AE 9F 07 LDX $079F [$7E:079F] $829565 BF 08 D9 7E LDA $7ED908,x[$7E:D908] $829569 29 FF 00 AND #$00FF $82956C D0 3C BNE $3C [$95AA] $82956E E2 20 SEP #$20 $829570 A0 00 00 LDY #$0000 $829573 A2 00 00 LDX #$0000 $829576 64 12 STZ $12 [$7E:0012] $829578 18 CLC $829579 3E F7 07 ROL $07F7,x[$7E:07F7] $82957C B0 1E BCS $1E [$959C] $82957E C2 20 REP #$20 $829580 A9 0F 00 LDA #$000F $829583 97 03 STA [$03],y[$7E:3000] $829585 E2 20 SEP #$20 $829587 C8 INY $829588 C8 INY $829589 E6 12 INC $12 [$7E:0012] $82958B A5 12 LDA $12 [$7E:0012] $82958D C9 08 CMP #$08 $82958F 30 E8 BMI $E8 [$9579] $829591 64 12 STZ $12 [$7E:0012] $829593 E8 INX $829594 E0 00 01 CPX #$0100 $829597 30 E0 BMI $E0 [$9579] $829599 4C 03 96 JMP $9603 [$82:9603] $82959C FE F7 07 INC $07F7,x[$7E:07FE] $82959F C2 30 REP #$30 $8295A1 B7 00 LDA [$00],y[$B5:9076] $8295A3 29 FF FB AND #$FBFF $8295A6 97 03 STA [$03],y[$7E:3076] $8295A8 80 DB BRA $DB [$9585] $829603 C2 30 REP #$30 $829605 AE 30 03 LDX $0330 [$7E:0330] $829608 A9 00 10 LDA #$1000 $82960B 95 D0 STA $D0,x [$7E:00D0] $82960D A9 00 30 LDA #$3000 $829610 95 D2 STA $D2,x [$7E:00D2] $829612 A9 7E 00 LDA #$007E $829615 95 D4 STA $D4,x [$7E:00D4] $829617 A5 58 LDA $58 [$7E:0058] $829619 29 FC 00 AND #$00FC $82961C EB XBA $82961D 95 D5 STA $D5,x [$7E:00D5] $82961F 8A TXA $829620 18 CLC $829621 69 07 00 ADC #$0007 $829624 8D 30 03 STA $0330 [$7E:0330] $829627 6B RTL $829628 8B PHB $829629 4B PHK $82962A AB PLB $82962B AD 9F 07 LDA $079F [$7E:079F] $82962E 0A ASL A $82962F AA TAX $829630 BD 5F 96 LDA $965F,x[$82:965F] $829633 AA TAX $829634 A0 00 00 LDY #$0000 $829637 BD 00 00 LDA $0000,x[$82:966F] $82963A 29 FF EF AND #$EFFF $82963D 97 00 STA [$00],y[$7E:4154] $82963F E8 INX $829640 E8 INX $829641 C8 INY $829642 C8 INY $829643 C0 18 00 CPY #$0018 $829646 30 EF BMI $EF [$9637] $829648 AB PLB $829649 6B RTL $82964A db 00, 90, B5, 00, 80, B5, 00, A0, B5, 00, B0, B5, 00, C0, B5, 00, D0, B5, 00, E0, B5, 6F, 96, 87, 96, 9F, 96, B7, 96, CF, 96, E7, 96 $82966F db 01, 28, 01, 28, 32, 38, 41, 38, 30, 38, 43, 38, 34, 38, 41, 38, 38, 38, 30, 28, 01, 28, 01, 28, 01, 28, 01, 28, 31, 38, 41, 38, 38, 38, 3D, 38, 42, 38, 43, 38, 30, 38, 41, 38, 01, 28, 01, 28, 01, 28, 01, 28, 3D, 38, 3E, 38, 41, 38, 35, 38, 30, 38, 38, 38, 41, 38, 01, 28, 01, 28, 01, 28, 46, 38, 41, 38, 34, 38, 32, 38, 3A, 38, 34, 38, 33, 38, 01, 28, 42, 38, 37, 38, 38, 38, 3F, 38, 01, 28, 01, 28, 3C, 38, 30, 38, 41, 38, 38, 38, 33, 38, 38, 38, 30, 38, 01, 28, 01, 28, 01, 28, 01, 28, 01, 28, 43, 38, 3E, 38, 44, 38, 41, 38, 38, 38, 30, 38, 3D, 38, 01, 28, 01, 28, 01, 28 $829717 db 27, 97, 27, 98, 27, 99, 27, 9A, 27, 9B, 27, 9C, 27, 9D $829727 db 00, 00, 00, 00, 00, 00, 00, 7F, 00, 00, 00, 7F, 00, 00, 00, 7F, 00, 00, 00, 7F, 00, 01, FF, FF, 00, 07, 94, 00, 00, 1E, 37, C0, 00, 10, FF, 00, 03, F0, 10, 00, 02, 00, 10, 00, 02, 00, 10, 00, 02, 00, 10, 00, 00, 00, 10, 00, 00, 00, 10, 00, 00, 00, 10, 00, 00, 00, 10, 00, 00, 00, 10, 00, 00, 00, 1F, 00, 00, 00, 01, 00, 00, 00, 01, 00, 00, 00, 01, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 03, FC, 00, 00, 03, FC, 00, 00, 03, F0, 00, 00, 03, F0, 00, 00, FF, FC, 7F, 80, 0D, FC, 7F, 80, 00, 00, 00, 80, 20, 00, 00, 80, 20, 00, 07, 80, 20, 00, 0F, 80, 20, 00, 08, 00, 00, 00, 08, 00, 00, 00, 08, 00, 00, 00, 08, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 40, 00, 00, 00, 40, 02, 00, 00, 40, 02, 00, 00, 40, 02, 00, 07, FD, FE, 00, 00, C0, 60, 00, 03, FF, E0, 00, 06, 00, 78, 20, 00, 00, 7C, 20, 00, 00, 60, 20, 00, 00, 7E, 7F, 00, 00, 1C, 0C, 00, 00, 07, 80, 00, FE, 01, FF, 00, 00, 00, 00, 00, 00, 01, FF, 00, 00, 00, 66, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 04, 00, 00, 00, 04, 00, 00, 00, 04, 00, 00, 00, 04, 00, 00, 00, 1C, 00, 00, 00, 06, 00, 00, 00, 7C, 00, 00, 00, C0, 00, 00, 00, 50, 00, 00, 00, 40, 00, 00, 00, C0, 00, 00, 00, 40, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 00, 02, 00, 00, 00, 3F, FF, C1, 80, 00, 79, FF, C0, 00, 40, 00, 00, 00, 40, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 20, 00, 00, 1E, 20, 00, FE, 1E, 20, 07, 8F, 1F, FF, 87, 80, 3E, 7F, FF, FC, 20, FF, FF, F8, 21, BE, 1E, FC, 3F, 1F, 13, 04, 03, C1, 93, FC, 00, FF, FF, A0, 00, 7F, F3, E0, 00, 38, 01, C0, 03, E0, 01, 80, 03, E0, 00, 00, 1E, 20, 00, 00, 1F, 3E, 00, 00, 1F, A0, 01, 00, 0F, F0, 01, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, FC, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0F, FC, 00, 00, 0F, 00, 00, 00, 3E, 00, 00, 00, 20, 80, 00, 00, 0F, C4, 00, 00, 00, FC, 00, 00, 00, 80, 00, 00, 01, 80, 00, 00, 00, 80, 00, 00, 07, F0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 78, 00, 00, 00, 58, 00, 00, 01, D8, 00, 00, 01, C0, 00, 00, 3F, C0, 00, 00, FD, FF, 00, 00, 31, DF, 00, 02, 21, FF, 00, 02, 2F, BF, 00, 3F, EF, C0, 00, 3F, CF, FC, 00, 37, 9F, C0, 00, 37, B0, 00, 00, 37, B0, 00, 00, 37, B0, 00, 00, 3E, 70, 00, 00, 3F, FF, F0, 00, 1F, C0, 00, 00, 7C, 00, 00, 00, 18, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 20, 00, 00, 00, 20, 00, 00, 00, 20, 00, 00, 00, 20, 00, 00, 00, 30, 00, 00, 00, E0, 00, 00, 00, FF, E0, 00, 00, FF, E0, 00, 00, FE, 00, 00, 00, 01, 80, 00, 00, 03, 80, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 08, 00, 00, 00, 08, 00, 00, 00, 08, 00, 00, 00, 08, 00, 00, 07, FC, 00, 00, 07, F8, 00, 00, 00, 08, 00, 00, 0F, F8, 00, 00, 1F, C0, 00, 00, 00, C0, 00, 00, 07, C0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 $829D5C db 08, 00 $829D60 db 08, 00 $829D64 db 08, 00 $829D68 db 0F, 00, 00 $829D6C db 01, F8, 00 $829D70 db 00, 00, 00 $829E27 C2 30 REP #$30 $829E29 85 14 STA $14 [$7E:0014] $829E2B AD AE 05 LDA $05AE [$7E:05AE] $829E2E 38 SEC $829E2F ED AC 05 SBC $05AC [$7E:05AC] $829E32 4A LSR A $829E33 18 CLC $829E34 6D AC 05 ADC $05AC [$7E:05AC] $829E37 38 SEC $829E38 E9 80 00 SBC #$0080 $829E3B 85 B1 STA $B1 [$7E:00B1] $829E3D AD F6 0A LDA $0AF6 [$7E:0AF6] $829E40 29 00 FF AND #$FF00 $829E43 EB XBA $829E44 18 CLC $829E45 6D A1 07 ADC $07A1 [$7E:07A1] $829E48 0A ASL A $829E49 0A ASL A $829E4A 0A ASL A $829E4B 38 SEC $829E4C E5 B1 SBC $B1 [$7E:00B1] $829E4E 85 12 STA $12 [$7E:0012] $829E50 A9 E0 00 LDA #$00E0 $829E53 38 SEC $829E54 E5 12 SBC $12 [$7E:0012] $829E56 10 0B BPL $0B [$9E63] $829E63 A9 20 00 LDA #$0020 $829E66 38 SEC $829E67 E5 12 SBC $12 [$7E:0012] $829E69 85 12 STA $12 [$7E:0012] $829E6B 30 07 BMI $07 [$9E74] $829E6D A5 B1 LDA $B1 [$7E:00B1] $829E6F 38 SEC $829E70 E5 12 SBC $12 [$7E:0012] $829E72 85 B1 STA $B1 [$7E:00B1] $829E74 AD B2 05 LDA $05B2 [$7E:05B2] $829E77 38 SEC $829E78 ED B0 05 SBC $05B0 [$7E:05B0] $829E7B 4A LSR A $829E7C 18 CLC $829E7D 69 10 00 ADC #$0010 $829E80 18 CLC $829E81 6D B0 05 ADC $05B0 [$7E:05B0] $829E84 85 12 STA $12 [$7E:0012] $829E86 A5 14 LDA $14 [$7E:0014] $829E88 38 SEC $829E89 E5 12 SBC $12 [$7E:0012] $829E8B 29 F8 FF AND #$FFF8 $829E8E 49 FF FF EOR #$FFFF $829E91 1A INC A $829E92 85 B3 STA $B3 [$7E:00B3] $829E94 AD FA 0A LDA $0AFA [$7E:0AFA] $829E97 EB XBA $829E98 29 FF 00 AND #$00FF $829E9B 18 CLC $829E9C 6D A3 07 ADC $07A3 [$7E:07A3] $829E9F 1A INC A $829EA0 0A ASL A $829EA1 0A ASL A $829EA2 0A ASL A $829EA3 38 SEC $829EA4 E5 B3 SBC $B3 [$7E:00B3] $829EA6 85 12 STA $12 [$7E:0012] $829EA8 A9 40 00 LDA #$0040 $829EAB 38 SEC $829EAC E5 12 SBC $12 [$7E:0012] $829EAE 30 13 BMI $13 [$9EC3] $829EB0 85 12 STA $12 [$7E:0012] $829EB2 A5 B3 LDA $B3 [$7E:00B3] $829EB4 38 SEC $829EB5 E5 12 SBC $12 [$7E:0012] $829EB7 85 B3 STA $B3 [$7E:00B3] $829EB9 C9 D8 FF CMP #$FFD8 $829EBC 10 05 BPL $05 [$9EC3] $829EC3 60 RTS $829EC4 08 PHP $829EC5 8B PHB $829EC6 AD 89 07 LDA $0789 [$7E:0789] $829EC9 F0 15 BEQ $15 [$9EE0] $829ECB A9 82 00 LDA #$0082 $829ECE 85 08 STA $08 [$7E:0008] $829ED0 A9 17 97 LDA #$9717 $829ED3 85 06 STA $06 [$7E:0006] $829ED5 AD 9F 07 LDA $079F [$7E:079F] $829ED8 0A ASL A $829ED9 A8 TAY $829EDA B7 06 LDA [$06],y[$82:9717] $829EDC 85 06 STA $06 [$7E:0006] $829EDE 80 0A BRA $0A [$9EEA] $829EE0 A9 00 00 LDA #$0000 $829EE3 85 08 STA $08 [$7E:0008] $829EE5 A9 F7 07 LDA #$07F7 $829EE8 85 06 STA $06 [$7E:0006] $829EEA 4B PHK $829EEB AB PLB $829EEC E2 20 SEP #$20 $829EEE A5 08 LDA $08 [$7E:0008] $829EF0 85 02 STA $02 [$7E:0002] $829EF2 C2 20 REP #$20 $829EF4 A5 06 LDA $06 [$7E:0006] $829EF6 85 00 STA $00 [$7E:0000] $829EF8 20 4A 9F JSR $9F4A [$82:9F4A] $829EFB 20 45 9F JSR $9F45 [$82:9F45] $829EFE 8D AC 05 STA $05AC [$7E:05AC] $829F01 AD 9F 07 LDA $079F [$7E:079F] $829F04 C9 04 00 CMP #$0004 $829F07 D0 0A BNE $0A [$9F13] $829F09 AD AC 05 LDA $05AC [$7E:05AC] $829F0C 38 SEC $829F0D E9 18 00 SBC #$0018 $829F10 8D AC 05 STA $05AC [$7E:05AC] $829F13 A5 06 LDA $06 [$7E:0006] $829F15 18 CLC $829F16 69 83 00 ADC #$0083 $829F19 85 00 STA $00 [$7E:0000] $829F1B 20 A9 9F JSR $9FA9 [$82:9FA9] $829F1E 20 45 9F JSR $9F45 [$82:9F45] $829F21 8D AE 05 STA $05AE [$7E:05AE] $829F24 A5 06 LDA $06 [$7E:0006] $829F26 85 00 STA $00 [$7E:0000] $829F28 20 09 A0 JSR $A009 [$82:A009] $829F2B 20 45 9F JSR $9F45 [$82:9F45] $829F2E 8D B0 05 STA $05B0 [$7E:05B0] $829F31 A5 06 LDA $06 [$7E:0006] $829F33 18 CLC $829F34 69 7C 00 ADC #$007C $829F37 85 00 STA $00 [$7E:0000] $829F39 20 53 A0 JSR $A053 [$82:A053] $829F3C 20 45 9F JSR $9F45 [$82:9F45] $829F3F 8D B2 05 STA $05B2 [$7E:05B2] $829F42 AB PLB $829F43 28 PLP $829F44 60 RTS $829F45 8A TXA $829F46 0A ASL A $829F47 0A ASL A $829F48 0A ASL A $829F49 60 RTS $829F4A 08 PHP $829F4B E2 20 SEP #$20 $829F4D A9 00 LDA #$00 $829F4F EB XBA $829F50 A9 00 LDA #$00 $829F52 A2 00 00 LDX #$0000 $829F55 8A TXA $829F56 29 07 AND #$07 $829F58 A8 TAY $829F59 B9 A1 9F LDA $9FA1,y[$82:9FA1] $829F5C 85 12 STA $12 [$7E:0012] $829F5E A0 00 00 LDY #$0000 $829F61 B7 00 LDA [$00],y[$7E:07F7] $829F63 24 12 BIT $12 [$7E:0012] $829F65 D0 38 BNE $38 [$9F9F] $829F67 C8 INY $829F68 C8 INY $829F69 C8 INY $829F6A C8 INY $829F6B C0 80 00 CPY #$0080 $829F6E 30 F1 BMI $F1 [$9F61] $829F70 E8 INX $829F71 E0 40 00 CPX #$0040 $829F74 10 26 BPL $26 [$9F9C] $829F76 8A TXA $829F77 29 07 AND #$07 $829F79 D0 0D BNE $0D [$9F88] $829F7B A5 00 LDA $00 [$7E:0000] $829F7D 18 CLC $829F7E 69 01 ADC #$01 $829F80 85 00 STA $00 [$7E:0000] $829F82 A5 01 LDA $01 [$7E:0001] $829F84 69 00 ADC #$00 $829F86 85 01 STA $01 [$7E:0001] $829F88 E0 20 00 CPX #$0020 $829F8B D0 C8 BNE $C8 [$9F55] $829F9F 28 PLP $829FA0 60 RTS $829FA1 db 80, 40, 20, 10, 08, 04, 02, 01 $829FA9 08 PHP $829FAA E2 20 SEP #$20 $829FAC A9 00 LDA #$00 $829FAE EB XBA $829FAF A9 00 LDA #$00 $829FB1 A2 3F 00 LDX #$003F $829FB4 8A TXA $829FB5 29 07 AND #$07 $829FB7 A8 TAY $829FB8 B9 01 A0 LDA $A001,y[$82:A008] $829FBB 85 12 STA $12 [$7E:0012] $829FBD A0 00 00 LDY #$0000 $829FC0 B7 00 LDA [$00],y[$7E:087A] $829FC2 24 12 BIT $12 [$7E:0012] $829FC4 D0 39 BNE $39 [$9FFF] $829FC6 C8 INY $829FC7 C8 INY $829FC8 C8 INY $829FC9 C8 INY $829FCA C0 80 00 CPY #$0080 $829FCD 30 F1 BMI $F1 [$9FC0] $829FCF CA DEX $829FD0 30 2A BMI $2A [$9FFC] $829FD2 8A TXA $829FD3 29 07 AND #$07 $829FD5 C9 07 CMP #$07 $829FD7 D0 0D BNE $0D [$9FE6] $829FD9 A5 00 LDA $00 [$7E:0000] $829FDB 38 SEC $829FDC E9 01 SBC #$01 $829FDE 85 00 STA $00 [$7E:0000] $829FE0 A5 01 LDA $01 [$7E:0001] $829FE2 E9 00 SBC #$00 $829FE4 85 01 STA $01 [$7E:0001] $829FE6 E0 1F 00 CPX #$001F $829FE9 D0 C9 BNE $C9 [$9FB4] $829FEB C2 20 REP #$20 $829FED A5 00 LDA $00 [$7E:0000] $829FEF 38 SEC $829FF0 E9 7C 00 SBC #$007C $829FF3 85 00 STA $00 [$7E:0000] $829FF5 A9 00 00 LDA #$0000 $829FF8 E2 20 SEP #$20 $829FFA 80 B8 BRA $B8 [$9FB4] $829FFF 28 PLP $82A000 60 RTS $82A001 db 80, 40, 20, 10, 08, 04, 02, 01 $82A009 08 PHP $82A00A C2 20 REP #$20 $82A00C A5 00 LDA $00 [$7E:0000] $82A00E 18 CLC $82A00F 69 80 00 ADC #$0080 $82A012 85 03 STA $03 [$7E:0003] $82A014 A9 00 00 LDA #$0000 $82A017 E2 20 SEP #$20 $82A019 A5 02 LDA $02 [$7E:0002] $82A01B 85 05 STA $05 [$7E:0005] $82A01D A2 00 00 LDX #$0000 $82A020 A0 00 00 LDY #$0000 $82A023 B7 00 LDA [$00],y[$7E:07F7] $82A025 D0 2A BNE $2A [$A051] $82A027 B7 03 LDA [$03],y[$7E:0877] $82A029 D0 26 BNE $26 [$A051] $82A02B C8 INY $82A02C C0 04 00 CPY #$0004 $82A02F 30 F2 BMI $F2 [$A023] $82A031 A0 00 00 LDY #$0000 $82A034 C2 20 REP #$20 $82A036 A5 00 LDA $00 [$7E:0000] $82A038 18 CLC $82A039 69 04 00 ADC #$0004 $82A03C 85 00 STA $00 [$7E:0000] $82A03E A5 03 LDA $03 [$7E:0003] $82A040 18 CLC $82A041 69 04 00 ADC #$0004 $82A044 85 03 STA $03 [$7E:0003] $82A046 E2 20 SEP #$20 $82A048 E8 INX $82A049 E0 1F 00 CPX #$001F $82A04C 30 D5 BMI $D5 [$A023] $82A051 28 PLP $82A052 60 RTS $82A053 08 PHP $82A054 C2 20 REP #$20 $82A056 A5 00 LDA $00 [$7E:0000] $82A058 18 CLC $82A059 69 80 00 ADC #$0080 $82A05C 85 03 STA $03 [$7E:0003] $82A05E A9 00 00 LDA #$0000 $82A061 E2 20 SEP #$20 $82A063 A5 02 LDA $02 [$7E:0002] $82A065 85 05 STA $05 [$7E:0005] $82A067 A2 1F 00 LDX #$001F $82A06A A0 00 00 LDY #$0000 $82A06D B7 00 LDA [$00],y[$7E:0873] $82A06F D0 27 BNE $27 [$A098] $82A071 B7 03 LDA [$03],y[$7E:08F3] $82A073 D0 23 BNE $23 [$A098] $82A075 C8 INY $82A076 C0 04 00 CPY #$0004 $82A079 30 F2 BMI $F2 [$A06D] $82A07B A0 00 00 LDY #$0000 $82A07E C2 20 REP #$20 $82A080 A5 00 LDA $00 [$7E:0000] $82A082 38 SEC $82A083 E9 04 00 SBC #$0004 $82A086 85 00 STA $00 [$7E:0000] $82A088 A5 03 LDA $03 [$7E:0003] $82A08A 38 SEC $82A08B E9 04 00 SBC #$0004 $82A08E 85 03 STA $03 [$7E:0003] $82A090 E2 20 SEP #$20 $82A092 CA DEX $82A093 D0 D8 BNE $D8 [$A06D] $82A098 28 PLP $82A099 60 RTS $82A09A E2 30 SEP #$30 $82A09C A9 01 LDA #$01 $82A09E 8D 01 21 STA $2101 [$7E:2101] $82A0A1 85 52 STA $52 [$7E:0052] $82A0A3 A9 09 LDA #$09 $82A0A5 8D 05 21 STA $2105 [$7E:2105] $82A0A8 85 55 STA $55 [$7E:0055] $82A0AA 64 5D STZ $5D [$7E:005D] $82A0AC 9C 0B 21 STZ $210B [$7E:210B] $82A0AF A9 04 LDA #$04 $82A0B1 85 5E STA $5E [$7E:005E] $82A0B3 8D 0C 21 STA $210C [$7E:210C] $82A0B6 A9 31 LDA #$31 $82A0B8 85 58 STA $58 [$7E:0058] $82A0BA 8D 07 21 STA $2107 [$7E:2107] $82A0BD A9 38 LDA #$38 $82A0BF 85 59 STA $59 [$7E:0059] $82A0C1 8D 08 21 STA $2108 [$7E:2108] $82A0C4 A9 58 LDA #$58 $82A0C6 85 5A STA $5A [$7E:005A] $82A0C8 8D 09 21 STA $2109 [$7E:2109] $82A0CB A9 00 LDA #$00 $82A0CD 85 5C STA $5C [$7E:005C] $82A0CF 8D 0A 21 STA $210A [$7E:210A] $82A0D2 A9 17 LDA #$17 $82A0D4 8D 2C 21 STA $212C [$7E:212C] $82A0D7 85 69 STA $69 [$7E:0069] $82A0D9 A9 00 LDA #$00 $82A0DB 8D 06 21 STA $2106 [$7E:2106] $82A0DE 85 57 STA $57 [$7E:0057] $82A0E0 A5 74 LDA $74 [$7E:0074] $82A0E2 29 E0 AND #$E0 $82A0E4 85 74 STA $74 [$7E:0074] $82A0E6 A5 75 LDA $75 [$7E:0075] $82A0E8 29 E0 AND #$E0 $82A0EA 85 75 STA $75 [$7E:0075] $82A0EC A5 76 LDA $76 [$7E:0076] $82A0EE 29 E0 AND #$E0 $82A0F0 85 76 STA $76 [$7E:0076] $82A0F2 A9 00 LDA #$00 $82A0F4 85 71 STA $71 [$7E:0071] $82A0F6 60 RTS $82A0F7 C2 30 REP #$30 $82A0F9 9C 57 07 STZ $0757 [$7E:0757] $82A0FC 64 B1 STZ $B1 [$7E:00B1] $82A0FE 64 B5 STZ $B5 [$7E:00B5] $82A100 64 B9 STZ $B9 [$7E:00B9] $82A102 64 B7 STZ $B7 [$7E:00B7] $82A104 64 BB STZ $BB [$7E:00BB] $82A106 9C 53 07 STZ $0753 [$7E:0753] $82A109 9C 3F 07 STZ $073F [$7E:073F] $82A10C 9C 45 07 STZ $0745 [$7E:0745] $82A10F 9C 76 07 STZ $0776 [$7E:0776] $82A112 9C 78 07 STZ $0778 [$7E:0778] $82A115 9C 7A 07 STZ $077A [$7E:077A] $82A118 AD 0C C1 LDA $C10C [$82:C10C] $82A11B 8D 2B 07 STA $072B [$7E:072B] $82A11E A9 01 00 LDA #$0001 $82A121 8D 3B 07 STA $073B [$7E:073B] $82A124 A9 00 00 LDA #$0000 $82A127 8D 4F 07 STA $074F [$7E:074F] $82A12A 60 RTS ;;; Sets the equipment screen up ;;; ; (reserve tank tiles, clears uncollected items, greys unequipped items, oranges equipped items). ; Runs when the game is paused $82A12B C2 30 REP #$30 $82A12D AD D4 09 LDA $09D4 [$7E:09D4] $82A130 F0 38 BEQ $38 [$A16A] $82A132 A0 00 00 LDY #$0000 $82A135 A9 68 C0 LDA #$C068 $82A138 85 03 STA $03 [$7E:0003] $82A13A A9 82 00 LDA #$0082 $82A13D 85 05 STA $05 [$7E:0005] $82A13F B7 03 LDA [$03],y[$82:C068] $82A141 85 00 STA $00 [$7E:0000] $82A143 AE 88 C0 LDX $C088 [$82:C088] $82A146 A9 0E 00 LDA #$000E $82A149 85 16 STA $16 [$7E:0016] $82A14B 20 7E A2 JSR $A27E [$82:A27E] $82A14E A0 02 00 LDY #$0002 $82A151 A9 68 C0 LDA #$C068 $82A154 85 03 STA $03 [$7E:0003] $82A156 A9 82 00 LDA #$0082 $82A159 85 05 STA $05 [$7E:0005] $82A15B B7 03 LDA [$03],y[$82:C06A] $82A15D 85 00 STA $00 [$7E:0000] $82A15F AE 8A C0 LDX $C08A [$82:C08A] $82A162 A9 0E 00 LDA #$000E $82A165 85 16 STA $16 [$7E:0016] $82A167 20 7E A2 JSR $A27E [$82:A27E] $82A16A A0 00 00 LDY #$0000 $82A16D A9 6C C0 LDA #$C06C $82A170 85 03 STA $03 [$7E:0003] $82A172 A9 82 00 LDA #$0082 $82A175 85 05 STA $05 [$7E:0005] $82A177 B7 03 LDA [$03],y[$82:C06C] $82A179 85 00 STA $00 [$7E:0000] $82A17B AD 76 0A LDA $0A76 [$7E:0A76] $82A17E D0 42 BNE $42 [$A1C2] $82A180 B9 4C C0 LDA $C04C,y[$82:C04C] $82A183 2C A8 09 BIT $09A8 [$7E:09A8] $82A186 D0 0D BNE $0D [$A195] $82A188 A2 1A C0 LDX #$C01A $82A18B A9 0A 00 LDA #$000A $82A18E 85 16 STA $16 [$7E:0016] $82A190 20 7E A2 JSR $A27E [$82:A27E] $82A193 80 20 BRA $20 [$A1B5] $82A195 BE 8C C0 LDX $C08C,y[$82:C08C] $82A198 A9 0A 00 LDA #$000A $82A19B 85 16 STA $16 [$7E:0016] $82A19D 20 7E A2 JSR $A27E [$82:A27E] $82A1A0 B9 4C C0 LDA $C04C,y[$82:C04C] $82A1A3 2C A6 09 BIT $09A6 [$7E:09A6] $82A1A6 D0 0D BNE $0D [$A1B5] $82A1A8 A9 00 0C LDA #$0C00 $82A1AB 85 12 STA $12 [$7E:0012] $82A1AD A9 0A 00 LDA #$000A $82A1B0 85 16 STA $16 [$7E:0016] $82A1B2 20 9D A2 JSR $A29D [$82:A29D] $82A1B5 C8 INY $82A1B6 C8 INY $82A1B7 B7 03 LDA [$03],y[$82:C06E] $82A1B9 85 00 STA $00 [$7E:0000] $82A1BB C0 0C 00 CPY #$000C $82A1BE 30 C0 BMI $C0 [$A180] $82A1C0 80 19 BRA $19 [$A1DB] $82A1C2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82A1DB A0 00 00 LDY #$0000 $82A1DE A9 76 C0 LDA #$C076 $82A1E1 85 03 STA $03 [$7E:0003] $82A1E3 A9 82 00 LDA #$0082 $82A1E6 85 05 STA $05 [$7E:0005] $82A1E8 B7 03 LDA [$03],y[$82:C076] $82A1EA 85 00 STA $00 [$7E:0000] $82A1EC B9 56 C0 LDA $C056,y[$82:C056] $82A1EF 2C A4 09 BIT $09A4 [$7E:09A4] $82A1F2 D0 0D BNE $0D [$A201] $82A1F4 A2 1A C0 LDX #$C01A $82A1F7 A9 12 00 LDA #$0012 $82A1FA 85 16 STA $16 [$7E:0016] $82A1FC 20 7E A2 JSR $A27E [$82:A27E] $82A1FF 80 20 BRA $20 [$A221] $82A201 BE 96 C0 LDX $C096,y[$82:C09A] $82A204 A9 12 00 LDA #$0012 $82A207 85 16 STA $16 [$7E:0016] $82A209 20 7E A2 JSR $A27E [$82:A27E] $82A20C B9 56 C0 LDA $C056,y[$82:C05A] $82A20F 2C A2 09 BIT $09A2 [$7E:09A2] $82A212 D0 0D BNE $0D [$A221] $82A214 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82A221 C8 INY $82A222 C8 INY $82A223 B7 03 LDA [$03],y[$82:C078] $82A225 85 00 STA $00 [$7E:0000] $82A227 C0 0C 00 CPY #$000C $82A22A 30 C0 BMI $C0 [$A1EC] $82A22C A0 00 00 LDY #$0000 $82A22F A9 82 C0 LDA #$C082 $82A232 85 03 STA $03 [$7E:0003] $82A234 A9 82 00 LDA #$0082 $82A237 85 05 STA $05 [$7E:0005] $82A239 B7 03 LDA [$03],y[$82:C082] $82A23B 85 00 STA $00 [$7E:0000] $82A23D B9 62 C0 LDA $C062,y[$82:C062] $82A240 2C A4 09 BIT $09A4 [$7E:09A4] $82A243 D0 0D BNE $0D [$A252] $82A245 A2 1A C0 LDX #$C01A $82A248 A9 12 00 LDA #$0012 $82A24B 85 16 STA $16 [$7E:0016] $82A24D 20 7E A2 JSR $A27E [$82:A27E] $82A250 80 20 BRA $20 [$A272] $82A252 A9 12 00 LDA #$0012 $82A255 85 16 STA $16 [$7E:0016] $82A257 BE A2 C0 LDX $C0A2,y[$82:C0A2] $82A25A 20 7E A2 JSR $A27E [$82:A27E] $82A25D B9 62 C0 LDA $C062,y[$82:C062] $82A260 2C A2 09 BIT $09A2 [$7E:09A2] $82A263 D0 0D BNE $0D [$A272] $82A265 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82A272 C8 INY $82A273 C8 INY $82A274 B7 03 LDA [$03],y[$82:C084] $82A276 85 00 STA $00 [$7E:0000] $82A278 C0 06 00 CPY #$0006 $82A27B 30 C0 BMI $C0 [$A23D] $82A27D 60 RTS $82A27E 08 PHP $82A27F 5A PHY $82A280 E2 20 SEP #$20 $82A282 A9 7E LDA #$7E $82A284 85 02 STA $02 [$7E:0002] $82A286 C2 30 REP #$30 $82A288 A0 00 00 LDY #$0000 $82A28B BD 00 00 LDA $0000,x[$82:C01A] $82A28E 97 00 STA [$00],y[$7E:3C08] $82A290 E8 INX $82A291 E8 INX $82A292 C8 INY $82A293 C8 INY $82A294 C6 16 DEC $16 [$7E:0016] $82A296 C6 16 DEC $16 [$7E:0016] $82A298 D0 F1 BNE $F1 [$A28B] $82A29A 7A PLY $82A29B 28 PLP $82A29C 60 RTS $82A29D 08 PHP $82A29E 5A PHY $82A29F E2 20 SEP #$20 $82A2A1 A9 7E LDA #$7E $82A2A3 85 02 STA $02 [$7E:0002] $82A2A5 C2 30 REP #$30 $82A2A7 A0 00 00 LDY #$0000 $82A2AA B7 00 LDA [$00],y[$7E:3C48] $82A2AC 29 FF E3 AND #$E3FF $82A2AF 05 12 ORA $12 [$7E:0012] $82A2B1 97 00 STA [$00],y[$7E:3C48] $82A2B3 C8 INY $82A2B4 C8 INY $82A2B5 C6 16 DEC $16 [$7E:0016] $82A2B7 C6 16 DEC $16 [$7E:0016] $82A2B9 D0 EF BNE $EF [$A2AA] $82A2BB 7A PLY $82A2BC 28 PLP $82A2BD 60 RTS $82A2BE 08 PHP $82A2BF E2 30 SEP #$30 $82A2C1 A9 00 LDA #$00 $82A2C3 8D 16 21 STA $2116 [$7E:2116] $82A2C6 A9 60 LDA #$60 $82A2C8 8D 17 21 STA $2117 [$7E:2117] $82A2CB A9 80 LDA #$80 $82A2CD 8D 15 21 STA $2115 [$7E:2115] $82A2D0 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $82A2D4 db 01, 01, 18, 00, D2, 9A, 00, 10 $82A2DC A9 02 LDA #$02 $82A2DE 8D 0B 42 STA $420B [$7E:420B] $82A2E1 28 PLP $82A2E2 60 RTS $82A2E3 E2 30 SEP #$30 $82A2E5 08 PHP $82A2E6 C2 30 REP #$30 $82A2E8 A0 00 02 LDY #$0200 $82A2EB A2 00 00 LDX #$0000 $82A2EE BF 00 33 7E LDA $7E3300,x[$7E:3300] $82A2F2 9F 00 C0 7E STA $7EC000,x[$7E:C000] $82A2F6 E8 INX $82A2F7 E8 INX $82A2F8 88 DEY $82A2F9 88 DEY $82A2FA D0 F2 BNE $F2 [$A2EE] $82A2FC 28 PLP $82A2FD 20 13 A3 JSR $A313 [$82:A313] $82A300 20 4E A3 JSR $A34E [$82:A34E] $82A303 20 77 A3 JSR $A377 [$82:A377] $82A306 20 80 A3 JSR $A380 [$82:A380] $82A309 C2 30 REP #$30 $82A30B A9 0C 00 LDA #$000C $82A30E 22 84 F0 90 JSL $90F084[$90:F084] $82A312 60 RTS $82A313 08 PHP $82A314 E2 30 SEP #$30 $82A316 A9 03 LDA #$03 $82A318 8D 01 21 STA $2101 [$7E:2101] $82A31B 85 52 STA $52 [$7E:0052] $82A31D A9 09 LDA #$09 $82A31F 8D 05 21 STA $2105 [$7E:2105] $82A322 85 55 STA $55 [$7E:0055] $82A324 64 5D STZ $5D [$7E:005D] $82A326 9C 0B 21 STZ $210B [$7E:210B] $82A329 A9 04 LDA #$04 $82A32B 85 5E STA $5E [$7E:005E] $82A32D 8D 0C 21 STA $210C [$7E:210C] $82A330 A9 51 LDA #$51 $82A332 85 58 STA $58 [$7E:0058] $82A334 8D 07 21 STA $2107 [$7E:2107] $82A337 A9 49 LDA #$49 $82A339 85 59 STA $59 [$7E:0059] $82A33B 8D 08 21 STA $2108 [$7E:2108] $82A33E A9 5A LDA #$5A $82A340 85 5A STA $5A [$7E:005A] $82A342 8D 09 21 STA $2109 [$7E:2109] $82A345 A9 00 LDA #$00 $82A347 85 5C STA $5C [$7E:005C] $82A349 8D 0A 21 STA $210A [$7E:210A] $82A34C 28 PLP $82A34D 60 RTS $82A34E 08 PHP $82A34F C2 30 REP #$30 $82A351 AD 11 09 LDA $0911 [$7E:0911] $82A354 18 CLC $82A355 6D 1D 09 ADC $091D [$7E:091D] $82A358 85 B1 STA $B1 [$7E:00B1] $82A35A AD 15 09 LDA $0915 [$7E:0915] $82A35D 18 CLC $82A35E 6D 1F 09 ADC $091F [$7E:091F] $82A361 85 B3 STA $B3 [$7E:00B3] $82A363 AD 17 09 LDA $0917 [$7E:0917] $82A366 18 CLC $82A367 6D 21 09 ADC $0921 [$7E:0921] $82A36A 85 B5 STA $B5 [$7E:00B5] $82A36C AD 19 09 LDA $0919 [$7E:0919] $82A36F 18 CLC $82A370 6D 23 09 ADC $0923 [$7E:0923] $82A373 85 B7 STA $B7 [$7E:00B7] $82A375 28 PLP $82A376 60 RTS $82A377 08 PHP $82A378 C2 30 REP #$30 $82A37A 22 8D AC 90 JSL $90AC8D[$90:AC8D] $82A37E 28 PLP $82A37F 60 RTS $82A380 08 PHP $82A381 C2 30 REP #$30 $82A383 9C 27 07 STZ $0727 [$7E:0727] $82A386 9C 29 07 STZ $0729 [$7E:0729] $82A389 9C 2B 07 STZ $072B [$7E:072B] $82A38C 9C 2D 07 STZ $072D [$7E:072D] $82A38F 9C 2F 07 STZ $072F [$7E:072F] $82A392 9C 31 07 STZ $0731 [$7E:0731] $82A395 9C 33 07 STZ $0733 [$7E:0733] $82A398 9C 35 07 STZ $0735 [$7E:0735] $82A39B 9C 37 07 STZ $0737 [$7E:0737] $82A39E 9C 39 07 STZ $0739 [$7E:0739] $82A3A1 9C 3D 07 STZ $073D [$7E:073D] $82A3A4 9C 3F 07 STZ $073F [$7E:073F] $82A3A7 9C 41 07 STZ $0741 [$7E:0741] $82A3AA 9C 43 07 STZ $0743 [$7E:0743] $82A3AD 9C 45 07 STZ $0745 [$7E:0745] $82A3B0 9C 47 07 STZ $0747 [$7E:0747] $82A3B3 9C 49 07 STZ $0749 [$7E:0749] $82A3B6 9C 4B 07 STZ $074B [$7E:074B] $82A3B9 9C 4D 07 STZ $074D [$7E:074D] $82A3BC 9C 51 07 STZ $0751 [$7E:0751] $82A3BF 9C 53 07 STZ $0753 [$7E:0753] $82A3C2 9C 55 07 STZ $0755 [$7E:0755] $82A3C5 9C 57 07 STZ $0757 [$7E:0757] $82A3C8 9C 59 07 STZ $0759 [$7E:0759] $82A3CB 9C 5B 07 STZ $075B [$7E:075B] $82A3CE 9C 5D 07 STZ $075D [$7E:075D] $82A3D1 9C 5F 07 STZ $075F [$7E:075F] $82A3D4 9C 61 07 STZ $0761 [$7E:0761] $82A3D7 28 PLP $82A3D8 60 RTS ;;; Checks for L or R input during pause screens ;;; $82A505 20 0C A5 JSR $A50C [$82:A50C] $82A508 20 9A A5 JSR $A59A [$82:A59A] $82A50B 60 RTS $82A50C 08 PHP $82A50D C2 30 REP #$30 $82A50F AD E1 05 LDA $05E1 [$7E:05E1] $82A512 89 20 00 BIT #$0020 $82A515 D0 30 BNE $30 [$A547] $82A517 89 10 00 BIT #$0010 $82A51A D0 09 BNE $09 [$A525] $82A51C 80 4D BRA $4D [$A56B] $82A525 AD 53 07 LDA $0753 [$7E:0753] $82A528 C9 02 00 CMP #$0002 $82A52B F0 3E BEQ $3E [$A56B] $82A52D AD 0A C1 LDA $C10A [$82:C10A] $82A530 8D 29 07 STA $0729 [$7E:0729] $82A533 A9 02 00 LDA #$0002 $82A536 8D 27 07 STA $0727 [$7E:0727] $82A539 A9 02 00 LDA #$0002 $82A53C 8D 51 07 STA $0751 [$7E:0751] $82A53F 8D 53 07 STA $0753 [$7E:0753] $82A542 20 15 A6 JSR $A615 [$82:A615] $82A545 80 1D BRA $1D [$A564] $82A564 A9 38 00 LDA #$0038 $82A567 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82A56B 28 PLP $82A56C 60 RTS ;;; Updates the flashing buttons when you change pause screens ;;; $82A56D 08 PHP $82A56E C2 30 REP #$30 $82A570 AD 29 07 LDA $0729 [$7E:0729] $82A573 F0 23 BEQ $23 [$A598] $82A575 3A DEC A $82A576 8D 29 07 STA $0729 [$7E:0729] $82A579 AD 51 07 LDA $0751 [$7E:0751] $82A57C F0 1A BEQ $1A [$A598] $82A57E 3A DEC A $82A57F 0A ASL A $82A580 AA TAX $82A581 A9 00 00 LDA #$0000 $82A584 85 03 STA $03 [$7E:0003] $82A586 BD 82 C1 LDA $C182,x[$82:C184] $82A589 48 PHA $82A58A BD 8A C1 LDA $C18A,x[$82:C18C] $82A58D A8 TAY $82A58E 88 DEY $82A58F BD 86 C1 LDA $C186,x[$82:C188] $82A592 AA TAX $82A593 68 PLA $82A594 22 1F 89 81 JSL $81891F[$81:891F] $82A598 28 PLP $82A599 60 RTS $82A59A 08 PHP $82A59B C2 30 REP #$30 $82A59D A0 D0 00 LDY #$00D0 $82A5A0 A2 18 00 LDX #$0018 $82A5A3 A9 02 00 LDA #$0002 $82A5A6 20 81 A8 JSR $A881 [$82:A881] $82A5A9 A0 D0 00 LDY #$00D0 $82A5AC A2 E8 00 LDX #$00E8 $82A5AF A9 02 00 LDA #$0002 $82A5B2 20 81 A8 JSR $A881 [$82:A881] $82A5B5 28 PLP $82A5B6 60 RTS $82A5B7 08 PHP $82A5B8 C2 30 REP #$30 $82A5BA AD E1 05 LDA $05E1 [$7E:05E1] $82A5BD 89 00 10 BIT #$1000 $82A5C0 F0 2A BEQ $2A [$A5EC] $82A5C2 A9 38 00 LDA #$0038 $82A5C5 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82A5C9 A9 01 00 LDA #$0001 $82A5CC 8D 23 07 STA $0723 [$7E:0723] $82A5CF 8D 25 07 STA $0725 [$7E:0725] $82A5D2 AD 53 07 LDA $0753 [$7E:0753] $82A5D5 48 PHA $82A5D6 A9 01 00 LDA #$0001 $82A5D9 8D 53 07 STA $0753 [$7E:0753] $82A5DC 20 15 A6 JSR $A615 [$82:A615] $82A5DF 68 PLA $82A5E0 8D 53 07 STA $0753 [$7E:0753] $82A5E3 A9 0B 00 LDA #$000B $82A5E6 8D 29 07 STA $0729 [$7E:0729] $82A5E9 EE 98 09 INC $0998 [$7E:0998] $82A5EC 20 4D A8 JSR $A84D [$82:A84D] $82A5EF 28 PLP $82A5F0 60 RTS $82A5F1 08 PHP $82A5F2 8B PHB $82A5F3 4B PHK $82A5F4 AB PLB $82A5F5 C2 30 REP #$30 $82A5F7 AD 29 07 LDA $0729 [$7E:0729] $82A5FA F0 16 BEQ $16 [$A612] $82A5FC 3A DEC A $82A5FD 8D 29 07 STA $0729 [$7E:0729] $82A600 A9 00 00 LDA #$0000 $82A603 85 03 STA $03 [$7E:0003] $82A605 A2 90 00 LDX #$0090 $82A608 A0 D0 00 LDY #$00D0 $82A60B A9 2B 00 LDA #$002B $82A60E 22 1F 89 81 JSL $81891F[$81:891F] $82A612 AB PLB $82A613 28 PLP $82A614 6B RTL $82A615 08 PHP $82A616 C2 30 REP #$30 $82A618 AD 53 07 LDA $0753 [$7E:0753] $82A61B 0A ASL A $82A61C AA TAX $82A61D FC 22 A6 JSR ($A622,x)[$82:A6DF] $82A620 28 PLP $82A621 60 RTS $82A624 db DF $82A626 db 28 $82A628 C2 30 REP #$30 $82A62A 08 PHP $82A62B C2 30 REP #$30 $82A62D A0 0A 00 LDY #$000A $82A630 A2 00 00 LDX #$0000 $82A633 BF 4A 36 7E LDA $7E364A,x[$7E:364A] $82A637 29 FF E3 AND #$E3FF $82A63A 09 00 08 ORA #$0800 $82A63D 9F 4A 36 7E STA $7E364A,x[$7E:364A] $82A641 E8 INX $82A642 E8 INX $82A643 88 DEY $82A644 88 DEY $82A645 D0 EC BNE $EC [$A633] $82A647 28 PLP $82A648 08 PHP $82A649 C2 30 REP #$30 $82A64B A0 0A 00 LDY #$000A $82A64E A2 00 00 LDX #$0000 $82A651 BF 8A 36 7E LDA $7E368A,x[$7E:368A] $82A655 29 FF E3 AND #$E3FF $82A658 09 00 08 ORA #$0800 $82A65B 9F 8A 36 7E STA $7E368A,x[$7E:368A] $82A65F E8 INX $82A660 E8 INX $82A661 88 DEY $82A662 88 DEY $82A663 D0 EC BNE $EC [$A651] $82A665 28 PLP $82A666 08 PHP $82A667 C2 30 REP #$30 $82A669 A0 08 00 LDY #$0008 $82A66C A2 00 00 LDX #$0000 $82A66F BF 58 36 7E LDA $7E3658,x[$7E:3658] $82A673 29 FF E3 AND #$E3FF $82A676 09 00 08 ORA #$0800 $82A679 9F 58 36 7E STA $7E3658,x[$7E:3658] $82A67D E8 INX $82A67E E8 INX $82A67F 88 DEY $82A680 88 DEY $82A681 D0 EC BNE $EC [$A66F] $82A683 28 PLP $82A684 08 PHP $82A685 C2 30 REP #$30 $82A687 A0 08 00 LDY #$0008 $82A68A A2 00 00 LDX #$0000 $82A68D BF 98 36 7E LDA $7E3698,x[$7E:3698] $82A691 29 FF E3 AND #$E3FF $82A694 09 00 08 ORA #$0800 $82A697 9F 98 36 7E STA $7E3698,x[$7E:3698] $82A69B E8 INX $82A69C E8 INX $82A69D 88 DEY $82A69E 88 DEY $82A69F D0 EC BNE $EC [$A68D] $82A6A1 28 PLP $82A6A2 08 PHP $82A6A3 C2 30 REP #$30 $82A6A5 A0 0A 00 LDY #$000A $82A6A8 A2 00 00 LDX #$0000 $82A6AB BF 6C 36 7E LDA $7E366C,x[$7E:366C] $82A6AF 29 FF E3 AND #$E3FF $82A6B2 09 00 14 ORA #$1400 $82A6B5 9F 6C 36 7E STA $7E366C,x[$7E:366C] $82A6B9 E8 INX $82A6BA E8 INX $82A6BB 88 DEY $82A6BC 88 DEY $82A6BD D0 EC BNE $EC [$A6AB] $82A6BF 28 PLP $82A6C0 08 PHP $82A6C1 C2 30 REP #$30 $82A6C3 A0 0A 00 LDY #$000A $82A6C6 A2 00 00 LDX #$0000 $82A6C9 BF AC 36 7E LDA $7E36AC,x[$7E:36AC] $82A6CD 29 FF E3 AND #$E3FF $82A6D0 09 00 14 ORA #$1400 $82A6D3 9F AC 36 7E STA $7E36AC,x[$7E:36AC] $82A6D7 E8 INX $82A6D8 E8 INX $82A6D9 88 DEY $82A6DA 88 DEY $82A6DB D0 EC BNE $EC [$A6C9] $82A6DD 28 PLP $82A6DE 60 RTS $82A6DF C2 30 REP #$30 $82A6E1 08 PHP $82A6E2 C2 30 REP #$30 $82A6E4 A0 08 00 LDY #$0008 $82A6E7 A2 00 00 LDX #$0000 $82A6EA BF 58 36 7E LDA $7E3658,x[$7E:3658] $82A6EE 29 FF E3 AND #$E3FF $82A6F1 09 00 08 ORA #$0800 $82A6F4 9F 58 36 7E STA $7E3658,x[$7E:3658] $82A6F8 E8 INX $82A6F9 E8 INX $82A6FA 88 DEY $82A6FB 88 DEY $82A6FC D0 EC BNE $EC [$A6EA] $82A6FE 28 PLP $82A6FF 08 PHP $82A700 C2 30 REP #$30 $82A702 A0 08 00 LDY #$0008 $82A705 A2 00 00 LDX #$0000 $82A708 BF 98 36 7E LDA $7E3698,x[$7E:3698] $82A70C 29 FF E3 AND #$E3FF $82A70F 09 00 08 ORA #$0800 $82A712 9F 98 36 7E STA $7E3698,x[$7E:3698] $82A716 E8 INX $82A717 E8 INX $82A718 88 DEY $82A719 88 DEY $82A71A D0 EC BNE $EC [$A708] $82A71C 28 PLP $82A71D 08 PHP $82A71E C2 30 REP #$30 $82A720 A0 0A 00 LDY #$000A $82A723 A2 00 00 LDX #$0000 $82A726 BF 4A 36 7E LDA $7E364A,x[$7E:364A] $82A72A 29 FF E3 AND #$E3FF $82A72D 09 00 14 ORA #$1400 $82A730 9F 4A 36 7E STA $7E364A,x[$7E:364A] $82A734 E8 INX $82A735 E8 INX $82A736 88 DEY $82A737 88 DEY $82A738 D0 EC BNE $EC [$A726] $82A73A 28 PLP $82A73B 08 PHP $82A73C C2 30 REP #$30 $82A73E A0 0A 00 LDY #$000A $82A741 A2 00 00 LDX #$0000 $82A744 BF 8A 36 7E LDA $7E368A,x[$7E:368A] $82A748 29 FF E3 AND #$E3FF $82A74B 09 00 14 ORA #$1400 $82A74E 9F 8A 36 7E STA $7E368A,x[$7E:368A] $82A752 E8 INX $82A753 E8 INX $82A754 88 DEY $82A755 88 DEY $82A756 D0 EC BNE $EC [$A744] $82A758 28 PLP $82A759 08 PHP $82A75A C2 30 REP #$30 $82A75C A0 0A 00 LDY #$000A $82A75F A2 00 00 LDX #$0000 $82A762 BF 6C 36 7E LDA $7E366C,x[$7E:366C] $82A766 29 FF E3 AND #$E3FF $82A769 09 00 14 ORA #$1400 $82A76C 9F 6C 36 7E STA $7E366C,x[$7E:366C] $82A770 E8 INX $82A771 E8 INX $82A772 88 DEY $82A773 88 DEY $82A774 D0 EC BNE $EC [$A762] $82A776 28 PLP $82A777 08 PHP $82A778 C2 30 REP #$30 $82A77A A0 0A 00 LDY #$000A $82A77D A2 00 00 LDX #$0000 $82A780 BF AC 36 7E LDA $7E36AC,x[$7E:36AC] $82A784 29 FF E3 AND #$E3FF $82A787 09 00 14 ORA #$1400 $82A78A 9F AC 36 7E STA $7E36AC,x[$7E:36AC] $82A78E E8 INX $82A78F E8 INX $82A790 88 DEY $82A791 88 DEY $82A792 D0 EC BNE $EC [$A780] $82A794 28 PLP $82A795 60 RTS $82A796 C2 30 REP #$30 $82A798 08 PHP $82A799 C2 30 REP #$30 $82A79B A0 0A 00 LDY #$000A $82A79E A2 00 00 LDX #$0000 $82A7A1 BF 6C 36 7E LDA $7E366C,x[$7E:366C] $82A7A5 29 FF E3 AND #$E3FF $82A7A8 09 00 08 ORA #$0800 $82A7AB 9F 6C 36 7E STA $7E366C,x[$7E:366C] $82A7AF E8 INX $82A7B0 E8 INX $82A7B1 88 DEY $82A7B2 88 DEY $82A7B3 D0 EC BNE $EC [$A7A1] $82A7B5 28 PLP $82A7B6 08 PHP $82A7B7 C2 30 REP #$30 $82A7B9 A0 0A 00 LDY #$000A $82A7BC A2 00 00 LDX #$0000 $82A7BF BF AC 36 7E LDA $7E36AC,x[$7E:36AC] $82A7C3 29 FF E3 AND #$E3FF $82A7C6 09 00 08 ORA #$0800 $82A7C9 9F AC 36 7E STA $7E36AC,x[$7E:36AC] $82A7CD E8 INX $82A7CE E8 INX $82A7CF 88 DEY $82A7D0 88 DEY $82A7D1 D0 EC BNE $EC [$A7BF] $82A7D3 28 PLP $82A7D4 08 PHP $82A7D5 C2 30 REP #$30 $82A7D7 A0 08 00 LDY #$0008 $82A7DA A2 00 00 LDX #$0000 $82A7DD BF 58 36 7E LDA $7E3658,x[$7E:3658] $82A7E1 29 FF E3 AND #$E3FF $82A7E4 09 00 08 ORA #$0800 $82A7E7 9F 58 36 7E STA $7E3658,x[$7E:3658] $82A7EB E8 INX $82A7EC E8 INX $82A7ED 88 DEY $82A7EE 88 DEY $82A7EF D0 EC BNE $EC [$A7DD] $82A7F1 28 PLP $82A7F2 08 PHP $82A7F3 C2 30 REP #$30 $82A7F5 A0 08 00 LDY #$0008 $82A7F8 A2 00 00 LDX #$0000 $82A7FB BF 98 36 7E LDA $7E3698,x[$7E:3698] $82A7FF 29 FF E3 AND #$E3FF $82A802 09 00 08 ORA #$0800 $82A805 9F 98 36 7E STA $7E3698,x[$7E:3698] $82A809 E8 INX $82A80A E8 INX $82A80B 88 DEY $82A80C 88 DEY $82A80D D0 EC BNE $EC [$A7FB] $82A80F 28 PLP $82A810 08 PHP $82A811 C2 30 REP #$30 $82A813 A0 0A 00 LDY #$000A $82A816 A2 00 00 LDX #$0000 $82A819 BF 4A 36 7E LDA $7E364A,x[$7E:364A] $82A81D 29 FF E3 AND #$E3FF $82A820 09 00 14 ORA #$1400 $82A823 9F 4A 36 7E STA $7E364A,x[$7E:364A] $82A827 E8 INX $82A828 E8 INX $82A829 88 DEY $82A82A 88 DEY $82A82B D0 EC BNE $EC [$A819] $82A82D 28 PLP $82A82E 08 PHP $82A82F C2 30 REP #$30 $82A831 A0 0A 00 LDY #$000A $82A834 A2 00 00 LDX #$0000 $82A837 BF 8A 36 7E LDA $7E368A,x[$7E:368A] $82A83B 29 FF E3 AND #$E3FF $82A83E 09 00 14 ORA #$1400 $82A841 9F 8A 36 7E STA $7E368A,x[$7E:368A] $82A845 E8 INX $82A846 E8 INX $82A847 88 DEY $82A848 88 DEY $82A849 D0 EC BNE $EC [$A837] $82A84B 28 PLP $82A84C 60 RTS $82A84D 08 PHP $82A84E C2 30 REP #$30 $82A850 AE 30 03 LDX $0330 [$7E:0330] $82A853 A9 80 00 LDA #$0080 $82A856 95 D0 STA $D0,x [$7E:00D0] $82A858 E8 INX $82A859 E8 INX $82A85A A9 40 36 LDA #$3640 $82A85D 95 D0 STA $D0,x [$7E:00D2] $82A85F E8 INX $82A860 E8 INX $82A861 E2 20 SEP #$20 $82A863 A9 7E LDA #$7E $82A865 95 D0 STA $D0,x [$7E:00D4] $82A867 C2 20 REP #$20 $82A869 E8 INX $82A86A A5 59 LDA $59 [$7E:0059] $82A86C 29 FC 00 AND #$00FC $82A86F EB XBA $82A870 18 CLC $82A871 69 20 03 ADC #$0320 $82A874 95 D0 STA $D0,x [$7E:00D5] $82A876 E8 INX $82A877 E8 INX $82A878 8E 30 03 STX $0330 [$7E:0330] $82A87B 28 PLP $82A87C 60 RTS $82A881 08 PHP $82A882 DA PHX $82A883 C2 30 REP #$30 $82A885 86 12 STX $12 [$7E:0012] $82A887 84 14 STY $14 [$7E:0014] $82A889 3A DEC A $82A88A 0A ASL A $82A88B AA TAX $82A88C BD B2 C0 LDA $C0B2,x[$82:C0B4] $82A88F A8 TAY $82A890 B9 00 00 LDA $0000,y[$7E:072B] $82A893 3A DEC A $82A894 99 00 00 STA $0000,y[$7E:072B] $82A897 F0 02 BEQ $02 [$A89B] $82A899 10 3F BPL $3F [$A8DA] $82A89B 84 18 STY $18 [$7E:0018] $82A89D BD C4 C0 LDA $C0C4,x[$82:C0C6] $82A8A0 A8 TAY $82A8A1 B9 00 00 LDA $0000,y[$7E:073F] $82A8A4 1A INC A $82A8A5 99 00 00 STA $0000,y[$7E:073F] $82A8A8 0A ASL A $82A8A9 18 CLC $82A8AA 79 00 00 ADC $0000,y[$7E:073F] $82A8AD 85 16 STA $16 [$7E:0016] $82A8AF BD E8 C0 LDA $C0E8,x[$82:C0EA] $82A8B2 18 CLC $82A8B3 65 16 ADC $16 [$7E:0016] $82A8B5 A8 TAY $82A8B6 B9 00 00 LDA $0000,y[$82:C10F] $82A8B9 29 FF 00 AND #$00FF $82A8BC C9 FF 00 CMP #$00FF $82A8BF D0 14 BNE $14 [$A8D5] $82A8C1 BD C4 C0 LDA $C0C4,x[$82:C0C6] $82A8C4 A8 TAY $82A8C5 A9 00 00 LDA #$0000 $82A8C8 99 00 00 STA $0000,y[$7E:073F] $82A8CB BD E8 C0 LDA $C0E8,x[$82:C0EA] $82A8CE A8 TAY $82A8CF B9 00 00 LDA $0000,y[$82:C10C] $82A8D2 29 FF 00 AND #$00FF $82A8D5 A4 18 LDY $18 [$7E:0018] $82A8D7 99 00 00 STA $0000,y[$7E:072B] $82A8DA BD C4 C0 LDA $C0C4,x[$82:C0C6] $82A8DD A8 TAY $82A8DE B9 00 00 LDA $0000,y[$7E:073F] $82A8E1 0A ASL A $82A8E2 18 CLC $82A8E3 79 00 00 ADC $0000,y[$7E:073F] $82A8E6 85 18 STA $18 [$7E:0018] $82A8E8 BD E8 C0 LDA $C0E8,x[$82:C0EA] $82A8EB 18 CLC $82A8EC 65 18 ADC $18 [$7E:0018] $82A8EE 1A INC A $82A8EF A8 TAY $82A8F0 5A PHY $82A8F1 A9 03 00 LDA #$0003 $82A8F4 0A ASL A $82A8F5 A8 TAY $82A8F6 B9 FA C0 LDA $C0FA,y[$82:C100] $82A8F9 85 03 STA $03 [$7E:0003] $82A8FB 7A PLY $82A8FC C8 INY $82A8FD B9 00 00 LDA $0000,y[$82:C10E] $82A900 29 FF 00 AND #$00FF $82A903 85 18 STA $18 [$7E:0018] $82A905 BD D6 C0 LDA $C0D6,x[$82:C0D8] $82A908 A8 TAY $82A909 B9 00 00 LDA $0000,y[$7E:0753] $82A90C 29 FF 00 AND #$00FF $82A90F 0A ASL A $82A910 85 1A STA $1A [$7E:001A] $82A912 BD E4 C1 LDA $C1E4,x[$82:C1E6] $82A915 18 CLC $82A916 65 1A ADC $1A [$7E:001A] $82A918 A8 TAY $82A919 B9 00 00 LDA $0000,y[$82:C1FC] $82A91C 18 CLC $82A91D 65 18 ADC $18 [$7E:0018] $82A91F A6 12 LDX $12 [$7E:0012] $82A921 A4 14 LDY $14 [$7E:0014] $82A923 88 DEY $82A924 22 1F 89 81 JSL $81891F[$81:891F] $82A928 FA PLX $82A929 28 PLP $82A92A 60 RTS ;;; Causes the flashing for sprites in the pause screen ;;; ; (Map arrows, status selection box, etc.) $82A92B 08 PHP $82A92C E2 20 SEP #$20 $82A92E A9 00 LDA #$00 $82A930 EB XBA $82A931 A9 00 LDA #$00 $82A933 AD 3B 07 LDA $073B [$7E:073B] $82A936 F0 4D BEQ $4D [$A985] $82A938 3A DEC A $82A939 8D 3B 07 STA $073B [$7E:073B] $82A93C D0 47 BNE $47 [$A985] $82A93E AD 4F 07 LDA $074F [$7E:074F] $82A941 1A INC A $82A942 8D 4F 07 STA $074F [$7E:074F] $82A945 0A ASL A $82A946 18 CLC $82A947 6D 4F 07 ADC $074F [$7E:074F] $82A94A AA TAX $82A94B BD 0C C1 LDA $C10C,x[$82:C10F] $82A94E C9 FF CMP #$FF $82A950 D0 12 BNE $12 [$A964] $82A952 C2 30 REP #$30 $82A954 A9 2A 00 LDA #$002A $82A957 22 4D 91 80 JSL $80914D[$80:914D] ; Sound library 3, $0653 = 06h $82A95B E2 20 SEP #$20 $82A95D A9 00 LDA #$00 $82A95F EB XBA $82A960 A9 00 LDA #$00 $82A962 80 DE BRA $DE [$A942] $82A964 8D 3B 07 STA $073B [$7E:073B] $82A967 AD 4F 07 LDA $074F [$7E:074F] $82A96A C2 30 REP #$30 $82A96C EB XBA $82A96D 4A LSR A $82A96E 4A LSR A $82A96F 4A LSR A $82A970 18 CLC $82A971 69 1E 00 ADC #$001E $82A974 A8 TAY $82A975 A2 1E 00 LDX #$001E $82A978 B9 87 A9 LDA $A987,y[$82:A9C5] $82A97B 9F 60 C1 7E STA $7EC160,x[$7E:C17E] $82A97F 88 DEY $82A980 88 DEY $82A981 CA DEX $82A982 CA DEX $82A983 10 F3 BPL $F3 [$A978] $82A985 28 PLP $82A986 60 RTS $82A987 db 00, 00, 7F, 7E, 5F, 01, 14, 7C, FF, 7F, 73, 4E, 00, 00, 8C, 31, 70, 00, 70, 28, 8C, 31, 00, 00, 00, 00, 8C, 31, 00, 00, 8C, 31, 00, 00, 1C, 6E, 1B, 01, 12, 74, 9C, 73, 94, 52, A6, 00, 4D, 29, 4E, 00, 92, 30, 4B, 29, A6, 00, 84, 10, 4A, 29, 00, 00, 8E, 29, 00, 00, BA, 61, F9, 00, 10, 68, 5A, 6B, B5, 56, 2A, 01, 30, 25, 4C, 00, B4, 34, 4B, 29, 2A, 01, C6, 18, 08, 21, 00, 00, B0, 25, 00, 00, 77, 55, B6, 00, 0C, 58, 18, 63, D6, 5A, 8E, 01, 11, 21, 4B, 00, F5, 3C, 2B, 25, 8E, 01, 4A, 29, E7, 1C, 00, 00, B1, 21, 00, 00, 56, 51, 93, 00, 0A, 50, 18, 63, 18, 63, 12, 02, F2, 1C, 28, 00, F6, 3C, 0B, 21, 12, 02, CE, 39, A5, 14, 00, 00, D3, 1D, 00, 00, F4, 44, 12, 00, 07, 44, D6, 5A, 39, 67, 96, 02, D5, 18, 04, 00, 18, 45, CB, 18, 96, 02, 52, 4A, 63, 0C, 00, 00, D6, 15, 00, 00, D2, 3C, 70, 00, 05, 38, 94, 52, 9C, 73, FA, 02, 7A, 0C, 02, 00, 5A, 49, 6F, 0C, FA, 02, 18, 63, 21, 04, 00, 00, FA, 0D, 00, 00, 0D, 20, 0A, 00, 02, 2C, 73, 4E, FF, 7F, 9F, 03, 1F, 00, 00, 00, 9D, 55, 1D, 00, 9F, 03, FF, 7F, 00, 00, 00, 00, 3F, 02, 00, 00, D2, 3C, 70, 00, 05, 38, 94, 52, 9C, 73, FA, 02, 7A, 0C, 02, 00, 5A, 49, 6F, 0C, FA, 02, 18, 63, 21, 04, 00, 00, FA, 0D, 00, 00, F4, 44, 12, 00, 07, 44, D6, 5A, 39, 67, 96, 02, D5, 18, 04, 00, 18, 45, CB, 18, 96, 02, 52, 4A, 63, 0C, 00, 00, D6, 15, 00, 00, 56, 51, 93, 00, 0A, 50, 18, 63, 18, 63, 12, 02, F2, 1C, 28, 00, F6, 3C, 0B, 21, 12, 02, CE, 39, A5, 14, 00, 00, D3, 1D, 00, 00, 77, 55, B6, 00, 0C, 58, 18, 63, D6, 5A, 8E, 01, 11, 21, 4B, 00, F5, 3C, 2B, 25, 8E, 01, 4A, 29, E7, 1C, 00, 00, B1, 21, 00, 00, BA, 61, F9, 00, 10, 68, 5A, 6B, B5, 56, 2A, 01, 30, 25, 4C, 00, B4, 34, 4B, 29, 2A, 01, C6, 18, 08, 21, 00, 00, B0, 25, 00, 00, 1C, 6E, 1B, 01, 12, 74, 9C, 73, 94, 52, A6, 00, 4D, 29, 4E, 00, 92, 30, 4B, 29, A6, 00, 84, 10, 4A, 29, 00, 00, 8E, 29 $82AB47 08 PHP $82AB48 C2 30 REP #$30 $82AB4A A5 B1 LDA $B1 [$7E:00B1] $82AB4C 85 BD STA $BD [$7E:00BD] $82AB4E A5 B3 LDA $B3 [$7E:00B3] $82AB50 85 BF STA $BF [$7E:00BF] $82AB52 64 B1 STZ $B1 [$7E:00B1] $82AB54 64 B3 STZ $B3 [$7E:00B3] $82AB56 AD D4 09 LDA $09D4 [$7E:09D4] $82AB59 F0 3A BEQ $3A [$AB95] $82AB5B AD C0 09 LDA $09C0 [$7E:09C0] $82AB5E F0 35 BEQ $35 [$AB95] $82AB60 A2 2A BF LDX #$BF2A $82AB63 A0 82 00 LDY #$0082 $82AB66 C9 01 00 CMP #$0001 $82AB69 F0 06 BEQ $06 [$AB71] $82AB71 84 02 STY $02 [$7E:0002] $82AB73 86 00 STX $00 [$7E:0000] $82AB75 A9 04 00 LDA #$0004 $82AB78 85 12 STA $12 [$7E:0012] $82AB7A A2 00 00 LDX #$0000 $82AB7D A0 00 00 LDY #$0000 $82AB80 BF 8E 3A 7E LDA $7E3A8E,x[$7E:3A8E] $82AB84 29 00 FC AND #$FC00 $82AB87 17 00 ORA [$00],y[$82:BF2A] $82AB89 9F 8E 3A 7E STA $7E3A8E,x[$7E:3A8E] $82AB8D C8 INY $82AB8E C8 INY $82AB8F E8 INX $82AB90 E8 INX $82AB91 C6 12 DEC $12 [$7E:0012] $82AB93 D0 EB BNE $EB [$AB80] $82AB95 9C 41 07 STZ $0741 [$7E:0741] $82AB98 AD 0C C1 LDA $C10C [$82:C10C] $82AB9B 29 FF 00 AND #$00FF $82AB9E 8D 2D 07 STA $072D [$7E:072D] $82ABA1 9C 43 07 STZ $0743 [$7E:0743] $82ABA4 AD 65 C1 LDA $C165 [$82:C165] $82ABA7 29 FF 00 AND #$00FF $82ABAA 8D 2F 07 STA $072F [$7E:072F] $82ABAD AD D4 09 LDA $09D4 [$7E:09D4] $82ABB0 F0 08 BEQ $08 [$ABBA] $82ABB2 A9 00 00 LDA #$0000 $82ABB5 8D 55 07 STA $0755 [$7E:0755] $82ABB8 80 5B BRA $5B [$AC15] $82AC15 AD D6 09 LDA $09D6 [$7E:09D6] $82AC18 F0 06 BEQ $06 [$AC20] $82AC1A 20 DD AD JSR $ADDD [$82:ADDD] $82AC1D 20 E0 B1 JSR $B1E0 [$82:B1E0] $82AC20 28 PLP $82AC21 60 RTS $82AC22 08 PHP $82AC23 8B PHB $82AC24 4B PHK $82AC25 AB PLB $82AC26 E2 30 SEP #$30 $82AC28 A9 00 LDA #$00 $82AC2A 8D 16 21 STA $2116 [$7E:2116] $82AC2D A9 30 LDA #$30 $82AC2F 8D 17 21 STA $2117 [$7E:2117] $82AC32 A9 80 LDA #$80 $82AC34 8D 15 21 STA $2115 [$7E:2115] $82AC37 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $82AC3B db 01, 01, 18, 00, 38, 7E, 00, 08 $82AC43 A9 02 LDA #$02 $82AC45 8D 0B 42 STA $420B [$7E:420B] $82AC48 64 B3 STZ $B3 [$7E:00B3] $82AC4A 64 B4 STZ $B4 [$7E:00B4] $82AC4C AB PLB $82AC4D 28 PLP $82AC4E 6B RTL $82AC4F 08 PHP $82AC50 C2 30 REP #$30 $82AC52 AD 55 07 LDA $0755 [$7E:0755] $82AC55 29 FF 00 AND #$00FF $82AC58 0A ASL A $82AC59 AA TAX $82AC5A FC 68 AC JSR ($AC68,x)[$82:AC70] $82AC5D 20 67 B2 JSR $B267 [$82:B267] $82AC60 20 A2 B2 JSR $B2A2 [$82:B2A2] $82AC63 20 E0 B1 JSR $B1E0 [$82:B1E0] $82AC66 28 PLP $82AC67 60 RTS $82AC68 db 70 $82AC6A db BE $82AC6C db C2 $82AC6E db 50 $82AC70 08 PHP $82AC71 C2 30 REP #$30 $82AC73 AD 55 07 LDA $0755 [$7E:0755] $82AC76 EB XBA $82AC77 29 FF 00 AND #$00FF $82AC7A 0A ASL A $82AC7B AA TAX $82AC7C FC 87 AC JSR ($AC87,x)[$82:AE8B] $82AC7F 20 8B AC JSR $AC8B [$82:AC8B] $82AC82 20 0A AD JSR $AD0A [$82:AD0A] $82AC85 28 PLP $82AC86 60 RTS $82AC87 db 8B $82AC8B 08 PHP $82AC8C C2 30 REP #$30 $82AC8E AD 55 07 LDA $0755 [$7E:0755] $82AC91 85 12 STA $12 [$7E:0012] $82AC93 A5 8F LDA $8F [$7E:008F] $82AC95 89 00 01 BIT #$0100 $82AC98 F0 18 BEQ $18 [$ACB2] $82AC9A 89 00 04 BIT #$0400 $82AC9D D0 0B BNE $0B [$ACAA] $82AC9F A2 00 00 LDX #$0000 $82ACA2 20 B7 B4 JSR $B4B7 [$82:B4B7] $82ACA5 C9 FF FF CMP #$FFFF $82ACA8 D0 06 BNE $06 [$ACB0] $82ACB0 28 PLP $82ACB1 60 RTS $82ACB2 89 00 08 BIT #$0800 $82ACB5 D0 38 BNE $38 [$ACEF] $82ACB7 89 00 04 BIT #$0400 $82ACBA F0 F4 BEQ $F4 [$ACB0] $82ACBC AD 55 07 LDA $0755 [$7E:0755] $82ACBF 29 00 FF AND #$FF00 $82ACC2 C9 00 01 CMP #$0100 $82ACC5 F0 20 BEQ $20 [$ACE7] $82ACC7 AD C0 09 LDA $09C0 [$7E:09C0] $82ACCA C9 01 00 CMP #$0001 $82ACCD F0 18 BEQ $18 [$ACE7] $82ACE7 A2 00 00 LDX #$0000 $82ACEA 20 56 B4 JSR $B456 [$82:B456] $82ACED 80 19 BRA $19 [$AD08] $82AD08 28 PLP $82AD09 60 RTS $82AD0A 08 PHP $82AD0B C2 30 REP #$30 $82AD0D AD 55 07 LDA $0755 [$7E:0755] $82AD10 89 FF 00 BIT #$00FF $82AD13 D0 0B BNE $0B [$AD20] $82AD15 EB XBA $82AD16 29 FF 00 AND #$00FF $82AD19 0A ASL A $82AD1A AA TAX $82AD1B FC 25 AD JSR ($AD25,x)[$82:AD29] $82AD1E 28 PLP $82AD1F 60 RTS $82AD20 20 EF AD JSR $ADEF [$82:ADEF] $82AD23 28 PLP $82AD24 60 RTS $82AD25 db 29 $82AD29 AD C0 09 LDA $09C0 [$7E:09C0] $82AD2C C9 01 00 CMP #$0001 $82AD2F D0 1A BNE $1A [$AD4B] $82AD31 AD B5 05 LDA $05B5 [$7E:05B5] $82AD34 29 1F 00 AND #$001F $82AD37 0A ASL A $82AD38 AA TAX $82AD39 BD 5D AD LDA $AD5D,x[$82:AD7B] $82AD3C 8F CC C0 7E STA $7EC0CC[$7E:C0CC] $82AD40 BD 9D AD LDA $AD9D,x[$82:ADBB] $82AD43 8F D6 C0 7E STA $7EC0D6[$7E:C0D6] $82AD47 20 01 AE JSR $AE01 [$82:AE01] $82AD4A 60 RTS $82AD5D db 9E, 03, 7D, 07, 5C, 0B, 5B, 0F, 3A, 13, 1A, 17, 19, 1F, F8, 22, D7, 26, D6, 2A, B6, 2E, 95, 36, 94, 3A, 73, 3E, 53, 42, 52, 4A, 52, 4A, 53, 42, 73, 3E, 94, 3A, 95, 36, B6, 2E, D6, 2A, D7, 26, F8, 22, 19, 1F, 1A, 17, 3A, 13, 5B, 0F, 5C, 0B, 7D, 07, 9E, 03, 56, 01, 55, 01, 54, 05, 54, 09, 53, 0D, 52, 0D, 52, 11, 51, 15, 70, 19, 70, 1D, 6F, 1D, 6E, 21, 6E, 25, 6D, 29, 6C, 29, 8C, 31, 8C, 31, 6C, 29, 6D, 29, 6E, 25, 6E, 21, 6F, 1D, 70, 1D, 70, 19, 51, 15, 52, 11, 52, 0D, 53, 0D, 54, 09, 54, 05, 55, 01, 56, 01 $82ADDD A9 9E 03 LDA #$039E $82ADE0 8F D6 C0 7E STA $7EC0D6[$7E:C0D6] $82ADE4 A9 56 01 LDA #$0156 $82ADE7 8F CC C0 7E STA $7EC0CC[$7E:C0CC] $82ADEB 20 01 AE JSR $AE01 [$82:AE01] $82ADEE 60 RTS $82ADEF A9 9E 03 LDA #$039E $82ADF2 8F D6 C0 7E STA $7EC0D6[$7E:C0D6] $82ADF6 A9 56 01 LDA #$0156 $82ADF9 8F CC C0 7E STA $7EC0CC[$7E:C0CC] $82ADFD 20 46 AE JSR $AE46 [$82:AE46] $82AE00 60 RTS $82AE01 08 PHP $82AE02 C2 30 REP #$30 $82AE04 08 PHP $82AE05 C2 30 REP #$30 $82AE07 A0 10 00 LDY #$0010 $82AE0A A2 00 00 LDX #$0000 $82AE0D BF 02 39 7E LDA $7E3902,x[$7E:3902] $82AE11 29 FF E3 AND #$E3FF $82AE14 09 00 18 ORA #$1800 $82AE17 9F 02 39 7E STA $7E3902,x[$7E:3902] $82AE1B 8A TXA $82AE1C 18 CLC $82AE1D 69 40 00 ADC #$0040 $82AE20 AA TAX $82AE21 88 DEY $82AE22 88 DEY $82AE23 D0 E8 BNE $E8 [$AE0D] $82AE25 28 PLP $82AE26 08 PHP $82AE27 C2 30 REP #$30 $82AE29 A0 04 00 LDY #$0004 $82AE2C A2 00 00 LDX #$0000 $82AE2F BF 02 3B 7E LDA $7E3B02,x[$7E:3B02] $82AE33 29 FF E3 AND #$E3FF $82AE36 09 00 18 ORA #$1800 $82AE39 9F 02 3B 7E STA $7E3B02,x[$7E:3B02] $82AE3D E8 INX $82AE3E E8 INX $82AE3F 88 DEY $82AE40 88 DEY $82AE41 D0 EC BNE $EC [$AE2F] $82AE43 28 PLP $82AE44 28 PLP $82AE45 60 RTS $82AE46 08 PHP $82AE47 C2 30 REP #$30 $82AE49 08 PHP $82AE4A C2 30 REP #$30 $82AE4C A0 10 00 LDY #$0010 $82AE4F A2 00 00 LDX #$0000 $82AE52 BF 02 39 7E LDA $7E3902,x[$7E:3902] $82AE56 29 FF E3 AND #$E3FF $82AE59 09 00 1C ORA #$1C00 $82AE5C 9F 02 39 7E STA $7E3902,x[$7E:3902] $82AE60 8A TXA $82AE61 18 CLC $82AE62 69 40 00 ADC #$0040 $82AE65 AA TAX $82AE66 88 DEY $82AE67 88 DEY $82AE68 D0 E8 BNE $E8 [$AE52] $82AE6A 28 PLP $82AE6B 08 PHP $82AE6C C2 30 REP #$30 $82AE6E A0 04 00 LDY #$0004 $82AE71 A2 00 00 LDX #$0000 $82AE74 BF 02 3B 7E LDA $7E3B02,x[$7E:3B02] $82AE78 29 FF E3 AND #$E3FF $82AE7B 09 00 1C ORA #$1C00 $82AE7E 9F 02 3B 7E STA $7E3B02,x[$7E:3B02] $82AE82 E8 INX $82AE83 E8 INX $82AE84 88 DEY $82AE85 88 DEY $82AE86 D0 EC BNE $EC [$AE74] $82AE88 28 PLP $82AE89 28 PLP $82AE8A 60 RTS $82AE8B 08 PHP $82AE8C C2 30 REP #$30 $82AE8E A5 8F LDA $8F [$7E:008F] $82AE90 89 80 00 BIT #$0080 $82AE93 F0 66 BEQ $66 [$AEFB] $82AEFB 28 PLP $82AEFC 60 RTS $82AFBE 08 PHP $82AFBF C2 30 REP #$30 $82AFC1 20 DB AF JSR $AFDB [$82:AFDB] $82AFC4 AD A6 09 LDA $09A6 [$7E:09A6] $82AFC7 85 24 STA $24 [$7E:0024] $82AFC9 AD A8 09 LDA $09A8 [$7E:09A8] $82AFCC F0 0B BEQ $0B [$AFD9] $82AFCE A9 0A 00 LDA #$000A $82AFD1 85 18 STA $18 [$7E:0018] $82AFD3 20 68 B5 JSR $B568 [$82:B568] $82AFD6 20 68 B0 JSR $B068 [$82:B068] $82AFD9 28 PLP $82AFDA 60 RTS $82AFDB 08 PHP $82AFDC C2 30 REP #$30 $82AFDE AD 55 07 LDA $0755 [$7E:0755] $82AFE1 85 12 STA $12 [$7E:0012] $82AFE3 A5 8F LDA $8F [$7E:008F] $82AFE5 89 00 01 BIT #$0100 $82AFE8 F0 20 BEQ $20 [$B00A] $82B00A 89 00 04 BIT #$0400 $82B00D D0 37 BNE $37 [$B046] $82B00F 89 00 08 BIT #$0800 $82B012 F0 52 BEQ $52 [$B066] $82B014 AD 55 07 LDA $0755 [$7E:0755] $82B017 29 00 FF AND #$FF00 $82B01A F0 18 BEQ $18 [$B034] $82B01C AD 55 07 LDA $0755 [$7E:0755] $82B01F 38 SEC $82B020 E9 00 01 SBC #$0100 $82B023 8D 55 07 STA $0755 [$7E:0755] $82B026 EB XBA $82B027 29 FF 00 AND #$00FF $82B02A 0A ASL A $82B02B AA TAX $82B02C 20 89 B4 JSR $B489 [$82:B489] $82B02F C9 FF FF CMP #$FFFF $82B032 D0 32 BNE $32 [$B066] $82B046 AD 76 0A LDA $0A76 [$7E:0A76] $82B049 D0 1B BNE $1B [$B066] $82B04B AD 55 07 LDA $0755 [$7E:0755] $82B04E C9 01 04 CMP #$0401 $82B051 F0 13 BEQ $13 [$B066] $82B053 AD 55 07 LDA $0755 [$7E:0755] $82B056 18 CLC $82B057 69 00 01 ADC #$0100 $82B05A 8D 55 07 STA $0755 [$7E:0755] $82B05D EB XBA $82B05E 29 FF 00 AND #$00FF $82B061 0A ASL A $82B062 AA TAX $82B063 20 56 B4 JSR $B456 [$82:B456] $82B066 28 PLP $82B067 60 RTS $82B068 08 PHP $82B069 C2 30 REP #$30 $82B06B A5 24 LDA $24 [$7E:0024] $82B06D 49 FF FF EOR #$FFFF $82B070 2D A6 09 AND $09A6 [$7E:09A6] $82B073 89 04 00 BIT #$0004 $82B076 D0 21 BNE $21 [$B099] $82B078 89 08 00 BIT #$0008 $82B07B F0 43 BEQ $43 [$B0C0] $82B0C0 28 PLP $82B0C1 60 RTS $82B0C2 08 PHP $82B0C3 C2 30 REP #$30 $82B0C5 20 D2 B0 JSR $B0D2 [$82:B0D2] $82B0C8 A9 12 00 LDA #$0012 $82B0CB 85 18 STA $18 [$7E:0018] $82B0CD 20 68 B5 JSR $B568 [$82:B568] $82B0D0 28 PLP $82B0D1 60 RTS $82B0D2 08 PHP $82B0D3 C2 30 REP #$30 $82B0D5 AD 55 07 LDA $0755 [$7E:0755] $82B0D8 85 12 STA $12 [$7E:0012] $82B0DA A5 8F LDA $8F [$7E:008F] $82B0DC 89 00 02 BIT #$0200 $82B0DF F0 1D BEQ $1D [$B0FE] $82B0E1 89 00 04 BIT #$0400 $82B0E4 D0 10 BNE $10 [$B0F6] $82B0E6 A2 00 00 LDX #$0000 $82B0E9 20 3F B4 JSR $B43F [$82:B43F] $82B0EC C9 00 00 CMP #$0000 $82B0EF D0 5D BNE $5D [$B14E] $82B0FE 89 00 08 BIT #$0800 $82B101 D0 30 BNE $30 [$B133] $82B103 89 00 04 BIT #$0400 $82B106 F0 46 BEQ $46 [$B14E] $82B108 AD 55 07 LDA $0755 [$7E:0755] $82B10B 29 00 FF AND #$FF00 $82B10E C9 00 05 CMP #$0500 $82B111 F0 18 BEQ $18 [$B12B] $82B113 AD 55 07 LDA $0755 [$7E:0755] $82B116 18 CLC $82B117 69 00 01 ADC #$0100 $82B11A 8D 55 07 STA $0755 [$7E:0755] $82B11D EB XBA $82B11E 29 FF 00 AND #$00FF $82B121 0A ASL A $82B122 AA TAX $82B123 20 B7 B4 JSR $B4B7 [$82:B4B7] $82B126 C9 FF FF CMP #$FFFF $82B129 D0 23 BNE $23 [$B14E] $82B12B A2 00 00 LDX #$0000 $82B12E 20 11 B5 JSR $B511 [$82:B511] $82B131 80 1B BRA $1B [$B14E] $82B14E 28 PLP $82B14F 60 RTS $82B150 08 PHP $82B151 C2 30 REP #$30 $82B153 20 60 B1 JSR $B160 [$82:B160] $82B156 A9 12 00 LDA #$0012 $82B159 85 18 STA $18 [$7E:0018] $82B15B 20 68 B5 JSR $B568 [$82:B568] $82B15E 28 PLP $82B15F 60 RTS $82B160 08 PHP $82B161 C2 30 REP #$30 $82B163 AD 55 07 LDA $0755 [$7E:0755] $82B166 85 12 STA $12 [$7E:0012] $82B168 A5 8F LDA $8F [$7E:008F] $82B16A 89 00 02 BIT #$0200 $82B16D F0 22 BEQ $22 [$B191] $82B16F 89 00 08 BIT #$0800 $82B172 D0 0B BNE $0B [$B17F] $82B174 A2 08 00 LDX #$0008 $82B177 20 89 B4 JSR $B489 [$82:B489] $82B17A C9 FF FF CMP #$FFFF $82B17D D0 5F BNE $5F [$B1DE] $82B191 89 00 04 BIT #$0400 $82B194 D0 2D BNE $2D [$B1C3] $82B196 89 00 08 BIT #$0800 $82B199 F0 43 BEQ $43 [$B1DE] $82B19B AD 55 07 LDA $0755 [$7E:0755] $82B19E 29 00 FF AND #$FF00 $82B1A1 F0 18 BEQ $18 [$B1BB] $82B1A3 AD 55 07 LDA $0755 [$7E:0755] $82B1A6 38 SEC $82B1A7 E9 00 01 SBC #$0100 $82B1AA 8D 55 07 STA $0755 [$7E:0755] $82B1AD EB XBA $82B1AE 29 FF 00 AND #$00FF $82B1B1 0A ASL A $82B1B2 AA TAX $82B1B3 20 3F B5 JSR $B53F [$82:B53F] $82B1B6 C9 FF FF CMP #$FFFF $82B1B9 D0 23 BNE $23 [$B1DE] $82B1C3 AD 55 07 LDA $0755 [$7E:0755] $82B1C6 C9 03 02 CMP #$0203 $82B1C9 F0 13 BEQ $13 [$B1DE] $82B1CB AD 55 07 LDA $0755 [$7E:0755] $82B1CE 18 CLC $82B1CF 69 00 01 ADC #$0100 $82B1D2 8D 55 07 STA $0755 [$7E:0755] $82B1D5 EB XBA $82B1D6 29 FF 00 AND #$00FF $82B1D9 0A ASL A $82B1DA AA TAX $82B1DB 20 11 B5 JSR $B511 [$82:B511] $82B1DE 28 PLP $82B1DF 60 RTS $82B1E0 08 PHP $82B1E1 C2 30 REP #$30 $82B1E3 20 0C B2 JSR $B20C [$82:B20C] $82B1E6 AE 30 03 LDX $0330 [$7E:0330] $82B1E9 A9 00 05 LDA #$0500 $82B1EC 95 D0 STA $D0,x [$7E:00D0] $82B1EE E8 INX $82B1EF E8 INX $82B1F0 A9 00 39 LDA #$3900 $82B1F3 95 D0 STA $D0,x [$7E:00D2] $82B1F5 E8 INX $82B1F6 E8 INX $82B1F7 E2 20 SEP #$20 $82B1F9 A9 7E LDA #$7E $82B1FB 95 D0 STA $D0,x [$7E:00D4] $82B1FD C2 20 REP #$20 $82B1FF E8 INX $82B200 A9 80 30 LDA #$3080 $82B203 95 D0 STA $D0,x [$7E:00D5] $82B205 E8 INX $82B206 E8 INX $82B207 8E 30 03 STX $0330 [$7E:0330] $82B20A 28 PLP $82B20B 60 RTS $82B20C 08 PHP $82B20D C2 30 REP #$30 $82B20F AD A2 09 LDA $09A2 [$7E:09A2] $82B212 29 01 01 AND #$0101 $82B215 A2 00 00 LDX #$0000 $82B218 DD 57 B2 CMP $B257,x[$82:B257] $82B21B F0 04 BEQ $04 [$B221] $82B21D E8 INX $82B21E E8 INX $82B21F 80 F7 BRA $F7 [$B218] $82B221 BD 5F B2 LDA $B25F,x[$82:B25F] $82B224 85 00 STA $00 [$7E:0000] $82B226 A9 82 00 LDA #$0082 $82B229 85 02 STA $02 [$7E:0002] $82B22B A9 11 00 LDA #$0011 $82B22E 85 14 STA $14 [$7E:0014] $82B230 A0 00 00 LDY #$0000 $82B233 A2 D8 01 LDX #$01D8 $82B236 DA PHX $82B237 A9 08 00 LDA #$0008 $82B23A 85 12 STA $12 [$7E:0012] $82B23C B7 00 LDA [$00],y[$82:D521] $82B23E 9F 00 38 7E STA $7E3800,x[$7E:39D8] $82B242 E8 INX $82B243 E8 INX $82B244 C8 INY $82B245 C8 INY $82B246 C6 12 DEC $12 [$7E:0012] $82B248 D0 F2 BNE $F2 [$B23C] $82B24A FA PLX $82B24B 8A TXA $82B24C 18 CLC $82B24D 69 40 00 ADC #$0040 $82B250 AA TAX $82B251 C6 14 DEC $14 [$7E:0014] $82B253 D0 E1 BNE $E1 [$B236] $82B255 28 PLP $82B256 60 RTS $82B257 db 00, 00, 00, 01, 01, 00, 01, 01, 21, D5 $82B263 db 41, D7, 51, D8 $82B267 08 PHP $82B268 C2 30 REP #$30 $82B26A AD A8 09 LDA $09A8 [$7E:09A8] $82B26D 0D A4 09 ORA $09A4 [$7E:09A4] $82B270 0D D4 09 ORA $09D4 [$7E:09D4] $82B273 F0 2B BEQ $2B [$B2A0] $82B275 AD 55 07 LDA $0755 [$7E:0755] $82B278 29 FF 00 AND #$00FF $82B27B 0A ASL A $82B27C AA TAX $82B27D BD 8E C1 LDA $C18E,x[$82:C18E] $82B280 85 12 STA $12 [$7E:0012] $82B282 AD 55 07 LDA $0755 [$7E:0755] $82B285 EB XBA $82B286 29 FF 00 AND #$00FF $82B289 0A ASL A $82B28A 0A ASL A $82B28B 18 CLC $82B28C 65 12 ADC $12 [$7E:0012] $82B28E A8 TAY $82B28F B9 00 00 LDA $0000,y[$82:C196] $82B292 AA TAX $82B293 CA DEX $82B294 C8 INY $82B295 C8 INY $82B296 B9 00 00 LDA $0000,y[$82:C198] $82B299 A8 TAY $82B29A A9 03 00 LDA #$0003 $82B29D 20 81 A8 JSR $A881 [$82:A881] $82B2A0 28 PLP $82B2A1 60 RTS $82B2A2 08 PHP $82B2A3 C2 30 REP #$30 $82B2A5 20 AA B2 JSR $B2AA [$82:B2AA] $82B2A8 28 PLP $82B2A9 60 RTS $82B2AA 08 PHP $82B2AB C2 30 REP #$30 $82B2AD 64 03 STZ $03 [$7E:0003] $82B2AF 20 F9 B3 JSR $B3F9 [$82:B3F9] $82B2B2 64 34 STZ $34 [$7E:0034] $82B2B4 AD D4 09 LDA $09D4 [$7E:09D4] $82B2B7 D0 02 BNE $02 [$B2BB] $82B2BB 8D 04 42 STA $4204 [$7E:4204] $82B2BE E2 20 SEP #$20 $82B2C0 A9 64 LDA #$64 $82B2C2 8D 06 42 STA $4206 [$7E:4206] $82B2C5 C2 20 REP #$20 $82B2C7 EA NOP $82B2C8 EA NOP $82B2C9 EA NOP $82B2CA EA NOP $82B2CB EA NOP $82B2CC EA NOP $82B2CD EA NOP $82B2CE AD 14 42 LDA $4214 [$7E:4214] $82B2D1 85 2C STA $2C [$7E:002C] $82B2D3 AD D6 09 LDA $09D6 [$7E:09D6] $82B2D6 8D 04 42 STA $4204 [$7E:4204] $82B2D9 E2 20 SEP #$20 $82B2DB A9 64 LDA #$64 $82B2DD 8D 06 42 STA $4206 [$7E:4206] $82B2E0 C2 20 REP #$20 $82B2E2 EA NOP $82B2E3 EA NOP $82B2E4 EA NOP $82B2E5 EA NOP $82B2E6 EA NOP $82B2E7 EA NOP $82B2E8 EA NOP $82B2E9 AD 16 42 LDA $4216 [$7E:4216] $82B2EC 85 32 STA $32 [$7E:0032] $82B2EE AD 14 42 LDA $4214 [$7E:4214] $82B2F1 85 2A STA $2A [$7E:002A] $82B2F3 85 30 STA $30 [$7E:0030] $82B2F5 85 2E STA $2E [$7E:002E] $82B2F7 F0 1C BEQ $1C [$B315] $82B2F9 A0 00 00 LDY #$0000 $82B2FC 5A PHY $82B2FD B9 D6 C1 LDA $C1D6,y[$82:C1D6] $82B300 AA TAX $82B301 AC E2 C1 LDY $C1E2 [$82:C1E2] $82B304 88 DEY $82B305 A9 1B 00 LDA #$001B $82B308 22 1F 89 81 JSL $81891F[$81:891F] $82B30C 7A PLY $82B30D C8 INY $82B30E C8 INY $82B30F C6 2E DEC $2E [$7E:002E] $82B311 D0 E9 BNE $E9 [$B2FC] $82B313 84 34 STY $34 [$7E:0034] $82B315 AD 16 42 LDA $4216 [$7E:4216] $82B318 F0 53 BEQ $53 [$B36D] $82B31A 8D 04 42 STA $4204 [$7E:4204] $82B31D E2 20 SEP #$20 $82B31F A9 0E LDA #$0E $82B321 8D 06 42 STA $4206 [$7E:4206] $82B324 C2 20 REP #$20 $82B326 EA NOP $82B327 EA NOP $82B328 EA NOP $82B329 EA NOP $82B32A EA NOP $82B32B EA NOP $82B32C EA NOP $82B32D AD 14 42 LDA $4214 [$7E:4214] $82B330 0A ASL A $82B331 AA TAX $82B332 C9 07 00 CMP #$0007 $82B335 10 0F BPL $0F [$B346] $82B346 AD D6 09 LDA $09D6 [$7E:09D6] $82B349 C9 64 00 CMP #$0064 $82B34C 30 06 BMI $06 [$B354] $82B354 BD D9 B3 LDA $B3D9,x[$82:B3E5] $82B357 48 PHA $82B358 A6 34 LDX $34 [$7E:0034] $82B35A BD D6 C1 LDA $C1D6,x[$82:C1D6] $82B35D AA TAX $82B35E AC E2 C1 LDY $C1E2 [$82:C1E2] $82B361 88 DEY $82B362 68 PLA $82B363 22 1F 89 81 JSL $81891F[$81:891F] $82B367 E6 30 INC $30 [$7E:0030] $82B369 E6 34 INC $34 [$7E:0034] $82B36B E6 34 INC $34 [$7E:0034] $82B36D A6 34 LDX $34 [$7E:0034] $82B36F A5 30 LDA $30 [$7E:0030] $82B371 C5 2C CMP $2C [$7E:002C] $82B373 10 17 BPL $17 [$B38C] $82B375 BD D6 C1 LDA $C1D6,x[$82:C1D8] $82B378 AA TAX $82B379 AC E2 C1 LDY $C1E2 [$82:C1E2] $82B37C 88 DEY $82B37D A9 20 00 LDA #$0020 $82B380 22 1F 89 81 JSL $81891F[$81:891F] $82B384 E6 34 INC $34 [$7E:0034] $82B386 E6 34 INC $34 [$7E:0034] $82B388 E6 30 INC $30 [$7E:0030] $82B38A 80 E1 BRA $E1 [$B36D] $82B38C A6 34 LDX $34 [$7E:0034] $82B38E BD D6 C1 LDA $C1D6,x[$82:C1DA] $82B391 AA TAX $82B392 AC E2 C1 LDY $C1E2 [$82:C1E2] $82B395 88 DEY $82B396 A9 1F 00 LDA #$001F $82B399 22 1F 89 81 JSL $81891F[$81:891F] $82B39D E2 20 SEP #$20 $82B39F A5 32 LDA $32 [$7E:0032] $82B3A1 8D 04 42 STA $4204 [$7E:4204] $82B3A4 A5 33 LDA $33 [$7E:0033] $82B3A6 8D 05 42 STA $4205 [$7E:4205] $82B3A9 A9 0A LDA #$0A $82B3AB 8D 06 42 STA $4206 [$7E:4206] $82B3AE C2 20 REP #$20 $82B3B0 EA NOP $82B3B1 EA NOP $82B3B2 EA NOP $82B3B3 EA NOP $82B3B4 EA NOP $82B3B5 EA NOP $82B3B6 EA NOP $82B3B7 AD 16 42 LDA $4216 [$7E:4216] $82B3BA 18 CLC $82B3BB 69 04 08 ADC #$0804 $82B3BE 8F 14 3B 7E STA $7E3B14[$7E:3B14] $82B3C2 AD 14 42 LDA $4214 [$7E:4214] $82B3C5 18 CLC $82B3C6 69 04 08 ADC #$0804 $82B3C9 8F 12 3B 7E STA $7E3B12[$7E:3B12] $82B3CD A5 2A LDA $2A [$7E:002A] $82B3CF 18 CLC $82B3D0 69 04 08 ADC #$0804 $82B3D3 8F 10 3B 7E STA $7E3B10[$7E:3B10] $82B3D7 28 PLP $82B3D8 60 RTS $82B3E5 db 26, 00 ;;; ;;; $82B3F9 08 PHP $82B3FA C2 30 REP #$30 $82B3FC A9 00 06 LDA #$0600 $82B3FF 85 03 STA $03 [$7E:0003] $82B401 AD D6 09 LDA $09D6 [$7E:09D6] $82B404 F0 37 BEQ $37 [$B43D] $82B406 CE 2F 07 DEC $072F [$7E:072F] $82B409 F0 02 BEQ $02 [$B40D] $82B40B 10 20 BPL $20 [$B42D] $82B40D AD 43 07 LDA $0743 [$7E:0743] $82B410 1A INC A $82B411 8D 43 07 STA $0743 [$7E:0743] $82B414 0A ASL A $82B415 AA TAX $82B416 BD 65 C1 LDA $C165,x[$82:C167] $82B419 29 FF 00 AND #$00FF $82B41C C9 FF 00 CMP #$00FF $82B41F D0 09 BNE $09 [$B42A] $82B421 9C 43 07 STZ $0743 [$7E:0743] $82B424 AD 65 C1 LDA $C165 [$82:C165] $82B427 29 FF 00 AND #$00FF $82B42A 8D 2F 07 STA $072F [$7E:072F] $82B42D AD 43 07 LDA $0743 [$7E:0743] $82B430 0A ASL A $82B431 1A INC A $82B432 AA TAX $82B433 A9 03 00 LDA #$0003 $82B436 0A ASL A $82B437 AA TAX $82B438 BD FA C0 LDA $C0FA,x[$82:C100] $82B43B 85 03 STA $03 [$7E:0003] $82B43D 28 PLP $82B43E 60 RTS ;;; ;;; $82B43F 08 PHP $82B440 C2 30 REP #$30 $82B442 AD D4 09 LDA $09D4 [$7E:09D4] $82B445 F0 0D BEQ $0D [$B454] $82B447 9C 55 07 STZ $0755 [$7E:0755] $82B44A A9 37 00 LDA #$0037 $82B44D 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B451 A9 01 00 LDA #$0001 $82B454 28 PLP $82B455 60 RTS ;;; ;;; $82B456 08 PHP $82B457 C2 30 REP #$30 $82B459 AD 76 0A LDA $0A76 [$7E:0A76] $82B45C D0 0F BNE $0F [$B46D] $82B45E AD A8 09 LDA $09A8 [$7E:09A8] $82B461 3C 4C C0 BIT $C04C,x[$82:C04C] $82B464 D0 0E BNE $0E [$B474] $82B466 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82B474 8A TXA $82B475 4A LSR A $82B476 EB XBA $82B477 29 00 FF AND #$FF00 $82B47A 09 01 00 ORA #$0001 $82B47D 8D 55 07 STA $0755 [$7E:0755] $82B480 A9 37 00 LDA #$0037 $82B483 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B487 28 PLP $82B488 60 RTS ;;; ;;; $82B489 08 PHP $82B48A C2 30 REP #$30 $82B48C AD 76 0A LDA $0A76 [$7E:0A76] $82B48F D0 0C BNE $0C [$B49D] $82B491 AD A8 09 LDA $09A8 [$7E:09A8] $82B494 3C 4C C0 BIT $C04C,x[$82:C04E] $82B497 D0 09 BNE $09 [$B4A2] $82B499 CA DEX $82B49A CA DEX $82B49B 10 F4 BPL $F4 [$B491] $82B49D ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82B4A2 A9 37 00 LDA #$0037 $82B4A5 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B4A9 8A TXA $82B4AA 4A LSR A $82B4AB EB XBA $82B4AC 29 00 FF AND #$FF00 $82B4AF 09 01 00 ORA #$0001 $82B4B2 8D 55 07 STA $0755 [$7E:0755] $82B4B5 28 PLP $82B4B6 60 RTS ;;; ;;; $82B4B7 08 PHP $82B4B8 C2 30 REP #$30 $82B4BA AD A4 09 LDA $09A4 [$7E:09A4] $82B4BD 3C 56 C0 BIT $C056,x[$82:C056] $82B4C0 D0 0C BNE $0C [$B4CE] $82B4C2 E8 INX $82B4C3 E8 INX $82B4C4 E0 0A 00 CPX #$000A $82B4C7 30 F1 BMI $F1 [$B4BA] $82B4C9 A9 FF FF LDA #$FFFF $82B4CC 80 16 BRA $16 [$B4E4] $82B4CE A9 37 00 LDA #$0037 $82B4D1 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B4D5 8A TXA $82B4D6 4A LSR A $82B4D7 EB XBA $82B4D8 29 00 FF AND #$FF00 $82B4DB 09 02 00 ORA #$0002 $82B4DE 8D 55 07 STA $0755 [$7E:0755] $82B4E1 A9 00 00 LDA #$0000 $82B4E4 28 PLP $82B4E5 60 RTS ;;; ;;; $82B511 08 PHP $82B512 C2 30 REP #$30 $82B514 AD A4 09 LDA $09A4 [$7E:09A4] $82B517 3C 62 C0 BIT $C062,x[$82:C062] $82B51A D0 0E BNE $0E [$B52A] $82B51C E8 INX $82B51D E8 INX $82B51E E0 06 00 CPX #$0006 $82B521 30 F1 BMI $F1 [$B514] $82B52A A9 37 00 LDA #$0037 $82B52D 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B531 8A TXA $82B532 4A LSR A $82B533 EB XBA $82B534 29 00 FF AND #$FF00 $82B537 09 03 00 ORA #$0003 $82B53A 8D 55 07 STA $0755 [$7E:0755] $82B53D 28 PLP $82B53E 60 RTS ;;; ;;; $82B53F 08 PHP $82B540 C2 30 REP #$30 $82B542 AD A4 09 LDA $09A4 [$7E:09A4] $82B545 3C 62 C0 BIT $C062,x[$82:C064] $82B548 D0 09 BNE $09 [$B553] $82B54A CA DEX $82B54B CA DEX $82B54C 10 F4 BPL $F4 [$B542] $82B54E ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82B553 A9 37 00 LDA #$0037 $82B556 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B55A 8A TXA $82B55B 4A LSR A $82B55C EB XBA $82B55D 29 00 FF AND #$FF00 $82B560 09 03 00 ORA #$0003 $82B563 8D 55 07 STA $0755 [$7E:0755] $82B566 28 PLP $82B567 60 RTS ;;; ;;; $82B568 08 PHP $82B569 C2 30 REP #$30 $82B56B A5 8F LDA $8F [$7E:008F] $82B56D 89 80 00 BIT #$0080 $82B570 D0 02 BNE $02 [$B574] $82B572 28 PLP $82B573 60 RTS $82B574 A9 38 00 LDA #$0038 $82B577 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82B57B AD 55 07 LDA $0755 [$7E:0755] $82B57E 29 FF 00 AND #$00FF $82B581 0A ASL A $82B582 AA TAX $82B583 85 1A STA $1A [$7E:001A] $82B585 AD 55 07 LDA $0755 [$7E:0755] $82B588 EB XBA $82B589 29 FF 00 AND #$00FF $82B58C 0A ASL A $82B58D 85 12 STA $12 [$7E:0012] $82B58F BD 2C C0 LDA $C02C,x[$82:C02E] $82B592 18 CLC $82B593 65 12 ADC $12 [$7E:0012] $82B595 A8 TAY $82B596 B9 00 00 LDA $0000,y[$82:C06E] $82B599 85 00 STA $00 [$7E:0000] $82B59B BD 3C C0 LDA $C03C,x[$82:C03E] $82B59E A8 TAY $82B59F BD 34 C0 LDA $C034,x[$82:C036] $82B5A2 18 CLC $82B5A3 65 12 ADC $12 [$7E:0012] $82B5A5 AA TAX $82B5A6 B9 00 00 LDA $0000,y[$7E:09A6] $82B5A9 3C 00 00 BIT $0000,x[$82:C04E] $82B5AC D0 1C BNE $1C [$B5CA] $82B5AE 1D 00 00 ORA $0000,x[$82:C04E] $82B5B1 99 00 00 STA $0000,y[$7E:09A6] $82B5B4 A5 18 LDA $18 [$7E:0018] $82B5B6 85 16 STA $16 [$7E:0016] $82B5B8 A6 1A LDX $1A [$7E:001A] $82B5BA BD 44 C0 LDA $C044,x[$82:C046] $82B5BD 18 CLC $82B5BE 65 12 ADC $12 [$7E:0012] $82B5C0 A8 TAY $82B5C1 B9 00 00 LDA $0000,y[$82:C08E] $82B5C4 AA TAX $82B5C5 20 7E A2 JSR $A27E [$82:A27E] $82B5C8 80 1C BRA $1C [$B5E6] $82B5CA BD 00 00 LDA $0000,x[$82:C04E] $82B5CD 49 FF FF EOR #$FFFF $82B5D0 85 12 STA $12 [$7E:0012] $82B5D2 B9 00 00 LDA $0000,y[$7E:09A6] $82B5D5 25 12 AND $12 [$7E:0012] $82B5D7 99 00 00 STA $0000,y[$7E:09A6] $82B5DA A9 00 0C LDA #$0C00 $82B5DD 85 12 STA $12 [$7E:0012] $82B5DF A5 18 LDA $18 [$7E:0018] $82B5E1 85 16 STA $16 [$7E:0016] $82B5E3 20 9D A2 JSR $A29D [$82:A29D] $82B5E6 28 PLP $82B5E7 60 RTS ;;; ;;; $82B62B 08 PHP $82B62C 8B PHB $82B62D 4B PHK $82B62E AB PLB $82B62F C2 30 REP #$30 $82B631 AD 53 07 LDA $0753 [$7E:0753] $82B634 AD 27 07 LDA $0727 [$7E:0727] $82B637 F0 09 BEQ $09 [$B642] $82B642 20 C8 B9 JSR $B9C8 [$82:B9C8] $82B645 22 72 B6 82 JSL $82B672[$82:B672] $82B649 22 30 BB 82 JSL $82BB30[$82:BB30] $82B64D AB PLB $82B64E 28 PLP $82B64F 6B RTL $82B672 8B PHB $82B673 C2 30 REP #$30 $82B675 4B PHK $82B676 AB PLB $82B677 A2 CB C7 LDX #$C7CB $82B67A A9 09 00 LDA #$0009 $82B67D 20 92 B8 JSR $B892 [$82:B892] $82B680 A9 00 0E LDA #$0E00 $82B683 85 03 STA $03 [$7E:0003] $82B685 A2 DB C7 LDX #$C7DB $82B688 A9 0B 00 LDA #$000B $82B68B 20 05 B8 JSR $B805 [$82:B805] $82B68E A2 EB C7 LDX #$C7EB $82B691 A9 0A 00 LDA #$000A $82B694 20 05 B8 JSR $B805 [$82:B805] $82B697 A2 FB C7 LDX #$C7FB $82B69A A9 4E 00 LDA #$004E $82B69D 20 05 B8 JSR $B805 [$82:B805] $82B6A0 A9 00 04 LDA #$0400 $82B6A3 85 03 STA $03 [$7E:0003] $82B6A5 A2 0B C8 LDX #$C80B $82B6A8 A9 08 00 LDA #$0008 $82B6AB 20 98 B7 JSR $B798 [$82:B798] $82B6AE AD D1 05 LDA $05D1 [$7E:05D1] $82B6B1 F0 09 BEQ $09 [$B6BC] $82B6BC AD 9F 07 LDA $079F [$7E:079F] $82B6BF D0 1A BNE $1A [$B6DB] $82B6C1 A9 00 0E LDA #$0E00 $82B6C4 85 03 STA $03 [$7E:0003] $82B6C6 AD 55 C8 LDA $C855 [$82:C855] $82B6C9 38 SEC $82B6CA E5 B3 SBC $B3 [$7E:00B3] $82B6CC A8 TAY $82B6CD AD 53 C8 LDA $C853 [$82:C853] $82B6D0 38 SEC $82B6D1 E5 B1 SBC $B1 [$7E:00B1] $82B6D3 AA TAX $82B6D4 A9 63 00 LDA #$0063 $82B6D7 22 1F 89 81 JSL $81891F[$81:891F] $82B6DB AB PLB $82B6DC 6B RTL $82B6DD 8B PHB $82B6DE C2 30 REP #$30 $82B6E0 4B PHK $82B6E1 AB PLB $82B6E2 20 2B A9 JSR $A92B [$82:A92B] $82B6E5 A2 CB C7 LDX #$C7CB $82B6E8 A9 09 00 LDA #$0009 $82B6EB 20 92 B8 JSR $B892 [$82:B892] $82B6EE A9 00 0E LDA #$0E00 $82B6F1 85 03 STA $03 [$7E:0003] $82B6F3 A2 DB C7 LDX #$C7DB $82B6F6 A9 0B 00 LDA #$000B $82B6F9 20 05 B8 JSR $B805 [$82:B805] $82B6FC A2 EB C7 LDX #$C7EB $82B6FF A9 0A 00 LDA #$000A $82B702 20 05 B8 JSR $B805 [$82:B805] $82B705 A2 FB C7 LDX #$C7FB $82B708 A9 4E 00 LDA #$004E $82B70B 20 05 B8 JSR $B805 [$82:B805] $82B70E A9 00 0E LDA #$0E00 $82B711 85 03 STA $03 [$7E:0003] $82B713 20 FC B9 JSR $B9FC [$82:B9FC] $82B716 48 PHA $82B717 A9 82 00 LDA #$0082 $82B71A 85 02 STA $02 [$7E:0002] $82B71C AD 9F 07 LDA $079F [$7E:079F] $82B71F 0A ASL A $82B720 AA TAX $82B721 BD 0B C8 LDA $C80B,x[$82:C80B] $82B724 85 00 STA $00 [$7E:0000] $82B726 AD 8B 07 LDA $078B [$7E:078B] $82B729 0A ASL A $82B72A 0A ASL A $82B72B A8 TAY $82B72C B7 00 LDA [$00],y[$82:C853] $82B72E 38 SEC $82B72F E5 B1 SBC $B1 [$7E:00B1] $82B731 AA TAX $82B732 DA PHX $82B733 C8 INY $82B734 C8 INY $82B735 B7 00 LDA [$00],y[$82:C855] $82B737 38 SEC $82B738 E5 B3 SBC $B3 [$7E:00B3] $82B73A A8 TAY $82B73B 5A PHY $82B73C AD 7A 07 LDA $077A [$7E:077A] $82B73F 89 01 00 BIT #$0001 $82B742 D0 07 BNE $07 [$B74B] $82B744 A9 12 00 LDA #$0012 $82B747 22 1F 89 81 JSL $81891F[$81:891F] $82B74B 7A PLY $82B74C FA PLX $82B74D 68 PLA $82B74E 22 1F 89 81 JSL $81891F[$81:891F] $82B752 AD D1 05 LDA $05D1 [$7E:05D1] $82B755 F0 20 BEQ $20 [$B777] $82B777 AD 9F 07 LDA $079F [$7E:079F] $82B77A D0 1A BNE $1A [$B796] $82B77C A9 00 0E LDA #$0E00 $82B77F 85 03 STA $03 [$7E:0003] $82B781 AD 55 C8 LDA $C855 [$82:C855] $82B784 38 SEC $82B785 E5 B3 SBC $B3 [$7E:00B3] $82B787 A8 TAY $82B788 AD 53 C8 LDA $C853 [$82:C853] $82B78B 38 SEC $82B78C E5 B1 SBC $B1 [$7E:00B1] $82B78E AA TAX $82B78F A9 63 00 LDA #$0063 $82B792 22 1F 89 81 JSL $81891F[$81:891F] $82B796 AB PLB $82B797 6B RTL $82B798 86 20 STX $20 [$7E:0020] $82B79A 85 22 STA $22 [$7E:0022] $82B79C AD 9F 07 LDA $079F [$7E:079F] $82B79F CF 18 D9 7E CMP $7ED918[$7E:D918] $82B7A3 D0 23 BNE $23 [$B7C8] $82B7A5 0A ASL A $82B7A6 AA TAX $82B7A7 BF F8 D8 7E LDA $7ED8F8,x[$7E:D8F8] $82B7AB 85 24 STA $24 [$7E:0024] $82B7AD E2 20 SEP #$20 $82B7AF AE 8B 07 LDX $078B [$7E:078B] $82B7B2 BD C9 B7 LDA $B7C9,x[$82:B7C9] $82B7B5 25 24 AND $24 [$7E:0024] $82B7B7 85 24 STA $24 [$7E:0024] $82B7B9 C2 20 REP #$20 $82B7BB AD 9F 07 LDA $079F [$7E:079F] $82B7BE 0A ASL A $82B7BF 18 CLC $82B7C0 65 20 ADC $20 [$7E:0020] $82B7C2 AA TAX $82B7C3 BD 00 00 LDA $0000,x[$82:C80B] $82B7C6 D0 54 BNE $54 [$B81C] $82B7C8 60 RTS $82B7C9 db 01, 02, 04, 08, 10, 20 $82B805 86 20 STX $20 [$7E:0020] $82B807 85 22 STA $22 [$7E:0022] $82B809 A9 FF FF LDA #$FFFF $82B80C 85 24 STA $24 [$7E:0024] $82B80E AD 9F 07 LDA $079F [$7E:079F] $82B811 0A ASL A $82B812 18 CLC $82B813 65 20 ADC $20 [$7E:0020] $82B815 AA TAX $82B816 BD 00 00 LDA $0000,x[$82:C7DB] $82B819 D0 01 BNE $01 [$B81C] $82B81B 60 RTS $82B81C AA TAX $82B81D BD 00 00 LDA $0000,x[$82:C84D] $82B820 89 00 80 BIT #$8000 $82B823 D0 2F BNE $2F [$B854] $82B825 46 24 LSR $24 [$7E:0024] $82B827 90 25 BCC $25 [$B84E] $82B829 DA PHX $82B82A BD 02 00 LDA $0002,x[$82:C84F] $82B82D A8 TAY $82B82E BD 00 00 LDA $0000,x[$82:C84D] $82B831 AA TAX $82B832 20 55 B8 JSR $B855 [$82:B855] $82B835 F0 16 BEQ $16 [$B84D] $82B837 FA PLX $82B838 DA PHX $82B839 BD 02 00 LDA $0002,x[$82:C84F] $82B83C 38 SEC $82B83D E5 B3 SBC $B3 [$7E:00B3] $82B83F A8 TAY $82B840 BD 00 00 LDA $0000,x[$82:C84D] $82B843 38 SEC $82B844 E5 B1 SBC $B1 [$7E:00B1] $82B846 AA TAX $82B847 A5 22 LDA $22 [$7E:0022] $82B849 22 1F 89 81 JSL $81891F[$81:891F] $82B84D FA PLX $82B84E E8 INX $82B84F E8 INX $82B850 E8 INX $82B851 E8 INX $82B852 80 C9 BRA $C9 [$B81D] $82B854 60 RTS $82B855 8A TXA $82B856 29 00 FF AND #$FF00 $82B859 4A LSR A $82B85A 85 12 STA $12 [$7E:0012] $82B85C 8A TXA $82B85D 29 FF 00 AND #$00FF $82B860 4A LSR A $82B861 4A LSR A $82B862 4A LSR A $82B863 4A LSR A $82B864 4A LSR A $82B865 4A LSR A $82B866 18 CLC $82B867 65 12 ADC $12 [$7E:0012] $82B869 85 12 STA $12 [$7E:0012] $82B86B 98 TYA $82B86C 29 F8 FF AND #$FFF8 $82B86F 4A LSR A $82B870 18 CLC $82B871 65 12 ADC $12 [$7E:0012] $82B873 85 12 STA $12 [$7E:0012] $82B875 8A TXA $82B876 4A LSR A $82B877 4A LSR A $82B878 4A LSR A $82B879 29 07 00 AND #$0007 $82B87C AA TAX $82B87D A4 12 LDY $12 [$7E:0012] $82B87F E2 20 SEP #$20 $82B881 B9 F7 07 LDA $07F7,y[$7E:0819] $82B884 3C 8A B8 BIT $B88A,x[$82:B891] $82B887 C2 20 REP #$20 $82B889 60 RTS $82B88A db 80, 40, 20, 10, 08, 04, 02, 01 $82B892 86 20 STX $20 [$7E:0020] $82B894 85 22 STA $22 [$7E:0022] $82B896 AE 9F 07 LDX $079F [$7E:079F] $82B899 BF 28 D8 7E LDA $7ED828,x[$7E:D828] $82B89D 29 FF 00 AND #$00FF $82B8A0 85 24 STA $24 [$7E:0024] $82B8A2 AD 9F 07 LDA $079F [$7E:079F] $82B8A5 0A ASL A $82B8A6 18 CLC $82B8A7 65 20 ADC $20 [$7E:0020] $82B8A9 AA TAX $82B8AA BD 00 00 LDA $0000,x[$82:C7CB] $82B8AD F0 38 BEQ $38 [$B8E7] $82B8AF AA TAX $82B8B0 BD 00 00 LDA $0000,x[$82:C83B] $82B8B3 C9 FF FF CMP #$FFFF $82B8B6 F0 2F BEQ $2F [$B8E7] $82B8B8 C9 FE FF CMP #$FFFE $82B8BB F0 2B BEQ $2B [$B8E8] $82B8BD A9 00 0E LDA #$0E00 $82B8C0 85 03 STA $03 [$7E:0003] $82B8C2 46 24 LSR $24 [$7E:0024] $82B8C4 B0 26 BCS $26 [$B8EC] $82B8C6 AD 89 07 LDA $0789 [$7E:0789] $82B8C9 F0 1D BEQ $1D [$B8E8] $82B8CB DA PHX $82B8CC BD 02 00 LDA $0002,x[$82:C89F] $82B8CF 38 SEC $82B8D0 E5 B3 SBC $B3 [$7E:00B3] $82B8D2 A8 TAY $82B8D3 BD 00 00 LDA $0000,x[$82:C89D] $82B8D6 38 SEC $82B8D7 E5 B1 SBC $B1 [$7E:00B1] $82B8D9 AA TAX $82B8DA A5 22 LDA $22 [$7E:0022] $82B8DC 22 1F 89 81 JSL $81891F[$81:891F] $82B8E0 FA PLX $82B8E1 E8 INX $82B8E2 E8 INX $82B8E3 E8 INX $82B8E4 E8 INX $82B8E5 80 C9 BRA $C9 [$B8B0] $82B8E7 60 RTS $82B8E8 46 24 LSR $24 [$7E:0024] $82B8EA 80 F5 BRA $F5 [$B8E1] $82B8EC DA PHX $82B8ED BD 02 00 LDA $0002,x[$82:C89F] $82B8F0 38 SEC $82B8F1 E5 B3 SBC $B3 [$7E:00B3] $82B8F3 A8 TAY $82B8F4 BD 00 00 LDA $0000,x[$82:C89D] $82B8F7 38 SEC $82B8F8 E5 B1 SBC $B1 [$7E:00B1] $82B8FA AA TAX $82B8FB A9 62 00 LDA #$0062 $82B8FE 22 1F 89 81 JSL $81891F[$81:891F] $82B902 FA PLX $82B903 A9 00 0C LDA #$0C00 $82B906 85 03 STA $03 [$7E:0003] $82B908 80 C1 BRA $C1 [$B8CB] $82B90A DA PHX $82B90B BD 00 00 LDA $0000,x[$82:B9A0] $82B90E 48 PHA $82B90F BD 02 00 LDA $0002,x[$82:B9A2] $82B912 A8 TAY $82B913 BD 04 00 LDA $0004,x[$82:B9A4] $82B916 FA PLX $82B917 8B PHB $82B918 4B PHK $82B919 AB PLB $82B91A 20 81 A8 JSR $A881 [$82:A881] $82B91D AB PLB $82B91E FA PLX $82B91F BD 06 00 LDA $0006,x[$82:B9A6] $82B922 24 8B BIT $8B [$7E:008B] $82B924 F0 0B BEQ $0B [$B931] $82B926 AD FD 05 LDA $05FD [$7E:05FD] $82B929 D0 06 BNE $06 [$B931] $82B92B BD 08 00 LDA $0008,x[$82:B9B2] $82B92E 8D FD 05 STA $05FD [$7E:05FD] $82B931 6B RTL $82B934 08 PHP $82B935 8B PHB $82B936 E2 20 SEP #$20 $82B938 A9 82 LDA #$82 $82B93A 48 PHA $82B93B AB PLB $82B93C C2 20 REP #$20 $82B93E AD AC 05 LDA $05AC [$7E:05AC] $82B941 38 SEC $82B942 E9 18 00 SBC #$0018 $82B945 C5 B1 CMP $B1 [$7E:00B1] $82B947 10 07 BPL $07 [$B950] $82B949 A2 A0 B9 LDX #$B9A0 $82B94C 22 0A B9 82 JSL $82B90A[$82:B90A] $82B950 AD AE 05 LDA $05AE [$7E:05AE] $82B953 18 CLC $82B954 69 18 00 ADC #$0018 $82B957 38 SEC $82B958 E9 00 01 SBC #$0100 $82B95B C5 B1 CMP $B1 [$7E:00B1] $82B95D 30 07 BMI $07 [$B966] $82B95F A2 AA B9 LDX #$B9AA $82B962 22 0A B9 82 JSL $82B90A[$82:B90A] $82B966 AD B0 05 LDA $05B0 [$7E:05B0] $82B969 38 SEC $82B96A E9 38 00 SBC #$0038 $82B96D C5 B3 CMP $B3 [$7E:00B3] $82B96F 10 07 BPL $07 [$B978] $82B971 A2 B4 B9 LDX #$B9B4 $82B974 22 0A B9 82 JSL $82B90A[$82:B90A] $82B978 AD B2 05 LDA $05B2 [$7E:05B2] $82B97B 38 SEC $82B97C E9 B1 00 SBC #$00B1 $82B97F C5 B3 CMP $B3 [$7E:00B3] $82B981 30 0A BMI $0A [$B98D] $82B983 A2 BE B9 LDX #$B9BE $82B986 22 0A B9 82 JSL $82B90A[$82:B90A] $82B98A AB PLB $82B98B 28 PLP $82B98C 6B RTL $82B98D AD FD 05 LDA $05FD [$7E:05FD] $82B990 CD C6 B9 CMP $B9C6 [$82:B9C6] $82B993 D0 F5 BNE $F5 [$B98A] $82B995 9C FB 05 STZ $05FB [$7E:05FB] $82B998 9C FD 05 STZ $05FD [$7E:05FD] $82B99B 9C FF 05 STZ $05FF [$7E:05FF] $82B99E 80 EA BRA $EA [$B98A] $82B9A0 db 10, 00, 78, 00, 09, 00, 00, 02, 01, 00, F0, 00, 78, 00, 08, 00, 00, 01, 02, 00, 80, 00, 38, 00, 06, 00, 00, 08, 03, 00, 80, 00, B8, 00, 07, 00, 00, 04, 04, 00 $82B9C8 A9 00 0E LDA #$0E00 $82B9CB 85 03 STA $03 [$7E:0003] $82B9CD 20 FC B9 JSR $B9FC [$82:B9FC] $82B9D0 48 PHA $82B9D1 AD F6 0A LDA $0AF6 [$7E:0AF6] $82B9D4 EB XBA $82B9D5 29 FF 00 AND #$00FF $82B9D8 18 CLC $82B9D9 6D A1 07 ADC $07A1 [$7E:07A1] $82B9DC 0A ASL A $82B9DD 0A ASL A $82B9DE 0A ASL A $82B9DF 38 SEC $82B9E0 E5 B1 SBC $B1 [$7E:00B1] $82B9E2 AA TAX $82B9E3 AD FA 0A LDA $0AFA [$7E:0AFA] $82B9E6 EB XBA $82B9E7 29 FF 00 AND #$00FF $82B9EA 18 CLC $82B9EB 6D A3 07 ADC $07A3 [$7E:07A3] $82B9EE 1A INC A $82B9EF 0A ASL A $82B9F0 0A ASL A $82B9F1 0A ASL A $82B9F2 38 SEC $82B9F3 E5 B3 SBC $B3 [$7E:00B3] $82B9F5 A8 TAY $82B9F6 68 PLA $82B9F7 22 1F 89 81 JSL $81891F[$81:891F] $82B9FB 60 RTS $82B9FC AD 78 07 LDA $0778 [$7E:0778] $82B9FF D0 19 BNE $19 [$BA1A] $82BA01 AE 76 07 LDX $0776 [$7E:0776] $82BA04 E8 INX $82BA05 E8 INX $82BA06 E0 08 00 CPX #$0008 $82BA09 30 06 BMI $06 [$BA11] $82BA0B EE 7A 07 INC $077A [$7E:077A] $82BA0E A2 00 00 LDX #$0000 $82BA11 8E 76 07 STX $0776 [$7E:0776] $82BA14 BD 25 BA LDA $BA25,x[$82:BA27] $82BA17 8D 78 07 STA $0778 [$7E:0778] $82BA1A 3A DEC A $82BA1B 8D 78 07 STA $0778 [$7E:0778] $82BA1E AE 76 07 LDX $0776 [$7E:0776] $82BA21 BD 2D BA LDA $BA2D,x[$82:BA2F] $82BA24 60 RTS $82BA25 db 08, 00, 04, 00, 08, 00, 04, 00, 5F, 00, 60, 00, 61, 00, 60, 00 $82BA35 A9 00 0E LDA #$0E00 $82BA38 85 03 STA $03 [$7E:0003] $82BA3A A2 80 00 LDX #$0080 $82BA3D A0 10 00 LDY #$0010 $82BA40 A9 48 00 LDA #$0048 $82BA43 22 1F 89 81 JSL $81891F[$81:891F] $82BA47 6B RTL $82BA5B A9 00 0E LDA #$0E00 $82BA5E 85 03 STA $03 [$7E:0003] $82BA60 A2 7C 00 LDX #$007C $82BA63 A0 10 00 LDY #$0010 $82BA66 A9 4A 00 LDA #$004A $82BA69 22 1F 89 81 JSL $81891F[$81:891F] $82BA6D 6B RTL $82BA6E 8B PHB $82BA6F 4B PHK $82BA70 AB PLB $82BA71 AD 8D 19 LDA $198D [$7E:198D] $82BA74 F0 18 BEQ $18 [$BA8E] $82BA76 3A DEC A $82BA77 8D 8D 19 STA $198D [$7E:198D] $82BA7A D0 12 BNE $12 [$BA8E] $82BA7C AD 97 19 LDA $1997 [$7E:1997] $82BA7F 1A INC A $82BA80 29 03 00 AND #$0003 $82BA83 8D 97 19 STA $1997 [$7E:1997] $82BA86 0A ASL A $82BA87 A8 TAY $82BA88 B9 AA BA LDA $BAAA,y[$82:BAAC] $82BA8B 8D 8D 19 STA $198D [$7E:198D] $82BA8E A9 00 0E LDA #$0E00 $82BA91 85 03 STA $03 [$7E:0003] $82BA93 AD 97 19 LDA $1997 [$7E:1997] $82BA96 0A ASL A $82BA97 A8 TAY $82BA98 B9 B2 BA LDA $BAB2,y[$82:BAB4] $82BA9B 48 PHA $82BA9C AD AB 19 LDA $19AB [$7E:19AB] $82BA9F A8 TAY $82BAA0 AD A1 19 LDA $19A1 [$7E:19A1] $82BAA3 AA TAX $82BAA4 68 PLA $82BAA5 AB PLB $82BAA6 5C 1F 89 81 JMP $81891F[$81:891F] $82BAAA db 08, 00, 08, 00, 08, 00, 08, 00, 37, 00, 36, 00, 35, 00, 34, 00 $82BB30 C2 30 REP #$30 $82BB32 8B PHB $82BB33 4B PHK $82BB34 AB PLB $82BB35 A9 00 00 LDA #$0000 $82BB38 85 03 STA $03 [$7E:0003] $82BB3A AE 9F 07 LDX $079F [$7E:079F] $82BB3D BF 08 D9 7E LDA $7ED908,x[$7E:D908] $82BB41 29 FF 00 AND #$00FF $82BB44 F0 2D BEQ $2D [$BB73] $82BB46 AD 9F 07 LDA $079F [$7E:079F] $82BB49 0A ASL A $82BB4A AA TAX $82BB4B BD 4D C7 LDA $C74D,x[$82:C74D] $82BB4E AA TAX $82BB4F BD 00 00 LDA $0000,x[$82:C759] $82BB52 C9 FF FF CMP #$FFFF $82BB55 F0 1C BEQ $1C [$BB73] $82BB57 DA PHX $82BB58 38 SEC $82BB59 E5 B1 SBC $B1 [$7E:00B1] $82BB5B 48 PHA $82BB5C BD 02 00 LDA $0002,x[$82:C75B] $82BB5F 38 SEC $82BB60 E5 B3 SBC $B3 [$7E:00B3] $82BB62 A8 TAY $82BB63 BD 04 00 LDA $0004,x[$82:C75D] $82BB66 FA PLX $82BB67 22 1F 89 81 JSL $81891F[$81:891F] $82BB6B 68 PLA $82BB6C 18 CLC $82BB6D 69 06 00 ADC #$0006 $82BB70 AA TAX $82BB71 80 DC BRA $DC [$BB4F] $82BB73 AB PLB $82BB74 6B RTL $82BB75 8B PHB $82BB76 C2 30 REP #$30 $82BB78 4B PHK $82BB79 AB PLB $82BB7A AD 94 0F LDA $0F94 [$7E:0F94] $82BB7D F0 5E BEQ $5E [$BBDD] $82BB7F AE 92 0F LDX $0F92 [$7E:0F92] $82BB82 3A DEC A $82BB83 8D 94 0F STA $0F94 [$7E:0F94] $82BB86 D0 16 BNE $16 [$BB9E] $82BB88 BD 06 00 LDA $0006,x[$82:BC2D] $82BB8B C9 FF FF CMP #$FFFF $82BB8E F0 4D BEQ $4D [$BBDD] $82BB90 30 59 BMI $59 [$BBEB] $82BB92 8D 94 0F STA $0F94 [$7E:0F94] $82BB95 8A TXA $82BB96 18 CLC $82BB97 69 06 00 ADC #$0006 $82BB9A 8D 92 0F STA $0F92 [$7E:0F92] $82BB9D AA TAX $82BB9E DA PHX $82BB9F BD 04 00 LDA $0004,x[$82:BC2B] $82BBA2 A8 TAY $82BBA3 A2 00 00 LDX #$0000 $82BBA6 B9 00 00 LDA $0000,y[$82:BD97] $82BBA9 9F 80 C1 7E STA $7EC180,x[$7E:C180] $82BBAD C8 INY $82BBAE C8 INY $82BBAF E8 INX $82BBB0 E8 INX $82BBB1 E0 20 00 CPX #$0020 $82BBB4 30 F0 BMI $F0 [$BBA6] $82BBB6 FA PLX $82BBB7 A9 00 08 LDA #$0800 $82BBBA 85 03 STA $03 [$7E:0003] $82BBBC BD 02 00 LDA $0002,x[$82:BC29] $82BBBF A2 7C 00 LDX #$007C $82BBC2 A0 50 00 LDY #$0050 $82BBC5 22 1F 89 81 JSL $81891F[$81:891F] $82BBC9 A9 00 0A LDA #$0A00 $82BBCC 85 03 STA $03 [$7E:0003] $82BBCE A9 64 00 LDA #$0064 $82BBD1 A2 7C 00 LDX #$007C $82BBD4 A0 50 00 LDY #$0050 $82BBD7 22 1F 89 81 JSL $81891F[$81:891F] $82BBDB AB PLB $82BBDC 6B RTL $82BBDD A9 27 BC LDA #$BC27 $82BBE0 8D 92 0F STA $0F92 [$7E:0F92] $82BBE3 A9 0A 00 LDA #$000A $82BBE6 8D 94 0F STA $0F94 [$7E:0F94] $82BBE9 80 94 BRA $94 [$BB7F] $82BC29 db 65, 00, 97, BD, 0A, 00, 66, 00, 97, BD, 0A, 00, 67, 00, 97, BD, 0A, 00, 66, 00, 97, BD, 0A, 00, 65, 00, 97, BD, 0A, 00, 66, 00, 97, BD, 0A, 00, 67, 00, 97, BD, 0A, 00, 66, 00, 97, BD $82BD97 db 00, 38, 50, 7F, 40, 2E, A0, 2D, 00, 2D, 5A, 72, 3A, 2C, 0F, 24, 05, 1C, 00, 18, 9A, 63, D3, 52, 0D, 42, 66, 7F, FA, 7F, 40, 72 ;;; ;;; $82BE17 C2 30 REP #$30 $82BE19 A9 02 00 LDA #$0002 $82BE1C 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82BE20 A9 71 00 LDA #$0071 $82BE23 22 CB 90 80 JSL $8090CB[$80:90CB] ; Sound library 2, $0653 = 06h $82BE27 A9 01 00 LDA #$0001 $82BE2A 22 4D 91 80 JSL $80914D[$80:914D] ; Sound library 3, $0653 = 06h $82BE2E 6B RTL ;;; ;;; $82BE2F C2 30 REP #$30 $82BE31 AD 3E 0B LDA $0B3E [$7E:0B3E] $82BE34 29 00 FF AND #$FF00 $82BE37 C9 00 04 CMP #$0400 $82BE3A D0 07 BNE $07 [$BE43] $82BE3C A9 2B 00 LDA #$002B $82BE3F 22 4D 91 80 JSL $80914D[$80:914D] ; Sound library 3, $0653 = 06h $82BE43 AD D0 0C LDA $0CD0 [$7E:0CD0] $82BE46 C9 10 00 CMP #$0010 $82BE49 30 07 BMI $07 [$BE52] $82BE4B ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82BE52 A9 14 00 LDA #$0014 $82BE55 22 84 F0 90 JSL $90F084[$90:F084] $82BE59 6B RTL $82BF06 db 19, 25, 1A, 25, 1B, 25, 46, 3D, 47, 3D, 48, 3D, 49, 3D, 80, 3C, 81, 3C, 82, 3C, 83, 3C, 84, 3C, 85, 3C, 86, 3C $82BF2A db 56, 3D, 57, 3D, 58, 3D, 59, 3D, FF, 08, D8, 08, D9, 08, DA, 08, E7, 08, FF, 08, DB, 08, DC, 08, D4, 08, D4, 08, FF, 08, DD, 08, DE, 08, DF, 08, D4, 08, FF, 08, E8, 08, E9, 08, EA, 08, EB, 08, FF, 08, EC, 08, ED, 08, EE, 08, EF, 08, FF, 08, 00, 09, 01, 09, 02, 09, 03, 09, 04, 09, 05, 09, D4, 08, D4, 08, FF, 08, D0, 08, D1, 08, D2, 08, D3, 08, 03, 09, 04, 09, 05, 09, D4, 08, FF, 08, 20, 09, 21, 09, 22, 09, 23, 09, 17, 09, 18, 09, 0F, 09, 1F, 09, FF, 08, D5, 08, D6, 08, D7, 08, D4, 08, D4, 08, D4, 08, D4, 08, D4, 08, FF, 08, 10, 09, 11, 09, 12, 09, 13, 09, 14, 09, 15, 09, 16, 09, D4, 08 $82BFC0 db FF, 08, E0, 08, E1, 08, E2, 08, E3, 08, E4, 08, E5, 08, E6, 08, D4, 08, FF, 08, 30, 09, 31, 09, 32, 09, 33, 09, 34, 09, 35, 09, 36, 09, D4, 08, FF, 08, F0, 08, F1, 08, F2, 08, F3, 08, F4, 08, F5, 08, D4, 08, D4, 08, FF, 08, 24, 09, 25, 09, 26, 09, 27, 09, 28, 09, 29, 09, 2A, 09, 2B, 09 $82C01A db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 $82C02E db 6C, C0 $82C036 db 4C, C0 $82C03E db A6, 09 $82C046 db 8C, C0 $82C04C db 00, 10, 02, 00, 01, 00, 04, 00, 08, 00, 01, 00, 20, 00, 04, 00, 00, 10, 02, 00, 08, 00, 00, 01, 00, 02, 00, 20, 88, 3A, C8, 3A, 08, 3C, 48, 3C, 88, 3C, C8, 3C, 08, 3D, 6A, 3A, AA, 3A, 6A, 3B, AA, 3B, EA, 3B, 2A, 3C, EA, 3C, 2A, 3D, 6A, 3D, 06, BF, 14, BF, 32, BF, 3C, BF, 46, BF, 50, BF, 5A, BF, 64, BF, 76, BF, 88, BF, 9A, BF, AC, BF, C0, BF, D2, BF, E4, BF, F6, BF $82C0B4 db 2B, 07, 2D, 07 $82C0BC db 33, 07, 35, 07, 37, 07, 39, 07 $82C0C6 db 3F, 07, 41, 07 $82C0CE db 47, 07, 49, 07, 4B, 07, 4D, 07 $82C0D8 db 53, 07, 55, 07 $82C0E0 db 5B, 07, 5D, 07, 5F, 07, 61, 07 $82C0EA db 0C, C1, 37, C1 $82C0F2 db 37, C1, 37, C1, 37, C1, 37, C1 $82C100 db 00, 06 $82C10A db 05, 00, 0F, 00, 00, 03, 01, 00, 03, 02, 00, 03, 03, 00, 03, 04, 00, 03, 05, 00, 03, 06, 00, 03, 07, 00, 03, 06, 00, 03, 05, 00, 03, 04, 00, 03, 03, 00, 03, 02, 00, 03, 01, 00, FF, 0F, 00, 00, 02, 01, 00, 02, 02, 00, 02, 03, 00, 02, 04, 00, 02, 05, 00, 02, 06, 00, 02, 07, 00, 02, 06, 00, 02, 05, 00, 02, 04, 00, 02, 03, 00, 02, 02, 00, 02, 01, 00, FF, 02 $82C165 db 0F, 00, 02, 01, 02, 02, 02, 03, 02, 04, 02, 05, 02, 06, 02, 07, 02, 06, 02, 05, 02, 04, 02, 03, 02, 02, 02, 01, FF, 28 $82C184 db 29, 00 $82C188 db E8, 00 $82C18C db D0, 00, 96, C1, 9E, C1, B2, C1, CA, C1, 1B, 00, 54, 00 $82C19E db 30, 00, 84, 00, 30, 00, 8C, 00, 30, 00, 94, 00, 30, 00, 9C, 00 $82C1B2 db CC, 00, 4C, 00 $82C1BA db CC, 00, 6C, 00, CC, 00, 74, 00 $82C1CA db CC, 00, 9C, 00 $82C1D2 db CC, 00, AC, 00, 18, 00, 20, 00, 28, 00, 30, 00, 38, 00 $82C1E2 db 60, 00 $82C1E6 db FC, C1, 02, C2 $82C1EE db 0E, C2, 10, C2, 12, C2, 14, C2 $82C1FC db 2A, 00 $82C200 db 2A, 00, 14, 00, 15, 00, 16, 00, 16, 00 $82C20E db 06, 00, 07, 00, 04, 00, 05, 00 $82C232 db 02, 00, FF, 01, FC, 9D, F4, F8, 01, FC, 9D, B4, 02, 00, FF, 01, FC, 9D, 74, F8, 01, FC, 9D, 34, 02, 00, FC, 01, 00, 9E, F4, FC, 01, F9, 9E, 74, 02, 00, FC, 01, 00, 9E, B4, FC, 01, F9, 9E, 34 $82C298 db 01, 00, 01, 00, 00, 89, 2E, 01, 00, FC, 01, FC, 46, 36 $82C2B7 db 0C, 00, 10, 00, 04, 5C, 34, 10, 00, FC, 5C, 34, F0, 01, 04, 5C, 34, F8, 01, 04, 5C, 34, 00, 00, 04, 5C, 34, 08, 00, 04, 5C, 34, 18, 00, 04, 5E, 34, 18, 00, FC, 5D, 34, 08, 00, FC, 5C, 34, 00, 00, FC, 5C, 34, F8, 01, FC, 5C, 34, F0, 01, FC, 5B, 34, 14, 00, 1C, 00, 04, 5C, 34, 1C, 00, FC, 5C, 34, 04, 00, 04, 5C, 34, 14, 00, 04, 5C, 34, 0C, 00, 04, 5C, 34, 14, 00, FC, 5C, 34, 0C, 00, FC, 5C, 34, 04, 00, FC, 5C, 34, FC, 01, 04, 5C, 34, FC, 01, FC, 5C, 34, DC, 01, 04, 5C, 34, E4, 01, 04, 5C, 34, EC, 01, 04, 5C, 34, F4, 01, 04, 5C, 34, 24, 00, 04, 5E, 34, 24, 00, FC, 5D, 34, F4, 01, FC, 5C, 34, EC, 01, FC, 5C, 34, E4, 01, FC, 5C, 34, DC, 01, FC, 5B, 34, 01, 00, 00, 00, 00, 4E, 34 $82C369 db 01, 00, 00, 00, 00, 4F, 34 $82C385 db 01, 00, 01, 00, 00, 8D, 20, 01, 00, 01, 00, 00, 8A, 20, 01, 00, 01, 00, 00, 8C, 20, 01, 00, 01, 00, 00, 8B, 20, 01, 00, 01, 00, 00, 8E, 20 $82C3D9 db 01, 00, 00, 00, 00, 4D, 34 $82C403 db 01, 00, 00, 00, 00, 4C, 34 $82C465 db 08, 00, 08, 00, 00, 51, 74, 00, 00, 00, 43, 34, F8, 01, 00, 43, 34, F0, 01, 00, 51, 34, 00, 00, F8, 3D, 74, 08, 00, F8, 3C, 74, F8, 01, F8, 3D, 34, F0, 01, F8, 3C, 34 $82C4A0 db 03, 00, FC, 01, FC, 2E, 34, 04, 00, FC, 2A, 34, F4, 01, FC, 28, 34, 08, 00, 08, 00, 00, C7, 34, 00, 00, 00, C6, 34, F8, 01, 00, C5, 34, F0, 01, 00, C4, 34, 00, 00, F8, B6, 34, F8, 01, F8, B5, 34, 08, 00, F8, B4, 74, F0, 01, F8, B4, 34, 04, 00, 10, 00, F8, 03, 20, 08, 00, F8, 02, 20, 00, 00, F8, 01, 20, F8, 01, F8, 00, 20, 04, 00, 10, 00, F8, 07, 20, 08, 00, F8, 06, 20, 00, 00, F8, 05, 20, F8, 01, F8, 04, 20, 04, 00, 10, 00, F8, 14, 20, 08, 00, F8, 13, 20, 00, 00, F8, 12, 20, F8, 01, F8, 10, 20 $82C533 db 04, 00, 10, 00, F8, 19, 20, 08, 00, F8, 18, 20, 00, 00, F8, 16, 20, F8, 01, F8, 15, 20, 06, 00, 04, 00, 00, 45, 20, FC, 01, 00, 44, 20, 0C, 00, F8, 56, 20, 04, 00, F8, 55, 20, FC, 01, F8, 54, 20, F4, 01, F8, 53, 20 $82C571 db 56, C2, 4A, C2, 32, C2, 3E, C2, 85, C3, 8C, C3, 93, C3, 9A, C3 $82C58D db 98, C2 $82C591 db 9F, C2, B7, C2, F5, C2 $82C59F db 5B, C3 $82C5A7 db 69, C3, D9, C3 $82C5B5 db 03, C4 $82C5BB db A0, C4, 65, C4, B1, C4, E9, CA, FF, CA, 15, CB, 2B, CB, 4B, CB, 6B, CB, 8B, CB, AB, CB, CB, CB, D7, CB, E3, CB, EF, CB, FB, CB, 6B, CC $82C5F9 db 0B, D0 $82C5FD db 77, D1 $82C605 db A1, C3 $82C61B db DB, C4, F1, C4, 07, C5, 49, C5, 33, C5 $82C627 db 7C, CF, 92, CF, A8, CF, BE, CF, D4, CF, E0, CF, F6, CF, FD, CF, 04, D0, 00, 00, 00, 00, 00, 00, B3, 25, B3, 65, 00, 00, 00, 00, 00, 00, C0, 25, C1, 25, C2, 25, C3, 25, C3, 65, C2, 65, C1, 65, C0, 65, D0, 25, D1, 25, D2, 25, D3, 25, D3, 65, D2, 65, D1, 65, D0, 65, E0, 25, E1, 25, EF, 25, E3, 25, E4, 25, E5, 25, E6, 25, E7, 25, F0, 25, F1, 25, F2, 25, F3, 25, F4, 25, F5, 25, F1, 65, F0, 65, 00, 26, 01, 26, 02, 26, 03, 26, 04, 26, 05, 26, 01, 66, 00, 66, 10, 26, 11, 26, 12, 26, 13, 26, 14, 26, 15, 26, 16, 26, 17, 26, 20, 26, 21, 26, 22, 26, 23, 26, 24, 26, 25, 26, 26, 26, 27, 26, 30, 26, 31, 26, 32, 26, 33, 26, 33, 66, 32, 66, 36, 26, 37, 26, 00, 00, C9, 25, CA, 25, CB, 25, CB, 65, CA, 65, 00, 00, 00, 00, 00, 00, 00, 00, DA, 25, DB, 25, DB, 65, DA, 65, 00, 00, 00, 00, 00, 00, E9, 25, EA, 25, EB, 25, EB, 65, EA, 65, E9, 65, 00, 00, 00, 00, F9, 25, FA, 25, FB, 25, FB, 65, FA, 65, F9, 65, 00, 00, 00, 00, 09, 26, 0A, 26, 00, 00, 00, 00, 0A, 66, 09, 66, 00, 00, 00, 00, 19, 26, 1A, 26, 00, 00, 00, 00, 1A, 66, 19, 66, 00, 00, 28, 26, 29, 26, 2A, 26, 2B, 06, 2B, 46, 2A, 66, 2C, 26, 2D, 26, 38, 26, 39, 26, 3A, 26, 00, 00, 00, 00, 3A, 66, 3C, 26, 38, 66, 38, 00 $82C74D db 59, C7, 79, C7, 99, C7, A1, C7, AF, C7, C3, C7, 30, 00, 70, 00, 5A, 00, B8, 00, B8, 00, 5A, 00, 10, 01, 68, 00, 5A, 00, 78, 01, 20, 00, 5C, 00, A0, 01, 80, 00, 5D, 00, FF, FF, 48, 00, 08, 00, 59, 00, D0, 00, 40, 00, 59, 00, 28, 01, 20, 00, 59, 00, 40, 01, 90, 00, 5D, 00, 48, 01, C0, 00, 5B, 00, FF, FF, 50, 00, 08, 00, 5A, 00, FF, FF, 40, 00, 80, 00, 59, 00, C0, 00, 80, 00, 59, 00, FF, FF, 08, 01, 08, 00, 59, 00, 30, 00, A0, 00, 5A, 00, 78, 00, A0, 00, 5A, 00, FF, FF, 98, 00, 48, 00, 59, 00, FF, FF, 3B, C8, 9D, C8, 0B, C9, 81, C9, DB, C9, 00, 00 $82C7DB db 00, 00, A3, C8, 00, 00, 00, 00, E1, C9, 00, 00 $82C7EB db 00, 00, A9, C8, 13, C9, 00, 00, E7, C9, 49, CA $82C7FB db 4D, C8, B7, C8, 1D, C9, 8B, C9, ED, C9, 4F, CA $82C80B db 53, C8, BD, C8, 23, C9, 91, C9, F3, C9, 51, CA $82C83B db FE, FF $82C83F db FE, FF $82C843 db FE, FF $82C847 db FF, FF $82C84D db B8, 00, 40, 00, FF, FF, D8, 00, 28, 00, 90, 00 $82C85B db FE, FF $82C89D db BC, 01, 9C, 00, FF, FF, 28, 00, 40, 00, FF, FF, 48, 00, 68, 00, 00, 01, 98, 00, B0, 01, 98, 00, FF, FF, 28, 00, 28, 00, FF, FF, 78, 00, 28, 00, 40, 00 $82C8C5 db 28, 00, 60, 00, 88, 01 $82C8CD db 30, 01 $82C8D1 db FE, FF $82C8D5 db FE, FF $82C8D9 db FE, FF $82C8DD db 48, 00 $82C8E1 db D0, 00 $82C8E5 db 28, 01 $82C8E9 db 48, 01 $82C8ED db FE, FF $82C8F1 db FE, FF $82C8F5 db FE, FF $82C8F9 db FE, FF $82C90B db B8, 00, 90, 00, FF, FF $82C913 db A0, 00, 50, 00, A8, 00, 80, 00, FF, FF, 48, 00, 28, 00, FF, FF, 60, 00, 60, 00, A8, 00, 20, 00, 58, 00, 30, 00, 80, 00 $82C933 db A0, 00, 58, 00, 20, 01, 68, 00, FE, FF $82C93F db FE, FF $82C943 db 50, 00 $82C947 db A8, 00 $82C94B db A8, 00 $82C94F db FE, FF $82C953 db FE, FF $82C957 db FE, FF $82C95B db FE, FF $82C95F db FE, FF $82C981 db 98, 00, A0, 00, FF, FF $82C98B db 68, 00, A0, 00, FF, FF, 88, 00, 78, 00, FE, FF $82C999 db FE, FF $82C99D db FE, FF $82C9A1 db FE, FF $82C9A5 db FE, FF $82C9A9 db FE, FF $82C9AD db FE, FF $82C9B1 db FE, FF $82C9B5 db FE, FF $82C9B9 db FE, FF $82C9BD db FE, FF $82C9C1 db FE, FF $82C9C5 db FE, FF $82C9C9 db FE, FF $82C9CD db FE, FF $82C9DB db 3C, 01, 54, 00, FF, FF, 30, 01, 48, 00, FF, FF, 50, 01, 38, 00, FF, FF, 88, 00, 90, 00, FF, FF, 60, 00, A0, 00, 18, 01, 28, 00, 98, 00, 60, 00, 48, 01, 38, 00, FE, FF $82CA07 db FE, FF $82CA0B db FE, FF $82CA0F db FE, FF $82CA13 db 10, 01 $82CA17 db FE, FF $82CA1B db FE, FF $82CA1F db FE, FF $82CA23 db FE, FF $82CA27 db FE, FF $82CA2B db FE, FF $82CA2F db FE, FF $82CA49 db 58, 00, 88, 00, FF, FF, FF, FF, 80, 00, 90, 00, A8, 00, 68, 00, FE, FF $82CA5D db FE, FF $82CA61 db FE, FF $82CA65 db FE, FF $82CA69 db FE, FF $82CA6D db FE, FF $82CA71 db A0, 00 $82CA75 db FE, FF $82CA79 db FE, FF $82CA7D db FE, FF $82CA81 db FE, FF $82CA85 db FE, FF $82CA89 db FE, FF $82CA8D db FE, FF $82CAE9 db 04, 00, FC, C3, F4, D1, 3E, FC, C3, FC, E1, 3E, F4, C3, FC, E0, 3E, F4, C3, F4, D0, 3E, 04, 00, F4, C3, FC, E3, 3E, F4, C3, F4, D3, 3E, FC, C3, F4, D4, 3E, FC, C3, FC, E4, 3E, 04, 00, FC, C3, F4, D7, 3E, F4, C3, F4, D6, 3E, F4, C3, FC, E6, 3E, FC, C3, FC, E7, 3E, 06, 00, 00, 00, FE, DA, 3E, F8, 01, FE, D9, 3E, FC, C3, F4, D7, 3E, F4, C3, F4, D6, 3E, F4, C3, FC, E6, 3E, FC, C3, FC, E7, 3E, 06, 00, 00, 00, FE, DC, 3E, F8, 01, FE, DB, 3E, FC, C3, F4, D7, 3E, F4, C3, F4, D6, 3E, F4, C3, FC, E6, 3E, FC, C3, FC, E7, 3E, 06, 00, 00, 00, FE, DE, 3E, F8, 01, FE, DD, 3E, FC, C3, F4, D7, 3E, F4, C3, F4, D6, 3E, F4, C3, FC, E6, 3E, FC, C3, FC, E7, 3E, 06, 00, 00, 00, FE, EA, 3E, F8, 01, FE, E9, 3E, FC, C3, F4, D7, 3E, F4, C3, F4, D6, 3E, F4, C3, FC, E6, 3E, FC, C3, FC, E7, 3E, 06, 00, 00, 00, FE, EC, 3E, F8, 01, FE, EB, 3E, FC, C3, F4, D7, 3E, F4, C3, F4, D6, 3E, F4, C3, FC, E6, 3E, FC, C3, FC, E7, 3E, 02, 00, 00, 00, FC, EF, 3E, F8, 01, FC, DF, 3E, 02, 00, 00, 00, FC, FF, 3E, F8, 01, FC, EE, 3E, 02, 00, 00, 00, FC, CC, 3E, F8, 01, FC, FE, 3E, 02, 00, F8, 01, FC, C8, 3E, 00, 00, FC, FF, 3E, 16, 00, 28, 00, 00, 3B, 30, 28, 00, F8, 2B, 30, 20, 00, 00, 1E, 30, 20, 00, F8, 0E, 30, 18, 00, 00, 1B, 30, 18, 00, F8, 0B, 30, 10, 00, 00, 1E, 30, 10, 00, F8, 0E, 30, 08, 00, 00, 52, 30, 08, 00, F8, 42, 30, F8, 01, 00, 11, 30, F8, 01, F8, 2C, 30, F0, 01, 00, 1E, 30, F0, 01, F8, 0E, 30, E8, 01, 00, 37, 30, E8, 01, F8, 27, 30, E0, 01, 00, 1A, 30, E0, 01, F8, 0A, 30, D8, 01, 00, 35, 30, D8, 01, F8, 25, 30, D0, 01, F8, 0D, 30, D0, 01, 00, 38, 30, 08, 00, 17, 00, FC, 6A, 30, 10, 00, FC, 72, 30, 0A, 00, FC, 7B, 30, 02, 00, FC, 6E, 30, FA, 01, FC, 7D, 30, F2, 01, FC, 6A, 30, EA, 01, FC, 7B, 30, E2, 01, FC, 6C, 30 $82CF7C db 04, 00, 04, 00, 04, AF, EE, FC, 01, 04, AF, AE, 04, 00, FC, AF, 6E, FC, 01, FC, AF, 2E, 04, 00, 05, 00, 05, AF, EE, FB, 01, 05, AF, AE, 05, 00, FB, AF, 6E, FB, 01, FB, AF, 2E, 04, 00, 06, 00, 06, AF, EE, FA, 01, 06, AF, AE, 06, 00, FA, AF, 6E, FA, 01, FA, AF, 2E, 04, 00, 03, 00, 04, 9F, EE, 03, 00, FC, 9F, 6E, FC, 01, 04, 9F, AE, FC, 01, FC, 9F, 2E, 02, 00, 04, 00, FE, 8F, 6E, FC, 01, FE, 8F, 2E, 04, 00, 00, 00, 08, 9A, FA, F8, 01, 08, 9A, BA, 00, 00, F0, 9A, 7A, F8, 01, F0, 9A, 3A, 01, 00, F8, C3, F8, 90, 38, 01, 00, F8, C3, F8, 92, 38, 01, 00, F8, C3, F8, 9B, 38, 20, 00, C8, 01, 00, ED, 3E, C8, 01, F8, ED, 3E, 30, 00, 00, ED, 3E, 30, 00, F8, ED, 3E, 30, 00, 08, FD, 3E, C8, 01, 08, FC, 3E, 30, 00, F0, FB, 3E, C8, 01, F0, F9, 3E, F8, 01, 08, FA, 3E, F0, 01, 08, FA, 3E, E8, 01, 08, FA, 3E, E0, 01, 08, FA, 3E, D8, 01, 08, FA, 3E, D0, 01, 08, FA, 3E, 28, 00, 08, FA, 3E, 20, 00, 08, FA, 3E, 18, 00, 08, FA, 3E, 10, 00, 08, FA, 3E, 08, 00, 08, FA, 3E, 00, 00, 08, FA, 3E, 28, 00, F0, FA, 3E, 20, 00, F0, FA, 3E, 18, 00, F0, FA, 3E, 10, 00, F0, FA, 3E, 08, 00, F0, FA, 3E, 00, 00, F0, FA, 3E, F8, 01, F0, FA, 3E, F0, 01, F0, FA, 3E, E8, 01, F0, FA, 3E, E0, 01, F0, FA, 3E, D8, 01, F0, FA, 3E, D0, 01, F0, FA, 3E $82D177 db 2A, 00, EC, 01, F0, FA, 3E, EC, 01, 08, FA, 3E, 04, 00, 08, FA, 3E, 0C, 00, 08, FA, 3E, F4, 01, 08, FA, 3E, FC, 01, 08, FA, 3E, 04, 00, F0, FA, 3E, 0C, 00, F0, FA, 3E, F4, 01, F0, FA, 3E, FC, 01, F0, FA, 3E, B4, 01, 00, ED, 3E, B4, 01, F8, ED, 3E, 44, 00, 00, ED, 3E, 44, 00, F8, ED, 3E, 44, 00, 08, FD, 3E, B4, 01, 08, FC, 3E, 44, 00, F0, FB, 3E, B4, 01, F0, F9, 3E, E4, 01, 08, FA, 3E, DC, 01, 08, FA, 3E, D4, 01, 08, FA, 3E, CC, 01, 08, FA, 3E, C4, 01, 08, FA, 3E, BC, 01, 08, FA, 3E, 3C, 00, 08, FA, 3E, 34, 00, 08, FA, 3E, 2C, 00, 08, FA, 3E, 24, 00, 08, FA, 3E, 1C, 00, 08, FA, 3E, 14, 00, 08, FA, 3E, 3C, 00, F0, FA, 3E, 34, 00, F0, FA, 3E, 2C, 00, F0, FA, 3E, 24, 00, F0, FA, 3E, 1C, 00, F0, FA, 3E, 14, 00, F0, FA, 3E, E4, 01, F0, FA, 3E, DC, 01, F0, FA, 3E, D4, 01, F0, FA, 3E, CC, 01, F0, FA, 3E, C4, 01, F0, FA, 3E, BC, 01, F0, FA, 3E, 22, 00, FC, 01, 08, FA, 3E, FC, 01, F0, FA, 3E, F4, 01, 08, FA, 3E, F4, 01, F0, FA, 3E, C4, 01, 00, ED, 3E, C4, 01, F8, ED, 3E, 34, 00, 00, ED, 3E, 34, 00, F8, ED, 3E, 34, 00, 08, FD, 3E, C4, 01, 08, FC, 3E, 34, 00, F0, FB, 3E, C4, 01, F0, F9, 3E, EC, 01, 08, FA, 3E, E4, 01, 08, FA, 3E, DC, 01, 08, FA, 3E, D4, 01, 08, FA, 3E, CC, 01, 08, FA, 3E, 2C, 00, 08, FA, 3E, 24, 00, 08, FA, 3E, 1C, 00, 08, FA, 3E, 14, 00, 08, FA, 3E, 0C, 00, 08, FA, 3E, 04, 00, 08, FA, 3E, 2C, 00, F0, FA, 3E, 24, 00, F0, FA, 3E, 1C, 00, F0, FA, 3E, 14, 00, F0, FA, 3E, 0C, 00, F0, FA, 3E, 04, 00, F0, FA, 3E, EC, 01, F0, FA, 3E, E4, 01, F0, FA, 3E, DC, 01, F0, FA, 3E, D4, 01, F0, FA, 3E, CC, 01, F0, FA, 3E $82D41B db 34, 00, E8, 01, 08, FA, 3E, F0, 01, 08, FA, 3E, 08, 00, 08, FA, 3E, 00, 00, 08, FA, 3E, F8, 01, 08, FA, 3E, E8, 01, F0, FA, 3E, F0, 01, F0, FA, 3E, 08, 00, F0, FA, 3E, 00, 00, F0, FA, 3E, F8, 01, F0, FA, 3E, D8, 01, F0, FA, 3E, D8, 01, 08, FA, 3E, 18, 00, 08, FA, 3E, 20, 00, 08, FA, 3E, E0, 01, 08, FA, 3E, 10, 00, 08, FA, 3E, 18, 00, F0, FA, 3E, 20, 00, F0, FA, 3E, E0, 01, F0, FA, 3E, 10, 00, F0, FA, 3E, A0, 01, 00, ED, 3E, A0, 01, F8, ED, 3E, 58, 00, 00, ED, 3E, 58, 00, F8, ED, 3E, 58, 00, 08, FD, 3E, A0, 01, 08, FC, 3E, 58, 00, F0, FB, 3E, A0, 01, F0, F9, 3E, D0, 01, 08, FA, 3E, C8, 01, 08, FA, 3E, C0, 01, 08, FA, 3E, B8, 01, 08, FA, 3E, B0, 01, 08, FA, 3E, A8, 01, 08, FA, 3E, 50, 00, 08, FA, 3E, 48, 00, 08, FA, 3E, 40, 00, 08, FA, 3E, 38, 00, 08, FA, 3E, 30, 00, 08, FA, 3E, 28, 00, 08, FA, 3E, 50, 00, F0, FA, 3E, 48, 00, F0, FA, 3E, 40, 00, F0, FA, 3E, 38, 00, F0, FA, 3E, 30, 00, F0, FA, 3E, 28, 00, F0, FA, 3E, D0, 01, F0, FA, 3E, C8, 01, F0, FA, 3E, C0, 01, F0, FA, 3E, B8, 01, F0, FA, 3E, B0, 01, F0, FA, 3E, A8, 01, F0, FA, 3E, 00, 00, 00, 00, 00, 00, B3, 25, B3, 65, 00, 00, 00, 00, 00, 00, BC, 25, BD, 25, BE, 25, C3, 25, C3, 65, BE, 65, BD, 65, BC, 65, CC, 25, CD, 25, CE, 25, D3, 25, D3, 65, CE, 65, CD, 65, CC, 65, DC, 25, DD, 25, EC, 25, ED, 25, 7C, 25, 7D, 25, 7E, 25, 7F, 25, F0, 25, F1, 25, FC, 25, FD, 25, FD, 65, FC, 65, F1, 65, F0, 65, 70, 25, 71, 25, 72, 25, 73, 25, 74, 25, 72, 65, 71, 65, 70, 65, 80, 25, 81, 25, 94, 25, 83, 25, 84, 25, 78, 25, 86, 25, 87, 25, 90, 25, 91, 25, A4, 25, A5, 25, A5, 65, 88, 25, 96, 25, 97, 25, A0, 25, A1, 25, B4, 25, B5, 25, B5, 65, B4, 65, A6, 25, A7, 25, 00, 00, C9, 25, C4, 25, C5, 25, C5, 65, C4, 65, 00, 00, 00, 00, 00, 00, 00, 00, D4, 25, D5, 25, D5, 65, D4, 65, 00, 00, 00, 00, 00, 00, 00, 00, B6, 25, B7, 25, B7, 65, B6, 65, 00, 00, 00, 00, 00, 00, 00, 00, C6, 25, C7, 25, C7, 65, C6, 65, 00, 00, 00, 00, 00, 00, 00, 00, D6, 25, D7, 05, D7, 45, D6, 65, 00, 00, 00, 00, 00, 00, 00, 00, 8F, 25, 00, 00, 00, 00, 8F, 65, 00, 00, 55, F9, 8E, 25, 9E, 25, 9F, 25, 00, 00, 00, 00, 9F, 65, EE, 25, 9D, 25, AD, 25, AE, 25, AF, 25, 00, 00, 00, 00, AF, 65, FE, 25, AD, 65 $82D741 db 00, 00, 00, 00, 00, 00, B3, 25, B3, 65, 00, 00, 00, 00, 00, 00, C0, 25, C1, 25, C2, 25, C3, 25, C3, 65, C2, 65, C1, 65, C0, 65, D0, 25, D1, 25, D2, 25, D3, 25, D3, 65, D2, 65, D1, 65, D0, 65, E0, 25, E1, 25, E2, 25, E3, 25, E4, 25, E5, 25, E6, 25, E7, 25, F0, 25, F1, 25, F2, 25, F3, 25, F3, 65, F2, 65, F1, 65, F0, 65, 70, 25, 71, 25, 72, 25, 73, 25, 74, 25, 72, 65, 71, 65, 70, 65, 80, 25, 81, 25, 82, 25, 83, 25, 84, 25, 85, 25, 86, 25, 87, 25, 90, 25, 91, 25, 92, 25, 93, 25, 93, 65, 95, 25, 96, 25, 97, 25, A0, 25, A1, 25, A2, 25, A3, 25, A3, 65, A2, 65, A6, 25, A7, 25, 00, 00, C9, 25, CA, 25, CB, 25, CB, 65, CA, 65, 00, 00, 00, 00, 00, 00, 00, 00, DA, 25, DB, 25, DB, 65, DA, 65, 00, 00, 00, 00, 00, 00, E9, 05, EA, 25, EB, 25, EB, 45, EA, 65, E9, 65, 00, 00, 00, 00, F9, 05, FA, 25, FB, 25, FB, 45, FA, 65, F9, 65, 00, 00, 00, 00, 00, 00, 7B, 25, D7, 05, D7, 45, 7B, 65, 00, 00, 00, 00, 00, 00, 00, 00, 8B, 25, 00, 00, 00, 00, 8B, 65, 00, 00, 55, E9, 8E, 25, 9E, 25, 9F, 25, 00, 00, 00, 00, 9F, 65, EE, 25, 9D, 25, AD, 25, AE, 25, AF, 25, 00, 00, 00, 00, AF, 65, FE, 25, FF, 25, 00, 00, 00, 00, 00, 00, B3, 25, B3, 65, 00, 00, 00, 00, 00, 00, C0, 25, C1, 25, C2, 25, C3, 25, C3, 65, C2, 65, C1, 65, C0, 65, D0, 25, D1, 25, D2, 25, D3, 25, D3, 65, D2, 65, D1, 65, D0, 65, E0, 25, E1, 25, E2, 25, E3, 25, E4, 25, E5, 25, E6, 25, E7, 25, F0, 25, F1, 25, F2, 25, F3, 25, F3, 65, F2, 65, F1, 65, F0, 65, 70, 25, 71, 25, 72, 25, 73, 25, 74, 25, 72, 65, 71, 65, 70, 65, 80, 25, 81, 25, 82, 25, 83, 25, 84, 25, 85, 25, 86, 25, 87, 25, 90, 25, 91, 25, 92, 25, 93, 25, 93, 65, 95, 25, 96, 25, 97, 25, A0, 25, A1, 25, A2, 25, A3, 25, A3, 65, A2, 65, A6, 25, A7, 25, 00, 00, C9, 25, CA, 25, CB, 25, CB, 65, CA, 65, 00, 00, 00, 00, 00, 00, 00, 00, DA, 25, DB, 25, DB, 65, DA, 65, 00, 00, 00, 00, 00, 00, E9, 25, EA, 25, EB, 25, EB, 65, EA, 65, E9, 65, 00, 00, 00, 00, F9, 25, FA, 25, FB, 25, FB, 65, FA, 65, F9, 65, 00, 00, 00, 00, 79, 25, 7A, 25, 00, 00, 00, 00, 7A, 65, 79, 65, 00, 00, 00, 00, 89, 25, 8A, 25, 00, 00, 00, 00, 8A, 65, 89, 65, 55, F9, 98, 25, 99, 25, 9A, 25, 9B, 05, 9B, 45, 9A, 65, 9C, 25, 9D, 25, A8, 25, A9, 25, AA, 25, 00, 00, 00, 00, AA, 65, AC, 25, A8, 65 ;;; Gradual color change routine for all colours, setting $C402 to 000Ch. ;;; $82D961 A9 0C 00 LDA #$000C $82D964 8F 02 C4 7E STA $7EC402[$7E:C402] $82D968 20 02 DA JSR $DA02 [$82:DA02] $82D96B 60 RTS ;;; Iteration of gradual colour change of area colour palette line 6 ;;; $82D96C C2 30 REP #$30 $82D96E A9 0C 00 LDA #$000C ;\ $82D971 8F 02 C4 7E STA $7EC402[$7E:C402] ;} Colour palette change denominator = 12 $82D975 1A INC A ;\ $82D976 CF 00 C4 7E CMP $7EC400[$7E:C400] ;} If colour palette change numerator > 13: $82D97A B0 09 BCS $09 [$D985] ;/ $82D97C A9 00 00 LDA #$0000 ;\ $82D97F 8F 00 C4 7E STA $7EC400[$7E:C400] ;} Colour palette change numerator = 0 $82D983 38 SEC ; Return carry set $82D984 6B RTL $82D985 8B PHB $82D986 F4 7E 7E PEA $7E7E $82D989 AB PLB $82D98A AB PLB $82D98B A2 C0 00 LDX #$00C0 ;\ ;| $82D98E DA PHX ;| $82D98F BF 00 C2 7E LDA $7EC200,x[$7E:C2C0] ;| $82D993 A8 TAY ;| $82D994 BF 00 C0 7E LDA $7EC000,x[$7E:C0C0] ;| $82D998 AA TAX ;| $82D999 AF 00 C4 7E LDA $7EC400[$7E:C400] ;} Iteration of gradual colour change of area colour palette line 6 $82D99D 20 4A DA JSR $DA4A [$82:DA4A] ;| $82D9A0 FA PLX ;| $82D9A1 9F 00 C0 7E STA $7EC000,x[$7E:C0C0] ;| $82D9A5 E8 INX ;| $82D9A6 E8 INX ;| $82D9A7 E0 E0 00 CPX #$00E0 ;| $82D9AA 90 E2 BCC $E2 [$D98E] ;/ $82D9AC AB PLB $82D9AD AF 00 C4 7E LDA $7EC400[$7E:C400] ;\ $82D9B1 1A INC A ;} Increment colour palette change numerator $82D9B2 8F 00 C4 7E STA $7EC400[$7E:C400] ;/ $82D9B6 18 CLC ; Return carry clear $82D9B7 6B RTL ;;; ;;; $82D9B8 C2 30 REP #$30 $82D9BA A9 0F 00 LDA #$000F $82D9BD 8F 02 C4 7E STA $7EC402[$7E:C402] $82D9C1 CF 00 C4 7E CMP $7EC400[$7E:C400] $82D9C5 10 09 BPL $09 [$D9D0] $82D9C7 A9 00 00 LDA #$0000 $82D9CA 8F 00 C4 7E STA $7EC400[$7E:C400] $82D9CE 38 SEC $82D9CF 6B RTL $82D9D0 84 22 STY $22 [$7E:0022] $82D9D2 8B PHB $82D9D3 F4 7E 7E PEA $7E7E $82D9D6 AB PLB $82D9D7 AB PLB $82D9D8 DA PHX $82D9D9 BF 00 C2 7E LDA $7EC200,x[$7E:C200] $82D9DD A8 TAY $82D9DE BF 00 C0 7E LDA $7EC000,x[$7E:C000] $82D9E2 AA TAX $82D9E3 AF 00 C4 7E LDA $7EC400[$7E:C400] $82D9E7 1A INC A $82D9E8 20 4A DA JSR $DA4A [$82:DA4A] $82D9EB FA PLX $82D9EC 9F 00 C0 7E STA $7EC000,x[$7E:C000] $82D9F0 E8 INX $82D9F1 E8 INX $82D9F2 E4 22 CPX $22 [$7E:0022] $82D9F4 90 E2 BCC $E2 [$D9D8] $82D9F6 AB PLB $82D9F7 AF 00 C4 7E LDA $7EC400[$7E:C400] $82D9FB 1A INC A $82D9FC 8F 00 C4 7E STA $7EC400[$7E:C400] $82DA00 18 CLC $82DA01 6B RTL ;;; Gradual colour change routine for all colours, based on $C402 and $C400 ;;; $82DA02 C2 30 REP #$30 $82DA04 AF 02 C4 7E LDA $7EC402[$7E:C402] $82DA08 1A INC A $82DA09 CF 00 C4 7E CMP $7EC400[$7E:C400] $82DA0D B0 09 BCS $09 [$DA18] $82DA0F A9 00 00 LDA #$0000 $82DA12 8F 00 C4 7E STA $7EC400[$7E:C400] $82DA16 38 SEC $82DA17 60 RTS $82DA18 8B PHB $82DA19 F4 7E 7E PEA $7E7E $82DA1C AB PLB $82DA1D AB PLB $82DA1E A2 00 00 LDX #$0000 $82DA21 8E 04 C4 STX $C404 [$7E:C404] $82DA24 BD 00 C2 LDA $C200,x[$7E:C200] $82DA27 DD 00 C0 CMP $C000,x[$7E:C000] $82DA2A F0 11 BEQ $11 [$DA3D] $82DA2C A8 TAY $82DA2D BD 00 C0 LDA $C000,x[$7E:C002] $82DA30 AA TAX $82DA31 AD 00 C4 LDA $C400 [$7E:C400] $82DA34 20 4A DA JSR $DA4A [$82:DA4A] $82DA37 AE 04 C4 LDX $C404 [$7E:C404] $82DA3A 9D 00 C0 STA $C000,x[$7E:C002] $82DA3D E8 INX $82DA3E E8 INX $82DA3F E0 00 02 CPX #$0200 $82DA42 90 DD BCC $DD [$DA21] $82DA44 EE 00 C4 INC $C400 [$7E:C400] $82DA47 AB PLB $82DA48 18 CLC $82DA49 60 RTS ;;; Gradual colour change routine ;;; ; Y is new colour (C200,x), X is original color (C000,x), A is current change amount $82DA4A 48 PHA $82DA4B 48 PHA $82DA4C DA PHX $82DA4D 5A PHY $82DA4E A3 01 LDA $01,s [$7E:1FEA] $82DA50 29 1F 00 AND #$001F $82DA53 A8 TAY $82DA54 A3 03 LDA $03,s [$7E:1FEC] $82DA56 29 1F 00 AND #$001F $82DA59 AA TAX $82DA5A A3 05 LDA $05,s [$7E:1FEE] $82DA5C 20 A6 DA JSR $DAA6 [$82:DAA6] $82DA5F 83 07 STA $07,s [$7E:1FF0] $82DA61 A3 01 LDA $01,s [$7E:1FEA] $82DA63 0A ASL A $82DA64 0A ASL A $82DA65 0A ASL A $82DA66 EB XBA $82DA67 29 1F 00 AND #$001F $82DA6A A8 TAY $82DA6B A3 03 LDA $03,s [$7E:1FEC] $82DA6D 0A ASL A $82DA6E 0A ASL A $82DA6F 0A ASL A $82DA70 EB XBA $82DA71 29 1F 00 AND #$001F $82DA74 AA TAX $82DA75 A3 05 LDA $05,s [$7E:1FEE] $82DA77 20 A6 DA JSR $DAA6 [$82:DAA6] $82DA7A 0A ASL A $82DA7B 0A ASL A $82DA7C 0A ASL A $82DA7D 0A ASL A $82DA7E 0A ASL A $82DA7F 03 07 ORA $07,s [$7E:1FF0] $82DA81 83 07 STA $07,s [$7E:1FF0] $82DA83 A3 01 LDA $01,s [$7E:1FEA] $82DA85 4A LSR A $82DA86 4A LSR A $82DA87 EB XBA $82DA88 29 1F 00 AND #$001F $82DA8B A8 TAY $82DA8C A3 03 LDA $03,s [$7E:1FEC] $82DA8E 4A LSR A $82DA8F 4A LSR A $82DA90 EB XBA $82DA91 29 1F 00 AND #$001F $82DA94 AA TAX $82DA95 A3 05 LDA $05,s [$7E:1FEE] $82DA97 20 A6 DA JSR $DAA6 [$82:DAA6] $82DA9A 0A ASL A $82DA9B 0A ASL A $82DA9C EB XBA $82DA9D 03 07 ORA $07,s [$7E:1FF0] $82DA9F 83 07 STA $07,s [$7E:1FF0] $82DAA1 7A PLY $82DAA2 FA PLX $82DAA3 68 PLA $82DAA4 68 PLA $82DAA5 60 RTS ;;; ;;; $82DAA6 C9 00 00 CMP #$0000 $82DAA9 D0 02 BNE $02 [$DAAD] $82DAAB 8A TXA $82DAAC 60 RTS $82DAAD 3A DEC A $82DAAE CD 02 C4 CMP $C402 [$7E:C402] $82DAB1 D0 02 BNE $02 [$DAB5] $82DAB3 98 TYA $82DAB4 60 RTS $82DAB5 DA PHX $82DAB6 1A INC A $82DAB7 85 14 STA $14 [$7E:0014] $82DAB9 98 TYA $82DABA 38 SEC $82DABB E3 01 SBC $01,s [$7E:1FE6] $82DABD 85 12 STA $12 [$7E:0012] $82DABF 10 04 BPL $04 [$DAC5] $82DAC1 49 FF FF EOR #$FFFF $82DAC4 1A INC A $82DAC5 EB XBA $82DAC6 29 00 FF AND #$FF00 $82DAC9 8F 04 42 00 STA $004204[$7E:4204] $82DACD E2 21 SEP #$21 $82DACF AD 02 C4 LDA $C402 [$7E:C402] $82DAD2 E5 14 SBC $14 [$7E:0014] $82DAD4 1A INC A $82DAD5 8F 06 42 00 STA $004206[$7E:4206] $82DAD9 C2 20 REP #$20 $82DADB EB XBA $82DADC EB XBA $82DADD EA NOP $82DADE EA NOP $82DADF AF 14 42 00 LDA $004214[$7E:4214] $82DAE3 24 12 BIT $12 [$7E:0012] $82DAE5 10 04 BPL $04 [$DAEB] $82DAE7 49 FF FF EOR #$FFFF $82DAEA 1A INC A $82DAEB 85 12 STA $12 [$7E:0012] $82DAED 68 PLA $82DAEE EB XBA $82DAEF 18 CLC $82DAF0 65 12 ADC $12 [$7E:0012] $82DAF2 EB XBA $82DAF3 29 FF 00 AND #$00FF $82DAF6 60 RTS ;;; ;;; $82DAF7 DA PHX $82DAF8 5A PHY $82DAF9 8B PHB $82DAFA F4 7E 7E PEA $7E7E $82DAFD AB PLB $82DAFE AB PLB $82DAFF A2 0C 00 LDX #$000C $82DB02 8E 02 C4 STX $C402 [$7E:C402] $82DB05 20 0C DB JSR $DB0C [$82:DB0C] $82DB08 AB PLB $82DB09 7A PLY $82DB0A FA PLX $82DB0B 6B RTL ;;; ;;; $82DB0C C2 30 REP #$30 $82DB0E 48 PHA $82DB0F AD 02 C4 LDA $C402 [$7E:C402] $82DB12 1A INC A $82DB13 CD 00 C4 CMP $C400 [$7E:C400] $82DB16 B0 09 BCS $09 [$DB21] $82DB18 A9 00 00 LDA #$0000 $82DB1B 8D 00 C4 STA $C400 [$7E:C400] $82DB1E 68 PLA $82DB1F 38 SEC $82DB20 60 RTS $82DB21 9C 04 C4 STZ $C404 [$7E:C404] $82DB24 68 PLA $82DB25 F0 15 BEQ $15 [$DB3C] $82DB27 4A LSR A $82DB28 48 PHA $82DB29 B0 0B BCS $0B [$DB36] $82DB2B AD 04 C4 LDA $C404 [$7E:C404] $82DB2E 69 20 00 ADC #$0020 $82DB31 8D 04 C4 STA $C404 [$7E:C404] $82DB34 80 EE BRA $EE [$DB24] $82DB36 20 41 DB JSR $DB41 [$82:DB41] $82DB39 80 E9 BRA $E9 [$DB24] $82DB3C EE 00 C4 INC $C400 [$7E:C400] $82DB3F 18 CLC $82DB40 60 RTS ;;; ;;; $82DB41 AE 04 C4 LDX $C404 [$7E:C404] $82DB44 BD 00 C2 LDA $C200,x[$7E:C320] $82DB47 DD 00 C0 CMP $C000,x[$7E:C120] $82DB4A F0 11 BEQ $11 [$DB5D] $82DB4C A8 TAY $82DB4D BD 00 C0 LDA $C000,x[$7E:C122] $82DB50 AA TAX $82DB51 AD 00 C4 LDA $C400 [$7E:C400] $82DB54 20 4A DA JSR $DA4A [$82:DA4A] $82DB57 AE 04 C4 LDX $C404 [$7E:C404] $82DB5A 9D 00 C0 STA $C000,x[$7E:C122] $82DB5D E8 INX $82DB5E E8 INX $82DB5F 8E 04 C4 STX $C404 [$7E:C404] $82DB62 8A TXA $82DB63 29 1F 00 AND #$001F $82DB66 D0 DC BNE $DC [$DB44] $82DB68 60 RTS $82DB69 08 PHP $82DB6A C2 30 REP #$30 $82DB6C AD C2 09 LDA $09C2 [$7E:09C2] $82DB6F F0 02 BEQ $02 [$DB73] $82DB71 10 3F BPL $3F [$DBB2] $82DB73 AD C0 09 LDA $09C0 [$7E:09C0] $82DB76 89 01 00 BIT #$0001 $82DB79 F0 1A BEQ $1A [$DB95] $82DB7B AD D6 09 LDA $09D6 [$7E:09D6] $82DB7E F0 15 BEQ $15 [$DB95] $82DB80 A9 00 80 LDA #$8000 $82DB83 8D 78 0A STA $0A78 [$7E:0A78] $82DB86 A9 1B 00 LDA #$001B $82DB89 8D 98 09 STA $0998 [$7E:0998] $82DB8C A9 1B 00 LDA #$001B $82DB8F 22 84 F0 90 JSL $90F084[$90:F084] $82DB93 80 1D BRA $1D [$DBB2] $82DB95 AD 98 09 LDA $0998 [$7E:0998] $82DB98 C9 08 00 CMP #$0008 $82DB9B F0 02 BEQ $02 [$DB9F] $82DB9D 28 PLP $82DB9E 60 RTS $82DB9F A9 00 80 LDA #$8000 $82DBA2 8D 78 0A STA $0A78 [$7E:0A78] $82DBA5 A9 11 00 LDA #$0011 $82DBA8 22 84 F0 90 JSL $90F084[$90:F084] $82DBAC A9 13 00 LDA #$0013 $82DBAF 8D 98 09 STA $0998 [$7E:0998] $82DBB2 AD DA 09 LDA $09DA [$7E:09DA] $82DBB5 18 CLC $82DBB6 69 01 00 ADC #$0001 $82DBB9 8D DA 09 STA $09DA [$7E:09DA] $82DBBC C9 3C 00 CMP #$003C $82DBBF 30 31 BMI $31 [$DBF2] $82DBC1 9C DA 09 STZ $09DA [$7E:09DA] $82DBC4 AD DC 09 LDA $09DC [$7E:09DC] $82DBC7 18 CLC $82DBC8 69 01 00 ADC #$0001 $82DBCB 8D DC 09 STA $09DC [$7E:09DC] $82DBCE C9 3C 00 CMP #$003C $82DBD1 30 1F BMI $1F [$DBF2] $82DBD3 9C DC 09 STZ $09DC [$7E:09DC] $82DBD6 AD DE 09 LDA $09DE [$7E:09DE] $82DBD9 18 CLC $82DBDA 69 01 00 ADC #$0001 $82DBDD 8D DE 09 STA $09DE [$7E:09DE] $82DBE0 C9 3C 00 CMP #$003C $82DBE3 30 0D BMI $0D [$DBF2] $82DBE5 9C DE 09 STZ $09DE [$7E:09DE] $82DBE8 AD E0 09 LDA $09E0 [$7E:09E0] $82DBEB 18 CLC $82DBEC 69 01 00 ADC #$0001 $82DBEF 8D E0 09 STA $09E0 [$7E:09E0] $82DBF2 AD E0 09 LDA $09E0 [$7E:09E0] $82DBF5 C9 64 00 CMP #$0064 $82DBF8 10 02 BPL $02 [$DBFC] $82DBFA 28 PLP $82DBFB 60 RTS ;;; Gamestate 1Bh ;;; ; Reserve tanks auto $82DC10 08 PHP $82DC11 C2 30 REP #$30 $82DC13 20 31 DC JSR $DC31 [$82:DC31] $82DC16 90 10 BCC $10 [$DC28] $82DC18 9C 78 0A STZ $0A78 [$7E:0A78] $82DC1B A9 08 00 LDA #$0008 $82DC1E 8D 98 09 STA $0998 [$7E:0998] $82DC21 A9 10 00 LDA #$0010 $82DC24 22 84 F0 90 JSL $90F084[$90:F084] $82DC28 20 44 8B JSR $8B44 [$82:8B44] $82DC2B 22 AB EA 90 JSL $90EAAB[$90:EAAB] $82DC2F 28 PLP $82DC30 60 RTS $82DC31 AD D6 09 LDA $09D6 [$7E:09D6] $82DC34 F0 41 BEQ $41 [$DC77] $82DC36 AD B6 05 LDA $05B6 [$7E:05B6] $82DC39 89 07 00 BIT #$0007 $82DC3C D0 07 BNE $07 [$DC45] $82DC3E A9 2D 00 LDA #$002D $82DC41 22 39 91 80 JSL $809139[$80:9139] ; Sound library 3, $0653 = 03h $82DC45 AD C2 09 LDA $09C2 [$7E:09C2] $82DC48 18 CLC $82DC49 69 01 00 ADC #$0001 $82DC4C 8D C2 09 STA $09C2 [$7E:09C2] $82DC4F CD C4 09 CMP $09C4 [$7E:09C4] $82DC52 30 08 BMI $08 [$DC5C] $82DC5C AD D6 09 LDA $09D6 [$7E:09D6] $82DC5F 38 SEC $82DC60 E9 01 00 SBC #$0001 $82DC63 8D D6 09 STA $09D6 [$7E:09D6] $82DC66 F0 0C BEQ $0C [$DC74] $82DC68 10 0D BPL $0D [$DC77] $82DC74 9C D6 09 STZ $09D6 [$7E:09D6] $82DC77 AD D6 09 LDA $09D6 [$7E:09D6] $82DC7A D0 02 BNE $02 [$DC7E] $82DC7C 38 SEC $82DC7D 60 RTS $82DC7E 18 CLC $82DC7F 60 RTS ;;; Gamestate 13h ;;; ; Samus ran out of health $82DC80 08 PHP $82DC81 C2 30 REP #$30 $82DC83 20 44 8B JSR $8B44 [$82:8B44] $82DC86 A2 FE 01 LDX #$01FE $82DC89 BF 00 C0 7E LDA $7EC000,x[$7E:C1FE] $82DC8D 9F 00 33 7E STA $7E3300,x[$7E:34FE] $82DC91 CA DEX $82DC92 CA DEX $82DC93 10 F4 BPL $F4 [$DC89] $82DC95 A2 7E 01 LDX #$017E $82DC98 A9 00 00 LDA #$0000 $82DC9B 9F 00 C2 7E STA $7EC200,x[$7E:C37E] $82DC9F CA DEX $82DCA0 CA DEX $82DCA1 10 F8 BPL $F8 [$DC9B] $82DCA3 A2 5E 00 LDX #$005E $82DCA6 A9 00 00 LDA #$0000 $82DCA9 9F A0 C3 7E STA $7EC3A0,x[$7E:C3FE] $82DCAD CA DEX $82DCAE CA DEX $82DCAF 10 F8 BPL $F8 [$DCA9] $82DCB1 A2 1E 00 LDX #$001E $82DCB4 BF 80 C1 7E LDA $7EC180,x[$7E:C19E] $82DCB8 9F 80 C3 7E STA $7EC380,x[$7E:C39E] $82DCBC CA DEX $82DCBD CA DEX $82DCBE 10 F4 BPL $F4 [$DCB4] $82DCC0 A9 03 00 LDA #$0003 $82DCC3 8D E2 0D STA $0DE2 [$7E:0DE2] $82DCC6 9C E4 0D STZ $0DE4 [$7E:0DE4] $82DCC9 9C E6 0D STZ $0DE6 [$7E:0DE6] $82DCCC 9C E8 0D STZ $0DE8 [$7E:0DE8] $82DCCF 9C D2 09 STZ $09D2 [$7E:09D2] $82DCD2 9C 04 0A STZ $0A04 [$7E:0A04] $82DCD5 9C A8 18 STZ $18A8 [$7E:18A8] $82DCD8 9C AA 18 STZ $18AA [$7E:18AA] $82DCDB EE 98 09 INC $0998 [$7E:0998] $82DCDE 28 PLP $82DCDF 60 RTS ;;; Gamestate 14h ;;; ; Samus ran out of health, black out surroundings $82DCE0 08 PHP $82DCE1 C2 30 REP #$30 $82DCE3 20 44 8B JSR $8B44 [$82:8B44] $82DCE6 A9 06 00 LDA #$0006 $82DCE9 8F 02 C4 7E STA $7EC402[$7E:C402] $82DCED 20 02 DA JSR $DA02 [$82:DA02] $82DCF0 B0 02 BCS $02 [$DCF4] $82DCF2 28 PLP $82DCF3 60 RTS $82DCF4 22 9E 82 88 JSL $88829E[$88:829E] $82DCF8 22 5F 98 80 JSL $80985F[$80:985F] ; Disable horizontal and vertical timer interrupts $82DCFC 9C 82 19 STZ $1982 [$7E:1982] $82DCFF 64 AB STZ $AB [$7E:00AB] $82DD01 E2 20 SEP #$20 $82DD03 64 6E STZ $6E [$7E:006E] $82DD05 64 71 STZ $71 [$7E:0071] $82DD07 A9 10 LDA #$10 $82DD09 85 69 STA $69 [$7E:0069] $82DD0B 64 6B STZ $6B [$7E:006B] $82DD0D 64 6C STZ $6C [$7E:006C] $82DD0F 64 6D STZ $6D [$7E:006D] $82DD11 A9 09 LDA #$09 $82DD13 85 55 STA $55 [$7E:0055] $82DD15 C2 20 REP #$20 $82DD17 9C E2 0D STZ $0DE2 [$7E:0DE2] $82DD1A 9C 23 07 STZ $0723 [$7E:0723] $82DD1D 9C 25 07 STZ $0725 [$7E:0725] $82DD20 A2 FE 00 LDX #$00FE $82DD23 9E 8D 1A STZ $1A8D,x[$7E:1B8B] $82DD26 CA DEX $82DD27 CA DEX $82DD28 10 F9 BPL $F9 [$DD23] $82DD2A A9 10 00 LDA #$0010 $82DD2D 8D E8 0D STA $0DE8 [$7E:0DE8] $82DD30 A9 03 00 LDA #$0003 $82DD33 8D E2 0D STA $0DE2 [$7E:0DE2] $82DD36 9C E4 0D STZ $0DE4 [$7E:0DE4] $82DD39 9C E6 0D STZ $0DE6 [$7E:0DE6] $82DD3C EE 98 09 INC $0998 [$7E:0998] $82DD3F 9C 92 05 STZ $0592 [$7E:0592] $82DD42 A9 02 00 LDA #$0002 $82DD45 22 21 90 80 JSL $809021[$80:9021] ; Sound library 1, $0653 = 0Fh $82DD49 A9 71 00 LDA #$0071 $82DD4C 22 A3 90 80 JSL $8090A3[$80:90A3] ; Sound library 2, $0653 = 0Fh $82DD50 A9 01 00 LDA #$0001 $82DD53 22 25 91 80 JSL $809125[$80:9125] ; Sound library 3, $0653 = 0Fh $82DD57 A9 00 00 LDA #$0000 $82DD5A 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $82DD5E A9 39 FF LDA #$FF39 $82DD61 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $82DD65 A9 05 00 LDA #$0005 $82DD68 A0 0E 00 LDY #$000E $82DD6B 22 F7 8F 80 JSL $808FF7[$80:8FF7] ; Changes music song/instruments or music track to A, with a Y-frame delay (minimum of 8). Does not stop 0639 from lapping 063B $82DD6F 28 PLP $82DD70 60 RTS ;;; Gamestate 15h ;;; ; Samus ran out of health, black out surroundings $82DD71 08 PHP $82DD72 C2 30 REP #$30 $82DD74 22 00 8A 90 JSL $908A00[$90:8A00] $82DD78 22 F4 8E 80 JSL $808EF4[$80:8EF4] ; Check for command timer $82DD7C B0 07 BCS $07 [$DD85] $82DD7E 22 A7 B3 9B JSL $9BB3A7[$9B:B3A7] $82DD82 EE 98 09 INC $0998 [$7E:0998] $82DD85 28 PLP $82DD86 60 RTS ;;; Gamestate 16h ;;; ; Samus ran out of health, starting death animation $82DD87 08 PHP $82DD88 C2 30 REP #$30 $82DD8A 22 3C B4 9B JSL $9BB43C[$9B:B43C] $82DD8E CE E8 0D DEC $0DE8 [$7E:0DE8] $82DD91 F0 02 BEQ $02 [$DD95] $82DD93 10 03 BPL $03 [$DD98] $82DD95 EE 98 09 INC $0998 [$7E:0998] $82DD98 28 PLP $82DD99 60 RTS ;;; Gamestate 17h ;;; ; Samus ran out of health, flashing $82DD9A 08 PHP $82DD9B C2 30 REP #$30 $82DD9D 22 41 B4 9B JSL $9BB441[$9B:B441] $82DDA1 AA TAX $82DDA2 F0 05 BEQ $05 [$DDA9] $82DDA4 EE 98 09 INC $0998 [$7E:0998] $82DDA7 80 04 BRA $04 [$DDAD] $82DDA9 22 98 89 90 JSL $908998[$90:8998] $82DDAD 28 PLP $82DDAE 60 RTS ;;; Gamestate 18h ;;; ; Samus ran out of health, explosion $82DDAF 08 PHP $82DDB0 C2 30 REP #$30 $82DDB2 22 01 B7 9B JSL $9BB701[$9B:B701] $82DDB6 AA TAX $82DDB7 F0 0C BEQ $0C [$DDC5] $82DDB9 A9 01 00 LDA #$0001 $82DDBC 8D 23 07 STA $0723 [$7E:0723] $82DDBF 8D 25 07 STA $0725 [$7E:0725] $82DDC2 EE 98 09 INC $0998 [$7E:0998] $82DDC5 28 PLP $82DDC6 60 RTS ;;; Gamestate 19h ;;; ; Samus ran out of health, black out (also cut to by timeup death) $82DDC7 08 PHP $82DDC8 C2 30 REP #$30 $82DDCA 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $82DDCE E2 20 SEP #$20 $82DDD0 A5 51 LDA $51 [$7E:0051] $82DDD2 C9 80 CMP #$80 $82DDD4 D0 17 BNE $17 [$DDED] $82DDD6 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $82DDDA C2 20 REP #$20 $82DDDC 9C 23 07 STZ $0723 [$7E:0723] $82DDDF 9C 25 07 STZ $0725 [$7E:0725] $82DDE2 EE 98 09 INC $0998 [$7E:0998] $82DDE5 9C 27 07 STZ $0727 [$7E:0727] $82DDE8 9C F5 05 STZ $05F5 [$7E:05F5] $82DDEB 28 PLP $82DDEC 60 RTS $82DDED C2 20 REP #$20 $82DDEF 28 PLP $82DDF0 60 RTS ;;; ;;; $82DDF1 8B PHB $82DDF2 DA PHX $82DDF3 F4 00 8F PEA $8F00 $82DDF6 AB PLB $82DDF7 AB PLB $82DDF8 AE 8D 07 LDX $078D [$7E:078D] $82DDFB BF 00 00 83 LDA $830000,x[$83:AB58] $82DDFF AA TAX $82DE00 AD B3 07 LDA $07B3 [$7E:07B3] $82DE03 8D B1 07 STA $07B1 [$7E:07B1] $82DE06 BD 08 00 LDA $0008,x[$8F:DF4D] $82DE09 29 FF 00 AND #$00FF $82DE0C 8D B3 07 STA $07B3 [$7E:07B3] $82DE0F FA PLX $82DE10 AB PLB $82DE11 60 RTS ;;; Load door header ;;; $82DE12 F4 00 83 PEA $8300 $82DE15 AB PLB $82DE16 AB PLB $82DE17 AE 8D 07 LDX $078D [$7E:078D] $82DE1A BD 00 00 LDA $0000,x[$83:AB58] $82DE1D 8D 9B 07 STA $079B [$7E:079B] $82DE20 BD 02 00 LDA $0002,x[$83:AB5A] $82DE23 8D 93 07 STA $0793 [$7E:0793] $82DE26 29 80 00 AND #$0080 $82DE29 8D 16 0E STA $0E16 [$7E:0E16] $82DE2C BD 03 00 LDA $0003,x[$83:AB5B] $82DE2F 29 FF 00 AND #$00FF $82DE32 8D 91 07 STA $0791 [$7E:0791] $82DE35 BD 06 00 LDA $0006,x[$83:AB5E] $82DE38 29 FF 00 AND #$00FF $82DE3B EB XBA $82DE3C 8D 27 09 STA $0927 [$7E:0927] $82DE3F BD 07 00 LDA $0007,x[$83:AB5F] $82DE42 29 FF 00 AND #$00FF $82DE45 EB XBA $82DE46 8D 29 09 STA $0929 [$7E:0929] $82DE49 64 12 STZ $12 [$7E:0012] $82DE4B 64 14 STZ $14 [$7E:0014] $82DE4D BD 08 00 LDA $0008,x[$83:AB60] $82DE50 10 10 BPL $10 [$DE62] $82DE52 AD 91 07 LDA $0791 [$7E:0791] $82DE55 89 02 00 BIT #$0002 $82DE58 D0 05 BNE $05 [$DE5F] $82DE5A A9 C8 00 LDA #$00C8 $82DE5D 80 03 BRA $03 [$DE62] $82DE5F A9 80 01 LDA #$0180 $82DE62 85 13 STA $13 [$7E:0013] $82DE64 A5 12 LDA $12 [$7E:0012] $82DE66 8D 2B 09 STA $092B [$7E:092B] $82DE69 A5 14 LDA $14 [$7E:0014] $82DE6B 8D 2D 09 STA $092D [$7E:092D] $82DE6E 60 RTS ;;; Load room header ;;; $82DE6F F4 00 8F PEA $8F00 ;\ $82DE72 AB PLB ;} DB = $8F $82DE73 AB PLB ;/ $82DE74 AE 9B 07 LDX $079B [$7E:079B] ; X = room header pointer $82DE77 BD 00 00 LDA $0000,x[$8F:DF45] ;\ $82DE7A 29 FF 00 AND #$00FF ;} Room index $82DE7D 8D 9D 07 STA $079D [$7E:079D] ;/ $82DE80 BD 01 00 LDA $0001,x[$8F:DF46] ;\ $82DE83 29 FF 00 AND #$00FF ;} Region $82DE86 8D 9F 07 STA $079F [$7E:079F] ;/ $82DE89 BD 02 00 LDA $0002,x[$8F:DF47] ;\ $82DE8C 29 FF 00 AND #$00FF ;} X $82DE8F 8D A1 07 STA $07A1 [$7E:07A1] ;/ $82DE92 BD 03 00 LDA $0003,x[$8F:DF48] ;\ $82DE95 29 FF 00 AND #$00FF ;} Y $82DE98 8D A3 07 STA $07A3 [$7E:07A3] ;/ $82DE9B BD 04 00 LDA $0004,x[$8F:DF49] ;\ $82DE9E 29 FF 00 AND #$00FF ;} Width in screens $82DEA1 8D A9 07 STA $07A9 [$7E:07A9] ;/ $82DEA4 0A ASL A ;\ $82DEA5 0A ASL A ;| $82DEA6 0A ASL A ;} Width in blocks $82DEA7 0A ASL A ;| $82DEA8 8D A5 07 STA $07A5 [$7E:07A5] ;/ $82DEAB BD 05 00 LDA $0005,x[$8F:DF4A] ;\ $82DEAE 29 FF 00 AND #$00FF ;} Height in screens $82DEB1 8D AB 07 STA $07AB [$7E:07AB] ;/ $82DEB4 0A ASL A ;\ $82DEB5 0A ASL A ;| $82DEB6 0A ASL A ;} Height in blocks $82DEB7 0A ASL A ;| $82DEB8 8D A7 07 STA $07A7 [$7E:07A7] ;/ $82DEBB BD 06 00 LDA $0006,x[$8F:DF4B] ;\ $82DEBE 29 FF 00 AND #$00FF ;} Up scroller $82DEC1 8D AD 07 STA $07AD [$7E:07AD] ;/ $82DEC4 BD 07 00 LDA $0007,x[$8F:DF4C] ;\ $82DEC7 29 FF 00 AND #$00FF ;} Down scroller $82DECA 8D AF 07 STA $07AF [$7E:07AF] ;/ $82DECD BD 09 00 LDA $0009,x[$8F:DF4E] ;\ $82DED0 8D B5 07 STA $07B5 [$7E:07B5] ;} Door out pointer $82DED3 22 D2 E5 8F JSL $8FE5D2[$8F:E5D2] ; Load state header $82DED7 E2 20 SEP #$20 ;\ $82DED9 AD A5 07 LDA $07A5 [$7E:07A5] ;| $82DEDC 8D 02 42 STA $4202 [$7E:4202] ;| $82DEDF AD A7 07 LDA $07A7 [$7E:07A7] ;| $82DEE2 8D 03 42 STA $4203 [$7E:4203] ;| $82DEE5 C2 20 REP #$20 ;| $82DEE7 EA NOP ;} Size of level data $82DEE8 EA NOP ;| $82DEE9 EA NOP ;| $82DEEA AD 16 42 LDA $4216 [$7E:4216] ;| $82DEED 0A ASL A ;| $82DEEE 8D B9 07 STA $07B9 [$7E:07B9] ;/ $82DEF1 60 RTS ;;; ;;; $82DEF2 F4 00 8F PEA $8F00 $82DEF5 AB PLB $82DEF6 AB PLB $82DEF7 AE BB 07 LDX $07BB [$7E:07BB] $82DEFA BD 03 00 LDA $0003,x[$8F:DF5A] $82DEFD 29 FF 00 AND #$00FF $82DF00 0A ASL A $82DF01 A8 TAY $82DF02 BE A7 E7 LDX $E7A7,y[$8F:E7C9] $82DF05 BD 01 00 LDA $0001,x[$8F:E73C] $82DF08 8D C1 07 STA $07C1 [$7E:07C1] $82DF0B BD 00 00 LDA $0000,x[$8F:E73B] $82DF0E 8D C0 07 STA $07C0 [$7E:07C0] $82DF11 BD 04 00 LDA $0004,x[$8F:E73F] $82DF14 8D C4 07 STA $07C4 [$7E:07C4] $82DF17 BD 03 00 LDA $0003,x[$8F:E73E] $82DF1A 8D C3 07 STA $07C3 [$7E:07C3] $82DF1D BD 07 00 LDA $0007,x[$8F:E742] $82DF20 8D C7 07 STA $07C7 [$7E:07C7] $82DF23 BD 06 00 LDA $0006,x[$8F:E741] $82DF26 8D C6 07 STA $07C6 [$7E:07C6] $82DF29 AE BB 07 LDX $07BB [$7E:07BB] $82DF2C BD 01 00 LDA $0001,x[$8F:DF58] $82DF2F 8D BE 07 STA $07BE [$7E:07BE] $82DF32 BD 00 00 LDA $0000,x[$8F:DF57] $82DF35 8D BD 07 STA $07BD [$7E:07BD] $82DF38 BD 04 00 LDA $0004,x[$8F:DF5B] $82DF3B 29 FF 00 AND #$00FF $82DF3E 8D CB 07 STA $07CB [$7E:07CB] $82DF41 BD 05 00 LDA $0005,x[$8F:DF5C] $82DF44 29 FF 00 AND #$00FF $82DF47 8D C9 07 STA $07C9 [$7E:07C9] $82DF4A BD 06 00 LDA $0006,x[$8F:DF5D] $82DF4D 8D CD 07 STA $07CD [$7E:07CD] $82DF50 BD 08 00 LDA $0008,x[$8F:DF5F] $82DF53 8D CF 07 STA $07CF [$7E:07CF] $82DF56 BD 0A 00 LDA $000A,x[$8F:DF61] $82DF59 8D D1 07 STA $07D1 [$7E:07D1] $82DF5C BD 0C 00 LDA $000C,x[$8F:DF63] $82DF5F 8D 1B 09 STA $091B [$7E:091B] $82DF62 BD 12 00 LDA $0012,x[$8F:DF69] $82DF65 8D DF 07 STA $07DF [$7E:07DF] $82DF68 60 RTS $82DF69 08 PHP $82DF6A E2 20 SEP #$20 $82DF6C 22 C5 82 80 JSL $8082C5[$80:82C5] ; Wait until the end of a VBlank $82DF70 A5 84 LDA $84 [$7E:0084] $82DF72 29 30 AND #$30 $82DF74 C9 30 CMP #$30 $82DF76 F0 04 BEQ $04 [$DF7C] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82DF7C C2 20 REP #$20 $82DF7E 28 PLP $82DF7F 60 RTS $82DF80 08 PHP $82DF81 E2 20 SEP #$20 $82DF83 AF 2A 98 80 LDA $80982A[$80:982A] ; Enable horizontal and vertical timer interrupts $82DF87 CF 80 DF 82 CMP $82DF80[$82:DF80] $82DF8B F0 08 BEQ $08 [$DF95] $82DF95 C2 20 REP #$20 $82DF97 28 PLP $82DF98 60 RTS $82DF99 AD 93 07 LDA $0793 [$7E:0793] $82DF9C 29 0F 00 AND #$000F $82DF9F F0 04 BEQ $04 [$DFA5] $82DFA5 AE 8D 07 LDX $078D [$7E:078D] $82DFA8 BF 02 00 83 LDA $830002,x[$83:AB4E] $82DFAC 89 40 00 BIT #$0040 $82DFAF F0 04 BEQ $04 [$DFB5] $82DFB1 22 C6 85 80 JSL $8085C6[$80:85C6] ; Mirror current area's map explored $82DFB5 60 RTS $82DFB6 AE 8D 07 LDX $078D [$7E:078D] $82DFB9 BF 02 00 83 LDA $830002,x[$83:AB4E] $82DFBD 89 40 00 BIT #$0040 $82DFC0 F0 04 BEQ $04 [$DFC6] $82DFC2 22 8C 85 80 JSL $80858C[$80:858C] ; Load mirror of current area's map explored $82DFC6 60 RTS ;;; Ensures that Samus is drawn every frame? ;;; $82DFC7 AD 16 0E LDA $0E16 [$7E:0E16] $82DFCA D0 04 BNE $04 [$DFD0] $82DFCC 22 00 8A 90 JSL $908A00[$90:8A00] $82DFD0 60 RTS $82DFD1 A9 00 70 LDA #$7000 $82DFD4 85 12 STA $12 [$7E:0012] $82DFD6 AE D1 07 LDX $07D1 [$7E:07D1] $82DFD9 F0 5D BEQ $5D [$E038] $82DFDB 9B TXY $82DFDC BF 00 00 B4 LDA $B40000,x[$B4:9226] $82DFE0 C9 FF FF CMP #$FFFF $82DFE3 F0 53 BEQ $53 [$E038] $82DFE5 AA TAX $82DFE6 BF 36 00 A0 LDA $A00036,x[$A0:E275] $82DFEA 8D C0 05 STA $05C0 [$7E:05C0] $82DFED BF 37 00 A0 LDA $A00037,x[$A0:E276] $82DFF1 8D C1 05 STA $05C1 [$7E:05C1] $82DFF4 BF 00 00 A0 LDA $A00000,x[$A0:E23F] $82DFF8 30 14 BMI $14 [$E00E] $82DFFA 8D C3 05 STA $05C3 [$7E:05C3] $82DFFD A5 12 LDA $12 [$7E:0012] $82DFFF 8D BE 05 STA $05BE [$7E:05BE] $82E002 BF 00 00 A0 LDA $A00000,x[$A0:E13F] $82E006 4A LSR A $82E007 18 CLC $82E008 65 12 ADC $12 [$7E:0012] $82E00A 85 12 STA $12 [$7E:0012] $82E00C 80 18 BRA $18 [$E026] $82E00E 29 FF 7F AND #$7FFF $82E011 8D C3 05 STA $05C3 [$7E:05C3] $82E014 BB TYX $82E015 BF 02 00 B4 LDA $B40002,x[$B4:9228] $82E019 29 00 F0 AND #$F000 $82E01C 4A LSR A $82E01D 4A LSR A $82E01E 4A LSR A $82E01F 4A LSR A $82E020 09 00 60 ORA #$6000 $82E023 8D BE 05 STA $05BE [$7E:05BE] $82E026 A9 00 80 LDA #$8000 $82E029 0C BC 05 TSB $05BC [$7E:05BC] $82E02C AD BC 05 LDA $05BC [$7E:05BC] $82E02F 30 FB BMI $FB [$E02C] $82E031 C8 INY $82E032 C8 INY $82E033 C8 INY $82E034 C8 INY $82E035 BB TYX $82E036 80 A4 BRA $A4 [$DFDC] $82E038 60 RTS ;;; Sets up DMA transfer to VRAM ;;; ; 7 bytes after the JSR are used as arguments: ; Source address (3 bytes), ; VRAM address (2 bytes), ; size (2 bytes). ; Waits for an IRQ to DMA - ONLY during door transitions. $82E039 A3 01 LDA $01,s [$7E:1FF7] $82E03B 1A INC A $82E03C 85 AD STA $AD [$7E:00AD] $82E03E 8B PHB $82E03F 4B PHK $82E040 AB PLB $82E041 B2 AD LDA ($AD) [$82:E449] $82E043 8D C0 05 STA $05C0 [$7E:05C0] $82E046 E6 AD INC $AD [$7E:00AD] $82E048 B2 AD LDA ($AD) [$82:E44A] $82E04A 8D C1 05 STA $05C1 [$7E:05C1] $82E04D E6 AD INC $AD [$7E:00AD] $82E04F E6 AD INC $AD [$7E:00AD] $82E051 B2 AD LDA ($AD) [$82:E44C] $82E053 8D BE 05 STA $05BE [$7E:05BE] $82E056 E6 AD INC $AD [$7E:00AD] $82E058 E6 AD INC $AD [$7E:00AD] $82E05A B2 AD LDA ($AD) [$82:E44E] $82E05C 8D C3 05 STA $05C3 [$7E:05C3] $82E05F AB PLB $82E060 A5 AD LDA $AD [$7E:00AD] $82E062 1A INC A $82E063 83 01 STA $01,s [$7E:1FF7] $82E065 A9 00 80 LDA #$8000 $82E068 0C BC 05 TSB $05BC [$7E:05BC] $82E06B AD BC 05 LDA $05BC [$7E:05BC] $82E06E 30 FB BMI $FB [$E06B] $82E070 60 RTS $82E071 08 PHP $82E072 8B PHB $82E073 C2 30 REP #$30 $82E075 AD 98 09 LDA $0998 [$7E:0998] $82E078 C9 28 00 CMP #$0028 $82E07B B0 1B BCS $1B [$E098] $82E07D AD CB 07 LDA $07CB [$7E:07CB] $82E080 F0 16 BEQ $16 [$E098] $82E082 CD F3 07 CMP $07F3 [$7E:07F3] $82E085 F0 11 BEQ $11 [$E098] $82E087 A9 00 00 LDA #$0000 $82E08A 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $82E08E AD CB 07 LDA $07CB [$7E:07CB] $82E091 09 00 FF ORA #$FF00 $82E094 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $82E098 AB PLB $82E099 28 PLP $82E09A 6B RTL ;;; ;;; $82E09B 08 PHP $82E09C 8B PHB $82E09D C2 30 REP #$30 $82E09F AD 98 09 LDA $0998 [$7E:0998] $82E0A2 C9 28 00 CMP #$0028 $82E0A5 B0 2B BCS $2B [$E0D2] $82E0A7 AD C9 07 LDA $07C9 [$7E:07C9] $82E0AA F0 26 BEQ $26 [$E0D2] $82E0AC AD CA 07 LDA $07CA [$7E:07CA] $82E0AF 29 00 FF AND #$FF00 $82E0B2 85 12 STA $12 [$7E:0012] $82E0B4 AD C9 07 LDA $07C9 [$7E:07C9] $82E0B7 04 12 TSB $12 [$7E:0012] $82E0B9 AD F2 07 LDA $07F2 [$7E:07F2] $82E0BC 29 00 FF AND #$FF00 $82E0BF 85 14 STA $14 [$7E:0014] $82E0C1 AD F5 07 LDA $07F5 [$7E:07F5] $82E0C4 04 14 TSB $14 [$7E:0014] $82E0C6 A5 12 LDA $12 [$7E:0012] $82E0C8 C5 14 CMP $14 [$7E:0014] $82E0CA F0 06 BEQ $06 [$E0D2] $82E0CC AD C9 07 LDA $07C9 [$7E:07C9] $82E0CF 8D F5 07 STA $07F5 [$7E:07F5] $82E0D2 AB PLB $82E0D3 28 PLP $82E0D4 6B RTL ;;; ;;; $82E0D5 08 PHP $82E0D6 8B PHB $82E0D7 C2 30 REP #$30 $82E0D9 AD 98 09 LDA $0998 [$7E:0998] $82E0DC C9 28 00 CMP #$0028 $82E0DF B0 2F BCS $2F [$E110] $82E0E1 AD C9 07 LDA $07C9 [$7E:07C9] $82E0E4 F0 2A BEQ $2A [$E110] $82E0E6 AD CA 07 LDA $07CA [$7E:07CA] $82E0E9 29 00 FF AND #$FF00 $82E0EC 85 12 STA $12 [$7E:0012] $82E0EE AD C9 07 LDA $07C9 [$7E:07C9] $82E0F1 04 12 TSB $12 [$7E:0012] $82E0F3 AD F2 07 LDA $07F2 [$7E:07F2] $82E0F6 29 00 FF AND #$FF00 $82E0F9 85 14 STA $14 [$7E:0014] $82E0FB AD F5 07 LDA $07F5 [$7E:07F5] $82E0FE 04 14 TSB $14 [$7E:0014] $82E100 A5 12 LDA $12 [$7E:0012] $82E102 C5 14 CMP $14 [$7E:0014] $82E104 F0 0A BEQ $0A [$E110] $82E106 A0 06 00 LDY #$0006 $82E109 AD C9 07 LDA $07C9 [$7E:07C9] $82E10C 22 F7 8F 80 JSL $808FF7[$80:8FF7] ; Changes music song/instruments or music track to A, with a Y-frame delay (minimum of 8). Does not stop 0639 from lapping 063B $82E110 AB PLB $82E111 28 PLP $82E112 6B RTL ;;; RTL ;;; $82E113 08 PHP $82E114 C2 20 REP #$20 $82E116 28 PLP $82E117 6B RTL ;;; ;;; $82E118 08 PHP $82E119 8B PHB $82E11A C2 30 REP #$30 $82E11C 5A PHY $82E11D A8 TAY $82E11E AD 98 09 LDA $0998 [$7E:0998] $82E121 C9 28 00 CMP #$0028 $82E124 B0 0E BCS $0E [$E134] $82E126 A9 00 00 LDA #$0000 $82E129 22 F7 8F 80 JSL $808FF7[$80:8FF7] ; Changes music song/instruments or music track to A, with a Y-frame delay (minimum of 8). Does not stop 0639 from lapping 063B $82E12D AD F5 07 LDA $07F5 [$7E:07F5] $82E130 22 C1 8F 80 JSL $808FC1[$80:8FC1] ; Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B $82E134 7A PLY $82E135 AB PLB $82E136 28 PLP $82E137 6B RTL ;;; ;;; $82E139 C2 30 REP #$30 $82E13B A2 1E 00 LDX #$001E $82E13E BF A0 81 9A LDA $9A81A0,x[$9A:81BE] $82E142 9F A0 C3 7E STA $7EC3A0,x[$7E:C3BE] $82E146 CA DEX $82E147 CA DEX $82E148 10 F4 BPL $F4 [$E13E] $82E14A A2 1E 00 LDX #$001E $82E14D BF C0 C1 7E LDA $7EC1C0,x[$7E:C1DE] $82E151 9F C0 C3 7E STA $7EC3C0,x[$7E:C3DE] $82E155 CA DEX $82E156 CA DEX $82E157 10 F4 BPL $F4 [$E14D] $82E159 A2 1E 00 LDX #$001E $82E15C BF 00 FC 9A LDA $9AFC00,x[$9A:FC1E] $82E160 9F 00 C3 7E STA $7EC300,x[$7E:C31E] $82E164 CA DEX $82E165 CA DEX $82E166 10 F4 BPL $F4 [$E15C] $82E168 6B RTL ;;; Gamestate 09h ;;; ; Hit a door block $82E169 08 PHP $82E16A C2 30 REP #$30 $82E16C F4 71 E1 PEA $E171 $82E16F 6C 9C 09 JMP ($099C)[$82:E17D] $82E172 B0 02 BCS $02 [$E176] $82E174 28 PLP $82E175 60 RTS $82E176 EE 98 09 INC $0998 [$7E:0998] $82E179 28 PLP $82E17A 4C B7 E1 JMP $E1B7 [$82:E1B7] ;;; ;;; $82E17D AD 16 0E LDA $0E16 [$7E:0E16] $82E180 F0 1B BEQ $1B [$E19D] $82E182 A9 00 00 LDA #$0000 $82E185 22 84 F0 90 JSL $90F084[$90:F084] $82E189 AD 99 07 LDA $0799 [$7E:0799] $82E18C 30 0F BMI $0F [$E19D] $82E18E A9 30 00 LDA #$0030 $82E191 8D 2F 09 STA $092F [$7E:092F] $82E194 A9 9F E1 LDA #$E19F $82E197 8D 9C 09 STA $099C [$7E:099C] $82E19A 4C 9F E1 JMP $E19F [$82:E19F] $82E19D 38 SEC $82E19E 60 RTS $82E19F CE 2F 09 DEC $092F [$7E:092F] $82E1A2 30 11 BMI $11 [$E1B5] $82E1A4 22 B6 8E A0 JSL $A08EB6[$A0:8EB6] $82E1A8 22 D4 8F A0 JSL $A08FD4[$A0:8FD4] $82E1AC 22 4D 88 A0 JSL $A0884D[$A0:884D] $82E1B0 20 C7 DF JSR $DFC7 [$82:DFC7] $82E1B3 18 CLC $82E1B4 60 RTS $82E1B5 38 SEC $82E1B6 60 RTS ;;; Gamestate 0Ah ;;; ; Loading next room $82E1B7 08 PHP $82E1B8 8B PHB $82E1B9 C2 30 REP #$30 $82E1BB A9 01 00 LDA #$0001 $82E1BE 8D 97 07 STA $0797 [$7E:0797] $82E1C1 8D 95 07 STA $0795 [$7E:0795] $82E1C4 9C F7 05 STZ $05F7 [$7E:05F7] $82E1C7 9C 75 1E STZ $1E75 [$7E:1E75] $82E1CA 22 B6 8E A0 JSL $A08EB6[$A0:8EB6] $82E1CE 22 D4 8F A0 JSL $A08FD4[$A0:8FD4] $82E1D2 22 4D 88 A0 JSL $A0884D[$A0:884D] $82E1D6 20 C7 DF JSR $DFC7 [$82:DFC7] $82E1D9 20 F1 DD JSR $DDF1 [$82:DDF1] $82E1DC F4 00 7E PEA $7E00 $82E1DF AB PLB $82E1E0 AB PLB $82E1E1 A2 FE 00 LDX #$00FE $82E1E4 A9 00 00 LDA #$0000 $82E1E7 9D 00 C2 STA $C200,x[$7E:C2FE] $82E1EA 9D 00 C3 STA $C300,x[$7E:C3FE] $82E1ED CA DEX $82E1EE CA DEX $82E1EF 10 F6 BPL $F6 [$E1E7] $82E1F1 AD 12 C0 LDA $C012 [$7E:C012] $82E1F4 8D 12 C2 STA $C212 [$7E:C212] $82E1F7 AD 14 C0 LDA $C014 [$7E:C014] $82E1FA 8D 14 C2 STA $C214 [$7E:C214] $82E1FD AD 1A C0 LDA $C01A [$7E:C01A] $82E200 8D 1A C2 STA $C21A [$7E:C21A] $82E203 AD 1C C0 LDA $C01C [$7E:C01C] $82E206 8D 1C C2 STA $C21C [$7E:C21C] $82E209 AD 22 C0 LDA $C022 [$7E:C022] $82E20C 8D 22 C2 STA $C222 [$7E:C222] $82E20F AD 24 C0 LDA $C024 [$7E:C024] $82E212 8D 24 C2 STA $C224 [$7E:C224] $82E215 AD 26 C0 LDA $C026 [$7E:C026] $82E218 8D 26 C2 STA $C226 [$7E:C226] $82E21B AD 3A C0 LDA $C03A [$7E:C03A] $82E21E 8D 3A C2 STA $C23A [$7E:C23A] $82E221 AD B3 07 LDA $07B3 [$7E:07B3] $82E224 0D B1 07 ORA $07B1 [$7E:07B1] $82E227 89 01 00 BIT #$0001 $82E22A D0 3F BNE $3F [$E26B] $82E22C AD 28 C0 LDA $C028 [$7E:C028] $82E22F 8D 28 C2 STA $C228 [$7E:C228] $82E232 AD 2A C0 LDA $C02A [$7E:C02A] $82E235 8D 2A C2 STA $C22A [$7E:C22A] $82E238 AD 2C C0 LDA $C02C [$7E:C02C] $82E23B 8D 2C C2 STA $C22C [$7E:C22C] $82E23E AD 2E C0 LDA $C02E [$7E:C02E] $82E241 8D 2E C2 STA $C22E [$7E:C22E] $82E244 AD 38 C0 LDA $C038 [$7E:C038] $82E247 8D 38 C2 STA $C238 [$7E:C238] $82E24A AD 43 09 LDA $0943 [$7E:0943] $82E24D F0 1C BEQ $1C [$E26B] $82E24F AD A2 C1 LDA $C1A2 [$7E:C1A2] $82E252 8D A2 C3 STA $C3A2 [$7E:C3A2] $82E255 AD A4 C1 LDA $C1A4 [$7E:C1A4] $82E258 8D A4 C3 STA $C3A4 [$7E:C3A4] $82E25B AD A8 C1 LDA $C1A8 [$7E:C1A8] $82E25E 8D A8 C3 STA $C3A8 [$7E:C3A8] $82E261 AD BA C1 LDA $C1BA [$7E:C1BA] $82E264 8D BA C3 STA $C3BA [$7E:C3BA] $82E267 22 6C 9F 80 JSL $809F6C[$80:9F6C] ; Draw timer $82E26B 22 50 82 84 JSL $848250[$84:8250] $82E26F A9 71 00 LDA #$0071 $82E272 22 A3 90 80 JSL $8090A3[$80:90A3] ; Sound library 2, $0653 = 0Fh $82E276 A9 FF FF LDA #$FFFF $82E279 8D F5 05 STA $05F5 [$7E:05F5] $82E27C A9 9E E2 LDA #$E29E $82E27F 8D 9C 09 STA $099C [$7E:099C] $82E282 EE 98 09 INC $0998 [$7E:0998] $82E285 AB PLB $82E286 28 PLP $82E287 60 RTS ;;; Gamestate 0Bh ;;; ; Loading next room $82E288 08 PHP $82E289 8B PHB $82E28A C2 30 REP #$30 $82E28C F4 91 E2 PEA $E291 $82E28F 6C 9C 09 JMP ($099C)[$82:E29E] $82E292 AD 43 09 LDA $0943 [$7E:0943] $82E295 F0 04 BEQ $04 [$E29B] $82E297 22 6C 9F 80 JSL $809F6C[$80:9F6C] ; Draw timer $82E29B AB PLB $82E29C 28 PLP $82E29D 60 RTS ;;; Handles room transitions ;;; $82E29E 08 PHP $82E29F 22 B6 8E A0 JSL $A08EB6[$A0:8EB6] $82E2A3 22 D4 8F A0 JSL $A08FD4[$A0:8FD4] $82E2A7 22 4D 88 A0 JSL $A0884D[$A0:884D] $82E2AB 20 C7 DF JSR $DFC7 [$82:DFC7] $82E2AE E2 20 SEP #$20 $82E2B0 AD 46 06 LDA $0646 [$7E:0646] $82E2B3 38 SEC $82E2B4 ED 43 06 SBC $0643 [$7E:0643] $82E2B7 29 0F AND #$0F $82E2B9 D0 1E BNE $1E [$E2D9] $82E2BB AD 47 06 LDA $0647 [$7E:0647] $82E2BE 38 SEC $82E2BF ED 44 06 SBC $0644 [$7E:0644] $82E2C2 29 0F AND #$0F $82E2C4 D0 13 BNE $13 [$E2D9] $82E2C6 AD 48 06 LDA $0648 [$7E:0648] $82E2C9 38 SEC $82E2CA ED 45 06 SBC $0645 [$7E:0645] $82E2CD 29 0F AND #$0F $82E2CF D0 08 BNE $08 [$E2D9] $82E2D1 C2 20 REP #$20 $82E2D3 A9 DB E2 LDA #$E2DB $82E2D6 8D 9C 09 STA $099C [$7E:099C] $82E2D9 28 PLP $82E2DA 60 RTS ;;; ;;; $82E2DB 20 61 D9 JSR $D961 [$82:D961] $82E2DE B0 10 BCS $10 [$E2F0] $82E2E0 22 B6 8E A0 JSL $A08EB6[$A0:8EB6] $82E2E4 22 D4 8F A0 JSL $A08FD4[$A0:8FD4] $82E2E8 22 4D 88 A0 JSL $A0884D[$A0:884D] $82E2EC 20 C7 DF JSR $DFC7 [$82:DFC7] $82E2EF 60 RTS $82E2F0 A9 F7 E2 LDA #$E2F7 $82E2F3 8D 9C 09 STA $099C [$7E:099C] $82E2F6 60 RTS ;;; ;;; $82E2F7 20 12 DE JSR $DE12 [$82:DE12] $82E2FA 22 AC 82 88 JSL $8882AC[$88:82AC] $82E2FE A9 00 80 LDA #$8000 $82E301 1C B0 18 TRB $18B0 [$7E:18B0] $82E304 A9 08 00 LDA #$0008 $82E307 85 A7 STA $A7 [$7E:00A7] $82E309 A9 10 E3 LDA #$E310 $82E30C 8D 9C 09 STA $099C [$7E:099C] $82E30F 60 RTS ;;; ;;; $82E310 F4 00 8F PEA $8F00 $82E313 AB PLB $82E314 AB PLB $82E315 AD 91 07 LDA $0791 [$7E:0791] $82E318 89 02 00 BIT #$0002 $82E31B D0 14 BNE $14 [$E331] $82E31D AD 14 09 LDA $0914 [$7E:0914] $82E320 89 00 FF BIT #$FF00 $82E323 F0 23 BEQ $23 [$E348] $82E325 30 05 BMI $05 [$E32C] $82E327 CE 15 09 DEC $0915 [$7E:0915] $82E32A 80 17 BRA $17 [$E343] $82E32C EE 15 09 INC $0915 [$7E:0915] $82E32F 80 12 BRA $12 [$E343] $82E331 AD 10 09 LDA $0910 [$7E:0910] $82E334 89 00 FF BIT #$FF00 $82E337 F0 0F BEQ $0F [$E348] $82E339 30 05 BMI $05 [$E340] $82E33B CE 11 09 DEC $0911 [$7E:0911] $82E33E 80 03 BRA $03 [$E343] $82E340 EE 11 09 INC $0911 [$7E:0911] $82E343 22 AB A3 80 JSL $80A3AB[$80:A3AB] ; Updates BG1 and BG2 graphics when scrolling $82E347 60 RTS $82E348 22 AB A3 80 JSL $80A3AB[$80:A3AB] ; Updates BG1 and BG2 graphics when scrolling $82E34C A9 53 E3 LDA #$E353 $82E34F 8D 9C 09 STA $099C [$7E:099C] $82E352 60 RTS ;;; ;;; $82E353 F4 00 8F PEA $8F00 $82E356 AB PLB $82E357 AB PLB $82E358 AD 91 07 LDA $0791 [$7E:0791] $82E35B 29 03 00 AND #$0003 $82E35E C9 03 00 CMP #$0003 $82E361 D0 04 BNE $04 [$E367] $82E363 22 1D AD 80 JSL $80AD1D[$80:AD1D] ; Run to 'Fix' doors moving up; redraws top row of blocks $82E367 A9 6E E3 LDA #$E36E $82E36A 8D 9C 09 STA $099C [$7E:099C] $82E36D 60 RTS ;;; ;;; $82E36E F4 00 8F PEA $8F00 $82E371 AB PLB $82E372 AB PLB $82E373 20 99 DF JSR $DF99 [$82:DF99] $82E376 20 6F DE JSR $DE6F [$82:DE6F] $82E379 20 F2 DE JSR $DEF2 [$82:DEF2] $82E37C 20 B6 DF JSR $DFB6 [$82:DFB6] $82E37F 22 C1 82 88 JSL $8882C1[$88:82C1] $82E383 22 73 EA 82 JSL $82EA73[$82:EA73] $82E387 A9 8E E3 LDA #$E38E $82E38A 8D 9C 09 STA $099C [$7E:099C] $82E38D 60 RTS ;;; ;;; $82E38E F4 00 8F PEA $8F00 $82E391 AB PLB $82E392 AB PLB $82E393 64 B5 STZ $B5 [$7E:00B5] $82E395 64 B7 STZ $B7 [$7E:00B7] $82E397 9C E9 07 STZ $07E9 [$7E:07E9] $82E39A AD 91 07 LDA $0791 [$7E:0791] $82E39D 29 03 00 AND #$0003 $82E3A0 C9 02 00 CMP #$0002 $82E3A3 D0 02 BNE $02 [$E3A7] $82E3A5 E6 B3 INC $B3 [$7E:00B3] $82E3A7 AD 91 07 LDA $0791 [$7E:0791] $82E3AA 29 03 00 AND #$0003 $82E3AD C9 03 00 CMP #$0003 $82E3B0 F0 03 BEQ $03 [$E3B5] $82E3B2 9C 25 09 STZ $0925 [$7E:0925] $82E3B5 22 30 AD 80 JSL $80AD30[$80:AD30] ; Follow door transition $82E3B9 A9 C0 E3 LDA #$E3C0 $82E3BC 8D 9C 09 STA $099C [$7E:099C] $82E3BF 60 RTS ;;; ;;; ; Set Samus inside the new room, ; set next IRQ to index 16 (10 if moving down), ; wait for vblank to end, ; then reload CRE if needed, ; load room tiles from 07C3 (3 byte pointer) $82E3C0 F4 00 8F PEA $8F00 $82E3C3 AB PLB $82E3C4 AB PLB $82E3C5 AD F6 0A LDA $0AF6 [$7E:0AF6] $82E3C8 29 FF 00 AND #$00FF $82E3CB 18 CLC $82E3CC 6D 11 09 ADC $0911 [$7E:0911] $82E3CF 8D F6 0A STA $0AF6 [$7E:0AF6] $82E3D2 8D 10 0B STA $0B10 [$7E:0B10] $82E3D5 AD FA 0A LDA $0AFA [$7E:0AFA] $82E3D8 29 FF 00 AND #$00FF $82E3DB 18 CLC $82E3DC 6D 15 09 ADC $0915 [$7E:0915] $82E3DF 8D FA 0A STA $0AFA [$7E:0AFA] $82E3E2 8D 14 0B STA $0B14 [$7E:0B14] $82E3E5 9C 31 09 STZ $0931 [$7E:0931] $82E3E8 9C BC 05 STZ $05BC [$7E:05BC] $82E3EB AD 91 07 LDA $0791 [$7E:0791] $82E3EE 29 03 00 AND #$0003 $82E3F1 C9 02 00 CMP #$0002 $82E3F4 D0 05 BNE $05 [$E3FB] $82E3F6 A9 10 00 LDA #$0010 $82E3F9 80 03 BRA $03 [$E3FE] $82E3FB A9 16 00 LDA #$0016 $82E3FE 85 A7 STA $A7 [$7E:00A7] $82E400 20 69 DF JSR $DF69 [$82:DF69] $82E403 AD B3 07 LDA $07B3 [$7E:07B3] ;\ $82E406 89 02 00 BIT #$0002 ;| $82E409 F0 19 BEQ $19 [$E424] ;| $82E40B AD 8D 07 LDA $078D [$7E:078D] ;} If special GFX bitflag bit1 set and DDB != $947A: $82E40E C9 7A 94 CMP #$947A ;| $82E411 F0 11 BEQ $11 [$E424] ;/ $82E413 A9 00 B9 LDA #$B900 ;\ $82E416 85 48 STA $48 [$7E:0048] ;| $82E418 A9 00 80 LDA #$8000 ;| $82E41B 85 47 STA $47 [$7E:0047] ;} Decompress $B98000 to $7E7000 $82E41D 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E421 dl 7E7000 ;/ $82E424 AD C4 07 LDA $07C4 [$7E:07C4] ;\ $82E427 85 48 STA $48 [$7E:0048] ;| $82E429 AD C3 07 LDA $07C3 [$7E:07C3] ;| $82E42C 85 47 STA $47 [$7E:0047] ;} Decompress [$07C3..C5] to $7E2000 $82E42E 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E432 dl 7E2000 ;/ $82E435 AD C7 07 LDA $07C7 [$7E:07C7] ;\ $82E438 85 48 STA $48 [$7E:0048] ;| $82E43A AD C6 07 LDA $07C6 [$7E:07C6] ;| $82E43D 85 47 STA $47 [$7E:0047] ;} Decompress [$07C6..C8] to $7EC200 $82E43F 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E443 dl 7EC200 ;/ $82E446 20 39 E0 JSR $E039 [$82:E039] ;\ $82E449 dx 7E2000, 0000, 2000 ;} $7E2000..3FFF -> VRAM[$0000..0FFF] $82E450 20 39 E0 JSR $E039 [$82:E039] ;\ $82E453 dx 7E4000, 1000, 2000 ;} $7E4000..5FFF -> VRAM[$1000..1FFF] $82E45A 20 39 E0 JSR $E039 [$82:E039] ;\ $82E45D dx 7E6000, 2000, 1000 ;} $7E6000..6FFF -> VRAM[$2000..27FF] $82E464 AD B3 07 LDA $07B3 [$7E:07B3] ;\ $82E467 89 06 00 BIT #$0006 ;| $82E46A F0 26 BEQ $26 [$E492] ;| $82E46C AD 8D 07 LDA $078D [$7E:078D] ;} If special GFX bitflag bit1 or bit2 set and DDB != $947A: $82E46F C9 7A 94 CMP #$947A ;| $82E472 F0 1E BEQ $1E [$E492] ;/ $82E474 20 39 E0 JSR $E039 [$82:E039] ;\ $82E477 dx 7E7000, 2800, 1000 ;} $7E7000..7FFF -> VRAM[$2800..2FFF] $82E47E 20 39 E0 JSR $E039 [$82:E039] ;\ $82E481 dx 7E8000, 3000, 2000 ;} $7E8000..9FFF -> VRAM[$3000..3FFF] $82E488 20 39 E0 JSR $E039 [$82:E039] ;\ $82E48B dx 9AB200, 4000, 1000 ;} $9AB200..C1FF -> VRAM[$4000..47FF] $82E492 AD 91 07 LDA $0791 [$7E:0791] $82E495 29 03 00 AND #$0003 $82E498 C9 03 00 CMP #$0003 $82E49B D0 05 BNE $05 [$E4A2] $82E49D A9 10 00 LDA #$0010 $82E4A0 85 A7 STA $A7 [$7E:00A7] $82E4A2 A9 A9 E4 LDA #$E4A9 $82E4A5 8D 9C 09 STA $099C [$7E:099C] $82E4A8 60 RTS ;;; ;;; $82E4A9 08 PHP $82E4AA 20 D1 DF JSR $DFD1 [$82:DFD1] $82E4AD 22 71 E0 82 JSL $82E071[$82:E071] $82E4B1 22 16 80 86 JSL $868016[$86:8016] $82E4B5 22 16 80 87 JSL $878016[$87:8016] $82E4B9 22 D8 C4 8D JSL $8DC4D8[$8D:C4D8] $82E4BD 22 C3 83 84 JSL $8483C3[$84:83C3] $82E4C1 22 6C EB 82 JSL $82EB6C[$82:EB6C] $82E4C5 22 82 AB 89 JSL $89AB82[$89:AB82] $82E4C9 20 EB E8 JSR $E8EB [$82:E8EB] $82E4CC 22 8D AC 90 JSL $90AC8D[$90:AC8D] $82E4D0 22 39 E1 82 JSL $82E139[$82:E139] $82E4D4 22 1E 8A A0 JSL $A08A1E[$A0:8A1E] $82E4D8 22 9E 8A A0 JSL $A08A9E[$A0:8A9E] $82E4DC 22 22 AD 90 JSL $90AD22[$90:AD22] $82E4E0 22 E6 DE 91 JSL $91DEE6[$91:DEE6] $82E4E4 28 PLP $82E4E5 F4 00 8F PEA $8F00 $82E4E8 AB PLB $82E4E9 AB PLB $82E4EA 20 66 E5 JSR $E566 [$82:E566] $82E4ED A9 00 8A LDA #$8A00 $82E4F0 8D C1 05 STA $05C1 [$7E:05C1] $82E4F3 AD 64 19 LDA $1964 [$7E:1964] $82E4F6 F0 1A BEQ $1A [$E512] $82E4F8 8D C0 05 STA $05C0 [$7E:05C0] $82E4FB A9 E0 5B LDA #$5BE0 $82E4FE 8D BE 05 STA $05BE [$7E:05BE] $82E501 A9 40 08 LDA #$0840 $82E504 8D C3 05 STA $05C3 [$7E:05C3] $82E507 A9 00 80 LDA #$8000 $82E50A 0C BC 05 TSB $05BC [$7E:05BC] $82E50D 2C BC 05 BIT $05BC [$7E:05BC] $82E510 30 FB BMI $FB [$E50D] $82E512 AE BB 07 LDX $07BB [$7E:07BB] $82E515 BC 16 00 LDY $0016,x[$8F:DFB5] $82E518 10 0A BPL $0A [$E524] $82E51A BE 00 00 LDX $0000,y[$8F:E4A5] $82E51D C8 INY $82E51E C8 INY $82E51F FC C7 E5 JSR ($E5C7,x)[$82:E616] $82E522 90 F6 BCC $F6 [$E51A] $82E524 C2 30 REP #$30 $82E526 AD 31 09 LDA $0931 [$7E:0931] $82E529 10 FB BPL $FB [$E526] $82E52B A9 E0 3B LDA #$3BE0 $82E52E 8F 88 C1 7E STA $7EC188[$7E:C188] $82E532 22 65 D8 88 JSL $88D865[$88:D865] $82E536 A9 00 80 LDA #$8000 $82E539 0C B0 18 TSB $18B0 [$7E:18B0] $82E53C 22 B4 85 84 JSL $8485B4[$84:85B4] $82E540 22 38 83 80 JSL $808338[$80:8338] ; Wait for IRQ $82E544 AD 91 07 LDA $0791 [$7E:0791] $82E547 89 02 00 BIT #$0002 $82E54A D0 13 BNE $13 [$E55F] $82E54C 29 03 00 AND #$0003 $82E54F F0 08 BEQ $08 [$E559] $82E551 A9 07 00 LDA #$0007 $82E554 1C F6 0A TRB $0AF6 [$7E:0AF6] $82E557 80 06 BRA $06 [$E55F] $82E559 A9 07 00 LDA #$0007 $82E55C 0C F6 0A TSB $0AF6 [$7E:0AF6] $82E55F A9 59 E6 LDA #$E659 $82E562 8D 9C 09 STA $099C [$7E:099C] $82E565 60 RTS $82E566 A2 7E 07 LDX #$077E $82E569 A9 4E 18 LDA #$184E $82E56C 9F 00 40 7E STA $7E4000,x[$7E:477E] $82E570 9F 80 47 7E STA $7E4780,x[$7E:4EFE] $82E574 CA DEX $82E575 CA DEX $82E576 10 F4 BPL $F4 [$E56C] $82E578 20 39 E0 JSR $E039 [$82:E039] $82E57B db 00, 40, 7E, 80, 58, 00, 0F $82E582 60 RTS $82E583 A2 FE 07 LDX #$07FE $82E586 A9 38 03 LDA #$0338 $82E589 9F 00 40 7E STA $7E4000,x[$7E:47FE] $82E58D 9F 00 48 7E STA $7E4800,x[$7E:4FFE] $82E591 CA DEX $82E592 CA DEX $82E593 10 F4 BPL $F4 [$E589] $82E595 20 39 E0 JSR $E039 [$82:E039] $82E598 db 00, 40, 7E, 00, 48, 00, 10 $82E59F 60 RTS $82E5A0 A2 FE 07 LDX #$07FE $82E5A3 A9 38 03 LDA #$0338 $82E5A6 9F 00 40 7E STA $7E4000,x[$7E:47FE] $82E5AA 9F 00 48 7E STA $7E4800,x[$7E:4FFE] $82E5AE CA DEX $82E5AF CA DEX $82E5B0 10 F4 BPL $F4 [$E5A6] $82E5B2 20 39 E0 JSR $E039 [$82:E039] $82E5B5 db 00, 40, 7E, 00, 40, 00, 10 $82E5BC 20 39 E0 JSR $E039 [$82:E039] $82E5BF db 00, 40, 7E, 00, 48, 00, 10 $82E5C6 60 RTS $82E5C7 db D7 $82E5C9 db EB $82E5CB db 16 $82E5CF db 3E $82E5D1 db 4B $82E5D3 db 52 $82E5D5 db D9 ;;; ;;; $82E5D7 38 SEC $82E5D8 60 RTS ;;; BG_Data type 000E ;;; $82E5D9 AD 8D 07 LDA $078D [$7E:078D] ;\ $82E5DC D9 00 00 CMP $0000,y[$8F:B76C] ;} If current DDB != BG_Data entry DDB: $82E5DF F0 08 BEQ $08 [$E5E9] ;/ $82E5E1 98 TYA ;\ $82E5E2 18 CLC ;| $82E5E3 69 09 00 ADC #$0009 ;} Next BG_Data entry $82E5E6 A8 TAY ;/ $82E5E7 18 CLC $82E5E8 60 RTS $82E5E9 C8 INY $82E5EA C8 INY $82E5EB B9 03 00 LDA $0003,y[$8F:E4B1] ;\ $82E5EE 8D BE 05 STA $05BE [$7E:05BE] ;} Dest $82E5F1 B9 00 00 LDA $0000,y[$8F:E4AE] ;\ $82E5F4 8D C0 05 STA $05C0 [$7E:05C0] ;| $82E5F7 B9 01 00 LDA $0001,y[$8F:E4AF] ;} Source $82E5FA 8D C1 05 STA $05C1 [$7E:05C1] ;/ $82E5FD B9 05 00 LDA $0005,y[$8F:E4B3] ;\ $82E600 8D C3 05 STA $05C3 [$7E:05C3] ;} Size $82E603 A9 00 80 LDA #$8000 ;\ $82E606 0C BC 05 TSB $05BC [$7E:05BC] ;} Update VRAM $82E609 2C BC 05 BIT $05BC [$7E:05BC] ;\ $82E60C 30 FB BMI $FB [$E609] ;} Wait for VRAM update $82E60E 98 TYA ;\ $82E60F 18 CLC ;| $82E610 69 07 00 ADC #$0007 ;} Next BG_Data entry $82E613 A8 TAY ;/ $82E614 18 CLC $82E615 60 RTS ;;; Decompress [Y..Y+2] to $7E:[Y+3..Y+4], Y += 5 ;;; $82E616 5A PHY $82E617 B9 00 00 LDA $0000,y[$8F:E4A7] $82E61A 85 47 STA $47 [$7E:0047] $82E61C B9 01 00 LDA $0001,y[$8F:E4A8] $82E61F 85 48 STA $48 [$7E:0048] $82E621 A9 00 7E LDA #$7E00 $82E624 85 4D STA $4D [$7E:004D] $82E626 B9 03 00 LDA $0003,y[$8F:E4AA] $82E629 85 4C STA $4C [$7E:004C] $82E62B 22 19 B1 80 JSL $80B119[$80:B119] $82E62F 68 PLA $82E630 18 CLC $82E631 69 05 00 ADC #$0005 $82E634 A8 TAY $82E635 18 CLC $82E636 60 RTS ;;; ;;; $82E63E 20 EB E5 JSR $E5EB [$82:E5EB] $82E641 E2 20 SEP #$20 $82E643 A9 02 LDA #$02 $82E645 85 5E STA $5E [$7E:005E] $82E647 C2 20 REP #$20 $82E649 18 CLC $82E64A 60 RTS ;;; ;;; $82E64B 5A PHY $82E64C 20 83 E5 JSR $E583 [$82:E583] $82E64F 7A PLY $82E650 18 CLC $82E651 60 RTS ;;; ;;; $82E652 5A PHY $82E653 20 A0 E5 JSR $E5A0 [$82:E5A0] $82E656 7A PLY $82E657 18 CLC $82E658 60 RTS ;;; ;;; $82E659 22 64 80 87 JSL $878064[$87:8064] $82E65D A9 64 E6 LDA #$E664 $82E660 8D 9C 09 STA $099C [$7E:099C] $82E663 60 RTS ;;; ;;; $82E664 22 F4 8E 80 JSL $808EF4[$80:8EF4] ; Check for command timer $82E668 B0 0A BCS $0A [$E674] $82E66A A9 A2 E6 LDA #$E6A2 $82E66D 8D 9C 09 STA $099C [$7E:099C] $82E670 22 D5 E0 82 JSL $82E0D5[$82:E0D5] $82E674 60 RTS ;;; ;;; $82E6A2 AD F6 0A LDA $0AF6 [$7E:0AF6] $82E6A5 29 F0 00 AND #$00F0 $82E6A8 C9 10 00 CMP #$0010 $82E6AB D0 0F BNE $0F [$E6BC] $82E6AD AD F6 0A LDA $0AF6 [$7E:0AF6] $82E6B0 09 0F 00 ORA #$000F $82E6B3 18 CLC $82E6B4 69 08 00 ADC #$0008 $82E6B7 8D F6 0A STA $0AF6 [$7E:0AF6] $82E6BA 80 12 BRA $12 [$E6CE] $82E6BC C9 E0 00 CMP #$00E0 $82E6BF D0 0D BNE $0D [$E6CE] $82E6CE AD FA 0A LDA $0AFA [$7E:0AFA] $82E6D1 29 F0 00 AND #$00F0 $82E6D4 C9 10 00 CMP #$0010 $82E6D7 D0 0F BNE $0F [$E6E8] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $82E6E8 C9 E0 00 CMP #$00E0 $82E6EB 8B PHB $82E6EC F4 00 7E PEA $7E00 $82E6EF AB PLB $82E6F0 AB PLB $82E6F1 A2 FE 01 LDX #$01FE $82E6F4 9E 00 9C STZ $9C00,x[$7E:9DFE] $82E6F7 9E 00 9E STZ $9E00,x[$7E:9FFE] $82E6FA CA DEX $82E6FB CA DEX $82E6FC 10 F6 BPL $F6 [$E6F4] $82E6FE AB PLB $82E6FF A5 A9 LDA $A9 [$7E:00A9] $82E701 D0 03 BNE $03 [$E706] $82E703 A9 04 00 LDA #$0004 $82E706 85 A7 STA $A7 [$7E:00A7] $82E708 20 80 DF JSR $DF80 [$82:DF80] $82E70B AD 16 0E LDA $0E16 [$7E:0E16] $82E70E F0 15 BEQ $15 [$E725] $82E710 2C 99 07 BIT $0799 [$7E:0799] $82E713 10 09 BPL $09 [$E71E] $82E715 A9 00 00 LDA #$0000 ;\ $82E718 22 84 F0 90 JSL $90F084[$90:F084] ;} Put #$E713 into $0A42, #$E8DC into $0A44 $82E71C 80 07 BRA $07 [$E725] $82E71E A9 07 00 LDA #$0007 ;\ $82E721 22 84 F0 90 JSL $90F084[$90:F084] ;} JSL $91E3F6, #$E8EC into $0A44, #$A337 into $0A58 (the cause of the elevator blue suit), #$EC14 into $0A5C, #$E913 into $0A60 $82E725 22 0F 8E 90 JSL $908E0F[$90:8E0F] $82E729 A9 37 E7 LDA #$E737 $82E72C 8D 9C 09 STA $099C [$7E:099C] $82E72F A5 51 LDA $51 [$7E:0051] $82E731 09 1F 00 ORA #$001F $82E734 85 51 STA $51 [$7E:0051] $82E736 60 RTS $82E737 22 64 80 87 JSL $878064[$87:8064] $82E73B 22 B6 8E A0 JSL $A08EB6[$A0:8EB6] $82E73F 22 D4 8F A0 JSL $A08FD4[$A0:8FD4] $82E743 22 04 81 86 JSL $868104[$86:8104] $82E747 22 4D 88 A0 JSL $A0884D[$A0:884D] $82E74B 20 C7 DF JSR $DFC7 [$82:DFC7] $82E74E 22 26 97 A0 JSL $A09726[$A0:9726] $82E752 20 61 D9 JSR $D961 [$82:D961] $82E755 90 13 BCC $13 [$E76A] $82E757 9C F5 05 STZ $05F5 [$7E:05F5] $82E75A 22 70 82 84 JSL $848270[$84:8270] $82E75E 9C 95 07 STZ $0795 [$7E:0795] $82E761 9C 97 07 STZ $0797 [$7E:0797] $82E764 A9 08 00 LDA #$0008 $82E767 8D 98 09 STA $0998 [$7E:0998] $82E76A 60 RTS ;;; ;;; $82E76B 08 PHP $82E76C 8B PHB $82E76D C2 30 REP #$30 $82E76F F4 00 8F PEA $8F00 $82E772 AB PLB $82E773 AB PLB $82E774 20 F1 DD JSR $DDF1 [$82:DDF1] $82E777 20 12 DE JSR $DE12 [$82:DE12] $82E77A 20 6F DE JSR $DE6F [$82:DE6F] $82E77D 20 F2 DE JSR $DEF2 [$82:DEF2] $82E780 4C 8C E7 JMP $E78C [$82:E78C] ;;; ;;; $82E783 08 PHP $82E784 8B PHB $82E785 C2 30 REP #$30 $82E787 F4 00 8F PEA $8F00 $82E78A AB PLB $82E78B AB PLB $82E78C 9C 16 0E STZ $0E16 [$7E:0E16] $82E78F A9 80 00 LDA #$0080 ;\ $82E792 8D 15 21 STA $2115 [$7E:2115] ;| $82E795 A9 00 B9 LDA #$B900 ;| $82E798 85 48 STA $48 [$7E:0048] ;| $82E79A A9 00 80 LDA #$8000 ;| $82E79D 85 47 STA $47 [$7E:0047] ;} Decompress $B98000 to VRAM[$2800] $82E79F A9 00 50 LDA #$5000 ;| $82E7A2 85 4C STA $4C [$7E:004C] ;| $82E7A4 4A LSR A ;| $82E7A5 8D 16 21 STA $2116 [$7E:2116] ;| $82E7A8 22 71 B2 80 JSL $80B271[$80:B271] ;/ $82E7AC AD C4 07 LDA $07C4 [$7E:07C4] ;\ $82E7AF 85 48 STA $48 [$7E:0048] ;| $82E7B1 AD C3 07 LDA $07C3 [$7E:07C3] ;| $82E7B4 85 47 STA $47 [$7E:0047] ;} Decompress [$07C3..C5] to VRAM[$0000] $82E7B6 9C 16 21 STZ $2116 [$7E:2116] ;| $82E7B9 64 4C STZ $4C [$7E:004C] ;| $82E7BB 22 71 B2 80 JSL $80B271[$80:B271] ;/ $82E7BF AD C7 07 LDA $07C7 [$7E:07C7] ;\ $82E7C2 85 48 STA $48 [$7E:0048] ;| $82E7C4 AC C6 07 LDY $07C6 [$7E:07C6] ;| $82E7C7 84 47 STY $47 [$7E:0047] ;} Decompress [$07C6..C8] to $7EC200 $82E7C9 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E7CD dl 7EC200 ;/ $82E7D0 AB PLB $82E7D1 28 PLP $82E7D2 6B RTL ;;; ;;; $82E7D3 08 PHP $82E7D4 8B PHB $82E7D5 C2 30 REP #$30 $82E7D7 F4 00 8F PEA $8F00 $82E7DA AB PLB $82E7DB AB PLB $82E7DC A2 FE 63 LDX #$63FE ;\ $82E7DF A9 00 80 LDA #$8000 ;| ;| $82E7E2 9F 02 00 7F STA $7F0002,x[$7F:6400] ;} $7F:0002..6401 = 8000h $82E7E6 CA DEX ;| $82E7E7 CA DEX ;| $82E7E8 10 F8 BPL $F8 [$E7E2] ;/ $82E7EA AD BE 07 LDA $07BE [$7E:07BE] ;\ $82E7ED 85 48 STA $48 [$7E:0048] ;| $82E7EF AD BD 07 LDA $07BD [$7E:07BD] ;| $82E7F2 85 47 STA $47 [$7E:0047] ;} Decompress level data $82E7F4 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E7F8 dl 7F0000 ;/ $82E7FB 8B PHB ;\ $82E7FC F4 00 7F PEA $7F00 ;| $82E7FF AB PLB ;| $82E800 AB PLB ;| $82E801 AD 00 00 LDA $0000 [$7F:0000] ;| $82E804 AA TAX ;| $82E805 4A LSR A ;| $82E806 6D 00 00 ADC $0000 [$7F:0000] ;| $82E809 6D 00 00 ADC $0000 [$7F:0000] ;| $82E80C A8 TAY ;| $82E80D 80 06 BRA $06 [$E815] ;} Mirror background data ;| $82E80F B9 02 00 LDA $0002,y[$7F:0F00] ;| $82E812 9D 02 96 STA $9602,x[$7F:9C00] ;| ;| $82E815 88 DEY ;| $82E816 88 DEY ;| $82E817 CA DEX ;| $82E818 CA DEX ;| $82E819 10 F4 BPL $F4 [$E80F] ;/ $82E81B AD 00 00 LDA $0000 [$7F:0000] ;\ $82E81E 4A LSR A ;| $82E81F AA TAX ;| $82E820 6D 00 00 ADC $0000 [$7F:0000] ;| $82E823 A8 TAY ;| $82E824 80 06 BRA $06 [$E82C] ;| ;| $82E826 B9 02 00 LDA $0002,y[$7F:0900] ;} Mirror BTS data $82E829 9D 02 64 STA $6402,x[$7F:6700] ;| ;| $82E82C 88 DEY ;| $82E82D 88 DEY ;| $82E82E CA DEX ;| $82E82F CA DEX ;| $82E830 10 F4 BPL $F4 [$E826] ;/ $82E832 AB PLB $82E833 AD 9F 07 LDA $079F [$7E:079F] ;\ $82E836 C9 06 00 CMP #$0006 ;} If not in Ceres: $82E839 F0 24 BEQ $24 [$E85F] ;/ $82E83B A9 00 B9 LDA #$B900 ;\ $82E83E 85 48 STA $48 [$7E:0048] ;| $82E840 A9 9D A0 LDA #$A09D ;| $82E843 85 47 STA $47 [$7E:0047] ;} Decompress $B9A09D to $7EA000 (standard CRE) $82E845 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E849 dl 7EA000 ;/ $82E84C AD C1 07 LDA $07C1 [$7E:07C1] ;\ $82E84F 85 48 STA $48 [$7E:0048] ;| $82E851 AD C0 07 LDA $07C0 [$7E:07C0] ;| $82E854 85 47 STA $47 [$7E:0047] ;} Decompress [$07C0..C2] to $7EA800 $82E856 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E85A dl 7EA800 ;/ $82E85D 80 11 BRA $11 [$E870] $82E85F AD C1 07 LDA $07C1 [$7E:07C1] ;\ Else (in Ceres): $82E862 85 48 STA $48 [$7E:0048] ;| $82E864 AD C0 07 LDA $07C0 [$7E:07C0] ;| $82E867 85 47 STA $47 [$7E:0047] ;} Decompress [$07C0..C2] to $7EA000 $82E869 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82E86D dl 7EA000 ;/ $82E870 AE BB 07 LDX $07BB [$7E:07BB] ;\ $82E873 BC 0E 00 LDY $000E,x[$8F:DF65] ;} If scroll pointer negative: $82E876 10 15 BPL $15 [$E88D] ;/ $82E878 A2 00 00 LDX #$0000 ;\ ;| $82E87B B9 00 00 LDA $0000,y[$8F:9283] ;| $82E87E 9F 20 CD 7E STA $7ECD20,x[$7E:CD20] ;| $82E882 C8 INY ;| $82E883 C8 INY ;} Load scroll data $82E884 E8 INX ;| $82E885 E8 INX ;| $82E886 E0 32 00 CPX #$0032 ;| $82E889 D0 F0 BNE $F0 [$E87B] ;/ $82E88B 80 2C BRA $2C [$E8B9] ; See $EB20 $82E88D 84 12 STY $12 [$7E:0012] ;\ Else (scroll pointer positive): $82E88F E2 30 SEP #$30 $82E891 AD AB 07 LDA $07AB [$7E:07AB] $82E894 3A DEC A $82E895 85 14 STA $14 [$7E:0014] $82E897 A9 02 LDA #$02 $82E899 A2 00 LDX #$00 $82E89B A0 00 LDY #$00 $82E89D C4 14 CPY $14 [$7E:0014] $82E89F D0 03 BNE $03 [$E8A4] $82E8A1 A5 12 LDA $12 [$7E:0012] $82E8A3 1A INC A $82E8A4 5A PHY $82E8A5 A0 00 LDY #$00 $82E8A7 9F 20 CD 7E STA $7ECD20,x[$7E:CD20] $82E8AB E8 INX $82E8AC C8 INY $82E8AD CC A9 07 CPY $07A9 [$7E:07A9] $82E8B0 D0 F5 BNE $F5 [$E8A7] $82E8B2 7A PLY $82E8B3 C8 INY $82E8B4 CC AB 07 CPY $07AB [$7E:07AB] $82E8B7 D0 E4 BNE $E4 [$E89D] $82E8B9 C2 30 REP #$30 $82E8BB AE BB 07 LDX $07BB [$7E:07BB] ;\ $82E8BE BD 14 00 LDA $0014,x[$8F:DF6B] ;} If PLM pointer: $82E8C1 F0 12 BEQ $12 [$E8D5] ;/ $82E8C3 AA TAX ;\ ;| $82E8C4 BD 00 00 LDA $0000,x[$8F:C8BB] ;| $82E8C7 F0 0C BEQ $0C [$E8D5] ;| $82E8C9 22 6A 84 84 JSL $84846A[$84:846A] ;| $82E8CD 8A TXA ;} Create the PLMs $82E8CE 18 CLC ;| $82E8CF 69 06 00 ADC #$0006 ;| $82E8D2 AA TAX ;| $82E8D3 80 EF BRA $EF [$E8C4] ;/ $82E8D5 22 A3 E8 8F JSL $8FE8A3[$8F:E8A3] ; Execute door ASM $82E8D9 22 8F E8 8F JSL $8FE88F[$8F:E88F] ; Execute Layer 1_2 $82E8DD AD 16 0E LDA $0E16 [$7E:0E16] ;\ $82E8E0 F0 06 BEQ $06 [$E8E8] ;} If elevator: $82E8E2 A9 02 00 LDA #$0002 ;\ $82E8E5 8D 18 0E STA $0E18 [$7E:0E18] ;} Set elevator status $82E8E8 AB PLB $82E8E9 28 PLP $82E8EA 6B RTL ;;; ;;; $82E8EB 08 PHP $82E8EC 8B PHB $82E8ED C2 30 REP #$30 $82E8EF F4 00 8F PEA $8F00 $82E8F2 AB PLB $82E8F3 AB PLB $82E8F4 20 1C E9 JSR $E91C [$82:E91C] $82E8F7 B0 20 BCS $20 [$E919] $82E8F9 AD 91 07 LDA $0791 [$7E:0791] $82E8FC 0A ASL A $82E8FD 18 CLC $82E8FE 69 8A E6 ADC #$E68A $82E901 AA TAX $82E902 BD 00 00 LDA $0000,x[$8F:E68A] $82E905 F0 12 BEQ $12 [$E919] $82E907 85 12 STA $12 [$7E:0012] $82E909 AE 8D 07 LDX $078D [$7E:078D] $82E90C BF 04 00 83 LDA $830004,x[$83:891A] $82E910 85 14 STA $14 [$7E:0014] $82E912 A2 12 00 LDX #$0012 $82E915 22 6A 84 84 JSL $84846A[$84:846A] $82E919 AB PLB $82E91A 28 PLP $82E91B 60 RTS $82E91C AE 8D 07 LDX $078D [$7E:078D] $82E91F 78 SEI $82E920 E2 20 SEP #$20 $82E922 BF 05 00 83 LDA $830005,x[$83:AB51] $82E926 8D 02 42 STA $4202 [$7E:4202] $82E929 AD A5 07 LDA $07A5 [$7E:07A5] $82E92C 8D 03 42 STA $4203 [$7E:4203] $82E92F BF 04 00 83 LDA $830004,x[$83:AB50] $82E933 C2 20 REP #$20 $82E935 29 FF 00 AND #$00FF $82E938 18 CLC $82E939 6D 16 42 ADC $4216 [$7E:4216] $82E93C 0A ASL A $82E93D 58 CLI $82E93E A2 4E 00 LDX #$004E $82E941 DD 87 1C CMP $1C87,x[$7E:1CD5] $82E944 F0 06 BEQ $06 [$E94C] $82E946 CA DEX $82E947 CA DEX $82E948 10 F7 BPL $F7 [$E941] $82E94A 18 CLC $82E94B 60 RTS $82E94C BD 37 1C LDA $1C37,x[$7E:1C83] $82E94F F0 F9 BEQ $F9 [$E94A] $82E951 BD C7 1D LDA $1DC7,x[$7E:1E0F] $82E954 30 0F BMI $0F [$E965] $82E956 DA PHX $82E957 22 8E 81 80 JSL $80818E[$80:818E] ; Change nth bit to address offset and mask $82E95B BF B0 D8 7E LDA $7ED8B0,x[$7E:D8B6] $82E95F FA PLX $82E960 2D E7 05 AND $05E7 [$7E:05E7] $82E963 D0 E5 BNE $E5 [$E94A] $82E965 A9 01 00 LDA #$0001 $82E968 9F 1C DE 7E STA $7EDE1C,x[$7E:DE64] $82E96C 9B TXY $82E96D BD 37 1C LDA $1C37,x[$7E:1C7F] $82E970 F0 D8 BEQ $D8 [$E94A] $82E972 AA TAX $82E973 BF 04 00 84 LDA $840004,x[$84:C84C] $82E977 99 27 1D STA $1D27,y[$7E:1D6F] $82E97A 38 SEC $82E97B 60 RTS $82E97C 08 PHP $82E97D 8B PHB $82E97E C2 30 REP #$30 $82E980 22 9C A2 80 JSL $80A29C[$80:A29C] ; VRAM $5880..5FFF = 184Eh $82E984 AD 64 19 LDA $1964 [$7E:1964] $82E987 F0 30 BEQ $30 [$E9B9] $82E989 8D 12 43 STA $4312 [$7E:4312] $82E98C A9 E0 5B LDA #$5BE0 $82E98F 8D 16 21 STA $2116 [$7E:2116] $82E992 A9 01 18 LDA #$1801 $82E995 8D 10 43 STA $4310 [$7E:4310] $82E998 A9 8A 00 LDA #$008A $82E99B 8D 14 43 STA $4314 [$7E:4314] $82E99E A9 40 08 LDA #$0840 $82E9A1 8D 15 43 STA $4315 [$7E:4315] $82E9A4 E2 20 SEP #$20 $82E9A6 A9 80 LDA #$80 $82E9A8 8D 15 21 STA $2115 [$7E:2115] $82E9AB A9 02 LDA #$02 $82E9AD 8D 0B 42 STA $420B [$7E:420B] $82E9B0 C2 20 REP #$20 $82E9B2 98 TYA $82E9B3 18 CLC $82E9B4 69 07 00 ADC #$0007 $82E9B7 A8 TAY $82E9B8 18 CLC $82E9B9 F4 00 8F PEA $8F00 $82E9BC AB PLB $82E9BD AB PLB $82E9BE C2 20 REP #$20 $82E9C0 AE BB 07 LDX $07BB [$7E:07BB] $82E9C3 BC 16 00 LDY $0016,x[$8F:DF6D] $82E9C6 10 0A BPL $0A [$E9D2] $82E9C8 BE 00 00 LDX $0000,y[$8F:E1D4] $82E9CB C8 INY $82E9CC C8 INY $82E9CD FC D5 E9 JSR ($E9D5,x)[$82:EA56] $82E9D0 90 F6 BCC $F6 [$E9C8] $82E9D2 AB PLB $82E9D3 28 PLP $82E9D4 6B RTL $82E9D5 db E5 $82E9D7 db F9 $82E9D9 db 2D $82E9DF db 56 $82E9E3 db E7 $82E9E5 38 SEC $82E9E6 60 RTS ;;; ;;; $82E9E7 AD 8D 07 LDA $078D [$7E:078D] ;\ $82E9EA D9 00 00 CMP $0000,y[$8F:B76C] ;} If current DDB != BG_Data entry DDB: $82E9ED F0 08 BEQ $08 [$E9F7] ;/ $82E9EF 98 TYA ;\ $82E9F0 18 CLC ;| $82E9F1 69 09 00 ADC #$0009 ;} Next BG_Data entry $82E9F4 A8 TAY ;/ $82E9F5 18 CLC $82E9F6 60 RTS $82E9F7 C8 INY $82E9F8 C8 INY $82E9F9 B9 03 00 LDA $0003,y[$8F:B79D] ;\ $82E9FC 8D 16 21 STA $2116 [$7E:2116] ;} Dest $82E9FF A9 01 18 LDA #$1801 $82EA02 8D 10 43 STA $4310 [$7E:4310] $82EA05 B9 00 00 LDA $0000,y[$8F:B79A] ;\ $82EA08 8D 12 43 STA $4312 [$7E:4312] ;| $82EA0B B9 02 00 LDA $0002,y[$8F:B79C] ;} Source $82EA0E 8D 14 43 STA $4314 [$7E:4314] ;/ $82EA11 B9 05 00 LDA $0005,y[$8F:B79F] ;\ $82EA14 8D 15 43 STA $4315 [$7E:4315] ;} Size $82EA17 E2 20 SEP #$20 $82EA19 A9 80 LDA #$80 $82EA1B 8D 15 21 STA $2115 [$7E:2115] $82EA1E A9 02 LDA #$02 $82EA20 8D 0B 42 STA $420B [$7E:420B] $82EA23 C2 20 REP #$20 $82EA25 98 TYA ;\ $82EA26 18 CLC ;| $82EA27 69 07 00 ADC #$0007 ;} Next BG_Data entry $82EA2A A8 TAY ;/ $82EA2B 18 CLC $82EA2C 60 RTS ;;; Decompress [Y..Y+2] to $7E:[Y+3..Y+4], Y += 5 ;;; $82EA2D 5A PHY $82EA2E B9 00 00 LDA $0000,y[$8F:BAF6] $82EA31 85 47 STA $47 [$7E:0047] $82EA33 B9 01 00 LDA $0001,y[$8F:BAF7] $82EA36 85 48 STA $48 [$7E:0048] $82EA38 A9 00 7E LDA #$7E00 $82EA3B 85 4D STA $4D [$7E:004D] $82EA3D B9 03 00 LDA $0003,y[$8F:BAF9] $82EA40 85 4C STA $4C [$7E:004C] $82EA42 22 19 B1 80 JSL $80B119[$80:B119] $82EA46 68 PLA $82EA47 18 CLC $82EA48 69 05 00 ADC #$0005 $82EA4B A8 TAY $82EA4C 18 CLC $82EA4D 60 RTS ;;; VRAM $4800..4FFF = 3838h ;;; $82EA56 5A PHY $82EA57 22 3F A2 80 JSL $80A23F[$80:A23F] ; VRAM $4800..4FFF = 3838h $82EA5B 7A PLY $82EA5C 18 CLC $82EA5D 60 RTS ;;; ;;; $82EA73 F4 00 8F PEA $8F00 $82EA76 AB PLB $82EA77 AB PLB $82EA78 A2 FE 18 LDX #$18FE ;\ $82EA7B A9 00 80 LDA #$8000 ;| ;| $82EA7E 9F 02 00 7F STA $7F0002,x[$7F:1900] ;| $82EA82 9F 02 19 7F STA $7F1902,x[$7F:3200] ;| $82EA86 9F 02 32 7F STA $7F3202,x[$7F:4B00] ;} $7F:0002..6401 = 8000h $82EA8A 9F 02 4B 7F STA $7F4B02,x[$7F:6400] ;| $82EA8E CA DEX ;| $82EA8F CA DEX ;| $82EA90 10 EC BPL $EC [$EA7E] ;/ $82EA92 AD BE 07 LDA $07BE [$7E:07BE] ;\ $82EA95 85 48 STA $48 [$7E:0048] ;| $82EA97 AD BD 07 LDA $07BD [$7E:07BD] ;| $82EA9A 85 47 STA $47 [$7E:0047] ;} Decompress level data $82EA9C 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EAA0 dl 7F0000 ;/ $82EAA3 8B PHB ;\ $82EAA4 F4 00 7F PEA $7F00 ;| $82EAA7 AB PLB ;| $82EAA8 AB PLB ;| $82EAA9 AD 00 00 LDA $0000 [$7F:0000] ;| $82EAAC AA TAX ;| $82EAAD 4A LSR A ;| $82EAAE 6D 00 00 ADC $0000 [$7F:0000] ;| $82EAB1 6D 00 00 ADC $0000 [$7F:0000] ;| $82EAB4 A8 TAY ;} Mirror background data $82EAB5 80 06 BRA $06 [$EABD] ;| ;| $82EAB7 B9 02 00 LDA $0002,y[$7F:0A00] ;| $82EABA 9D 02 96 STA $9602,x[$7F:9A00] ;| ;| $82EABD 88 DEY ;| $82EABE 88 DEY ;| $82EABF CA DEX ;| $82EAC0 CA DEX ;| $82EAC1 10 F4 BPL $F4 [$EAB7] ;/ $82EAC3 AD 00 00 LDA $0000 [$7F:0000] ;\ $82EAC6 4A LSR A ;| $82EAC7 AA TAX ;| $82EAC8 6D 00 00 ADC $0000 [$7F:0000] ;| $82EACB A8 TAY ;| $82EACC 80 06 BRA $06 [$EAD4] ;| ;| $82EACE B9 02 00 LDA $0002,y[$7F:0600] ;} Mirror BTS data $82EAD1 9D 02 64 STA $6402,x[$7F:6600] ;| ;| $82EAD4 88 DEY ;| $82EAD5 88 DEY ;| $82EAD6 CA DEX ;| $82EAD7 CA DEX ;| $82EAD8 10 F4 BPL $F4 [$EACE] ;/ $82EADA AB PLB $82EADB AD 9F 07 LDA $079F [$7E:079F] ;\ $82EADE C9 06 00 CMP #$0006 ;} If not in Ceres: $82EAE1 F0 2C BEQ $2C [$EB0F] ;/ $82EAE3 AD B3 07 LDA $07B3 [$7E:07B3] ;\ $82EAE6 89 02 00 BIT #$0002 ;} If special GFX bitflag bit1 set: $82EAE9 F0 11 BEQ $11 [$EAFC] ;/ $82EAEB A9 00 B9 LDA #$B900 ;\ $82EAEE 85 48 STA $48 [$7E:0048] ;| $82EAF0 A9 9D A0 LDA #$A09D ;| $82EAF3 85 47 STA $47 [$7E:0047] ;} Decompress $B9A09D to $7EA000 (standard CRE) $82EAF5 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EAF9 dl 7EA000 ;/ $82EAFC AD C1 07 LDA $07C1 [$7E:07C1] ;\ $82EAFF 85 48 STA $48 [$7E:0048] ;| $82EB01 AD C0 07 LDA $07C0 [$7E:07C0] ;| $82EB04 85 47 STA $47 [$7E:0047] ;} Decompress [$07C0..C2] to $7EA800 $82EB06 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EB0A dl 7EA800 ;/ $82EB0D 80 11 BRA $11 [$EB20] $82EB0F AD C1 07 LDA $07C1 [$7E:07C1] ;\ Else (in Ceres): $82EB12 85 48 STA $48 [$7E:0048] ;| $82EB14 AD C0 07 LDA $07C0 [$7E:07C0] ;| $82EB17 85 47 STA $47 [$7E:0047] ;} Decompress [$07C0..C2] to $7EA000 $82EB19 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EB1D dl 7EA000 ;/ ; Load scrolls $82EB20 AE BB 07 LDX $07BB [$7E:07BB] ;\ $82EB23 BC 0E 00 LDY $000E,x[$8F:DFAD] ;} Y = scroll pointer $82EB26 10 15 BPL $15 [$EB3D] ; If Y is negative: $82EB28 A2 00 00 LDX #$0000 ;\ ;| $82EB2B B9 00 00 LDA $0000,y[$8F:9370] ;| $82EB2E 9F 20 CD 7E STA $7ECD20,x[$7E:CD20] ;| $82EB32 C8 INY ;| $82EB33 C8 INY ;} [Y..Y+49] -> room scrolls $82EB34 E8 INX ;| $82EB35 E8 INX ;| $82EB36 E0 32 00 CPX #$0032 ;| $82EB39 D0 F0 BNE $F0 [$EB2B] ;/ $82EB3B 80 2C BRA $2C [$EB69] ; Return $82EB3D 84 12 STY $12 [$7E:0012] ; $12 = scroll pointer $82EB3F E2 30 SEP #$30 $82EB41 AD AB 07 LDA $07AB [$7E:07AB] ;\ $82EB44 3A DEC A ;} $14 = Y-screen of bottom screen $82EB45 85 14 STA $14 [$7E:0014] ;/ $82EB47 A9 02 LDA #$02 ; A = blue scroll $82EB49 A2 00 LDX #$00 ; Current scroll = 0 $82EB4B A0 00 LDY #$00 ; Current row = 0 $82EB4D C4 14 CPY $14 [$7E:0014] ;\ $82EB4F D0 03 BNE $03 [$EB54] ;} If last row: $82EB51 A5 12 LDA $12 [$7E:0012] ;\ $82EB53 1A INC A ;} A = scroll pointer + 1 $82EB54 5A PHY $82EB55 A0 00 LDY #$00 ;\ ;| $82EB57 9F 20 CD 7E STA $7ECD20,x[$7E:CD20] ;| $82EB5B E8 INX ;} A -> room scrolls for current row $82EB5C C8 INY ;| $82EB5D CC A9 07 CPY $07A9 [$7E:07A9] ;| $82EB60 D0 F5 BNE $F5 [$EB57] ;/ $82EB62 7A PLY ;\ $82EB63 C8 INY ;} ++Y $82EB64 CC AB 07 CPY $07AB [$7E:07AB] ;\ $82EB67 D0 E4 BNE $E4 [$EB4D] ;} If Y != room scroll height: next! $82EB69 C2 30 REP #$30 $82EB6B 6B RTL ;;; ;;; $82EB6C F4 00 8F PEA $8F00 $82EB6F AB PLB $82EB70 AB PLB $82EB71 AE BB 07 LDX $07BB [$7E:07BB] ;\ $82EB74 BD 14 00 LDA $0014,x[$8F:DFB3] ;} If PLM pointer: $82EB77 F0 12 BEQ $12 [$EB8B] ;/ $82EB79 AA TAX ;\ ;| $82EB7A BD 00 00 LDA $0000,x[$8F:C8BD] ;| $82EB7D F0 0C BEQ $0C [$EB8B] ;| $82EB7F 22 6A 84 84 JSL $84846A[$84:846A] ;| $82EB83 8A TXA ;} Create the PLMs $82EB84 18 CLC ;| $82EB85 69 06 00 ADC #$0006 ;| $82EB88 AA TAX ;| $82EB89 80 EF BRA $EF [$EB7A] ;/ $82EB8B 22 A3 E8 8F JSL $8FE8A3[$8F:E8A3] ; Execute door ASM $82EB8F 22 8F E8 8F JSL $8FE88F[$8F:E88F] ; Execute Layer 1_2 $82EB93 AD 16 0E LDA $0E16 [$7E:0E16] ;\ $82EB96 F0 06 BEQ $06 [$EB9E] ;} If elevator: $82EB98 A9 02 00 LDA #$0002 ;\ $82EB9B 8D 18 0E STA $0E18 [$7E:0E18] ;} Set elevator status $82EB9E 6B RTL ;;; Gamestate 02h ;;; ; Game options menu $82EB9F 08 PHP $82EBA0 8B PHB $82EBA1 4B PHK $82EBA2 AB PLB $82EBA3 C2 30 REP #$30 $82EBA5 AD E2 0D LDA $0DE2 [$7E:0DE2] $82EBA8 0A ASL A $82EBA9 AA TAX $82EBAA FC C1 EB JSR ($EBC1,x)[$82:EBDB] $82EBAD 20 11 8C JSR $8C11 [$82:8C11] $82EBB0 20 A1 8C JSR $8CA1 [$82:8CA1] $82EBB3 AD E2 0D LDA $0DE2 [$7E:0DE2] $82EBB6 C9 02 00 CMP #$0002 $82EBB9 30 03 BMI $03 [$EBBE] $82EBBB 20 FF EC JSR $ECFF [$82:ECFF] $82EBBE AB PLB $82EBBF 28 PLP $82EBC0 60 RTS $82EBC1 db DB $82EBC3 db 11 $82EBC5 db E4 $82EBC7 db 42 $82EBC9 db B4 $82EBCB db 18 $82EBCD db DB $82EBD1 db 24 $82EBD9 db 92 $82EBDB 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $82EBDF E2 20 SEP #$20 $82EBE1 A5 51 LDA $51 [$7E:0051] $82EBE3 C9 80 CMP #$80 $82EBE5 D0 10 BNE $10 [$EBF7] $82EBE7 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $82EBEB C2 20 REP #$20 $82EBED 9C 23 07 STZ $0723 [$7E:0723] $82EBF0 9C 25 07 STZ $0725 [$7E:0725] $82EBF3 EE E2 0D INC $0DE2 [$7E:0DE2] $82EBF6 60 RTS ;;; ;;; $82EC11 08 PHP $82EC12 E2 30 SEP #$30 $82EC14 A9 00 LDA #$00 $82EC16 85 5D STA $5D [$7E:005D] $82EC18 A9 13 LDA #$13 $82EC1A 85 69 STA $69 [$7E:0069] $82EC1C 64 6B STZ $6B [$7E:006B] $82EC1E 64 6C STZ $6C [$7E:006C] $82EC20 64 6D STZ $6D [$7E:006D] $82EC22 64 6E STZ $6E [$7E:006E] $82EC24 64 71 STZ $71 [$7E:0071] $82EC26 64 6F STZ $6F [$7E:006F] $82EC28 64 72 STZ $72 [$7E:0072] $82EC2A A9 00 LDA #$00 $82EC2C 8D 16 21 STA $2116 [$7E:2116] $82EC2F A9 58 LDA #$58 $82EC31 8D 17 21 STA $2117 [$7E:2117] $82EC34 A9 80 LDA #$80 $82EC36 8D 15 21 STA $2115 [$7E:2115] $82EC39 22 A9 91 80 JSL $8091A9[$80:91A9] ; Set up a (H)DMA transfer $82EC3D dx 01, 01, 18, 8EDC00, 0800 $82EC45 A9 02 LDA #$02 $82EC47 8D 0B 42 STA $420B [$7E:420B] $82EC4A C2 30 REP #$30 $82EC4C 64 B1 STZ $B1 [$7E:00B1] $82EC4E 64 B3 STZ $B3 [$7E:00B3] $82EC50 64 B5 STZ $B5 [$7E:00B5] $82EC52 64 B7 STZ $B7 [$7E:00B7] $82EC54 9C E0 0D STZ $0DE0 [$7E:0DE0] $82EC57 A2 FE 01 LDX #$01FE $82EC5A BF 00 E4 8E LDA $8EE400,x[$8E:E5FE] $82EC5E 9F 00 C0 7E STA $7EC000,x[$7E:C1FE] $82EC62 CA DEX $82EC63 CA DEX $82EC64 10 F4 BPL $F4 [$EC5A] $82EC66 A9 00 97 LDA #$9700 ;\ $82EC69 85 48 STA $48 [$7E:0048] ;| $82EC6B A9 F4 8D LDA #$8DF4 ;| $82EC6E 85 47 STA $47 [$7E:0047] ;} Decompress $978DF4 to $7FC000 $82EC70 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EC74 db 7FC000 ;/ $82EC77 A9 00 97 LDA #$9700 ;\ $82EC7A 85 48 STA $48 [$7E:0048] ;| $82EC7C A9 CD 8F LDA #$8FCD ;| $82EC7F 85 47 STA $47 [$7E:0047] ;} Decompress $978FCD to $7FC800 $82EC81 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EC85 db 7FC800 ;/ $82EC88 A9 00 97 LDA #$9700 ;\ $82EC8B 85 48 STA $48 [$7E:0048] ;| $82EC8D A9 C4 91 LDA #$91C4 ;| $82EC90 85 47 STA $47 [$7E:0047] ;} Decompress $9791C4 to $7FD000 $82EC92 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82EC96 db 7FD000 ;/ $82EC99 A9 00 97 LDA #$9700 ;\ $82EC9C 85 48 STA $48 [$7E:0048] ;| $82EC9E A9 8D 93 LDA #$938D ;| $82ECA1 85 47 STA $47 [$7E:0047] ;} Decompress $97938D to $7FD800 $82ECA3 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82ECA7 db 7FD800 ;/ $82ECAA A9 00 97 LDA #$9700 ;\ $82ECAD 85 48 STA $48 [$7E:0048] ;| $82ECAF A9 3A 95 LDA #$953A ;| $82ECB2 85 47 STA $47 [$7E:0047] ;} Decompress $97953A to $7FE000 $82ECB4 22 FF B0 80 JSL $80B0FF[$80:B0FF] ;| $82ECB8 db 7FE000 ;/ $82ECBB A2 FE 07 LDX #$07FE $82ECBE BF 00 C0 7F LDA $7FC000,x[$7F:C7FE] $82ECC2 9F 00 30 7E STA $7E3000,x[$7E:37FE] $82ECC6 CA DEX $82ECC7 CA DEX $82ECC8 10 F4 BPL $F4 [$ECBE] $82ECCA 9C 9E 09 STZ $099E [$7E:099E] $82ECCD 20 B9 8B JSR $8BB9 [$82:8BB9] $82ECD0 A0 B8 F4 LDY #$F4B8 $82ECD3 20 CB 8B JSR $8BCB [$82:8BCB] $82ECD6 A0 C4 F4 LDY #$F4C4 $82ECD9 20 CB 8B JSR $8BCB [$82:8BCB] $82ECDC EE E2 0D INC $0DE2 [$7E:0DE2] $82ECDF 20 ED ED JSR $EDED [$82:EDED] $82ECE2 28 PLP $82ECE3 60 RTS ;;; ;;; $82ECE4 22 4D 89 80 JSL $80894D[$80:894D] ; Handle fading in $82ECE8 E2 20 SEP #$20 $82ECEA A5 51 LDA $51 [$7E:0051] $82ECEC C9 0F CMP #$0F $82ECEE D0 0C BNE $0C [$ECFC] $82ECF0 C2 20 REP #$20 $82ECF2 9C 23 07 STZ $0723 [$7E:0723] $82ECF5 9C 25 07 STZ $0725 [$7E:0725] $82ECF8 EE E2 0D INC $0DE2 [$7E:0DE2] $82ECFB 60 RTS $82ECFC C2 20 REP #$20 $82ECFE 60 RTS ;;; ;;; $82ECFF 08 PHP $82ED00 C2 30 REP #$30 $82ED02 AE 30 03 LDX $0330 [$7E:0330] $82ED05 A9 00 08 LDA #$0800 $82ED08 95 D0 STA $D0,x [$7E:00D0] $82ED0A E8 INX $82ED0B E8 INX $82ED0C A9 00 30 LDA #$3000 $82ED0F 95 D0 STA $D0,x [$7E:00D2] $82ED11 E8 INX $82ED12 E8 INX $82ED13 E2 20 SEP #$20 $82ED15 A9 7E LDA #$7E $82ED17 95 D0 STA $D0,x [$7E:00D4] $82ED19 C2 20 REP #$20 $82ED1B E8 INX $82ED1C A9 00 50 LDA #$5000 $82ED1F 95 D0 STA $D0,x [$7E:00D5] $82ED21 E8 INX $82ED22 E8 INX $82ED23 8E 30 03 STX $0330 [$7E:0330] $82ED26 28 PLP $82ED27 60 RTS $82ED28 08 PHP $82ED29 C2 30 REP #$30 $82ED2B 85 12 STA $12 [$7E:0012] $82ED2D BF 00 30 7E LDA $7E3000,x[$7E:3288] $82ED31 29 FF E3 AND #$E3FF $82ED34 05 12 ORA $12 [$7E:0012] $82ED36 9F 00 30 7E STA $7E3000,x[$7E:3288] $82ED3A E8 INX $82ED3B E8 INX $82ED3C 88 DEY $82ED3D 88 DEY $82ED3E D0 ED BNE $ED [$ED2D] $82ED40 28 PLP $82ED41 60 RTS $82ED42 08 PHP $82ED43 C2 30 REP #$30 $82ED45 A5 8F LDA $8F [$7E:008F] $82ED47 29 00 08 AND #$0800 $82ED4A F0 14 BEQ $14 [$ED60] $82ED4C A9 37 00 LDA #$0037 $82ED4F 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82ED53 CE 9E 09 DEC $099E [$7E:099E] $82ED56 10 25 BPL $25 [$ED7D] $82ED60 A5 8F LDA $8F [$7E:008F] $82ED62 29 00 04 AND #$0400 $82ED65 F0 16 BEQ $16 [$ED7D] $82ED67 A9 37 00 LDA #$0037 $82ED6A 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82ED6E AD 9E 09 LDA $099E [$7E:099E] $82ED71 1A INC A $82ED72 8D 9E 09 STA $099E [$7E:099E] $82ED75 C9 05 00 CMP #$0005 $82ED78 D0 03 BNE $03 [$ED7D] $82ED7D A5 8F LDA $8F [$7E:008F] $82ED7F 89 00 80 BIT #$8000 $82ED82 D0 1B BNE $1B [$ED9F] $82ED84 89 80 00 BIT #$0080 $82ED87 D0 05 BNE $05 [$ED8E] $82ED89 89 00 10 BIT #$1000 $82ED8C F0 0F BEQ $0F [$ED9D] $82ED8E A9 38 00 LDA #$0038 $82ED91 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82ED95 AD 9E 09 LDA $099E [$7E:099E] $82ED98 0A ASL A $82ED99 AA TAX $82ED9A FC A7 ED JSR ($EDA7,x)[$82:EE55] $82ED9D 28 PLP $82ED9E 60 RTS $82EDA7 db B1 $82EDAF db 55 $82EDB1 AD D1 05 LDA $05D1 [$7E:05D1] $82EDB4 F0 07 BEQ $07 [$EDBD] $82EDBD AF 14 D9 7E LDA $7ED914[$7E:D914] $82EDC1 C9 05 00 CMP #$0005 $82EDC4 D0 07 BNE $07 [$EDCD] $82EDCD 9C 23 07 STZ $0723 [$7E:0723] $82EDD0 9C 25 07 STZ $0725 [$7E:0725] $82EDD3 A9 0C 00 LDA #$000C $82EDD6 8D E2 0D STA $0DE2 [$7E:0DE2] $82EDD9 60 RTS $82EDED AD E2 09 LDA $09E2 [$7E:09E2] $82EDF0 D0 32 BNE $32 [$EE24] $82EDF2 A2 88 02 LDX #$0288 $82EDF5 A0 18 00 LDY #$0018 $82EDF8 A9 00 00 LDA #$0000 $82EDFB 20 28 ED JSR $ED28 [$82:ED28] $82EDFE A2 C8 02 LDX #$02C8 $82EE01 A0 18 00 LDY #$0018 $82EE04 A9 00 00 LDA #$0000 $82EE07 20 28 ED JSR $ED28 [$82:ED28] $82EE0A A2 48 03 LDX #$0348 $82EE0D A0 32 00 LDY #$0032 $82EE10 A9 00 04 LDA #$0400 $82EE13 20 28 ED JSR $ED28 [$82:ED28] $82EE16 A2 88 03 LDX #$0388 $82EE19 A0 32 00 LDY #$0032 $82EE1C A9 00 04 LDA #$0400 $82EE1F 20 28 ED JSR $ED28 [$82:ED28] $82EE22 80 30 BRA $30 [$EE54] $82EE54 60 RTS $82EE55 E2 20 SEP #$20 $82EE57 A9 03 LDA #$03 $82EE59 85 57 STA $57 [$7E:0057] $82EE5B C2 20 REP #$20 $82EE5D 9C 23 07 STZ $0723 [$7E:0723] $82EE60 9C 25 07 STZ $0725 [$7E:0725] $82EE63 A9 05 00 LDA #$0005 $82EE66 8D E2 0D STA $0DE2 [$7E:0DE2] $82EE69 60 RTS $82EE92 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $82EE96 E2 20 SEP #$20 $82EE98 A5 51 LDA $51 [$7E:0051] $82EE9A C9 80 CMP #$80 $82EE9C D0 13 BNE $13 [$EEB1] $82EE9E 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $82EEA2 C2 20 REP #$20 $82EEA4 9C 23 07 STZ $0723 [$7E:0723] $82EEA7 9C 25 07 STZ $0725 [$7E:0725] $82EEAA A9 04 00 LDA #$0004 $82EEAD 8D E2 0D STA $0DE2 [$7E:0DE2] $82EEB0 60 RTS $82EEB1 C2 20 REP #$20 $82EEB3 60 RTS $82EEB4 9C E2 0D STZ $0DE2 [$7E:0DE2] $82EEB7 AD D1 05 LDA $05D1 [$7E:05D1] $82EEBA F0 07 BEQ $07 [$EEC3] $82EEC3 AF 14 D9 7E LDA $7ED914[$7E:D914] $82EEC7 F0 10 BEQ $10 [$EED9] $82EED9 A9 1E 00 LDA #$001E $82EEDC 8D 98 09 STA $0998 [$7E:0998] $82EEDF A9 95 A3 LDA #$A395 $82EEE2 8D 51 1F STA $1F51 [$7E:1F51] $82EEE5 9C 9E 09 STZ $099E [$7E:099E] $82EEE8 9C 23 07 STZ $0723 [$7E:0723] $82EEEB 9C 25 07 STZ $0725 [$7E:0725] $82EEEE 60 RTS $82EF18 22 24 89 80 JSL $808924[$80:8924] ; Handle fading out $82EF1C E2 20 SEP #$20 $82EF1E A5 57 LDA $57 [$7E:0057] $82EF20 C9 F3 CMP #$F3 $82EF22 F0 05 BEQ $05 [$EF29] $82EF24 18 CLC $82EF25 69 10 ADC #$10 $82EF27 85 57 STA $57 [$7E:0057] $82EF29 A5 51 LDA $51 [$7E:0051] $82EF2B C9 80 CMP #$80 $82EF2D F0 03 BEQ $03 [$EF32] $82EF2F C2 20 REP #$20 $82EF31 60 RTS $82EF32 22 4B 83 80 JSL $80834B[$80:834B] ; Enable NMI with $84 options $82EF36 C2 20 REP #$20 $82EF38 9C 23 07 STZ $0723 [$7E:0723] $82EF3B 9C 25 07 STZ $0725 [$7E:0725] $82EF3E 64 B3 STZ $B3 [$7E:00B3] $82EF40 EE E2 0D INC $0DE2 [$7E:0DE2] $82EF43 AD 9E 09 LDA $099E [$7E:099E] $82EF46 F0 37 BEQ $37 [$EF7F] $82EF48 89 04 00 BIT #$0004 $82EF4B D0 34 BNE $34 [$EF81] $82EF7F 80 41 BRA $41 [$EFC2] $82EF81 AD E2 09 LDA $09E2 [$7E:09E2] $82EF84 D0 11 BNE $11 [$EF97] $82EF86 A2 FE 07 LDX #$07FE $82EF89 BF 00 D8 7F LDA $7FD800,x[$7F:DFFE] $82EF8D 9F 00 30 7E STA $7E3000,x[$7E:37FE] $82EF91 CA DEX $82EF92 CA DEX $82EF93 10 F4 BPL $F4 [$EF89] $82EF95 80 0F BRA $0F [$EFA6] $82EFA6 9C 9E 09 STZ $099E [$7E:099E] $82EFA9 20 B9 F0 JSR $F0B9 [$82:F0B9] $82EFAC A9 01 00 LDA #$0001 $82EFAF 8D 9E 09 STA $099E [$7E:099E] $82EFB2 20 B9 F0 JSR $F0B9 [$82:F0B9] $82EFB5 A9 04 00 LDA #$0004 $82EFB8 8D 9E 09 STA $099E [$7E:099E] $82EFBB A0 D0 F4 LDY #$F4D0 $82EFBE 20 CB 8B JSR $8BCB [$82:8BCB] $82EFC1 60 RTS $82EFC2 A2 FE 07 LDX #$07FE $82EFC5 BF 00 C0 7F LDA $7FC000,x[$7F:C7FE] $82EFC9 9F 00 30 7E STA $7E3000,x[$7E:37FE] $82EFCD CA DEX $82EFCE CA DEX $82EFCF 10 F4 BPL $F4 [$EFC5] $82EFD1 20 ED ED JSR $EDED [$82:EDED] $82EFD4 A0 C4 F4 LDY #$F4C4 $82EFD7 20 CB 8B JSR $8BCB [$82:8BCB] $82EFDA 60 RTS $82EFDB 22 4D 89 80 JSL $80894D[$80:894D] ; Handle fading in $82EFDF E2 20 SEP #$20 $82EFE1 A5 57 LDA $57 [$7E:0057] $82EFE3 C9 03 CMP #$03 $82EFE5 F0 05 BEQ $05 [$EFEC] $82EFE7 38 SEC $82EFE8 E9 10 SBC #$10 $82EFEA 85 57 STA $57 [$7E:0057] $82EFEC A5 51 LDA $51 [$7E:0051] $82EFEE C9 0F CMP #$0F $82EFF0 D0 2F BNE $2F [$F021] $82EFF2 64 57 STZ $57 [$7E:0057] $82EFF4 C2 20 REP #$20 $82EFF6 9C 23 07 STZ $0723 [$7E:0723] $82EFF9 9C 25 07 STZ $0725 [$7E:0725] $82EFFC AD 9E 09 LDA $099E [$7E:099E] $82EFFF F0 19 BEQ $19 [$F01A] $82F001 89 04 00 BIT #$0004 $82F004 D0 0A BNE $0A [$F010] $82F010 A9 08 00 LDA #$0008 $82F013 8D E2 0D STA $0DE2 [$7E:0DE2] $82F016 9C 9E 09 STZ $099E [$7E:099E] $82F019 60 RTS $82F01A A9 03 00 LDA #$0003 $82F01D 8D E2 0D STA $0DE2 [$7E:0DE2] $82F020 60 RTS $82F021 C2 20 REP #$20 $82F023 60 RTS $82F024 A5 8F LDA $8F [$7E:008F] $82F026 29 00 08 AND #$0800 $82F029 F0 14 BEQ $14 [$F03F] $82F03F A5 8F LDA $8F [$7E:008F] $82F041 29 00 04 AND #$0400 $82F044 F0 16 BEQ $16 [$F05C] $82F046 A9 37 00 LDA #$0037 $82F049 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82F04D AD 9E 09 LDA $099E [$7E:099E] $82F050 1A INC A $82F051 8D 9E 09 STA $099E [$7E:099E] $82F054 C9 03 00 CMP #$0003 $82F057 D0 03 BNE $03 [$F05C] $82F05C A5 8F LDA $8F [$7E:008F] $82F05E 89 00 80 BIT #$8000 $82F061 F0 0E BEQ $0E [$F071] $82F071 A5 8F LDA $8F [$7E:008F] $82F073 89 80 13 BIT #$1380 $82F076 F0 0F BEQ $0F [$F087] $82F078 A9 38 00 LDA #$0038 $82F07B 22 49 90 80 JSL $809049[$80:9049] ; Sound library 1, $0653 = 06h $82F07F AD 9E 09 LDA $099E [$7E:099E] $82F082 0A ASL A $82F083 AA TAX $82F084 FC 88 F0 JSR ($F088,x)[$82:F08E] $82F087 60 RTS $82F08A db 8E $82F08C db B2 $82F08E AD 9E 09 LDA $099E [$7E:099E] $82F091 0A ASL A $82F092 AA TAX $82F093 BD AE F0 LDA $F0AE,x[$82:F0B0] $82F096 AA TAX $82F097 BD 00 00 LDA $0000,x[$7E:09E4] $82F09A F0 08 BEQ $08 [$F0A4] $82F0A4 A9 01 00 LDA #$0001 $82F0A7 9D 00 00 STA $0000,x[$7E:09E4] $82F0AA 20 B9 F0 JSR $F0B9 [$82:F0B9] $82F0AD 60 RTS $82F0AE db EA, 09, E4, 09 $82F0B2 9C 9E 09 STZ $099E [$7E:099E] $82F0B5 20 55 EE JSR $EE55 [$82:EE55] $82F0B8 60 RTS $82F0B9 AD 9E 09 LDA $099E [$7E:099E] $82F0BC 0A ASL A $82F0BD AA TAX $82F0BE BD AE F0 LDA $F0AE,x[$82:F0AE] $82F0C1 AA TAX $82F0C2 BD 00 00 LDA $0000,x[$7E:09EA] $82F0C5 D0 41 BNE $41 [$F108] $82F0C7 AD 9E 09 LDA $099E [$7E:099E] $82F0CA 0A ASL A $82F0CB 0A ASL A $82F0CC AA TAX $82F0CD DA PHX $82F0CE BD 49 F1 LDA $F149,x[$82:F149] $82F0D1 AA TAX $82F0D2 A0 0C 00 LDY #$000C $82F0D5 A9 00 04 LDA #$0400 $82F0D8 20 28 ED JSR $ED28 [$82:ED28] $82F0DB FA PLX $82F0DC DA PHX $82F0DD BD 4B F1 LDA $F14B,x[$82:F14B] $82F0E0 AA TAX $82F0E1 A0 0C 00 LDY #$000C $82F0E4 A9 00 04 LDA #$0400 $82F0E7 20 28 ED JSR $ED28 [$82:ED28] $82F0EA FA PLX $82F0EB DA PHX $82F0EC BD 51 F1 LDA $F151,x[$82:F151] $82F0EF AA TAX $82F0F0 A0 0C 00 LDY #$000C $82F0F3 A9 00 00 LDA #$0000 $82F0F6 20 28 ED JSR $ED28 [$82:ED28] $82F0F9 FA PLX $82F0FA BD 53 F1 LDA $F153,x[$82:F153] $82F0FD AA TAX $82F0FE A0 0C 00 LDY #$000C $82F101 A9 00 00 LDA #$0000 $82F104 20 28 ED JSR $ED28 [$82:ED28] $82F107 60 RTS $82F108 AD 9E 09 LDA $099E [$7E:099E] $82F10B 0A ASL A $82F10C 0A ASL A $82F10D AA TAX $82F10E DA PHX $82F10F BD 49 F1 LDA $F149,x[$82:F14D] $82F112 AA TAX $82F113 A0 0C 00 LDY #$000C $82F116 A9 00 00 LDA #$0000 $82F119 20 28 ED JSR $ED28 [$82:ED28] $82F11C FA PLX $82F11D DA PHX $82F11E BD 4B F1 LDA $F14B,x[$82:F14F] $82F121 AA TAX $82F122 A0 0C 00 LDY #$000C $82F125 A9 00 00 LDA #$0000 $82F128 20 28 ED JSR $ED28 [$82:ED28] $82F12B FA PLX $82F12C DA PHX $82F12D BD 51 F1 LDA $F151,x[$82:F155] $82F130 AA TAX $82F131 A0 0C 00 LDY #$000C $82F134 A9 00 04 LDA #$0400 $82F137 20 28 ED JSR $ED28 [$82:ED28] $82F13A FA PLX $82F13B BD 53 F1 LDA $F153,x[$82:F157] $82F13E AA TAX $82F13F A0 0C 00 LDY #$000C $82F142 A9 00 04 LDA #$0400 $82F145 20 28 ED JSR $ED28 [$82:ED28] $82F148 60 RTS $82F149 db E0, 01, 20, 02, 60, 03, A0, 03, EE, 01, 2E, 02, 6E, 03, AE, 03 $82F296 A9 18 00 LDA #$0018 $82F299 99 AD 1A STA $1AAD,y[$7E:1ABB] $82F29C A9 38 00 LDA #$0038 $82F29F 99 BD 1A STA $1ABD,y[$7E:1ACB] $82F2A2 A9 00 0E LDA #$0E00 $82F2A5 99 CD 1A STA $1ACD,y[$7E:1ADB] $82F2A8 60 RTS $82F2A9 AD 98 09 LDA $0998 [$7E:0998] $82F2AC C9 02 00 CMP #$0002 $82F2AF F0 0D BEQ $0D [$F2BE] $82F2B1 A9 01 00 LDA #$0001 $82F2B4 9D 1D 1B STA $1B1D,x[$7E:1B2B] $82F2B7 A9 B6 F4 LDA #$F4B6 $82F2BA 9D FD 1A STA $1AFD,x[$7E:1B0B] $82F2BD 60 RTS $82F2BE AD E2 0D LDA $0DE2 [$7E:0DE2] $82F2C1 0A ASL A $82F2C2 A8 TAY $82F2C3 B9 ED F2 LDA $F2ED,y[$82:F2F1] $82F2C6 F0 18 BEQ $18 [$F2E0] $82F2C8 85 12 STA $12 [$7E:0012] $82F2CA AD 9E 09 LDA $099E [$7E:099E] $82F2CD 0A ASL A $82F2CE 0A ASL A $82F2CF 18 CLC $82F2D0 65 12 ADC $12 [$7E:0012] $82F2D2 A8 TAY $82F2D3 B9 00 00 LDA $0000,y[$82:F307] $82F2D6 9D AD 1A STA $1AAD,x[$7E:1ABB] $82F2D9 B9 02 00 LDA $0002,y[$82:F309] $82F2DC 9D BD 1A STA $1ABD,x[$7E:1ACB] $82F2DF 60 RTS $82F2E0 A9 80 01 LDA #$0180 $82F2E3 9D AD 1A STA $1AAD,x[$7E:1ABB] $82F2E6 A9 10 00 LDA #$0010 $82F2E9 9D BD 1A STA $1ABD,x[$7E:1ACB] $82F2EC 60 RTS $82F2F1 db 07, F3, 07, F3, 00, 00, 00, 00, 00, 00 $82F2FD db 3F, F3 $82F305 db 00, 00, 18, 00, 38, 00, 18, 00, 58, 00, 18, 00, 70, 00, 18, 00, 90, 00, 18, 00, B0, 00 $82F33F db 10, 00, 40, 00, 10, 00, 70, 00, 10, 00, A0, 00 $82F34B A9 7C 00 LDA #$007C $82F34E 99 AD 1A STA $1AAD,y[$7E:1AB9] $82F351 80 16 BRA $16 [$F369] $82F35B A9 80 00 LDA #$0080 $82F35E 99 AD 1A STA $1AAD,y[$7E:1AB7] $82F361 80 06 BRA $06 [$F369] $82F369 A9 10 00 LDA #$0010 $82F36C 99 BD 1A STA $1ABD,y[$7E:1AC9] $82F36F A9 00 0E LDA #$0E00 $82F372 99 CD 1A STA $1ACD,y[$7E:1AD9] $82F375 60 RTS $82F376 AD 98 09 LDA $0998 [$7E:0998] $82F379 C9 02 00 CMP #$0002 $82F37C D0 13 BNE $13 [$F391] $82F37E AD E2 0D LDA $0DE2 [$7E:0DE2] $82F381 C9 06 00 CMP #$0006 $82F384 D0 19 BNE $19 [$F39F] $82F386 E2 20 SEP #$20 $82F388 A5 51 LDA $51 [$7E:0051] $82F38A C9 80 CMP #$80 $82F38C F0 03 BEQ $03 [$F391] $82F38E C2 20 REP #$20 $82F390 60 RTS $82F391 C2 20 REP #$20 $82F393 A9 01 00 LDA #$0001 $82F396 9D 1D 1B STA $1B1D,x[$7E:1B29] $82F399 A9 B6 F4 LDA #$F4B6 $82F39C 9D FD 1A STA $1AFD,x[$7E:1B09] $82F39F 60 RTS $82F3E2 AD E2 0D LDA $0DE2 [$7E:0DE2] $82F3E5 C9 06 00 CMP #$0006 $82F3E8 D0 19 BNE $19 [$F403] $82F3EA E2 20 SEP #$20 $82F3EC A5 51 LDA $51 [$7E:0051] $82F3EE C9 80 CMP #$80 $82F3F0 F0 03 BEQ $03 [$F3F5] $82F3F2 C2 20 REP #$20 $82F3F4 60 RTS $82F3F5 C2 20 REP #$20 $82F3F7 A9 01 00 LDA #$0001 $82F3FA 9D 1D 1B STA $1B1D,x[$7E:1B27] $82F3FD A9 B6 F4 LDA #$F4B6 $82F400 9D FD 1A STA $1AFD,x[$7E:1B07] $82F403 60 RTS $82F442 db 08, 00, CB, CB, 08, 00, D7, CB, 08, 00, E3, CB, 08, 00, EF, CB, 82, 8C, 42, F4 $82F47E db 02, 00, 4B, D2, 6E, 8C, 76, F3, 90, 00, 4B, D2, 82, 8C, 86, F4 $82F49E db 02, 00, 1B, D4, 6E, 8C, E2, F3, 90, 00, 1B, D4, 82, 8C, A6, F4 $82F4B6 db 5A, 8C, 96 $82F4BA db A9, F2, 42, F4 $82F4C4 db 4B $82F4C6 db 10, 8C, 7E, F4 $82F4D0 db 5B $82F4D2 db 10, 8C, 9E, F4