The current URL is datacrystal.tcrf.net.
BS-X BIOS/RAM map
I mark with the tag "UNNECESSARY LINE" things that I think could be removed. If anyone ever wants to reassemble this and looks for some bytes to save, there you go.
Bank $10
There is a Jump Table on the Satellaview that is used at the Start Up. I guess its implemented to serve as a verification that the Satellaview is there and working correctly, because the BIOS jumps to this jump table just to be redirected to subroutines in itself again.
$10/5974 6B RTL ; (Executed at Start Up) $10/5978 6B RTL ; (Executed while NMI)
$10/598C 5C AD C2 80 JMP $80C2AD ; Check if Satellaview Stream Number Registers work $10/59A4 5C 6D C3 80 JMP $80C36D ; Transfer (fixed Set of) Data to Satellaview $10/59B0 5C D6 C3 80 JMP $80C3D6[$80:C3D6] A:0008 X:FFFE Y:E280 P:envMxdIzC $10/5A6C 5C 84 BB 80 JMP $80BB84 ; MCC Memory Controller Settings: Enable Flash R/W $10/5A70 5C B1 BB 80 JMP $80BBB1 ; MCC Memory Controller Settings: Disable Flash R/W
$10/5A90 5C 6C BD 80 JMP $80BD6C[$80:BD6C] A:0 X:0007 Y:0 P:envMXdIZC $10/5A94 5C 95 BD 80 JMP $80BD95[$80:BD95] A:0 X:0 Y:0 P:envMXdIZc
$10/5B0C 5C 77 C1 80 JMP $80C177[$80:C177] A:0080 X:0007 Y:0 P:eNvMxdIzC $10/5B10 5C C5 C1 80 JMP $80C1C5[$80:C1C5] A:0080 X:0007 Y:0 P:eNvMxdIzC
$10/5B40 5C EB F1 80 JMP $80F1EB[$80:F1EB] A:0061 X:FFFE Y:0 P:eNvmxdIzC $10/5B44 5C 31 F2 80 JMP $80F231[$80:F231] A:0 X:00FF Y:0 P:eNvmxdIzC
$10/5B4C 5C AB F2 80 JMP $80F2AB[$80:F2AB] A:0 X:0 Y:00FF P:envmxdIzC
$10/5B58 5C F2 F2 80 JMP $80F2F2[$80:F2F2] A:0 X:FFFE Y:E280 P:envMxdIZC
$10/5B70 5C A3 E7 80 JMP $80E7A3[$80:E7A3] A:0 X:00FF Y:0 P:envMxdIzC
$10/5BAC 5C 28 EA 80 JMP $80EA28[$80:EA28] A:0 X:0 Y:0 P:envMxdIzC
$10/5C0C 5C D6 EF 80 JMP $80EFD6[$80:EFD6] A:0 X:00FF Y:0 P:envMxdIzC
$10/5C1C 5C 20 97 80 JMP $809720[$80:9720] A:0384 X:FFFE Y:0001 P:envmxdIzc $10/5C20 5C A6 97 80 JMP $8097A6[$80:97A6] A:0 X:00FF Y:0 P:eNvmxdIzC
Bank $80
$80/8200 Update Graphics Registers
Transfers values from their $01xx-buffers to their registers
$80/8200 08 PHP ; Buffer Flag Register value on stack $80/8201 E2 20 SEP #$20 ; A = 8-bit $80/8203 AD 00 01 LDA $0100 ; Update Display Control 1 (FBLANK / Brightness) and it's buffer $80/8206 8D 00 21 STA $2100 $80/8209 8D 1B 02 STA $021B $80/820C AD 01 01 LDA $0101 ; Update Object Size and Object Base $80/820F 8D 01 21 STA $2101 $80/8212 AD 04 01 LDA $0104 ; Update BG Mode $80/8215 8D 05 21 STA $2105 $80/8218 AD 05 01 LDA $0105 ; Update Mosaic $80/821B 8D 06 21 STA $2106 $80/821E AD 06 01 LDA $0106 ; Update BG1 Tilemap Address and Mirroring $80/8221 8D 07 21 STA $2107 $80/8224 AD 07 01 LDA $0107 ; Update BG2 Tilemap Address and Mirroring $80/8227 8D 08 21 STA $2108 $80/822A AD 08 01 LDA $0108 ; Update BG3 Tilemap Address and Mirroring $80/822D 8D 09 21 STA $2109 $80/8230 AD 09 01 LDA $0109 ; Update BG4 Tilemap Address and Mirroring $80/8233 8D 0A 21 STA $210A $80/8236 AD 0A 01 LDA $010A ; Update BG1/2 Tileset Address $80/8239 8D 0B 21 STA $210B $80/823C AD 0B 01 LDA $010B ; Update BG3/4 Tileset Address $80/823F 8D 0C 21 STA $210C $80/8242 AD 0C 01 LDA $010C ; Update Mode 7 Rotation/Scaling Mode Settings $80/8245 8D 1A 21 STA $211A $80/8248 AD 0D 01 LDA $010D ; Update Window BG1/BG2 Mask Settings $80/824B 8D 23 21 STA $2123 $80/824E AD 0E 01 LDA $010E ; Update Window BG3/BG4 Mask Settings $80/8251 8D 24 21 STA $2124 $80/8254 AD 1F 01 LDA $011F ; Update Window OBJ/MATH Mask Settings $80/8257 8D 25 21 STA $2125 $80/825A AD 20 01 LDA $0120 ; Update Window 1 Left Position (X1) $80/825D 8D 26 21 STA $2126 $80/8260 AD 21 01 LDA $0121 ; Update Window 1 Right Position (X2) $80/8263 8D 27 21 STA $2127 $80/8266 AD 22 01 LDA $0122 ; Update Window 2 Left Position (X1) $80/8269 8D 28 21 STA $2128 $80/826C AD 23 01 LDA $0123 ; Update Window 2 Right Position (X2) $80/826F 8D 29 21 STA $2129 $80/8272 AD 24 01 LDA $0124 ; Update Window 1/2 Mask Logic (BG1-BG4) $80/8275 8D 2A 21 STA $212A $80/8278 AD 25 01 LDA $0125 ; Update Window 1/2 Mask Logic (OBJ/MATH) $80/827B 8D 2B 21 STA $212B $80/827E AD 26 01 LDA $0126 ; Update Main Screen Designation $80/8281 8D 2C 21 STA $212C $80/8284 AD 28 01 LDA $0128 ; Update Window Area Main Screen Disable $80/8287 8D 2E 21 STA $212E $80/828A AD 27 01 LDA $0127 ; Update Sub Screen Designation $80/828D 8D 2D 21 STA $212D $80/8290 AD 29 01 LDA $0129 ; Update Window Area Sub Screen Disable $80/8293 8D 2F 21 STA $212F $80/8296 AD 2A 01 LDA $012A ; Update $80/8299 8D 30 21 STA $2130 $80/829C AD 2B 01 LDA $012B ; Update $80/829F 8D 31 21 STA $2131 $80/82A2 AD 2D 01 LDA $012D ; Update Color Math Sub Screen Backdrop Color - RED $80/82A5 09 20 ORA #$20 $80/82A7 8D 32 21 STA $2132 $80/82AA AD 2E 01 LDA $012E ; Update Color Math Sub Screen Backdrop Color - GREEN $80/82AD 09 40 ORA #$40 $80/82AF 8D 32 21 STA $2132 $80/82B2 AD 2F 01 LDA $012F ; Update Color Math Sub Screen Backdrop Color - BLUE $80/82B5 09 80 ORA #$80 $80/82B7 8D 32 21 STA $2132 $80/82BA AD 30 01 LDA $0130 ; Update Display Control 2 $80/82BD 8D 33 21 STA $2133 $80/82C0 AD 0F 01 LDA $010F ; Update Scroll Registers for BG1 to BG4 $80/82C3 8D 0D 21 STA $210D $80/82C6 AD 10 01 LDA $0110 $80/82C9 8D 0D 21 STA $210D $80/82CC AD 11 01 LDA $0111 $80/82CF 8D 0E 21 STA $210E $80/82D2 AD 12 01 LDA $0112 $80/82D5 8D 0E 21 STA $210E $80/82D8 AD 13 01 LDA $0113 $80/82DB 8D 0F 21 STA $210F $80/82DE AD 14 01 LDA $0114 $80/82E1 8D 0F 21 STA $210F $80/82E4 AD 15 01 LDA $0115 $80/82E7 8D 10 21 STA $2110 $80/82EA AD 16 01 LDA $0116 $80/82ED 8D 10 21 STA $2110 $80/82F0 AD 17 01 LDA $0117 $80/82F3 8D 11 21 STA $2111 $80/82F6 AD 18 01 LDA $0118 $80/82F9 8D 11 21 STA $2111 $80/82FC AD 19 01 LDA $0119 $80/82FF 8D 12 21 STA $2112 $80/8302 AD 1A 01 LDA $011A $80/8305 8D 12 21 STA $2112 $80/8308 AD 1B 01 LDA $011B $80/830B 8D 13 21 STA $2113 $80/830E AD 1C 01 LDA $011C $80/8311 8D 13 21 STA $2113 $80/8314 AD 1D 01 LDA $011D $80/8317 8D 14 21 STA $2114 $80/831A AD 1E 01 LDA $011E $80/831D 8D 14 21 STA $2114 $80/8320 AD 3A 01 LDA $013A ; Set HDMA flags $80/8323 8D 0C 42 STA $420C $80/8326 28 PLP ; Restore Flag Register value $80/8327 6B RTL
$80/8328 ? (Executed while NMI)
$80/8328 08 PHP ; Buffer Flag Register value on stack $80/8329 E2 10 SEP #$10 ; X/Y = 8-bit $80/832B C2 20 REP #$20 ; A = 16-bit $80/832D AD 1C 02 LDA $021C [$80:021C] A:2100 X:0 Y:00FF P:envmXdIzC $80/8330 F0 24 BEQ $24 [$8356] A:0 X:0 Y:00FF P:envmXdIZC
code is missing here
$80/8356 28 PLP ; Restore Flag Register value $80/8357 6B RTL
$80/8358 ?
$80/8358 08 PHP ; Buffer Flag Register value on stack $80/8359 C2 20 REP #$20 ; A = 16-bit $80/835B A9 61 00 LDA #$0061 A:00E0 X:FFFE Y:0 P:eNvmxdIzC $80/835E 8D 24 02 STA $0224 [$80:0224] A:0061 X:FFFE Y:0 P:envmxdIzC $80/8361 28 PLP ; Restore Flag Register value $80/8362 6B RTL
$80/8363 ? (Executed while NMI)
$80/8363 08 PHP ; Buffer Flag Register value on stack $80/8364 E2 20 SEP #$20 ; A = 8-bit $80/8366 AD 24 02 LDA $0224 [$80:0224] A:0 X:0 Y:0 P:eNvMxdIzC $80/8369 8D 02 42 STA $4202 [$80:4202] A:0061 X:0 Y:0 P:envMxdIzC $80/836C A9 05 LDA #$05 A:0061 X:0 Y:0 P:envMxdIzC $80/836E 8D 03 42 STA $4203 [$80:4203] A:0005 X:0 Y:0 P:envMxdIzC $80/8371 EA NOP A:0005 X:0 Y:0 P:envMxdIzC $80/8372 C2 20 REP #$20 A:0005 X:0 Y:0 P:envMxdIzC $80/8374 AD 16 42 LDA $4216 [$80:4216] A:0005 X:0 Y:0 P:envmxdIzC $80/8377 48 PHA A:01E5 X:0 Y:0 P:envmxdIzC $80/8378 E2 20 SEP #$20 A:01E5 X:0 Y:0 P:envmxdIzC $80/837A AD 25 02 LDA $0225 [$80:0225] A:01E5 X:0 Y:0 P:envMxdIzC $80/837D 8D 02 42 STA $4202 [$80:4202] A:0100 X:0 Y:0 P:envMxdIZC $80/8380 A9 05 LDA #$05 A:0100 X:0 Y:0 P:envMxdIZC $80/8382 8D 03 42 STA $4203 [$80:4203] A:0105 X:0 Y:0 P:envMxdIzC $80/8385 EB XBA A:0105 X:0 Y:0 P:envMxdIzC $80/8386 EA NOP A:0501 X:0 Y:0 P:envMxdIzC $80/8387 AD 16 42 LDA $4216 [$80:4216] A:0501 X:0 Y:0 P:envMxdIzC $80/838A 38 SEC A:0500 X:0 Y:0 P:envMxdIZC $80/838B 63 02 ADC $02,s [$00:1EEA] A:0500 X:0 Y:0 P:envMxdIZC $80/838D 83 02 STA $02,s [$00:1EEA] A:0502 X:0 Y:0 P:envMxdIzc $80/838F C2 20 REP #$20 A:0502 X:0 Y:0 P:envMxdIzc $80/8391 68 PLA A:0502 X:0 Y:0 P:envmxdIzc $80/8392 69 11 00 ADC #$0011 A:02E5 X:0 Y:0 P:envmxdIzc $80/8395 6D 26 02 ADC $0226 [$80:0226] A:02F6 X:0 Y:0 P:envmxdIzc $80/8398 8D 24 02 STA $0224 [$80:0224] A:02F6 X:0 Y:0 P:envmxdIzc $80/839B 28 PLP ; Restore Flag Register value $80/839C 6B RTL
$80/839D Activate NMI
$80/839D 08 PHP ; Buffer Flag Register value on stack $80/839E E2 20 SEP #$20 $80/83A0 AD 35 01 LDA $0135 ; Load value for Interrupt Enable from buffer $80/83A3 09 80 ORA #$80 ; Set Flag to activate NMI $80/83A5 8D 00 42 STA $4200 ; Set Interrupt Enables $80/83A8 8D 35 01 STA $0135 ; Update buffer $80/83AB 28 PLP ; Restore Flag Register value $80/83AC 6B RTL
$80/83BD Clear whole VRAM via DMA
$80/83BD 08 PHP ; Buffer Flag Register value on stack $80/83BE E2 20 SEP #$20 ; A = 8-bit $80/83C0 A9 80 LDA #$80 ; 16-bit transfer $80/83C2 8D 15 21 STA $2115 $80/83C5 9C 16 21 STZ $2116 ; VRAM Address: $0000 $80/83C8 9C 17 21 STZ $2117 $80/83CB A9 09 LDA #$09 ; Fixed DMA, 16-bit transfer $80/83CD 8D 00 43 STA $4300 $80/83D0 A9 18 LDA #$18 ; Destination: $2118 (VRAM) $80/83D2 8D 01 43 STA $4301 $80/83D5 A9 F5 LDA #$F5 ; Source Address (Clear Byte): $80/83F5 $80/83D7 8D 02 43 STA $4302 $80/83DA A9 83 LDA #$83 $80/83DC 8D 03 43 STA $4303 $80/83DF A9 80 LDA #$80 $80/83E1 8D 04 43 STA $4304 $80/83E4 A9 00 LDA #$00 ; Number of Bytes: $10000 $80/83E6 8D 05 43 STA $4305 $80/83E9 A9 00 LDA #$00 $80/83EB 8D 06 43 STA $4306 $80/83EE A9 01 LDA #$01 ; Activate DMA $80/83F0 8D 0B 42 STA $420B $80/83F3 28 PLP ; Restore Flag Register value $80/83F4 6B RTL
Clear byte:
$80/83F5 00
$80/8411 Store a chain of values in $01xx (Graphics Register buffer)
When this subroutine is called from a place in code, the next three byte are arguments for this subroutine. The arguments are a 24-bit-address.
The address this points contains a variable number of arguments in the following format:
1st byte: Destination ($0100-$01FE) 2nd byte: Value for that register
When #$FF is the first byte the loop is ended.
$80/8411 08 PHP ; Buffer Flag Register value on stack $80/8412 E2 10 SEP #$10 ; X/Y = 8-bit $80/8414 C2 20 REP #$20 ; A = 16-bit $80/8416 A3 03 LDA $03,s ; Copy the original return address (pointing to data for this subroutine)... $80/8418 8D 21 00 STA $0021 ; ... into $20-$22 as a 24-bit load address $80/841B A3 02 LDA $02,s $80/841D 8D 20 00 STA $0020 $80/8420 18 CLC ; Change return address on stack to leap over the data $80/8421 69 03 00 ADC #$0003 $80/8424 83 02 STA $02,s $80/8426 A0 01 LDY #$01 ; Load Data from the original return address $80/8428 B7 20 LDA [$20],y ; Set this data up as another 24-bit-address in $23-$25 $80/842A 8D 23 00 STA $0023 $80/842D C8 INY $80/842E B7 20 LDA [$20],y $80/8430 8D 24 00 STA $0024 $80/8433 E2 20 SEP #$20 ; A = 8 bit $80/8435 A0 00 LDY #$00 ; Reset Load Index $80/8437 B7 23 LDA [$23],y ; Load byte from the second address $80/8439 AA TAX ; Transfer to X as (potential) Store Index $80/843A C9 FF CMP #$FF ; Exit if that byte was = #$FF $80/843C F0 09 BEQ $09 ; [$8447] $80/843E C8 INY $80/843F B7 23 LDA [$23],y ; Load next byte and store it in $01xx $80/8441 9D 00 01 STA $0100,x $80/8444 C8 INY $80/8445 80 F0 BRA $F0 ; [$8437] Loop $80/8447 28 PLP ; Restore Flag Register value $80/8448 6B RTL
$80/8849 Set Sprites in OAM buffer
Before this is called, there is an 16-bit value set into $00/1. This gets added to each X/Y-coordinate for every sprite that gets set with this subroutine.
$08/9 is what gets added to the other two bytes of OAM data.
$20-2 contains the Data Load address. First double-byte is the number of sprites to do
$80/8849 A7 20 LDA [$20] ; Load first double-byte - Number of Sprites to do $80/884B F0 78 BEQ $78 ; [$88C5] Exit if #$0000 $80/884D 85 04 STA $04 ; Store number of sprites to do as counter in $04 $80/884F A0 02 00 LDY #$0002 ; Set up Load Index $80/8852 AE 20 1E LDX $1E20 ; Load Number of used Sprites $80/8855 18 CLC A:000C X:0 Y:0002 P:envmxdIZc $80/8856 B7 20 LDA [$20],y ; Load next double-byte $80/8858 85 0C STA $0C [$00:000C] A:81F8 X:0 Y:0002 P:eNvmxdIzc $80/885A C8 INY ; Increment Load Index twice $80/885B C8 INY $80/885C 65 00 ADC $00 [$00:0000] A:81F8 X:0 Y:0004 P:envmxdIzc $80/885E 9D 00 1C STA $1C00,x ; Store in OAM Low Table buffer $80/8861 89 00 01 BIT #$0100 A:8200 X:0 Y:0004 P:eNvmxdIzc $80/8864 F0 0E BEQ $0E [$8874] A:8200 X:0 Y:0004 P:eNvmxdIZc $80/8866 BF 49 86 80 LDA $808649,x ; Setup corresponding address for OAM High Table buffer $80/886A 85 06 STA $06 $80/886C B2 06 LDA ($06) [$81:1E00] A:1E00 X:0004 Y:0009 P:envmxdIzc $80/886E 1F 49 84 80 ORA $808449,x[$80:844D] A:0002 X:0004 Y:0009 P:envmxdIzc $80/8872 92 06 STA ($06) [$81:1E00] A:0006 X:0004 Y:0009 P:envmxdIzc $80/8874 B7 20 LDA [$20],y[$95:82B1] A:8200 X:0 Y:0004 P:eNvmxdIZc $80/8876 29 FF 00 AND #$00FF A:0408 X:0 Y:0004 P:envmxdIzc $80/8879 89 80 00 BIT #$0080 A:0008 X:0 Y:0004 P:envmxdIzc $80/887C F0 03 BEQ $03 [$8881] A:0008 X:0 Y:0004 P:envmxdIZc $80/887E 09 00 FF ORA #$FF00 A:00F8 X:000C Y:0013 P:envmxdIzc $80/8881 18 CLC A:0008 X:0 Y:0004 P:envmxdIZc $80/8882 65 02 ADC $02 [$00:0002] A:0008 X:0 Y:0004 P:envmxdIZc $80/8884 C9 F0 00 CMP #$00F0 A:007F X:0 Y:0004 P:envmxdIzc $80/8887 90 08 BCC $08 [$8891] A:007F X:0 Y:0004 P:eNvmxdIzc
code is missing here
$80/8891 E2 20 SEP #$20 A:007F X:0 Y:0004 P:eNvmxdIzc $80/8893 9D 01 1C STA $1C01,x[$81:1C01] A:007F X:0 Y:0004 P:eNvMxdIzc $80/8896 C8 INY A:007F X:0 Y:0004 P:eNvMxdIzc $80/8897 C2 21 REP #$21 A:007F X:0 Y:0005 P:envMxdIzc $80/8899 A5 0C LDA $0C [$00:000C] A:007F X:0 Y:0005 P:envmxdIzc $80/889B 10 0E BPL $0E [$88AB] A:81F8 X:0 Y:0005 P:eNvmxdIzc $80/889D BF 49 86 80 LDA $808649,x[$80:8649] A:81F8 X:0 Y:0005 P:eNvmxdIzc $80/88A1 85 06 STA $06 [$00:0006] A:1E00 X:0 Y:0005 P:envmxdIzc $80/88A3 B2 06 LDA ($06) [$81:1E00] A:1E00 X:0 Y:0005 P:envmxdIzc $80/88A5 1F 4B 84 80 ORA $80844B,x[$80:844B] A:0 X:0 Y:0005 P:envmxdIZc $80/88A9 92 06 STA ($06) [$81:1E00] A:0002 X:0 Y:0005 P:envmxdIzc $80/88AB B7 20 LDA [$20],y[$95:82B2] A:0002 X:0 Y:0005 P:envmxdIzc $80/88AD C8 INY A:3E04 X:0 Y:0005 P:envmxdIzc $80/88AE C8 INY A:3E04 X:0 Y:0006 P:envmxdIzc $80/88AF 25 0A AND $0A [$00:000A] A:3E04 X:0 Y:0007 P:envmxdIzc $80/88B1 65 08 ADC $08 [$00:0008] A:3E04 X:0 Y:0007 P:envmxdIzc $80/88B3 9D 02 1C STA $1C02,x[$81:1C02] A:3E04 X:0 Y:0007 P:envmxdIzc $80/88B6 8A TXA ; Increment number of used sprites by four $80/88B7 69 04 00 ADC #$0004 $80/88BA 29 FF 01 AND #$01FF ; (Reset value if it surpasses the limit of #$200) $80/88BD AA TAX $80/88BE C6 04 DEC $04 ; Decrement number of sprites to do $80/88C0 D0 94 BNE $94 ; [$8856] Branch if there are still sprites to do $80/88C2 8E 20 1E STX $1E20 ; Store number of used sprites back $80/88C5 6B RTL
$80/8944 Update OAM
This subroutine transfers the whole OAM buffer at $7E/1C00 to the OAM via DMA.
$80/8944 08 PHP ; Buffer Flag Register value on stack $80/8945 E2 10 SEP #$10 ; X/Y = 8-bit $80/8947 C2 20 REP #$20 ; A = 16-bit $80/8949 A9 00 04 LDA #$0400 ; DMA transfer type: 8-bit, $2104 $80/894C 8D 00 43 STA $4300 $80/894F A9 00 1C LDA #$1C00 ; Source Address: $00/1C00 $80/8952 8D 02 43 STA $4302 $80/8955 A2 00 LDX #$00 $80/8957 8E 04 43 STX $4304 $80/895A A9 20 02 LDA #$0220 ; Transfer #$220 bytes $80/895D 8D 05 43 STA $4305 $80/8960 9C 02 21 STZ $2102 ; Start at $0000 in OAM $80/8963 A2 01 LDX #$01 ; Activate DMA $80/8965 8E 0B 42 STX $420B $80/8968 28 PLP ; Restore Flag Register value $80/8969 6B RTL
$80/896A Update Joypad Input buffers
$80/896A 08 PHP ; Buffer Flag Register value on stack $80/896B E2 20 SEP #$20 ; A = 8-bit $80/896D AD 12 42 LDA $4212 ; Wait until Auto-Joypad Read is done $80/8970 29 01 AND #$01 $80/8972 D0 F9 BNE $F9 ; [$896D] $80/8974 C2 20 REP #$20 ; A = 16-bit $80/8976 AD 18 42 LDA $4218 ; Buffer Joypad 1 Input of this frame $80/8979 8D 50 01 STA $0150 $80/897C 4D 5C 01 EOR $015C ; Calculate which buttons were pushed this frame $80/897F 2D 50 01 AND $0150 $80/8982 8D 54 01 STA $0154 [$80:0154] A:0 X:00FF Y:00FF P:envmxdIZC $80/8985 8D 58 01 STA $0158 [$80:0158] A:0 X:00FF Y:00FF P:envmxdIZC $80/8988 AD 50 01 LDA $0150 ; Is currently any button pushed/held? $80/898B F0 18 BEQ $18 ; [$89A5] Branch if not
code is missing here
$80/89A5 AD 4C 01 LDA $014C [$80:014C] A:0 X:00FF Y:00FF P:envmxdIZC $80/89A8 8D 62 01 STA $0162 [$80:0162] A:0008 X:00FF Y:00FF P:envmxdIzC $80/89AB AD 50 01 LDA $0150 ; Replace last frame's input with this one (for the next frame) $80/89AE 8D 5C 01 STA $015C $80/89B1 AD 1A 42 LDA $421A ; Buffer Joypad 2 Input of this frame $80/89B4 8D 52 01 STA $0152 $80/89B7 4D 64 01 EOR $0164 ; Calculate which buttons were pushed this frame $80/89BA 2D 52 01 AND $0152 $80/89BD 8D 56 01 STA $0156 [$80:0156] A:0 X:00FF Y:00FF P:envmxdIZC $80/89C0 8D 5A 01 STA $015A [$80:015A] A:0 X:00FF Y:00FF P:envmxdIZC $80/89C3 AD 52 01 LDA $0152 ; Is currently any button pushed/held? $80/89C6 F0 18 BEQ $18 ; [$89E0] Branch if not
code is missing here
$80/89E0 AD 4C 01 LDA $014C [$80:014C] A:0 X:00FF Y:00FF P:envmxdIZC $80/89E3 8D 6A 01 STA $016A [$80:016A] A:0008 X:00FF Y:00FF P:envmxdIzC $80/89E6 AD 52 01 LDA $0152 ; Replace last frame's input with this one (for the next frame) $80/89E9 8D 64 01 STA $0164 $80/89EC 28 PLP ; Restore Flag Register value $80/89ED 6B RTL
$80/8A14 ? (Use Jump Table)
$80/8A14 08 PHP ; Buffer Flag Register value and Direct Bank on stack $80/8A15 0B PHD $80/8A16 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/8A18 AD 21 1E LDA $1E21 [$80:1E21] A:FFFF X:0028 Y:0001 P:envMXdIzc $80/8A1B 29 03 AND #$03 A:FF00 X:0028 Y:0001 P:envMXdIZc $80/8A1D 0A ASL A A:FF00 X:0028 Y:0001 P:envMXdIZc $80/8A1E AA TAX A:FF00 X:0028 Y:0001 P:envMXdIZc $80/8A1F FC 2A 8A JSR ($8A2A,x)[$80:8A32] A:FF00 X:0 Y:0001 P:envMXdIZc $80/8A22 C2 30 REP #$30 A:1C00 X:00F0 Y:0001 P:envmXdIzc $80/8A24 9C 20 1E STZ $1E20 [$80:1E20] A:1C00 X:00F0 Y:0001 P:envmxdIzc $80/8A27 2B PLD ; Restore Flag Register value and Direct Bank $80/8A28 28 PLP $80/8A29 6B RTL
$80/8A2A Jump Table for $80/8A14
data is missing here
$80/8A6A Clear sixty-four entries of the OAM Low Table buffer
Executed during NMI. Before this is executed, the direct page has to be set to $1C00 or $1D00 and X has to contain the clear value #$00F0 (pushing any sprite over the bottom line of the screen)
$80/8A6A 86 01 STX $01 $80/8A6C 86 05 STX $05 $80/8A6E 86 09 STX $09 $80/8A70 86 0D STX $0D $80/8A72 86 11 STX $11 $80/8A74 86 15 STX $15 $80/8A76 86 19 STX $19 $80/8A78 86 1D STX $1D $80/8A7A 86 21 STX $21 $80/8A7C 86 25 STX $25 $80/8A7E 86 29 STX $29 $80/8A80 86 2D STX $2D $80/8A82 86 31 STX $31 $80/8A84 86 35 STX $35 $80/8A86 86 39 STX $39 $80/8A88 86 3D STX $3D $80/8A8A 86 41 STX $41 $80/8A8C 86 45 STX $45 $80/8A8E 86 49 STX $49 $80/8A90 86 4D STX $4D $80/8A92 86 51 STX $51 $80/8A94 86 55 STX $55 $80/8A96 86 59 STX $59 $80/8A98 86 5D STX $5D $80/8A9A 86 61 STX $61 $80/8A9C 86 65 STX $65 $80/8A9E 86 69 STX $69 $80/8AA0 86 6D STX $6D $80/8AA2 86 71 STX $71 $80/8AA4 86 75 STX $75 $80/8AA6 86 79 STX $79 $80/8AA8 86 7D STX $7D $80/8AAA 86 81 STX $81 $80/8AAC 86 85 STX $85 $80/8AAE 86 89 STX $89 $80/8AB0 86 8D STX $8D $80/8AB2 86 91 STX $91 $80/8AB4 86 95 STX $95 $80/8AB6 86 99 STX $99 $80/8AB8 86 9D STX $9D $80/8ABA 86 A1 STX $A1 $80/8ABC 86 A5 STX $A5 $80/8ABE 86 A9 STX $A9 $80/8AC0 86 AD STX $AD $80/8AC2 86 B1 STX $B1 $80/8AC4 86 B5 STX $B5 $80/8AC6 86 B9 STX $B9 $80/8AC8 86 BD STX $BD $80/8ACA 86 C1 STX $C1 $80/8ACC 86 C5 STX $C5 $80/8ACE 86 C9 STX $C9 $80/8AD0 86 CD STX $CD $80/8AD2 86 D1 STX $D1 $80/8AD4 86 D5 STX $D5 $80/8AD6 86 D9 STX $D9 $80/8AD8 86 DD STX $DD $80/8ADA 86 E1 STX $E1 $80/8ADC 86 E5 STX $E5 $80/8ADE 86 E9 STX $E9 $80/8AE0 86 ED STX $ED $80/8AE2 86 F1 STX $F1 $80/8AE4 86 F5 STX $F5 $80/8AE6 86 F9 STX $F9 $80/8AE8 86 FD STX $FD $80/8AEA 60 RTS
$80/8AEB Clear OAM High Table buffer
$80/8AEB 9C 00 1E STZ $1E00 $80/8AEE 9C 02 1E STZ $1E02 $80/8AF1 9C 04 1E STZ $1E04 $80/8AF4 9C 06 1E STZ $1E06 $80/8AF7 9C 08 1E STZ $1E08 $80/8AFA 9C 0A 1E STZ $1E0A $80/8AFD 9C 0C 1E STZ $1E0C $80/8B00 9C 0E 1E STZ $1E0E $80/8B03 9C 10 1E STZ $1E10 $80/8B06 9C 12 1E STZ $1E12 $80/8B09 9C 14 1E STZ $1E14 $80/8B0C 9C 16 1E STZ $1E16 $80/8B0F 9C 18 1E STZ $1E18 $80/8B12 9C 1A 1E STZ $1E1A $80/8B15 9C 1C 1E STZ $1E1C $80/8B18 9C 1E 1E STZ $1E1E $80/8B1B 6B RTL
$80/8C0F ?
$80/8C0F 8B PHB A:0080 X:0000 Y:0000 P:eNvmxdIzC $80/8C10 08 PHP A:0080 X:0000 Y:0000 P:eNvmxdIzC $80/8C11 4B PHK A:0080 X:0000 Y:0000 P:eNvmxdIzC $80/8C12 AB PLB A:0080 X:0000 Y:0000 P:eNvmxdIzC $80/8C13 E2 30 SEP #$30 A:0080 X:0000 Y:0000 P:eNvmxdIzC $80/8C15 A9 80 LDA #$80 A:0080 X:0000 Y:0000 P:eNvMXdIzC $80/8C17 8D 0C 02 STA $020C [$80:020C] A:0080 X:0000 Y:0000 P:eNvMXdIzC $80/8C1A A9 10 LDA #$10 A:0080 X:0000 Y:0000 P:eNvMXdIzC $80/8C1C 8D FC 01 STA $01FC [$80:01FC] A:0010 X:0000 Y:0000 P:envMXdIzC $80/8C1F A2 0F LDX #$0F A:0010 X:0000 Y:0000 P:envMXdIzC $80/8C21 9E 6C 01 STZ $016C,x[$80:017B] A:0010 X:000F Y:0000 P:envMXdIzC $80/8C24 CA DEX A:0010 X:000F Y:0000 P:envMXdIzC $80/8C25 10 FA BPL $FA [$8C21] A:0010 X:000E Y:0000 P:envMXdIzC $80/8C27 28 PLP A:0010 X:00FF Y:0000 P:eNvMXdIzC $80/8C28 AB PLB A:0010 X:00FF Y:0000 P:eNvmxdIzC $80/8C29 6B RTL A:0010 X:00FF Y:0000 P:eNvmxdIzC
$80/8CDC ?
Executed during NMI.
$80/8CDC 8B PHB A:0220 X:0001 Y:0 P:envmxdIzC $80/8CDD 08 PHP A:0220 X:0001 Y:0 P:envmxdIzC $80/8CDE 4B PHK A:0220 X:0001 Y:0 P:envmxdIzC $80/8CDF AB PLB A:0220 X:0001 Y:0 P:envmxdIzC $80/8CE0 E2 30 SEP #$30 A:0220 X:0001 Y:0 P:eNvmxdIzC $80/8CE2 A2 10 LDX #$10 A:0220 X:0001 Y:0 P:eNvMXdIzC $80/8CE4 BD FC 01 LDA $01FC,x[$80:020C] A:0220 X:0010 Y:0 P:envMXdIzC $80/8CE7 30 12 BMI $12 [$8CFB] A:0280 X:0010 Y:0 P:eNvMXdIzC
code is missing here
$80/8CFB A9 80 LDA #$80 A:0280 X:0010 Y:0 P:eNvMXdIzC $80/8CFD 8D 0C 02 STA $020C [$80:020C] A:0280 X:0010 Y:0 P:eNvMXdIzC $80/8D00 A9 10 LDA #$10 A:0280 X:0010 Y:0 P:eNvMXdIzC $80/8D02 8D FC 01 STA $01FC [$80:01FC] A:0210 X:0010 Y:0 P:envMXdIzC $80/8D05 28 PLP A:0210 X:0010 Y:0 P:envMXdIzC $80/8D06 AB PLB A:0210 X:0010 Y:0 P:envmxdIzC $80/8D07 6B RTL A:0210 X:0010 Y:0 P:eNvmxdIzC
$80/8DCE DA PHX ; Buffer X on stack $80/8DCF 20 D9 8D JSR $8DD9 ; Turn first input ($0211 or $0212) into negative number if necessary $80/8DD2 E8 INX ; Increment Index so that it points to the second register $80/8DD3 E8 INX $80/8DD4 20 D9 8D JSR $8DD9 ; Turn first input ($0213 or $0214) into negative number if necessary $80/8DD7 FA PLX ; Restore X $80/8DD8 60 RTS
If you move the mouse one pixel down, the value is #$01. If you move it up, it is #$81. The MSB tells the direction and the other bits tell the number of pixels moved, always as a positive.
This subroutine turns this into a real negative number (One pixel up = #$FF, two pixel up = #$FE), so it can be added more easily.
$80/8DD9 BD 11 02 LDA $0211,x ; Load Mouse input $80/8DDC 10 0A BPL $0A ; [$8DE8] Exit if it is positive (nothing is to change) $80/8DDE 29 7F AND #$7F ; If it is negative, remove the MSB $80/8DE0 49 FF EOR #$FF ; Turn the rest into a negative number (EOR + 1) $80/8DE2 1A INC A $80/8DE3 9D 11 02 STA $0211,x ; Store number $80/8DE6 80 02 BRA $02 ; [$8DEA] UNNECESSARY LINE - if the two lines below are removed, this is useless $80/8DE8 29 7F AND #$7F ; UNNECESSARY LINE - This is only executed the MSB already isn't set $80/8DEA 9D 11 02 STA $0211,x ; UNNECESSARY LINE - Nothing gets stored that isn't stored already $80/8DED 60 RTS
$80/8DEE 8A TXA A:0000 X:0000 Y:0000 P:envMXdIZc $80/8DEF 0A ASL A A:0000 X:0000 Y:0000 P:envMXdIZc $80/8DF0 A8 TAY A:0000 X:0000 Y:0000 P:envMXdIZc $80/8DF1 B9 58 01 LDA $0158,y[$80:0158] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8DF4 0A ASL A A:0001 X:0000 Y:0000 P:envMXdIzc $80/8DF5 0A ASL A A:0002 X:0000 Y:0000 P:envMXdIzc $80/8DF6 3E 15 02 ROL $0215,x[$80:0215] A:0004 X:0000 Y:0000 P:envMXdIzc $80/8DF9 B9 54 01 LDA $0154,y[$80:0154] A:0004 X:0000 Y:0000 P:envMXdIZc $80/8DFC 0A ASL A A:0001 X:0000 Y:0000 P:envMXdIzc $80/8DFD 0A ASL A A:0002 X:0000 Y:0000 P:envMXdIzc $80/8DFE 3E 15 02 ROL $0215,x[$80:0215] A:0004 X:0000 Y:0000 P:envMXdIzc $80/8E01 B9 50 01 LDA $0150,y[$80:0150] A:0004 X:0000 Y:0000 P:envMXdIZc $80/8E04 0A ASL A A:0001 X:0000 Y:0000 P:envMXdIzc $80/8E05 0A ASL A A:0002 X:0000 Y:0000 P:envMXdIzc $80/8E06 3E 15 02 ROL $0215,x[$80:0215] A:0004 X:0000 Y:0000 P:envMXdIzc $80/8E09 1E 15 02 ASL $0215,x[$80:0215] A:0004 X:0000 Y:0000 P:envMXdIZc $80/8E0C B9 58 01 LDA $0158,y[$80:0158] A:0004 X:0000 Y:0000 P:envMXdIZc $80/8E0F 0A ASL A A:0001 X:0000 Y:0000 P:envMXdIzc $80/8E10 3E 15 02 ROL $0215,x[$80:0215] A:0002 X:0000 Y:0000 P:envMXdIzc $80/8E13 B9 54 01 LDA $0154,y[$80:0154] A:0002 X:0000 Y:0000 P:envMXdIZc $80/8E16 0A ASL A A:0001 X:0000 Y:0000 P:envMXdIzc $80/8E17 3E 15 02 ROL $0215,x[$80:0215] A:0002 X:0000 Y:0000 P:envMXdIzc $80/8E1A B9 50 01 LDA $0150,y[$80:0150] A:0002 X:0000 Y:0000 P:envMXdIZc $80/8E1D 0A ASL A A:0001 X:0000 Y:0000 P:envMXdIzc $80/8E1E 3E 15 02 ROL $0215,x[$80:0215] A:0002 X:0000 Y:0000 P:envMXdIzc $80/8E21 20 25 8E JSR $8E25 [$80:8E25] A:0002 X:0000 Y:0000 P:envMXdIZc $80/8E24 60 RTS A:0000 X:0000 Y:0000 P:envMXdIZc
$80/8E25 BD 19 02 LDA $0219,x[$80:0219] A:0002 X:0000 Y:0000 P:envMXdIZc $80/8E28 D0 11 BNE $11 [$8E3B] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8E2A BD 15 02 LDA $0215,x[$80:0215] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8E2D 29 22 AND #$22 A:0000 X:0000 Y:0000 P:envMXdIZc $80/8E2F F0 2D BEQ $2D [$8E5E] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8E5E 60 RTS A:0000 X:0000 Y:0000 P:envMXdIZc
$80/8E5F Is a SNES mouse connected?
$80/8E5F A2 01 LDX #$01 A:0061 X:00FF Y:00FF P:envMXdIzc $80/8E61 8A TXA A:0061 X:0001 Y:00FF P:envMXdIzc $80/8E62 0A ASL A A:0001 X:0001 Y:00FF P:envMXdIzc $80/8E63 A8 TAY A:0002 X:0001 Y:00FF P:envMXdIzc $80/8E64 B9 18 42 LDA $4218,y[$80:421A] A:0002 X:0001 Y:0002 P:envMXdIzc $80/8E67 29 0F AND #$0F ; Is a mouse connected to the Joypad port? $80/8E69 C9 01 CMP #$01 $80/8E6B F0 08 BEQ $08 ; [$8E75] Branch if it is $80/8E6D 9E 17 02 STZ $0217,x[$80:0218] A:0 X:0001 Y:0002 P:eNvMXdIzc $80/8E70 9E 19 02 STZ $0219,x[$80:021A] A:0 X:0001 Y:0002 P:eNvMXdIzc $80/8E73 80 1E BRA $1E [$8E93] A:0 X:0001 Y:0002 P:eNvMXdIzc
if a SNES mouse is connected
$80/8E75 AD 0E 02 LDA $020E [$80:020E] A:0001 X:0000 Y:0000 P:envMXdIZC $80/8E78 1D 97 8E ORA $8E97,x[$80:8E97] A:0000 X:0000 Y:0000 P:envMXdIZC $80/8E7B 8D 0E 02 STA $020E [$80:020E] A:0001 X:0000 Y:0000 P:envMXdIzC $80/8E7E A0 10 LDY #$10 ; Transfer the Mouse Input to $0211-4 (only 16 bit) $80/8E80 BD 16 40 LDA $4016,x ; (It seems only to care about the mouse POSITION, not if buttons are pushed) $80/8E83 4A LSR A $80/8E84 3E 11 02 ROL $0211,x $80/8E87 3E 13 02 ROL $0213,x $80/8E8A 88 DEY $80/8E8B D0 F3 BNE $F3 ; [$8E80] $80/8E8D 20 CE 8D JSR $8DCE ; Turn negatives input into negative numbers $80/8E90 20 EE 8D JSR $8DEE [$80:8DEE] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8E93 CA DEX A:0 X:0001 Y:0002 P:eNvMXdIzc $80/8E94 10 CB BPL $CB [$8E61] A:0 X:0 Y:0002 P:envMXdIZc $80/8E96 60 RTS A:0 X:00FF Y:0 P:eNvMXdIzc
$80/8E97 Data for $80/8E5F
$80/8E97 01 02
$80/8E99
$80/8E99 8B PHB ; Buffer Program Bank and Flag Register value on stack $80/8E9A 08 PHP $80/8E9B 4B PHK ; Set Program Bank to $80 $80/8E9C AB PLB $80/8E9D E2 30 SEP #$30 ; A/X/Y = 8-bit $80/8E9F 9C 0E 02 STZ $020E ; Clear all Mouse related registers $80/8EA2 9C 15 02 STZ $0215 $80/8EA5 9C 11 02 STZ $0211 $80/8EA8 9C 13 02 STZ $0213 $80/8EAB 9C 16 02 STZ $0216 $80/8EAE 9C 12 02 STZ $0212 $80/8EB1 9C 14 02 STZ $0214 $80/8EB4 AD 35 01 LDA $0135 ; Check if Auto Joypad Read is enabled $80/8EB7 4A LSR A $80/8EB8 90 0C BCC $0C ; [$8EC6] Exit if it is $80/8EBA AD 12 42 LDA $4212 ; Wait if Auto-Joypad-Read is still busy $80/8EBD 4A LSR A $80/8EBE B0 FA BCS $FA ; [$8EBA] $80/8EC0 20 5F 8E JSR $8E5F ; Is a SNES mouse connected? $80/8EC3 20 0A 8F JSR $8F0A [$80:8F0A] A:0 X:00FF Y:0 P:eNvMXdIzc $80/8EC6 28 PLP ; Restore Program Bank and Flag Register $80/8EC7 AB PLB $80/8EC8 6B RTL
From FullSNES:
Mouse Sensitivity The Mouse Resolution is specified as "50 counts/inch (+/-10%)". There are three selectable Sensitivity (Threshold) settings: 0 - slow - linear fixed level (1:1) 1 - normal - exponential -?- levels (1:1 to ?:1) (?:1=smaller than 6:1) 2 - fast - exponential six levels (1:1 to 6:1) Setting 0 returns raw mickeys (so one must implement effects like double-speed threshold by software). Settings 1-2 can be used directly as screen-pixel offsets. To change the sensitivity (for port n=0 or n=1): [4016h]=01h ;set STB=1 dummy=[4016h+n] ;issue CLK pulse while STB=1 <-- increments the value, [4016h]=00h ;set STB=0 or wraps from 2 to 0 ;Thereafter, one should read the Sensitivity bits, typically like so: [4016h]=01h ;set STB=1 ;\another STB on/off, for invoking reading [4016h]=00h ;set STB=0 ;/(not sure if this part is required) for i=11 to 0, dummy=[4016h+n], next i ;skip first 12 bits for i=1 to 0, sensitivity.bit(i)=[4016h+n], next i ;read 2 sensitivity bits ;Repeat the above procedure until the desired sensitivity value is reached. Caution: According to Nintendo, the internal threshold factors aren't initialized until the change-sensitivty procedure is executed at least once (ie. after power-up, or after sensing a newly connected mouse, one MUST execute the change-sensitivity procedure, EVEN if the mouse does return the desired 2bit sensitivity code).
This subroutine is still to-do
$80/8EC9 A9 06 LDA #$06 A:0001 X:0000 Y:0000 P:envMXdIzc $80/8ECB 8D 41 00 STA $0041 [$80:0041] A:0006 X:0000 Y:0000 P:envMXdIzc $80/8ECE A9 01 LDA #$01 A:0006 X:0000 Y:0000 P:envMXdIzc $80/8ED0 8D 16 40 STA $4016 [$80:4016] A:0001 X:0000 Y:0000 P:envMXdIzc $80/8ED3 BD 16 40 LDA $4016,x[$80:4016] A:0001 X:0000 Y:0000 P:envMXdIzc $80/8ED6 9C 16 40 STZ $4016 [$80:4016] A:0040 X:0000 Y:0000 P:envMXdIzc $80/8ED9 A9 01 LDA #$01 A:0040 X:0000 Y:0000 P:envMXdIzc $80/8EDB 8D 16 40 STA $4016 [$80:4016] A:0001 X:0000 Y:0000 P:envMXdIzc $80/8EDE A9 00 LDA #$00 A:0001 X:0000 Y:0000 P:envMXdIzc $80/8EE0 8D 16 40 STA $4016 [$80:4016] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8EE3 8D 44 00 STA $0044 [$80:0044] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8EE6 A0 0A LDY #$0A A:0000 X:0000 Y:0000 P:envMXdIZc $80/8EE8 BD 16 40 LDA $4016,x[$80:4016] A:0000 X:0000 Y:000A P:envMXdIzc $80/8EEB 88 DEY A:0040 X:0000 Y:000A P:envMXdIzc $80/8EEC D0 FA BNE $FA [$8EE8] A:0040 X:0000 Y:0009 P:envMXdIzc $80/8EEE BD 16 40 LDA $4016,x[$80:4016] A:0040 X:0000 Y:0000 P:envMXdIZc $80/8EF1 4A LSR A A:0040 X:0000 Y:0000 P:envMXdIzc $80/8EF2 2E 44 00 ROL $0044 [$80:0044] A:0020 X:0000 Y:0000 P:envMXdIzc $80/8EF5 BD 16 40 LDA $4016,x[$80:4016] A:0020 X:0000 Y:0000 P:envMXdIZc $80/8EF8 4A LSR A A:0041 X:0000 Y:0000 P:envMXdIzc $80/8EF9 2E 44 00 ROL $0044 [$80:0044] A:0020 X:0000 Y:0000 P:envMXdIzC $80/8EFC AD 44 00 LDA $0044 [$80:0044] A:0020 X:0000 Y:0000 P:envMXdIzc $80/8EFF DD 0F 02 CMP $020F,x[$80:020F] A:0001 X:0000 Y:0000 P:envMXdIzc $80/8F02 F0 05 BEQ $05 [$8F09] A:0001 X:0000 Y:0000 P:envMXdIzC $80/8F04 CE 41 00 DEC $0041 [$80:0041] A:0001 X:0000 Y:0000 P:envMXdIzC $80/8F07 D0 C5 BNE $C5 [$8ECE] A:0001 X:0000 Y:0000 P:envMXdIzC $80/8F09 60 RTS A:0000 X:0000 Y:0000 P:envMXdIZC
$80/8F0A ?
$80/8F0A A2 01 LDX #$01 ; Check if a mouse is connected $80/8F0C AD 0E 02 LDA $020E [$80:020E] A:0000 X:0001 Y:0000 P:envMXdIzc $80/8F0F 3D 1B 8F AND $8F1B,x[$80:8F1C] A:0001 X:0001 Y:0000 P:envMXdIzc $80/8F12 F0 03 BEQ $03 [$8F17] A:0000 X:0001 Y:0000 P:envMXdIZc $80/8F14 20 C9 8E JSR $8EC9 [$80:8EC9] A:0001 X:0000 Y:0000 P:envMXdIzc $80/8F17 CA DEX A:0000 X:0001 Y:0000 P:envMXdIZc $80/8F18 10 F2 BPL $F2 [$8F0C] A:0000 X:0000 Y:0000 P:envMXdIZc $80/8F1A 60 RTS A:0000 X:00FF Y:0000 P:eNvMXdIzC
$80/8F1B Data for $80/8F0A
$80/8F1B 01 02
$80/8F49 ? (Frame Counter?)
$80/8F49 AD 27 06 LDA $0627 [$80:0627] A:0 X:0 Y:004B P:envmxdIzC $80/8F4C 1A INC A A:0 X:0 Y:004B P:envmxdIZC $80/8F4D C9 3C 00 CMP #$003C A:0001 X:0 Y:004B P:envmxdIzC $80/8F50 B0 04 BCS $04 [$8F56] A:0001 X:0 Y:004B P:eNvmxdIzc $80/8F52 8D 27 06 STA $0627 [$80:0627] A:0001 X:0 Y:004B P:eNvmxdIzc $80/8F55 6B RTL A:0001 X:0 Y:004B P:eNvmxdIzc $80/8F56 9C 27 06 STZ $0627 [$80:0627] A:003C X:0010 Y:0 P:envmxdIZC $80/8F59 AD 29 06 LDA $0629 [$80:0629] A:003C X:0010 Y:0 P:envmxdIZC $80/8F5C 1A INC A A:0 X:0010 Y:0 P:envmxdIZC $80/8F5D C9 3C 00 CMP #$003C A:0001 X:0010 Y:0 P:envmxdIzC $80/8F60 B0 04 BCS $04 [$8F66] A:0001 X:0010 Y:0 P:eNvmxdIzc $80/8F62 8D 29 06 STA $0629 [$80:0629] A:0001 X:0010 Y:0 P:eNvmxdIzc $80/8F65 6B RTL A:0001 X:0010 Y:0 P:eNvmxdIzc $80/8F66 9C 29 06 STZ $0629 [$80:0629] A:003C X:0 Y:006E P:envmxdIZC $80/8F69 AD 2B 06 LDA $062B [$80:062B] A:003C X:0 Y:006E P:envmxdIZC $80/8F6C 1A INC A A:0 X:0 Y:006E P:envmxdIZC $80/8F6D C9 3C 00 CMP #$003C A:0001 X:0 Y:006E P:envmxdIzC $80/8F70 B0 04 BCS $04 [$8F76] A:0001 X:0 Y:006E P:eNvmxdIzc $80/8F72 8D 2B 06 STA $062B [$80:062B] A:0001 X:0 Y:006E P:eNvmxdIzc $80/8F75 6B RTL A:0001 X:0 Y:006E P:eNvmxdIzc
$80/8F7D PROGRAM START
$00/8F7D 78 SEI ; Disable Interrupts $00/8F7E 18 CLC ; Activate Native Mode $00/8F7F FB XCE $00/8F80 5C 84 8F 80 JMP $808F84 ; Switch to FastROM addressing $80/8F84 E2 20 SEP #$20 ; A = 8-bit $80/8F86 C2 10 REP #$10 ; X/Y = 16-bit $80/8F88 4B PHK ; Data Bank = Program Bank $80/8F89 AB PLB $80/8F8A A9 01 LDA #$01 $80/8F8C 8D 00 42 STA $4200 ; Auto-Joypad-Enable, NMI/IRQ Disable $80/8F8F 8D 0D 42 STA $420D ; Activate FastROM $80/8F92 A9 80 LDA #$80 ; FBLANK $80/8F94 8D 00 21 STA $2100 $80/8F97 C2 30 REP #$30 ; A/X/Y = 16-bit $80/8F99 A9 00 00 LDA #$0000 ; Direct Page: $0000 $80/8F9C 5B TCD $80/8F9D AD 63 06 LDA $0663 [$80:0663] A:0000 X:0 Y:0 P:envmxdIZC $80/8FA0 49 FF FF EOR #$FFFF A:5555 X:0 Y:0 P:envmxdIzC $80/8FA3 CD 61 06 CMP $0661 [$80:0661] A:AAAA X:0 Y:0 P:eNvmxdIzC $80/8FA6 D0 06 BNE $06 [$8FAE] A:AAAA X:0 Y:0 P:envmxdIzC
code is missing here
$80/8FAE A9 00 00 LDA #$0000 ; Clear whole WRAM $80/8FB1 8F 00 00 7E STA $7E0000 $80/8FB5 8F 00 00 7F STA $7F0000 $80/8FB9 A9 FD FF LDA #$FFFD ; (Clear Bank $7E) $80/8FBC A2 01 00 LDX #$0001 $80/8FBF 9B TXY $80/8FC0 C8 INY $80/8FC1 54 7E 7E MVN 7E 7E $80/8FC4 A9 FD FF LDA #$FFFD ; (Clear Bank $7F) $80/8FC7 A2 01 00 LDX #$0001 $80/8FCA 9B TXY $80/8FCB C8 INY $80/8FCC 54 7F 7F MVN 7F 7F $80/8FCF 4B PHK ; Data Bank = Program Bank $80/8FD0 AB PLB $80/8FD1 7B TDC ; Buffer Direct Page in $0665 $80/8FD2 8D 65 06 STA $0665 $80/8FD5 A9 00 00 LDA #$0000 ; Direct Page: $0000 $80/8FD8 5B TCD $80/8FD9 A9 FF 1E LDA #$1EFF ; Stack: $1EFF $80/8FDC 1B TCS $80/8FDD 22 11 84 80 JSL $808411 ; Store a chain of values in $01xx
Arguments: $80/8FE1 D7 90 80 ; Data for $01xx registers is at $80/90D7
$80/8FE4 A9 80 00 LDA #$0080 $80/8FE7 8D 00 01 STA $0100 ; #$80 in value to set in $2100 (FBLANK) $80/8FEA 8D 1B 02 STA $021B ; #$80 in value currently set in $2100 (FBLANK) $80/8FED A9 01 00 LDA #$0001 ; Set Flag for Auto Joypad Read in $4200 buffer $80/8FF0 8D 35 01 STA $0135 $80/8FF3 22 00 82 80 JSL $808200[$80:8200] A:0001 X:00FF Y:0062 P:envmxdIzC $80/8FF7 AF F1 FF 9F LDA $9FFFF1 ; Setup address of the SPC program to transfer in $20-22: $9D/8000 $80/8FFB 85 21 STA $21 ; (UNNECESSARY LINE - one could save a few bytes if the address...) $80/8FFD AF F0 FF 9F LDA $9FFFF0 ; (... would be loaded directly here instead of this bank $9F detour) $80/9001 85 20 STA $20 $80/9003 22 5A 99 80 JSL $80995A ; Transfer Data to SPC $80/9007 AD 12 42 LDA $4212 ; Wait until the Auto-Joypad read is done $80/900A 4A LSR A $80/900B 90 FA BCC $FA ; [$9007] $80/900D AD 12 42 LDA $4212 $80/9010 4A LSR A $80/9011 B0 FA BCS $FA ; [$900D] $80/9013 AD 1A 42 LDA $421A ; Load Joypad 2 data $80/9016 29 F0 FF AND #$FFF0 ; Check if A/B/X/Y/L/R are pushed all at the same time $80/9019 C9 F0 C0 CMP #$C0F0 $80/901C D0 0E BNE $0E ; [$902C] Branch if not $80/901E 22 E4 C8 80 JSL $80C8E4[$80:C8E4] A:0000 X:0000 Y:E280 P:envmxdIzc
Play Sound Effect after SRAM reset
$80/9022 A9 84 03 LDA #$0384 ; Play Sound Effect #$84 $80/9025 A0 01 00 LDY #$0001 A:0384 X:FFFE Y:E280 P:envmxdIzc $80/9028 22 1C 5C 10 JSL $105C1C ; APU Message $80/902C 22 F7 C8 80 JSL $80C8F7 ; Copy data from banks $10-$12 to $13-$15 $80/9030 22 74 59 10 JSL $105974[$10:5974] A:0 X:FFFE Y:E280 P:envmxdIzc $80/9034 E2 20 SEP #$20 ; A = 8-bit $80/9036 C2 10 REP #$10 ; X/Y = 16-bit $80/9038 9C 3F 14 STZ $143F ; Clear Error Counter? $80/903B 22 8C 59 10 JSL $10598C ; Check if Satellaview Stream Number Registers work $80/903F F0 03 BEQ $03 ; [$9044] Branch if everything works fine $80/9041 EE 3F 14 INC $143F ; Increment Error Counter? $80/9044 22 58 5B 10 JSL $105B58[$10:5B58] A:0 X:FFFE Y:E280 P:envMxdIZC $80/9048 22 A4 59 10 JSL $1059A4 ; Transfer (fixed Set of) Data to Satellaview $80/904C 22 6C 5A 10 JSL $105A6C ; MCC Memory Controller Settings: Enable Flash R/W $80/9050 22 0C 5B 10 JSL $105B0C[$10:5B0C] A:0080 X:0007 Y:0 P:eNvMxdIzC $80/9054 22 70 5A 10 JSL $105A70 ; MCC Memory Controller Settings: Disable Flash R/W $80/9058 C2 30 REP #$30 A:0080 X:0 Y:0 P:eNvMxdIzC $80/905A 22 0F 8C 80 JSL $808C0F[$80:8C0F] A:0080 X:0 Y:0 P:eNvmxdIzC $80/905E 22 09 A7 80 JSL $80A709[$80:A709] A:0010 X:00FF Y:0 P:eNvmxdIzC $80/9062 22 58 83 80 JSL $808358[$80:8358] A:00E0 X:FFFE Y:0 P:eNvmxdIzC $80/9066 22 40 5B 10 JSL $105B40[$10:5B40] A:0061 X:FFFE Y:0 P:eNvmxdIzC $80/906A A9 08 00 LDA #$0008 A:0006 X:FFFF Y:0 P:eNvmxdIzC $80/906D 8D 4C 01 STA $014C [$80:014C] A:0008 X:FFFF Y:0 P:envmxdIzC $80/9070 A9 04 00 LDA #$0004 A:0008 X:FFFF Y:0 P:envmxdIzC $80/9073 8D 4E 01 STA $014E [$80:014E] A:0004 X:FFFF Y:0 P:envmxdIzC $80/9076 A9 FF FF LDA #$FFFF A:0004 X:FFFF Y:0 P:envmxdIzC $80/9079 8D 13 0A STA $0A13 [$80:0A13] A:FFFF X:FFFF Y:0 P:eNvmxdIzC $80/907C A9 FF FF LDA #$FFFF A:FFFF X:FFFF Y:0 P:eNvmxdIzC $80/907F 8F 15 87 7E STA $7E8715[$7E:8715] A:FFFF X:FFFF Y:0 P:eNvmxdIzC $80/9083 AD 65 06 LDA $0665 [$80:0665] A:FFFF X:FFFF Y:0 P:eNvmxdIzC $80/9086 C9 47 53 CMP #$5347 A:0 X:FFFF Y:0 P:envmxdIZC $80/9089 F0 0E BEQ $0E [$9099] A:0 X:FFFF Y:0 P:eNvmxdIzc $80/908B A9 00 80 LDA #$8000 A:0 X:FFFF Y:0 P:eNvmxdIzc $80/908E 8D 37 06 STA $0637 [$80:0637] A:8000 X:FFFF Y:0 P:eNvmxdIzc $80/9091 A9 94 00 LDA #$0094 A:8000 X:FFFF Y:0 P:eNvmxdIzc $80/9094 8D 39 06 STA $0639 [$80:0639] A:0094 X:FFFF Y:0 P:envmxdIzc $80/9097 80 18 BRA $18 [$90B1] A:0094 X:FFFF Y:0 P:envmxdIzc $80/90B1 9C 65 06 STZ $0665 [$80:0665] A:0094 X:FFFF Y:0 P:envmxdIzc $80/90B4 22 25 92 80 JSL $809225[$80:9225] A:0094 X:FFFF Y:0 P:envmxdIzc $80/90B8 A9 3A 91 LDA #$913A A:0 X:0010 Y:0 P:envmxdIzc $80/90BB 8D 3F 06 STA $063F [$80:063F] A:913A X:0010 Y:0 P:eNvmxdIzc $80/90BE A9 80 00 LDA #$0080 A:913A X:0010 Y:0 P:eNvmxdIzc $80/90C1 8D 41 06 STA $0641 [$80:0641] A:0080 X:0010 Y:0 P:envmxdIzc $80/90C4 22 9D 83 80 JSL $80839D[$80:839D] A:0080 X:0010 Y:0 P:envmxdIzc $80/90C8 58 CLI A:0081 X:0010 Y:0 P:envmxdIzc $80/90C9 20 6A 93 JSR $936A [$80:936A] A:0081 X:0010 Y:0 P:envmxdizc $80/90CC 4B PHK A:913A X:0010 Y:0 P:eNvmxdizc $80/90CD F4 D2 90 PEA $90D2 A:913A X:0010 Y:0 P:eNvmxdizc $80/90D0 DC 33 06 JML [$0633][$80:913A] A:913A X:0010 Y:0 P:eNvmxdizc
$80/90D7 Data
This data gets transfered to the $01xx Graphics Register buffer via $80/8411 at $80/8FDD.
This is executed while the start-up, these values serve to clear those Graphics Registers.
$80/90D7 01 00 - Value for $0101 = $2101 - Object Size and Object Base $80/90D9 02 00 - Value for $0102 $80/90DB 03 00 - Value for $0103 $80/90DD 04 00 - Value for $0104 = $2105 - BG Mode $80/90DF 05 00 - Value for $0105 = $2106 - Mosaic $80/90E1 06 00 $80/90E3 07 00 $80/90E5 08 00 $80/90E7 09 00 $80/90E9 0A 00 $80/90EB 0B 00 $80/90ED 0F 00 $80/90EF 10 00 $80/90F1 11 00 $80/90F3 12 00 $80/90F5 13 00 $80/90F7 14 00 $80/90F9 15 00 $80/90FB 16 00 $80/90FD 17 00 $80/90FF 18 00 $80/9101 19 00 $80/9103 1A 00 $80/9105 1B 00 $80/9107 1C 00 $80/9109 1D 00 $80/910B 1E 00 $80/910D 0C 00 $80/910F 0D 00 $80/9111 0E 00 $80/9113 1F 00 $80/9115 20 00 $80/9117 21 00 $80/9119 22 00 $80/911B 23 00 $80/911D 24 00 $80/911F 25 00 $80/9121 26 00 $80/9123 27 00 $80/9125 28 00 $80/9127 2A 30 $80/9129 2B 00 $80/912B 2C E0 $80/912D 30 00 $80/912F 38 00 $80/9131 39 00 $80/9133 36 00 $80/9135 37 00 $80/9137 3A 00 $80/9139 FF
$80/913A ? (Executed when talking to the aerial building and at ROM start up)
$80/913A 08 PHP ; Push everything on stack, A/X/Y = 16-bit $80/913B C2 30 REP #$30 $80/913D 48 PHA $80/913E DA PHX $80/913F 5A PHY $80/9140 0B PHD $80/9141 8B PHB $80/9142 4B PHK ; Set Program Bank to $80 $80/9143 AB PLB $80/9144 BA TSX A:0000 X:0000 Y:001C P:eNvmxdizc $80/9145 8A TXA A:0000 X:1E8D Y:001C P:envmxdizc $80/9146 E2 10 SEP #$10 A:1E8D X:1E8D Y:001C P:envmxdizc $80/9148 AC 45 06 LDY $0645 [$80:0645] A:1E8D X:008D Y:001C P:envmXdizc $80/914B BE 50 06 LDX $0650,y[$80:0650] A:1E8D X:008D Y:0000 P:envmXdiZc $80/914E 10 03 BPL $03 [$9153] A:1E8D X:0000 Y:0000 P:envmXdiZc $80/9150 99 4D 06 STA $064D,y[$80:064D] A:1E86 X:00C0 Y:0 P:eNvmXdizc $80/9153 BB TYX A:1E8D X:0000 Y:0000 P:envmXdiZc $80/9154 E2 30 SEP #$30 A:1E8D X:0000 Y:0000 P:envmXdiZc $80/9156 A9 FF LDA #$FF A:1E8D X:0000 Y:0000 P:envMXdiZc $80/9158 80 09 BRA $09 [$9163] A:1EFF X:0000 Y:0000 P:eNvMXdizc $80/915A 3C 50 06 BIT $0650,x[$80:0654] A:1EFF X:0004 Y:0 P:eNvMXdizc $80/915D 70 04 BVS $04 [$9163] A:1EFF X:0004 Y:0 P:envMXdiZc $80/915F 30 0E BMI $0E [$916F] A:1EFF X:0004 Y:0 P:envMXdiZc $80/9161 D0 1D BNE $1D [$9180] A:1EFF X:0004 Y:0 P:envMXdiZc $80/9163 E8 INX A:1EFF X:0 Y:0 P:eNvMXdizc $80/9164 E8 INX A:1EFF X:0001 Y:0 P:envMXdizc $80/9165 E8 INX A:1EFF X:0002 Y:0 P:envMXdizc $80/9166 E8 INX A:1EFF X:0003 Y:0 P:envMXdizc $80/9167 E0 10 CPX #$10 A:1EFF X:0004 Y:0 P:envMXdizc $80/9169 90 EF BCC $EF [$915A] A:1EFF X:0004 Y:0 P:eNvMXdizc $80/916B A2 00 LDX #$00 A:1EFF X:0010 Y:0 P:envMXdiZC $80/916D 80 EB BRA $EB [$915A] A:1EFF X:0 Y:0 P:envMXdiZC
code is missing here
$80/9180 8E 45 06 STX $0645 [$80:0645] A:1EFF X:0 Y:0 P:envMXdizC $80/9183 A9 80 LDA #$80 A:1EFF X:0 Y:0 P:envMXdizC $80/9185 9D 50 06 STA $0650,x[$80:0650] A:1E80 X:0 Y:0 P:eNvMXdizC $80/9188 C2 20 REP #$20 A:1E80 X:0 Y:0 P:eNvMXdizC $80/918A BD 4D 06 LDA $064D,x[$80:064D] A:1E80 X:0 Y:0 P:eNvmXdizC $80/918D 8D 4A 06 STA $064A [$80:064A] A:8572 X:0 Y:0 P:eNvmXdizC $80/9190 BC 4F 06 LDY $064F,x[$80:064F] A:8572 X:0 Y:0 P:eNvmXdizC $80/9193 8C 4C 06 STY $064C [$80:064C] A:8572 X:0 Y:0094 P:eNvmXdizC $80/9196 C2 30 REP #$30 A:8572 X:0 Y:0094 P:eNvmXdizC $80/9198 AD 45 06 LDA $0645 [$80:0645] A:8572 X:0 Y:0094 P:eNvmxdizC $80/919B 29 FF 00 AND #$00FF A:0 X:0 Y:0094 P:envmxdiZC $80/919E AA TAX A:0 X:0 Y:0094 P:envmxdiZC $80/919F BD A6 91 LDA $91A6,x[$80:91A6] A:0 X:0 Y:0094 P:envmxdiZC $80/91A2 1B TCS A:1E97 X:0 Y:0094 P:envmxdizC $80/91A3 DC 4A 06 JML [$064A][$94:8572] A:1E97 X:0 Y:0094 P:envmxdizC
$80/91B6 ? (Executed when talking to the aerial building)
$80/91B6 DA PHX A:B0B4 X:0000 Y:0000 P:eNvmxdIzc $80/91B7 08 PHP A:B0B4 X:0000 Y:0000 P:eNvmxdIzc $80/91B8 E2 30 SEP #$30 A:B0B4 X:0000 Y:0000 P:eNvmxdIzc $80/91BA A2 00 LDX #$00 A:B0B4 X:0000 Y:0000 P:eNvMXdIzc $80/91BC BD 50 06 LDA $0650,x[$81:0650] A:B0B4 X:0000 Y:0000 P:envMXdIZc $80/91BF F0 0C BEQ $0C [$91CD] A:B000 X:0000 Y:0000 P:envMXdIZc $80/91CD C2 20 REP #$20 A:B000 X:0000 Y:0000 P:envMXdIZc $80/91CF AD 5D 06 LDA $065D [$81:065D] A:B000 X:0000 Y:0000 P:envmXdIZc $80/91D2 9D 4D 06 STA $064D,x[$81:064D] A:B0B4 X:0000 Y:0000 P:eNvmXdIzc $80/91D5 AD 5F 06 LDA $065F [$81:065F] A:B0B4 X:0000 Y:0000 P:eNvmXdIzc $80/91D8 29 FF 00 AND #$00FF A:0080 X:0000 Y:0000 P:envmXdIzc $80/91DB 09 00 01 ORA #$0100 A:0080 X:0000 Y:0000 P:envmXdIzc $80/91DE 9D 4F 06 STA $064F,x[$81:064F] A:0180 X:0000 Y:0000 P:envmXdIzc $80/91E1 8E 60 06 STX $0660 [$81:0660] A:0180 X:0000 Y:0000 P:envmXdIzc $80/91E4 8A TXA A:0180 X:0000 Y:0000 P:envmXdIzc $80/91E5 28 PLP A:0000 X:0000 Y:0000 P:envmXdIZc $80/91E6 FA PLX A:0000 X:0000 Y:0000 P:eNvmxdIzc $80/91E7 18 CLC A:0000 X:0000 Y:0000 P:envmxdIZc $80/91E8 6B RTL A:0000 X:0000 Y:0000 P:envmxdIZc
$80/91E9 ? (Executed when talking to the aerial building)
$80/91E9 E2 30 SEP #$30 A:0000 X:0000 Y:041C P:envmxdiZc $80/91EB AE 45 06 LDX $0645 [$80:0645] A:0000 X:0000 Y:001C P:envMXdiZc $80/91EE 9E 50 06 STZ $0650,x[$80:0650] A:0000 X:0000 Y:001C P:envMXdiZc $80/91F1 4C 3A 91 JMP $913A [$80:913A] A:0000 X:0000 Y:001C P:envMXdiZc
$80/9225 ? (Clear $0650/4/8/C)
$80/9225 08 PHP ; Buffer Flag Register value on stack $80/9226 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/9228 A2 00 LDX #$00 ; Clear A and X $80/922A 8A TXA $80/922B 9D 50 06 STA $0650,x ; Clear $0650(/4/8/C) $80/922E E8 INX ; Increment Store Index four times $80/922F E8 INX $80/9230 E8 INX $80/9231 E8 INX $80/9232 E0 10 CPX #$10 ; Check if limit was reached $80/9234 D0 F5 BNE $F5 ; [$922B] $80/9236 28 PLP ; Restore Flag Register value $80/9237 6B RTL
$80/92AF NMI Handler
$00/92AF 5C B3 92 80 JMP $8092B3 ; Change to FastROM $80/92B3 C2 30 REP #$30 ; Buffer everything on Stack $80/92B5 48 PHA $80/92B6 DA PHX $80/92B7 5A PHY $80/92B8 8B PHB $80/92B9 0B PHD $80/92BA 4B PHK ; Set Program Bank to $80 $80/92BB AB PLB $80/92BC A9 00 00 LDA #$0000 ; Set Direct Page to $0000 $80/92BF 5B TCD $80/92C0 AD 10 42 LDA $4210 ; Remove NMI flag $80/92C3 22 78 59 10 JSL $105978[$10:5978] A:42C2 X:0010 Y:0 P:envmxdIzc $80/92C7 A3 0D LDA $0D,s [$00:1EFB] A:42C2 X:0010 Y:0 P:envmxdIzc $80/92C9 29 FF 00 AND #$00FF A:0480 X:0010 Y:0 P:envmxdIzc $80/92CC C9 04 00 CMP #$0004 A:0080 X:0010 Y:0 P:envmxdIzc $80/92CF F0 FE BEQ $FE [$92CF] A:0080 X:0010 Y:0 P:envmxdIzC $80/92D1 AD 43 06 LDA $0643 [$80:0643] A:0080 X:0010 Y:0 P:envmxdIzC $80/92D4 F0 03 BEQ $03 [$92D9] A:0 X:0010 Y:0 P:envmxdIZC $80/92D6 4C 45 93 JMP $9345 [$80:9345] A:0001 X:0007 Y:014B P:envmxdIzC $80/92D9 EE 43 06 INC $0643 [$80:0643] A:0 X:0010 Y:0 P:envmxdIZC $80/92DC 22 44 89 80 JSL $808944 ; Update OAM $80/92E0 22 DC 8C 80 JSL $808CDC[$80:8CDC] A:0220 X:0001 Y:0 P:envmxdIzC $80/92E4 22 4E 9C 80 JSL $809C4E[$80:9C4E] A:0210 X:0010 Y:0 P:eNvmxdIzC $80/92E8 22 C8 AF 83 JSL $83AFC8[$83:AFC8] A:0 X:0001 Y:0 P:envmxdIzC $80/92EC 22 28 83 80 JSL $808328[$80:8328] A:2100 X:0 Y:FFFF P:envmxdIzC $80/92F0 22 5E AC 80 JSL $80AC5E[$80:AC5E] A:0 X:0 Y:00FF P:envmxdIzC $80/92F4 22 00 82 80 JSL $808200 ; Update Graphics Registers $80/92F8 22 90 93 80 JSL $809390 ; UNNECESSARY LINE - USELESS SUBROUTINE $80/92FC 22 4C 5B 10 JSL $105B4C[$10:5B4C] A:0 X:0 Y:00FF P:envmxdIzC $80/9300 22 6A 89 80 JSL $80896A[$80:896A] A:0001 X:00FF Y:00FF P:envmxdIzC $80/9304 22 99 8E 80 JSL $808E99[$80:8E99] A:0 X:00FF Y:00FF P:envmxdIzC $80/9308 22 20 5C 10 JSL $105C20 ; ? (Work off SPC pipeline) $80/930C 22 44 5B 10 JSL $105B44[$10:5B44] A:0 X:00FF Y:0 P:eNvmxdIzC $80/9310 22 63 83 80 JSL $808363[$80:8363] A:0 X:0 Y:0 P:eNvmxdIzC $80/9314 22 EB 8A 80 JSL $808AEB[$80:8AEB] A:02F6 X:0 Y:0 P:eNvmxdIzC $80/9318 20 55 93 JSR $9355 ; Setup an 24-bit-Address in $062F to jump to $80/931B 4B PHK ; Push 24-bit Return Address on Stack (because it's a JML, not a JSL) $80/931C F4 21 93 PEA $9321 $80/931F DC 2F 06 JML [$062F] ; Jump to address in $062F-31 $80/9322 C2 30 REP #$30 A:0094 X:FFFE Y:0001 P:envmxdIzc $80/9324 22 67 C3 81 JSL $81C367[$81:C367] A:0094 X:FFFE Y:0001 P:envmxdIzc $80/9328 22 14 8A 80 JSL $808A14[$80:8A14] A:FFFF X:0028 Y:0001 P:envmxdIzc $80/932C 22 E1 B0 83 JSL $83B0E1[$83:B0E1] A:1C00 X:00F0 Y:0001 P:envmxdIzc $80/9330 22 93 92 80 JSL $809293[$80:9293] A:FFFF X:00F0 Y:0 P:envmxdIzC $80/9334 22 93 93 80 JSL $809393 ; UNNECESSARY LINE - USELESS SUBROUTINE $80/9338 22 49 8F 80 JSL $808F49[$80:8F49] A:FFFF X:0010 Y:0 P:envmxdIzC $80/933C 2B PLD ; Restore everything $80/933D AB PLB $80/933E 7A PLY $80/933F FA PLX $80/9340 68 PLA $80/9341 9C 43 06 STZ $0643 [$80:0643] A:0081 X:0010 Y:0 P:envmxdIzc $80/9344 40 RTI
$80/9345 ?
$80/9345 C2 30 REP #$30 ; A/X/Y = 16-bit $80/9347 22 44 5B 10 JSL $105B44[$10:5B44] A:0001 X:0007 Y:014B P:envmxdIzC $80/934B 22 49 8F 80 JSL $808F49[$80:8F49] A:0 X:0 Y:004B P:envmxdIzC $80/934F 2B PLD ; Restore everything $80/9350 AB PLB $80/9351 7A PLY $80/9352 FA PLX $80/9353 68 PLA $80/9354 40 RTI
$80/9355 ?
Executed during NMI. A = 16 bit!
$80/9355 AD 39 06 LDA $0639 $80/9358 30 0F BMI $0F ; [$9369] Exit if MSB of $063A is set $80/935A 8D 31 06 STA $0631 ; If not, store it as Bank for the Jump Address in $062F-31 $80/935D 09 00 80 ORA #$8000 ; Set MSB in $063A (this subroutine won't be executed again by default) $80/9360 8D 39 06 STA $0639 $80/9363 AD 37 06 LDA $0637 ; $80/9366 8D 2F 06 STA $062F [$80:062F] A:8000 X:0 Y:0 P:eNvmxdIzC $80/9369 60 RTS A:8000 X:0 Y:0 P:eNvmxdIzC
$80/9390 USELESS SUBROUTINE
Life would be so desolate without them.
$80/9390 08 PHP ; UNNECESSARY LINE $80/9391 28 PLP ; UNNECESSARY LINE $80/9392 6B RTL ; UNNECESSARY LINE
$80/9393 USELESS SUBROUTINE
You should call home more often.
$80/9393 08 PHP ; UNNECESSARY LINE $80/9394 28 PLP ; UNNECESSARY LINE $80/9395 6B RTL ; UNNECESSARY LINE
$80/839F ?
When this subroutine is called from a place in code, the next three byte are arguments for this subroutine. The arguments are a 24-bit-address.
$80/939F 08 PHP A:A8BB X:0084 Y:0 P:eNvmXdIzC $80/93A0 C2 30 REP #$30 A:A8BB X:0084 Y:0 P:eNvmXdIzC $80/93A2 A3 03 LDA $03,s [$00:1EEA] A:A8BB X:0084 Y:0 P:eNvmxdIzC $80/93A4 85 76 STA $76 [$00:0076] A:9480 X:0084 Y:0 P:eNvmxdIzC $80/93A6 A3 02 LDA $02,s [$00:1EE9] A:9480 X:0084 Y:0 P:eNvmxdIzC $80/93A8 85 75 STA $75 [$00:0075] A:8077 X:0084 Y:0 P:eNvmxdIzC $80/93AA 18 CLC A:8077 X:0084 Y:0 P:eNvmxdIzC $80/93AB 69 03 00 ADC #$0003 A:8077 X:0084 Y:0 P:eNvmxdIzc $80/93AE 83 02 STA $02,s [$00:1EE9] A:807A X:0084 Y:0 P:eNvmxdIzc $80/93B0 A0 01 00 LDY #$0001 A:807A X:0084 Y:0 P:eNvmxdIzc $80/93B3 B7 75 LDA [$75],y[$94:8078] A:807A X:0084 Y:0001 P:envmxdIzc $80/93B5 85 7D STA $7D [$00:007D] A:2000 X:0084 Y:0001 P:envmxdIzc $80/93B7 C8 INY A:2000 X:0084 Y:0001 P:envmxdIzc $80/93B8 B7 75 LDA [$75],y[$94:8079] A:2000 X:0084 Y:0002 P:envmxdIzc $80/93BA 85 7E STA $7E [$00:007E] A:7E20 X:0084 Y:0002 P:envmxdIzc $80/93BC 28 PLP A:7E20 X:0084 Y:0002 P:envmxdIzc $80/93BD 08 PHP A:7E20 X:0084 Y:0002 P:eNvmXdIzC $80/93BE 8B PHB A:7E20 X:0084 Y:0002 P:eNvmXdIzC $80/93BF E2 20 SEP #$20 A:7E20 X:0084 Y:0002 P:eNvmXdIzC $80/93C1 C2 10 REP #$10 A:7E20 X:0084 Y:0002 P:eNvMXdIzC $80/93C3 A5 7A LDA $7A [$00:007A] A:7E20 X:0084 Y:0002 P:eNvMxdIzC $80/93C5 48 PHA A:7E84 X:0084 Y:0002 P:eNvMxdIzC $80/93C6 AB PLB A:7E84 X:0084 Y:0002 P:eNvMxdIzC $80/93C7 64 81 STZ $81 [$00:0081] A:7E84 X:0084 Y:0002 P:eNvMxdIzC $80/93C9 A0 00 00 LDY #$0000 A:7E84 X:0084 Y:0002 P:eNvMxdIzC $80/93CC DA PHX A:7E84 X:0084 Y:0 P:envMxdIZC $80/93CD A6 78 LDX $78 [$00:0078] A:7E84 X:0084 Y:0 P:envMxdIZC $80/93CF BD 00 00 LDA $0000,x[$84:A8BB] A:7E84 X:A8BB Y:0 P:eNvMxdIzC $80/93D2 E8 INX A:7EE0 X:A8BB Y:0 P:eNvMxdIzC $80/93D3 D0 03 BNE $03 [$93D8] A:7EE0 X:A8BC Y:0 P:eNvMxdIzC $80/93D8 86 78 STX $78 [$00:0078] A:7EE0 X:A8BC Y:0 P:eNvMxdIzC $80/93DA FA PLX A:7EE0 X:A8BC Y:0 P:eNvMxdIzC $80/93DB 85 7B STA $7B [$00:007B] A:7EE0 X:0084 Y:0 P:envMxdIzC $80/93DD C9 FF CMP #$FF A:7EE0 X:0084 Y:0 P:envMxdIzC $80/93DF D0 07 BNE $07 [$93E8] A:7EE0 X:0084 Y:0 P:eNvMxdIzc $80/93E1 8B PHB A:00FF X:0 Y:0200 P:envMxdIZC $80/93E2 68 PLA A:00FF X:0 Y:0200 P:envMxdIZC $80/93E3 85 7A STA $7A [$00:007A] A:0084 X:0 Y:0200 P:eNvMxdIzC $80/93E5 AB PLB A:0084 X:0 Y:0200 P:eNvMxdIzC $80/93E6 28 PLP A:0084 X:0 Y:0200 P:eNvMxdIzC $80/93E7 6B RTL A:0084 X:0 Y:0 P:eNvmXdIzC $80/93E8 29 E0 AND #$E0 A:7EE0 X:0084 Y:0 P:eNvMxdIzc $80/93EA C9 E0 CMP #$E0 A:7EE0 X:0084 Y:0 P:eNvMxdIzc $80/93EC D0 1E BNE $1E [$940C] A:7EE0 X:0084 Y:0 P:envMxdIZC $80/93EE A5 7B LDA $7B [$00:007B] A:7EE0 X:0084 Y:0 P:envMxdIZC $80/93F0 0A ASL A A:7EE0 X:0084 Y:0 P:eNvMxdIzC $80/93F1 0A ASL A A:7EC0 X:0084 Y:0 P:eNvMxdIzC $80/93F2 0A ASL A A:7E80 X:0084 Y:0 P:eNvMxdIzC $80/93F3 29 E0 AND #$E0 A:7E00 X:0084 Y:0 P:envMxdIZC $80/93F5 48 PHA A:7E00 X:0084 Y:0 P:envMxdIZC $80/93F6 A5 7B LDA $7B [$00:007B] A:7E00 X:0084 Y:0 P:envMxdIZC $80/93F8 29 03 AND #$03 A:7EE0 X:0084 Y:0 P:eNvMxdIzC $80/93FA EB XBA A:7E00 X:0084 Y:0 P:envMxdIZC $80/93FB DA PHX A:007E X:0084 Y:0 P:envMxdIzC $80/93FC A6 78 LDX $78 [$00:0078] A:007E X:0084 Y:0 P:envMxdIzC $80/93FE BD 00 00 LDA $0000,x[$84:A8BC] A:007E X:A8BC Y:0 P:eNvMxdIzC $80/9401 E8 INX A:0023 X:A8BC Y:0 P:envMxdIzC $80/9402 D0 03 BNE $03 [$9407] A:0023 X:A8BD Y:0 P:eNvMxdIzC $80/9407 86 78 STX $78 [$00:0078] A:0023 X:A8BD Y:0 P:eNvMxdIzC $80/9409 FA PLX A:0023 X:A8BD Y:0 P:eNvMxdIzC $80/940A 80 08 BRA $08 [$9414] A:0023 X:0084 Y:0 P:envMxdIzC $80/9414 AA TAX A:0023 X:0084 Y:0 P:envMxdIzC $80/9415 E8 INX A:0023 X:0023 Y:0 P:envMxdIzC $80/9416 68 PLA A:0023 X:0024 Y:0 P:envMxdIzC $80/9417 C9 00 CMP #$00 A:0 X:0024 Y:0 P:envMxdIZC $80/9419 10 04 BPL $04 [$941F] A:0 X:0024 Y:0 P:envMxdIZC $80/941F C9 20 CMP #$20 A:0 X:0024 Y:0 P:envMxdIZC $80/9421 F0 1F BEQ $1F [$9442] A:0 X:0024 Y:0 P:eNvMxdIzc $80/9423 C9 40 CMP #$40 A:0 X:0024 Y:0 P:eNvMxdIzc $80/9425 F0 34 BEQ $34 [$945B] A:0 X:0024 Y:0 P:eNvMxdIzc $80/9427 C9 60 CMP #$60 A:0 X:0024 Y:0 P:eNvMxdIzc $80/9429 F0 66 BEQ $66 [$9491] A:0 X:0024 Y:0 P:eNvMxdIzc $80/942B DA PHX A:0 X:0024 Y:0 P:eNvMxdIzc $80/942C A6 78 LDX $78 [$00:0078] A:0 X:0024 Y:0 P:eNvMxdIzc $80/942E BD 00 00 LDA $0000,x[$84:A8BD] A:0 X:A8BD Y:0 P:eNvMxdIzc $80/9431 E8 INX A:003F X:A8BD Y:0 P:envMxdIzc $80/9432 D0 03 BNE $03 [$9437] A:003F X:A8BE Y:0 P:eNvMxdIzc $80/9437 86 78 STX $78 [$00:0078] A:003F X:A8BE Y:0 P:eNvMxdIzc $80/9439 FA PLX A:003F X:A8BE Y:0 P:eNvMxdIzc $80/943A 97 7D STA [$7D],y[$7E:2000] A:003F X:0024 Y:0 P:envMxdIzc $80/943C C8 INY A:003F X:0024 Y:0 P:envMxdIzc $80/943D CA DEX A:003F X:0024 Y:0001 P:envMxdIzc $80/943E D0 EB BNE $EB [$942B] A:003F X:0023 Y:0001 P:envMxdIzc $80/9440 F0 8A BEQ $8A [$93CC] A:007F X:0 Y:0024 P:envMxdIZc $80/940C 48 PHA A:0020 X:0 Y:0024 P:envMxdIzc $80/940D A9 00 LDA #$00 A:0020 X:0 Y:0024 P:envMxdIzc $80/940F EB XBA A:0 X:0 Y:0024 P:envMxdIZc $80/9410 A5 7B LDA $7B [$00:007B] A:0 X:0 Y:0024 P:envMxdIZc $80/9412 29 1F AND #$1F A:0025 X:0 Y:0024 P:envMxdIzc $80/9442 DA PHX A:0020 X:0006 Y:0024 P:envMxdIZC $80/9443 A6 78 LDX $78 [$00:0078] A:0020 X:0006 Y:0024 P:envMxdIZC $80/9445 BD 00 00 LDA $0000,x[$84:A8E2] A:0020 X:A8E2 Y:0024 P:eNvMxdIzC $80/9448 E8 INX A:0 X:A8E2 Y:0024 P:envMxdIZC $80/9449 D0 03 BNE $03 [$944E] A:0 X:A8E3 Y:0024 P:eNvMxdIzC $80/944E 86 78 STX $78 [$00:0078] A:0 X:A8E3 Y:0024 P:eNvMxdIzC $80/9450 FA PLX A:0 X:A8E3 Y:0024 P:eNvMxdIzC $80/9451 97 7D STA [$7D],y[$7E:2024] A:0 X:0006 Y:0024 P:envMxdIzC $80/9453 C8 INY A:0 X:0006 Y:0024 P:envMxdIzC $80/9454 CA DEX A:0 X:0006 Y:0025 P:envMxdIzC $80/9455 D0 FA BNE $FA [$9451] A:0 X:0005 Y:0025 P:envMxdIzC $80/9457 5C CC 93 80 JMP $8093CC[$80:93CC] A:0 X:0 Y:002A P:envMxdIZC $80/945B DA PHX A:0040 X:0004 Y:0050 P:envMxdIZC $80/945C A6 78 LDX $78 [$00:0078] A:0040 X:0004 Y:0050 P:envMxdIC $80/945E BD 00 00 LDA $0000,x[$84:A903] A:0040 X:A903 Y:0050 P:eNvMxdIzC $80/9461 E8 INX A:007B X:A903 Y:0050 P:envMxdIzC $80/9462 D0 03 BNE $03 [$9467] A:007B X:A904 Y:0050 P:eNvMxdIzC $80/9467 86 78 STX $78 [$00:0078] A:007B X:A904 Y:0050 P:eNvMxdIzC $80/9469 FA PLX A:007B X:A904 Y:0050 P:eNvMxdIzC $80/946A 85 7B STA $7B [$00:007B] A:007B X:0004 Y:0050 P:envMxdIzC $80/946C DA PHX A:007B X:0004 Y:0050 P:envMxdIzC $80/946D A6 78 LDX $78 [$00:0078] A:007B X:0004 Y:0050 P:envMxdIzC $80/946F BD 00 00 LDA $0000,x[$84:A904] A:007B X:A904 Y:0050 P:eNvMxdIzC $80/9472 E8 INX A:006F X:A904 Y:0050 P:envMxdIzC $80/9473 D0 03 BNE $03 [$9478] A:006F X:A905 Y:0050 P:eNvMxdIzC $80/9478 86 78 STX $78 [$00:0078] A:006F X:A905 Y:0050 P:eNvMxdIzC $80/947A FA PLX A:006F X:A905 Y:0050 P:eNvMxdIzC $80/947B 85 7C STA $7C [$00:007C] A:006F X:0004 Y:0050 P:envMxdIzC $80/947D A5 7B LDA $7B [$00:007B] A:006F X:0004 Y:0050 P:envMxdIzC $80/947F 97 7D STA [$7D],y[$7E:2050] A:007B X:0004 Y:0050 P:envMxdIzC $80/9481 C8 INY A:007B X:0004 Y:0050 P:envMxdIzC $80/9482 CA DEX A:007B X:0004 Y:0051 P:envMxdIzC $80/9483 F0 08 BEQ $08 [$948D] A:007B X:0003 Y:0051 P:envMxdIzC $80/9485 A5 7C LDA $7C [$00:007C] A:007B X:0003 Y:0051 P:envMxdIzC $80/9487 97 7D STA [$7D],y[$7E:2051] A:006F X:0003 Y:0051 P:envMxdIzC $80/9489 C8 INY A:006F X:0003 Y:0051 P:envMxdIzC $80/948A CA DEX A:006F X:0003 Y:0052 P:envMxdIzC $80/948B D0 F0 BNE $F0 [$947D] A:006F X:0002 Y:0052 P:envMxdIzC $80/948D 5C CC 93 80 JMP $8093CC[$80:93CC] A:006F X:0 Y:0054 P:envMxdIZC
$80/951E Graphics Decompression directly to VRAM
This subroutine is to 80% commented. Since I do not plan to write compression/decompression Utility, I see no use in breaking my brain to fully understand every piece of its mechanisms.
Notes:
Transfers data directly to VRAM.
The data source address is stored in $78-$7A.
$7B Buffer for Loaded Compressed Data Byte.
$7D contains the VRAM destination (times two).
Compressed Data Byte = $FF - Exit Subroutine.
Bits 5-7 of the first Data Byte decide how to handle the other bits / the next byte(s)
%000x.xxxx The next byte gets stored alternating in $2118/9 and incremented after each storing, how often depends on bits 0-4 (#%0000.0000 transfers it one time, #%0001.1111 transfers it thirty-two times).
%001x.xxxx
The next byte gets stored alternating in $2118/9 unchanged, how often depends on bits 0-4 (#%0010.0000 transfers it one time, #%0011.1111 transfers it thirty-two times).
%010x.xxxx
The next two bytes get alternating stored in $2118/9 unchanged, how often depends on bits 0-4 (#%0100.0000 transfers one byte, #%0101.1111 transfers thirty-two). Note that the counter gets decremented every SINGLE byte transfered, not every byte duo; this way, with an uneven number, the first and the last byte are the same.
%011x.xxxx
The next bytes get stored alternating in $2118/9 unchanged, how many depends on bits 0-4 (#%0110.0000 transfers one byte, #%0111.1111 transfers thirty-two).
%100x.xxxx
Next two bytes are an offset. This subroutine repeats already decompressed data from there.
%101x.xxxx
Same as above, but Data Byte gets EORed with #$FF %110x.xxxx Next two bytes are an offset. This subroutine repeats already decompressed data from Offset - Y.
%111x.xxxx
Same as above, but Data Byte gets EORed with #$FF
START UP: Set VRAM Address
$80/951E 08 PHP ; Buffer Flag Register value and Program Bank on stack $80/951F 8B PHB $80/9520 C2 30 REP #$30 ; A/X/Y = 16-bit $80/9522 A5 7D LDA $7D [$00:007D] A:8000 X:0084 Y:003C P:eNvmxdIzC $80/9524 A8 TAY A:0 X:0084 Y:003C P:envmxdIZC $80/9525 4A LSR A ; Set VRAM Destination $80/9526 8D 16 21 STA $2116 $80/9529 E2 20 SEP #$20 ; A = 8-bit $80/952B A5 7A LDA $7A ; Set Program Bank to Bank of the Compressed Data $80/952D 48 PHA $80/952E AB PLB $80/952F 64 81 STZ $81 [$00:0081] A:0084 X:0084 Y:0 P:eNvMxdIzc
Load Data Byte and check if it's the Exit Signal
$80/9531 DA PHX ; Buffer X on stack $80/9532 A6 78 LDX $78 ; Load Compressed Data Address $80/9534 BD 00 00 LDA $0000,x ; Load Compressed Data Byte $80/9537 E8 INX ; Increment Data Load Address $80/9538 D0 03 BNE $03 ; [$953D] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/953D 86 78 STX $78 ; Store Compressed Data Address back $80/953F FA PLX ; Restore X $80/9540 85 7B STA $7B ; Buffer loaded Data Byte in $7B $80/9542 C9 FF CMP #$FF ; Branch if it is not $FF (which is the Exit Signal) $80/9544 D0 07 BNE $07 ; [$954D]
Exit
$80/9546 8B PHB ; Store current Program Bank back to $7A $80/9547 68 PLA $80/9548 85 7A STA $7A $80/954A AB PLB ; Restore Flag Register value and Program Bank $80/954B 28 PLP $80/954C 6B RTL
Check if Bits 5-7 of Data Byte are set
$80/954D 29 E0 AND #$E0 ; Check if Bits 5 to 7 of the Data Byte are set $80/954F C9 E0 CMP #$E0 $80/9551 D0 1E BNE $1E ; [$9571] Branch if not
If Data Byte Bits 5-7 are set
$80/9553 A5 7B LDA $7B ; Push Data Byte Bits 2-4 to 5-7, remove the rest, push that value on stack $80/9555 0A ASL A $80/9556 0A ASL A $80/9557 0A ASL A $80/9558 29 E0 AND #$E0 $80/955A 48 PHA $80/955B A5 7B LDA $7B ; Load Data Byte, remove all the bits but Bits 0 and 1 $80/955D 29 03 AND #$03 $80/955F EB XBA A:0 X:0084 Y:0 P:envMxdIZC $80/9560 DA PHX ; Buffer X on stack $80/9561 A6 78 LDX $78 ; Load next Data Byte $80/9563 BD 00 00 LDA $0000,x $80/9566 E8 INX ; Increment Data Load Address $80/9567 D0 03 BNE $03 ; [$956C] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/956C 86 78 STX $78 ; Store Compressed Data Address back $80/956E FA PLX ; Restore X $80/956F 80 08 BRA $08 [$9579] A:0020 X:0084 Y:0 P:envMxdIzC
If not all Data Byte Bits 5-7 are set: But the other bits in X and Increment X
$80/9571 48 PHA ; Push Bits on Stack $80/9572 A9 00 LDA #$00 A:0 X:0 Y:0021 P:envMxdIzc $80/9574 EB XBA A:0 X:0 Y:0021 P:envMxdIZc $80/9575 A5 7B LDA $7B ; Restore Data Byte $80/9577 29 1F AND #$1F ; Remove Bits 5-7 from Data Byte $80/9579 AA TAX A:0020 X:0084 Y:0 P:envMxdIzC $80/957A E8 INX A:0020 X:0020 Y:0 P:envMxdIzC
If not all Data Byte Bits 5-7 are set: WHICH Bits ARE set, exactly?
$80/957B 68 PLA ; Pull Data Byte Bits 5-7 from Stack $80/957C C9 00 CMP #$00 ; UNNECESSARY LINE? (unnecessary if PLA sets the negative flag) $80/957E 10 04 BPL $04 ; [$9584] Branch if positive $80/9580 5C 5C 96 80 JMP $80965C ; Jump if negative $80/9584 C9 20 CMP #$20 $80/9586 F0 33 BEQ $33 ; [$95BB] if %001x.xxxx $80/9588 C9 40 CMP #$40 $80/958A F0 56 BEQ $56 ; [$95E2] if %010x.xxxx $80/958C C9 60 CMP #$60 $80/958E D0 04 BNE $04 ; [$9594] if %011x.xxxx $80/9590 5C 34 96 80 JMP $809634 ; If %000x.xxxx
If Data Byte Bits 5-7 = %011x.xxxx --- TRANSFER DATA AS IS
$80/9594 DA PHX ; Buffer X on stack $80/9595 A6 78 LDX $78 ; Load next Data Byte $80/9597 BD 00 00 LDA $0000,x $80/959A E8 INX ; Increment Data Load Address $80/959B D0 03 BNE $03 ; [$95A0] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/95A0 86 78 STX $78 ; Store Compressed Data Address back $80/95A2 FA PLX ; Restore X $80/95A3 48 PHA ; Store in $2118 if Y is even / Store in $2119 if Y is odd $80/95A4 98 TYA $80/95A5 4A LSR A $80/95A6 68 PLA $80/95A7 B0 06 BCS $06 ; [$95AF] $80/95A9 8F 18 21 00 STA $002118 $80/95AD 80 04 BRA $04 ; [$95B3] $80/95AF 8F 19 21 00 STA $002119 $80/95B3 C8 INY ; Next time, store in the other VRAM register $80/95B4 CA DEX ; Decrement number of bytes to do this way $80/95B5 D0 DD BNE $DD ; [$9594] Loop if counter did not run out $80/95B7 5C 31 95 80 JMP $809531 ; Go back, load next Data Byte (next Command)
If Data Byte Bits 5-7 = %001x.xxxx --- REPEAT ONE BYTE
$80/95BB DA PHX ; Buffer X on stack $80/95BC A6 78 LDX $78 ; Load next Data Byte $80/95BE BD 00 00 LDA $0000,x $80/95C1 E8 INX ; Increment Data Load Address $80/95C2 D0 03 BNE $03 ; [$95C7] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/95C7 86 78 STX $78 ; Store Compressed Data Address back $80/95C9 FA PLX ; Restore X $80/95CA 48 PHA ; Store in $2118 if Y is even / Store in $2119 if Y is odd $80/95CB 98 TYA $80/95CC 4A LSR A $80/95CD 68 PLA $80/95CE B0 06 BCS $06 ; [$95D6] $80/95D0 8F 18 21 00 STA $002118 $80/95D4 80 04 BRA $04 ; [$95DA] $80/95D6 8F 19 21 00 STA $002119 $80/95DA C8 INY ; Next time, store in the other VRAM register $80/95DB CA DEX ; Decrement number of bytes to do this way $80/95DC D0 EC BNE $EC ; [$95CA] Loop if counter did not run out $80/95DE 5C 31 95 80 JMP $809531 ; Go back, load next Data Byte (next Command)
If Data Byte Bits 5-7 = %010x.xxxx --- STORE TWO BYTES ALTERNATING
$80/95E2 DA PHX ; Buffer X on stack $80/95E3 A6 78 LDX $78 ; Load next Data Byte $80/95E5 BD 00 00 LDA $0000,x $80/95E8 E8 INX ; Increment Data Load Address $80/95E9 D0 03 BNE $03 ; [$95EE] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/95EE 86 78 STX $78 ; Store Compressed Data Address back $80/95F0 FA PLX ; Restore X $80/95F1 85 7B STA $7B ; Buffer loaded Data Byte in $7B $80/95F3 DA PHX ; Buffer X on stack $80/95F4 A6 78 LDX $78 ; Load next Data Byte $80/95F6 BD 00 00 LDA $0000,x $80/95F9 E8 INX ; Increment Data Load Address $80/95FA D0 03 BNE $03 ; [$95FF] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/95FF 86 78 STX $78 ; Store Compressed Data Address back $80/9601 FA PLX ; Restore X $80/9602 85 7C STA $7C ; Buffer second loaded Data Byte in $7B $80/9604 A5 7B LDA $7B ; Load first data byte $80/9606 48 PHA ; Store in $2118 if Y is even / Store in $2119 if Y is odd $80/9607 98 TYA $80/9608 4A LSR A $80/9609 68 PLA $80/960A B0 06 BCS $06 ; [$9612] $80/960C 8F 18 21 00 STA $002118 $80/9610 80 04 BRA $04 ; [$9616] $80/9612 8F 19 21 00 STA $002119 $80/9616 C8 INY ; Next time, store in the other VRAM register $80/9617 CA DEX ; Decrement number of bytes to do this way $80/9618 F0 16 BEQ $16 ; [$9630] Load next command if number of Bytes has run out $80/961A A5 7C LDA $7C ; Load second Data Byte $80/961C 48 PHA ; Store in $2118 if Y is even / Store in $2119 if Y is odd $80/961D 98 TYA $80/961E 4A LSR A $80/961F 68 PLA $80/9620 B0 06 BCS $06 ; [$9628] $80/9622 8F 18 21 00 STA $002118 $80/9626 80 04 BRA $04 ; [$962C] $80/9628 8F 19 21 00 STA $002119 $80/962C C8 INY ; Next time, store in the other VRAM register $80/962D CA DEX ; Decrement number of bytes to do this way $80/962E D0 D4 BNE $D4 ; [$9604] Loop if counter did not run out $80/9630 5C 31 95 80 JMP $809531 ; Go back, load next Data Byte (next Command)
If Data Byte Bits 5-7 = %000x.xxxx --- REPEAT BYTE AND INC IT AFTER EACH STORING
$80/9634 DA PHX ; Buffer X on stack $80/9635 A6 78 LDX $78 ; Load next Data Byte $80/9637 BD 00 00 LDA $0000,x $80/963A E8 INX ; Increment Data Load Address $80/963B D0 03 BNE $03 ; [$9640] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/9640 86 78 STX $78 ; Store Compressed Data Address back $80/9642 FA PLX ; Restore X $80/9643 48 PHA ; Store in $2118 if Y is even / Store in $2119 if Y is odd $80/9644 98 TYA $80/9645 4A LSR A $80/9646 68 PLA $80/9647 B0 06 BCS $06 ; [$964F] $80/9649 8F 18 21 00 STA $002118 $80/964D 80 04 BRA $04 ; [$9653] $80/964F 8F 19 21 00 STA $002119 $80/9653 C8 INY ; Next time, store in the other VRAM register $80/9654 1A INC A ; Increment Byte to store $80/9655 CA DEX ; Decrement number of bytes to do this way $80/9656 D0 EB BNE $EB ; [$9643] Loop if counter did not run out $80/9658 5C 31 95 80 JMP $809531 ; Go back, load next Data Byte (next Command)
If Data Byte Bits 5-7 = %1??x.xxxx = Is bit 6 set?
$80/965C C9 C0 CMP #$C0 $80/965E B0 73 BCS $73 ; [$96D3] Branch if #$C0 or #$E0 (Bit 6 is set)
If Data Byte Bits 5-7 = %10?x.xxxx
$80/9660 29 20 AND #$20 ; Buffer bit 5 in $80 $80/9662 85 80 STA $80 $80/9664 DA PHX ; Buffer X on stack $80/9665 A6 78 LDX $78 ; Load next Data Byte $80/9667 BD 00 00 LDA $0000,x $80/966A E8 INX ; Increment Data Load Address $80/966B D0 03 BNE $03 ; [$9670] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/9670 86 78 STX $78 ; Store Compressed Data Address back $80/9672 FA PLX ; Restore X $80/9673 85 7B STA $7B ; Store first loaded Data Byte in $7B $80/9675 DA PHX ; Buffer X on stack $80/9676 A6 78 LDX $78 ; Load next Data Byte $80/9678 BD 00 00 LDA $0000,x $80/967B E8 INX ; Increment Data Load Address $80/967C D0 03 BNE $03 ; [$9681] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/9681 86 78 STX $78 ; Store Compressed Data Address back $80/9683 FA PLX ; Restore X $80/9684 85 7C STA $7C ; Store second loaded Data Byte in $7C $80/9686 C2 20 REP #$20 ; A = 16-bit $80/9688 A5 7D LDA $7D ; Add Offset ($7B/C) to VRAM Address ($7D/E) and store it in $7B/C $80/968A 18 CLC $80/968B 65 7B ADC $7B $80/968D 85 7B STA $7B
Second part of everything with Data Byte Bit 7 = %1xxx.xxxx
$80/968F DA PHX A:0350 X:0003 Y:0405 P:envmxdIzC $80/9690 C2 20 REP #$20 ; A = 16-bit $80/9692 A5 7B LDA $7B ; Set Address in VRAM $80/9694 4A LSR A $80/9695 8F 16 21 00 STA $002116 $80/9699 AF 39 21 00 LDA $002139 ; Load from VRAM $80/969D AF 39 21 00 LDA $002139 $80/96A1 90 01 BCC $01 ; [$96A4] Branch if the LSB of $7B was clear $80/96A3 EB XBA A:0300 X:0002 Y:0406 P:envmxdIzC $80/96A4 E6 7B INC $7B ; Increment VRAM Address $80/96A6 E2 20 SEP #$20 ; A = 8-bit $80/96A8 A6 80 LDX $80 ; If bit 5 of the Commando Byte was set, EOR the Data Byte $80/96AA F0 02 BEQ $02 ; [$96AE] Else, Branch $80/96AC 49 FF EOR #$FF $80/96AE 48 PHA ; Buffer A on Stack $80/96AF C2 20 REP #$20 ; A = 16-bit $80/96B1 98 TYA ; Restore VRAM Address (for Storing) $80/96B2 4A LSR A $80/96B3 8F 16 21 00 STA $002116 $80/96B7 E2 20 SEP #$20 ; A = 8-bit $80/96B9 68 PLA ; Restore A $80/96BA 48 PHA ; Store in $2118 if Y is even / Store in $2119 if Y is odd $80/96BB 98 TYA $80/96BC 4A LSR A $80/96BD 68 PLA $80/96BE B0 06 BCS $06 ; [$96C6] $80/96C0 8F 18 21 00 STA $002118 $80/96C4 80 04 BRA $04 ; [$96CA] $80/96C6 8F 19 21 00 STA $002119 $80/96CA C8 INY ; Next time, store in the other VRAM register $80/96CB FA PLX ; Decrement number of bytes to do this way $80/96CC CA DEX $80/96CD D0 C0 BNE $C0 ; [$968F] Loop if counter did not run out $80/96CF 5C 31 95 80 JMP $809531 ; Go back, load next Data Byte (next Command)
If Data Byte Bits 5-7 = %11?x.xxxx
$80/96D3 29 20 AND #$20 ; Buffer bit 5 in $80 $80/96D5 85 80 STA $80 $80/96D7 DA PHX ; Buffer X on stack $80/96D8 A6 78 LDX $78 ; Load next Data Byte $80/96DA BD 00 00 LDA $0000,x $80/96DD E8 INX ; Increment Data Load Address $80/96DE D0 03 BNE $03 ; [$96E3] Branch if it did not latch from $FFFF to $0000
code is missing here
$80/96E3 86 78 STX $78 ; Store Compressed Data Address back $80/96E5 FA PLX ; Restore X $80/96E6 85 7B STA $7B [$00:007B] A:00B5 X:0003 Y:0405 P:envMxdIzC $80/96E8 64 7C STZ $7C [$00:007C] A:00B5 X:0003 Y:0405 P:envMxdIzC $80/96EA C2 20 REP #$20 A:00B5 X:0003 Y:0405 P:envMxdIzC $80/96EC 98 TYA A:00B5 X:0003 Y:0405 P:envmxdIzC $80/96ED 38 SEC A:0405 X:0003 Y:0405 P:envmxdIzC $80/96EE E5 7B SBC $7B [$00:007B] A:0405 X:0003 Y:0405 P:envmxdIzC $80/96F0 85 7B STA $7B [$00:007B] A:0350 X:0003 Y:0405 P:envmxdIzC $80/96F2 80 9B BRA $9B ; [$968F] Branch to the second part
This subroutine exits with an Error flag (in the Carry).
$80/9720 DA PHX ; Buffer X and Flag Register value on stack $80/9721 08 PHP $80/9722 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/9724 C0 00 CPY #$00 A:0003 X:00FE Y:0 P:envMXdIZC $80/9726 D0 34 BNE $34 [$975C] A:0003 X:00FE Y:0 P:envMXdIZC $80/9728 C9 FD CMP #$FD A:0003 X:00FE Y:0 P:envMXdIZC $80/972A 90 1E BCC $1E [$974A] A:0003 X:00FE Y:0 P:envMXdIzc
code is missing here
$80/974A C9 22 CMP #$22 A:0003 X:00FE Y:0 P:envMXdIzc $80/974C B0 07 BCS $07 [$9755] A:0003 X:00FE Y:0 P:eNvMXdIzc $80/974E 48 PHA A:0003 X:00FE Y:0 P:eNvMXdIzc $80/974F A9 80 LDA #$80 A:0003 X:00FE Y:0 P:eNvMXdIzc $80/9751 20 8D 97 JSR $978D [$80:978D] A:0080 X:00FE Y:0 P:eNvMXdIzc $80/9754 68 PLA A:0080 X:0080 Y:0 P:eNvMXdIzc $80/9755 20 8D 97 JSR $978D [$80:978D] A:0003 X:0080 Y:0 P:envMXdIzc $80/9758 B0 0B BCS $0B ; [$9765] Branch if Error flag is set $80/975A 80 05 BRA $05 ; [$9761] Else: Exit and clear Error flag $80/975C 20 69 97 JSR $9769 ; Put sound effect to play in pipeline $80/975F B0 04 BCS $04 ; [$9765] Branch if Error flag is set $80/9761 28 PLP ; Restore X and Flag Register value $80/9762 FA PLX $80/9763 18 CLC ; Clear Error flag $80/9764 6B RTL $80/9765 28 PLP ; Restore X and Flag Register value $80/9766 FA PLX $80/9767 38 SEC ; Set Error flag $80/9768 6B RTL
When this subroutine gets called, Y contains the APU register destination (Y = #$0x ==> $214x). A is 8-bit, the active 8-bit (A) are the value store in that APU register, the inactive 8-bit (B) are for $2143.
The carry is used here as error flag. When it's set, something went wrong.
$80/9769 AA TAX ; Buffer Original (active) A value in X $80/976A AD 0A 07 LDA $070A [$80:070A] A:0384 X:0084 Y:0001 P:eNvMXdIzC $80/976D 1A INC A A:0300 X:0084 Y:0001 P:envMXdIZC $80/976E 29 0F AND #$0F A:0301 X:0084 Y:0001 P:envMXdIzC $80/9770 CD 0C 07 CMP $070C [$80:070C] A:0301 X:0084 Y:0001 P:envMXdIzC $80/9773 F0 16 BEQ $16 ; [$978B] Set Error Flag and Exit $80/9775 8D 0A 07 STA $070A [$80:070A] A:0301 X:0084 Y:0001 P:envMXdIzC $80/9778 3A DEC A A:0301 X:0084 Y:0001 P:envMXdIzC $80/9779 29 0F AND #$0F A:0300 X:0084 Y:0001 P:envMXdIZC $80/977B DA PHX ; Push Original A value on stack $80/977C AA TAX A:0300 X:0084 Y:0001 P:envMXdIZC $80/977D 98 TYA ; $80/977E 9D CA 06 STA $06CA,x[$80:06CA] A:0301 X:0000 Y:0001 P:envMXdIzC $80/9781 68 PLA ; Pull Original A from stack $80/9782 9D EA 06 STA $06EA,x[$80:06EA] A:0384 X:0000 Y:0001 P:eNvMXdIzC $80/9785 EB XBA ; Store byte from inactive Accumulator part as value for $2143 $80/9786 9D FA 06 STA $06FA,x[$80:06FA] A:8403 X:0000 Y:0001 P:envMXdIzC $80/9789 18 CLC ; Clear Error flag - everything's fine $80/978A 60 RTS $80/978B 38 SEC ; Set Error flag - something went wrong $80/978C 60 RTS
A contains the input.
$80/978D AA TAX A:0080 X:00FE Y:0 P:eNvMXdIzc $80/978E AD 0B 07 LDA $070B [$80:070B] A:0080 X:0080 Y:0 P:eNvMXdIzc $80/9791 1A INC A A:0 X:0080 Y:0 P:envMXdIZc $80/9792 29 0F AND #$0F A:0001 X:0080 Y:0 P:envMXdIzc $80/9794 CD 0D 07 CMP $070D [$80:070D] A:0001 X:0080 Y:0 P:envMXdIzc $80/9797 F0 F2 BEQ $F2 [$978B] A:0001 X:0080 Y:0 P:envMXdIzC $80/9799 8D 0B 07 STA $070B [$80:070B] A:0001 X:0080 Y:0 P:envMXdIzC $80/979C 3A DEC A A:0001 X:0080 Y:0 P:envMXdIzC $80/979D 29 0F AND #$0F A:0 X:0080 Y:0 P:envMXdIZC $80/979F A8 TAY A:0 X:0080 Y:0 P:envMXdIZC $80/97A0 8A TXA A:0 X:0080 Y:0 P:envMXdIZC $80/97A1 99 DA 06 STA $06DA,y[$80:06DA] A:0080 X:0080 Y:0 P:eNvMXdIzC $80/97A4 18 CLC A:0080 X:0080 Y:0 P:eNvMXdIzC $80/97A5 60 RTS
A wild guess: This is used to play a sound effect
$80/97A6 08 PHP ; Buffer Flag Register value on stack $80/97A7 C2 30 REP #$30 ; A/X/Y 16-bit $80/97A9 AD 16 07 LDA $0716 [$80:0716] A:0000 X:00FF Y:0000 P:eNvmxdIzC $80/97AC F0 03 BEQ $03 [$97B1] A:0000 X:00FF Y:0000 P:envmxdIZC
code is missing here
$80/97B1 E2 20 SEP #$20 ; A = 8-bit $80/97B3 AD 19 07 LDA $0719 [$80:0719] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97B6 F0 03 BEQ $03 [$97BB] A:0000 X:00FF Y:0000 P:envMxdIZC
code is missing here
$80/97BB AD 15 07 LDA $0715 [$80:0715] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97BE C9 02 CMP #$02 A:0000 X:00FF Y:0000 P:envMxdIZC $80/97C0 D0 03 BNE $03 [$97C5] A:0000 X:00FF Y:0000 P:eNvMxdIzc $80/97C2 4C B0 98 JMP $98B0 ; Exit $80/97C5 AD 41 21 LDA $2141 ; Has the value in $2141 changed? $80/97C8 CD 0F 07 CMP $070F $80/97CB D0 4A BNE $4A ; [$9817] Branch if the value has changed $80/97CD AC 42 21 LDY $2142 ; Have the values in $2142/3 changed? $80/97D0 CC 10 07 CPY $0710 $80/97D3 D0 42 BNE $42 ; [$9817] Branch if the values have changed $80/97D5 AD 18 07 LDA $0718 [$80:0718] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97D8 D0 08 BNE $08 [$97E2] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97DA AD 0C 07 LDA $070C [$80:070C] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97DD CD 0A 07 CMP $070A [$80:070A] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97E0 D0 14 BNE $14 [$97F6] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97E2 A0 00 00 LDY #$0000 A:0000 X:00FF Y:0000 P:envMxdIZC $80/97E5 9C 0F 07 STZ $070F [$80:070F] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97E8 8C 10 07 STY $0710 [$80:0710] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97EB 9C 41 21 STZ $2141 [$80:2141] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97EE 8C 42 21 STY $2142 [$80:2142] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97F1 9C 18 07 STZ $0718 [$80:0718] A:0000 X:00FF Y:0000 P:envMxdIZC $80/97F4 80 21 BRA $21 [$9817] A:0000 X:00FF Y:0000 P:envMxdIZC
executed when a sound effect is played
$80/97F6 E2 30 SEP #$30 A:0000 X:00FF Y:0000 P:eNvMxdIzc $80/97F8 AA TAX A:0000 X:00FF Y:0000 P:eNvMXdIzc $80/97F9 1A INC A A:0000 X:0000 Y:0000 P:envMXdIZc $80/97FA 29 0F AND #$0F A:0001 X:0000 Y:0000 P:envMXdIzc $80/97FC 8D 0C 07 STA $070C [$80:070C] A:0001 X:0000 Y:0000 P:envMXdIzc $80/97FF BD FA 06 LDA $06FA,x[$80:06FA] A:0001 X:0000 Y:0000 P:envMXdIzc $80/9802 8D 11 07 STA $0711 [$80:0711] A:0003 X:0000 Y:0000 P:envMXdIzc $80/9805 8D 43 21 STA $2143 [$80:2143] A:0003 X:0000 Y:0000 P:envMXdIzc $80/9808 BC CA 06 LDY $06CA,x[$80:06CA] A:0003 X:0000 Y:0000 P:envMXdIzc $80/980B BD EA 06 LDA $06EA,x[$80:06EA] A:0003 X:0000 Y:0001 P:envMXdIzc $80/980E 99 0E 07 STA $070E,y[$80:070F] A:0084 X:0000 Y:0001 P:eNvMXdIzc $80/9811 99 40 21 STA $2140,y[$80:2141] A:0084 X:0000 Y:0001 P:eNvMXdIzc $80/9814 EE 18 07 INC $0718 [$80:0718] A:0084 X:0000 Y:0001 P:eNvMXdIzc
if $2141 != $070F / $2142/3 != $0710/1
$80/9817 AD 40 21 LDA $2140 [$80:2140] A:0000 X:00FF Y:0000 P:envMxdIZC $80/981A CD 0E 07 CMP $070E [$80:070E] A:0000 X:00FF Y:0000 P:envMxdIZC $80/981D D0 A3 BNE $A3 ; [$97C2] Exit $80/981F AD 0D 07 LDA $070D [$80:070D] A:0000 X:00FF Y:0000 P:envMxdIZC $80/9822 CD 0B 07 CMP $070B [$80:070B] A:0000 X:00FF Y:0000 P:envMxdIZC $80/9825 F0 9B BEQ $9B ; [$97C2] Exit
executed when a sound effect is played?
$80/9827 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/9829 AE 19 07 LDX $0719 [$80:0719] A:0000 X:00FF Y:0000 P:eNvMXdIzc $80/982C D0 94 BNE $94 ; [$97C2] Exit $80/982E AA TAX A:0000 X:0000 Y:0000 P:envMXdIZc $80/982F 1A INC A A:0000 X:0000 Y:0000 P:envMXdIZc $80/9830 29 0F AND #$0F A:0001 X:0000 Y:0000 P:envMXdIzc $80/9832 8D 0D 07 STA $070D [$80:070D] A:0001 X:0000 Y:0000 P:envMXdIzc $80/9835 BD DA 06 LDA $06DA,x[$80:06DA] A:0001 X:0000 Y:0000 P:envMXdIzc $80/9838 8D 0E 07 STA $070E [$80:070E] A:0080 X:0000 Y:0000 P:eNvMXdIzc $80/983B 8D 40 21 STA $2140 [$80:2140] A:0080 X:0000 Y:0000 P:eNvMXdIzc $80/983E C9 81 CMP #$81 A:0080 X:0000 Y:0000 P:eNvMXdIzc $80/9840 D0 00 BNE $00 [$9842] A:0080 X:0000 Y:0000 P:eNvMXdIzc $80/9842 C9 FD CMP #$FD A:0080 X:0000 Y:0000 P:eNvMXdIzc $80/9844 90 6A BCC $6A ; [$98B0] Exit
code is missing here
$80/98B0 28 PLP ; Restore Flag Register value $80/98B1 6B RTL
$80/995A Transfer Data to SPC
I guess this subroutine is the standard SPC Data Transfer Subroutine by Nintendo. Furthermore, since this ROM is programmed by Nintendo (I guess?), they surely will use this subroutine, too, to transfer song/sfx data. Other developers tended to write their own.
$80/995A 08 PHP ; Buffer Flag Register value on stack $80/995B C2 30 REP #$30 ; A/X/Y = 16 bit $80/995D AC 20 00 LDY $0020 [$80:0020] A:8000 X:00FF Y:0062 P:eNvmxdIzC $80/9960 9C 20 00 STZ $0020 [$80:0020] A:8000 X:00FF Y:8000 P:eNvmxdIzC $80/9963 A9 AA BB LDA #$BBAA ; Is the SPC ready? $80/9966 CD 40 21 CMP $2140 $80/9969 D0 FB BNE $FB ; [$9966] $80/996B E2 20 SEP #$20 ; Send ready signal back $80/996D A9 CC LDA #$CC $80/996F 80 2B BRA $2B ; [$999C]
$80/9971 FA PLX A:51CC X:03FA Y:8004 P:enVMxdIZC $80/9972 B7 20 LDA [$20],y[$9D:8004] A:51CC X:00F0 Y:8004 P:enVMxdIzC $80/9974 20 D5 99 JSR $99D5 ; Inc Y $80/9977 EB XBA A:5120 X:00F0 Y:8005 P:eNVMxdIzC $80/9978 A9 00 LDA #$00 A:2051 X:00F0 Y:8005 P:enVMxdIzC $80/997A 80 0D BRA $0D [$9989] A:2000 X:00F0 Y:8005 P:enVMxdIZC $80/997C EB XBA A:2000 X:00EF Y:8005 P:enVMxdIzC $80/997D B7 20 LDA [$20],y[$9D:8005] A:0020 X:00EF Y:8005 P:enVMxdIzC $80/997F 20 D5 99 JSR $99D5 [$80:99D5] A:0054 X:00EF Y:8005 P:enVMxdIzC $80/9982 EB XBA A:0054 X:00EF Y:8006 P:eNVMxdIzC $80/9983 CD 40 21 CMP $2140 [$80:2140] A:5400 X:00EF Y:8006 P:enVMxdIZC $80/9986 D0 FB BNE $FB [$9983] A:5400 X:00EF Y:8006 P:enVMxdIzc $80/9988 1A INC A A:5400 X:00EF Y:8006 P:enVMxdIZC $80/9989 C2 20 REP #$20 A:2000 X:00F0 Y:8005 P:enVMxdIZC $80/998B 8D 40 21 STA $2140 [$80:2140] A:2000 X:00F0 Y:8005 P:enVmxdIZC $80/998E E2 20 SEP #$20 A:2000 X:00F0 Y:8005 P:enVmxdIZC $80/9990 CA DEX A:2000 X:00F0 Y:8005 P:enVMxdIZC $80/9991 D0 E9 BNE $E9 [$997C] A:2000 X:00EF Y:8005 P:enVMxdIzC $80/9993 CD 40 21 CMP $2140 [$80:2140] A:E4EF X:0 Y:80F4 P:enVMxdIZC $80/9996 D0 FB BNE $FB [$9993] A:E4EF X:0 Y:80F4 P:enVMxdIzC $80/9998 69 03 ADC #$03 A:E4EF X:0 Y:80F4 P:enVMxdIZC $80/999A F0 FC BEQ $FC [$9998] A:E4F3 X:0 Y:80F4 P:eNvMxdIzc $80/999C 48 PHA A:BBCC X:00FF Y:8000 P:eNvMxdIzC $80/999D C2 20 REP #$20 ; A = 16-bit $80/999F B7 20 LDA [$20],y[$9D:8000] A:BBCC X:00FF Y:8000 P:eNvmxdIzC $80/99A1 20 D5 99 JSR $99D5 ; Inc Y $80/99A4 20 D5 99 JSR $99D5 ; Inc Y $80/99A7 AA TAX A:00F0 X:00FF Y:8002 P:eNvmxdIzC $80/99A8 B7 20 LDA [$20],y[$9D:8002] A:00F0 X:00F0 Y:8002 P:envmxdIzC $80/99AA 20 D5 99 JSR $99D5 ; Inc Y $80/99AD 20 D5 99 JSR $99D5 ; Inc Y $80/99B0 8D 42 21 STA $2142 [$80:2142] A:5100 X:00F0 Y:8004 P:eNvmxdIzC $80/99B3 E2 20 SEP #$20 A:5100 X:00F0 Y:8004 P:eNvmxdIzC $80/99B5 E0 01 00 CPX #$0001 A:5100 X:00F0 Y:8004 P:eNvMxdIzC $80/99B8 A9 00 LDA #$00 A:5100 X:00F0 Y:8004 P:envMxdIzC $80/99BA 2A ROL A A:5100 X:00F0 Y:8004 P:envMxdIZC $80/99BB 8D 41 21 STA $2141 [$80:2141] A:5101 X:00F0 Y:8004 P:envMxdIzc $80/99BE 69 7F ADC #$7F A:5101 X:00F0 Y:8004 P:envMxdIzc $80/99C0 68 PLA A:5180 X:00F0 Y:8004 P:eNVMxdIzc $80/99C1 8D 40 21 STA $2140 [$80:2140] A:51CC X:00F0 Y:8004 P:eNVMxdIzc $80/99C4 DA PHX A:51CC X:00F0 Y:8004 P:eNVMxdIzc $80/99C5 A2 00 04 LDX #$0400 A:51CC X:00F0 Y:8004 P:eNVMxdIzc $80/99C8 CA DEX A:51CC X:0400 Y:8004 P:enVMxdIzc $80/99C9 F0 07 BEQ $07 [$99D2] A:51CC X:03FF Y:8004 P:enVMxdIzc $80/99CB CD 40 21 CMP $2140 [$80:2140] A:51CC X:03FF Y:8004 P:enVMxdIzc $80/99CE D0 F8 BNE $F8 [$99C8] A:51CC X:03FF Y:8004 P:enVMxdIzC $80/99D0 70 9F BVS $9F [$9971] A:51CC X:03FA Y:8004 P:enVMxdIZC $80/99D2 FA PLX A:0403 X:03F9 Y:E280 P:envMxdIZC $80/99D3 28 PLP ; Restore Flag Register value $80/99D4 6B RTL
$80/99D5 Increment Load Index Y
This subroutine increments Y. If it turned from #$FFFF to #$0000, its value gets set to #$8000 and the bank of the 24-bit-address in $20-$22 gets incremented.
Side Note: One could save one byte of code if the branch command is a BNE that points to an RTS, but maybe they built it this way to save cycles?
$80/99D5 C8 INY ; Increment Load index $80/99D6 F0 01 BEQ $01 ; [$99D9] Branch if it turned from #$FFFF to #$0000 $80/99D8 60 RTS $80/99D9 E6 22 INC $22 ; Increment bank $80/99DB A0 00 80 LDY #$8000 ; Reset to #$8000 (first byte of the new LoROM bank) $80/99DE 60 RTS
$80/9AF0 ? (Executed when talking to the aerial building)
$80/9AF0 DA PHX A:0060 X:0000 Y:0000 P:envmxdizc $80/9AF1 AD 1D 07 LDA $071D [$80:071D] A:0060 X:0000 Y:0000 P:envmxdizc $80/9AF4 85 89 STA $89 [$00:0089] A:9499 X:0000 Y:0000 P:eNvmxdizc $80/9AF6 AD 1C 07 LDA $071C [$80:071C] A:9499 X:0000 Y:0000 P:eNvmxdizc $80/9AF9 85 88 STA $88 [$00:0088] A:9909 X:0000 Y:0000 P:eNvmxdizc $80/9AFB 8B PHB A:9909 X:0000 Y:0000 P:eNvmxdizc $80/9AFC F4 00 7E PEA $7E00 A:9909 X:0000 Y:0000 P:eNvmxdizc $80/9AFF AB PLB A:9909 X:0000 Y:0000 P:eNvmxdizc $80/9B00 AB PLB A:9909 X:0000 Y:0000 P:envmxdiZc $80/9B01 AE 21 07 LDX $0721 [$7E:0721] A:9909 X:0000 Y:0000 P:envmxdizc $80/9B04 7C 07 9B JMP ($9B07,x)[$80:9B0F] A:9909 X:0002 Y:0000 P:envmxdizc $80/9B0F A2 00 00 LDX #$0000 A:9909 X:0002 Y:0000 P:envmxdizc $80/9B12 AD 1F 07 LDA $071F [$7E:071F] A:9909 X:0000 Y:0000 P:envmxdiZc $80/9B15 18 CLC A:0060 X:0000 Y:0000 P:envmxdizc $80/9B16 69 07 00 ADC #$0007 A:0060 X:0000 Y:0000 P:envmxdizc $80/9B19 4A LSR A A:0067 X:0000 Y:0000 P:envmxdizc $80/9B1A 4A LSR A A:0033 X:0000 Y:0000 P:envmxdizC $80/9B1B 4A LSR A A:0019 X:0000 Y:0000 P:envmxdizC $80/9B1C 80 0C BRA $0C [$9B2A] A:000C X:0000 Y:0000 P:envmxdizC $80/9B2A 48 PHA A:000C X:0000 Y:0000 P:envmxdizC $80/9B2B A0 00 00 LDY #$0000 A:000C X:0000 Y:0000 P:envmxdizC $80/9B2E B7 88 LDA [$88],y[$94:9909] A:000C X:0000 Y:0000 P:envmxdiZC $80/9B30 9D 00 7E STA $7E00,x[$7E:7E00] A:FFFF X:0000 Y:0000 P:eNvmxdizC $80/9B33 9D 00 82 STA $8200,x[$7E:8200] A:FFFF X:0000 Y:0000 P:eNvmxdizC $80/9B36 C8 INY A:FFFF X:0000 Y:0000 P:eNvmxdizC $80/9B37 C8 INY A:FFFF X:0000 Y:0001 P:envmxdizC $80/9B38 9D 02 7E STA $7E02,x[$7E:7E02] A:FFFF X:0000 Y:0002 P:envmxdizC $80/9B3B 9D 02 82 STA $8202,x[$7E:8202] A:FFFF X:0000 Y:0002 P:envmxdizC $80/9B3E C8 INY A:FFFF X:0000 Y:0002 P:envmxdizC $80/9B3F C8 INY A:FFFF X:0000 Y:0003 P:envmxdizC $80/9B40 9D 04 7E STA $7E04,x[$7E:7E04] A:FFFF X:0000 Y:0004 P:envmxdizC $80/9B43 9D 04 82 STA $8204,x[$7E:8204] A:FFFF X:0000 Y:0004 P:envmxdizC $80/9B46 C8 INY A:FFFF X:0000 Y:0004 P:envmxdizC $80/9B47 C8 INY A:FFFF X:0000 Y:0005 P:envmxdizC $80/9B48 9D 06 7E STA $7E06,x[$7E:7E06] A:FFFF X:0000 Y:0006 P:envmxdizC $80/9B4B 9D 06 82 STA $8206,x[$7E:8206] A:FFFF X:0000 Y:0006 P:envmxdizC $80/9B4E C8 INY A:FFFF X:0000 Y:0006 P:envmxdizC $80/9B4F C8 INY A:FFFF X:0000 Y:0007 P:envmxdizC $80/9B50 9D 08 7E STA $7E08,x[$7E:7E08] A:FFFF X:0000 Y:0008 P:envmxdizC $80/9B53 9D 08 82 STA $8208,x[$7E:8208] A:FFFF X:0000 Y:0008 P:envmxdizC $80/9B56 C8 INY A:FFFF X:0000 Y:0008 P:envmxdizC $80/9B57 C8 INY A:FFFF X:0000 Y:0009 P:envmxdizC $80/9B58 9D 0A 7E STA $7E0A,x[$7E:7E0A] A:FFFF X:0000 Y:000A P:envmxdizC $80/9B5B 9D 0A 82 STA $820A,x[$7E:820A] A:FFFF X:0000 Y:000A P:envmxdizC $80/9B5E C8 INY A:FFFF X:0000 Y:000A P:envmxdizC $80/9B5F C8 INY A:FFFF X:0000 Y:000B P:envmxdizC $80/9B60 9D 0C 7E STA $7E0C,x[$7E:7E0C] A:FFFF X:0000 Y:000C P:envmxdizC $80/9B63 9D 0C 82 STA $820C,x[$7E:820C] A:FFFF X:0000 Y:000C P:envmxdizC $80/9B66 C8 INY A:FFFF X:0000 Y:000C P:envmxdizC $80/9B67 C8 INY A:FFFF X:0000 Y:000D P:envmxdizC $80/9B68 9D 0E 7E STA $7E0E,x[$7E:7E0E] A:FFFF X:0000 Y:000E P:envmxdizC $80/9B6B 9D 0E 82 STA $820E,x[$7E:820E] A:FFFF X:0000 Y:000E P:envmxdizC $80/9B6E 8A TXA A:FFFF X:0000 Y:000E P:envmxdizC $80/9B6F 18 CLC A:0000 X:0000 Y:000E P:envmxdiZC $80/9B70 69 10 00 ADC #$0010 A:0000 X:0000 Y:000E P:envmxdiZc $80/9B73 AA TAX A:0010 X:0000 Y:000E P:envmxdizc $80/9B74 68 PLA A:0010 X:0010 Y:000E P:envmxdizc $80/9B75 3A DEC A A:000C X:0010 Y:000E P:envmxdizc $80/9B76 D0 B2 BNE $B2 [$9B2A] A:000B X:0010 Y:000E P:envmxdizc $80/9B78 AB PLB A:0000 X:00C0 Y:000E P:envmxdiZc $80/9B79 FA PLX A:0000 X:00C0 Y:000E P:eNvmxdizc $80/9B7A 9C 35 07 STZ $0735 [$80:0735] A:0000 X:0000 Y:000E P:envmxdiZc $80/9B7D 6B RTL A:0000 X:0000 Y:000E P:envmxdiZc
$80/9C23 Store A into $7E/7600 to $7E/7DFF
$80/9C23 08 PHP ; Buffer Flag Register value and Data Bank on stack $80/9C24 8B PHB $80/9C25 F4 00 7E PEA $7E00 ; Set Data Bank to $7E $80/9C28 AB PLB $80/9C29 AB PLB $80/9C2A C2 30 REP #$30 ; A/X/Y = 16-bit $80/9C2C A2 FE 00 LDX #$00FE ; Loop $80/9C2F 9D 00 76 STA $7600,x $80/9C32 9D 00 77 STA $7700,x $80/9C35 9D 00 78 STA $7800,x $80/9C38 9D 00 79 STA $7900,x $80/9C3B 9D 00 7A STA $7A00,x $80/9C3E 9D 00 7B STA $7B00,x $80/9C41 9D 00 7C STA $7C00,x $80/9C44 9D 00 7D STA $7D00,x $80/9C47 CA DEX $80/9C48 CA DEX $80/9C49 10 E4 BPL $E4 ; [$9C2F] $80/9C4B AB PLB ; Restore Flag Register value and Data Bank $80/9C4C 28 PLP $80/9C4D 6B RTL
$80/9C4E ? (VRAM DMA)
Transfers #$800 byte from $7E/7600 to VRAM
$80/9C4E AD 42 07 LDA $0742 ; Is flag set for VRAM DMA? $80/9C51 F0 2E BEQ $2E ; [$9C81] Exit if not $80/9C53 E2 10 SEP #$10 ; X/Y = 8-bit $80/9C55 A9 01 18 LDA #$1801 ; 16-bit transfer to $2118 (VRAM) $80/9C58 8D 00 43 STA $4300 $80/9C5B A9 00 76 LDA #$7600 ; Source: $7E/7600 $80/9C5E 8D 02 43 STA $4302 $80/9C61 A2 7E LDX #$7E $80/9C63 8E 04 43 STX $4304 $80/9C66 A9 00 08 LDA #$0800 ; Transfer #$800 byte $80/9C69 8D 05 43 STA $4305 $80/9C6C A2 80 LDX #$80 ; 16-bit transfer $80/9C6E 8E 15 21 STX $2115 $80/9C71 AD 29 07 LDA $0729 ; Set VRAM destination $80/9C74 8D 16 21 STA $2116 $80/9C77 A2 01 LDX #$01 ; Activate DMA $80/9C79 8E 0B 42 STX $420B $80/9C7C 9C 42 07 STZ $0742 ; Remove flag for VRAM DMA $80/9C7F C2 10 REP #$10 ; X/Y = 16-bit $80/9C81 6B RTL
$80/9C89 ? (Executed when talking to the aerial building)
$80/9C89 8B PHB A:95FA X:0004 Y:000E P:envmxdizC $80/9C8A 4B PHK A:95FA X:0004 Y:000E P:envmxdizC $80/9C8B AB PLB A:95FA X:0004 Y:000E P:envmxdizC $80/9C8C C9 FF FF CMP #$FFFF A:95FA X:0004 Y:000E P:eNvmxdizC $80/9C8F F0 43 BEQ $43 [$9CD4] A:95FA X:0004 Y:000E P:eNvmxdizc $80/9C91 A2 00 00 LDX #$0000 A:95FA X:0004 Y:000E P:eNvmxdizc $80/9C94 DD D7 9C CMP $9CD7,x[$80:9CD7] A:95FA X:0000 Y:000E P:envmxdiZc $80/9C97 90 3B BCC $3B [$9CD4] A:95FA X:0000 Y:000E P:envmxdizC $80/9C99 DD D9 9C CMP $9CD9,x[$80:9CD9] A:95FA X:0000 Y:000E P:envmxdizC $80/9C9C 90 0A BCC $0A [$9CA8] A:95FA X:0000 Y:000E P:envmxdizC $80/9C9E E8 INX A:95FA X:0000 Y:000E P:envmxdizC $80/9C9F E8 INX A:95FA X:0001 Y:000E P:envmxdizC $80/9CA0 E8 INX A:95FA X:0002 Y:000E P:envmxdizC $80/9CA1 E8 INX A:95FA X:0003 Y:000E P:envmxdizC $80/9CA2 E8 INX A:95FA X:0004 Y:000E P:envmxdizC $80/9CA3 E8 INX A:95FA X:0005 Y:000E P:envmxdizC $80/9CA4 E8 INX A:95FA X:0006 Y:000E P:envmxdizC $80/9CA5 E8 INX A:95FA X:0007 Y:000E P:envmxdizC $80/9CA6 80 EC BRA $EC [$9C94] A:95FA X:0008 Y:000E P:envmxdizC $80/9CA8 48 PHA A:95FA X:0038 Y:000E P:eNvmxdizc $80/9CA9 BD DC 9C LDA $9CDC,x[$80:9D14] A:95FA X:0038 Y:000E P:eNvmxdizc $80/9CAC 85 8C STA $8C [$00:008C] A:8B80 X:0038 Y:000E P:eNvmxdizc $80/9CAE 68 PLA A:8B80 X:0038 Y:000E P:eNvmxdizc $80/9CAF 38 SEC A:95FA X:0038 Y:000E P:eNvmxdizc $80/9CB0 FD D7 9C SBC $9CD7,x[$80:9D0F] A:95FA X:0038 Y:000E P:eNvmxdizC $80/9CB3 0A ASL A A:0549 X:0038 Y:000E P:envmxdizC $80/9CB4 0A ASL A A:0A92 X:0038 Y:000E P:envmxdizc $80/9CB5 0A ASL A A:1524 X:0038 Y:000E P:envmxdizc $80/9CB6 48 PHA A:2A48 X:0038 Y:000E P:envmxdizc $80/9CB7 0A ASL A A:2A48 X:0038 Y:000E P:envmxdizc $80/9CB8 18 CLC A:5490 X:0038 Y:000E P:envmxdizc $80/9CB9 63 01 ADC $01,s [$00:1E8B] A:5490 X:0038 Y:000E P:envmxdizc $80/9CBB 18 CLC A:7ED8 X:0038 Y:000E P:envmxdizc $80/9CBC 7D DB 9C ADC $9CDB,x[$80:9D13] A:7ED8 X:0038 Y:000E P:envmxdizc $80/9CBF 85 8B STA $8B [$00:008B] A:FED8 X:0038 Y:000E P:eNvmxdizc $80/9CC1 68 PLA A:FED8 X:0038 Y:000E P:eNvmxdizc $80/9CC2 BD DE 9C LDA $9CDE,x[$80:9D16] A:2A48 X:0038 Y:000E P:envmxdizc $80/9CC5 29 FF 00 AND #$00FF A:060C X:0038 Y:000E P:envmxdizc $80/9CC8 8D 39 07 STA $0739 [$80:0739] A:000C X:0038 Y:000E P:envmxdizc $80/9CCB A9 18 00 LDA #$0018 A:000C X:0038 Y:000E P:envmxdizc $80/9CCE 8D 3B 07 STA $073B [$80:073B] A:0018 X:0038 Y:000E P:envmxdizc $80/9CD1 AB PLB A:0018 X:0038 Y:000E P:envmxdizc $80/9CD2 18 CLC A:0018 X:0038 Y:000E P:eNvmxdizc $80/9CD3 6B RTL A:0018 X:0038 Y:000E P:eNvmxdizc
$80/9CD7 Data for $80/9C89
data is missing here
$80/9D49 ? (Executed when talking to the aerial building)
$80/9D49 B7 8B LDA [$8B],y[$8B:FED8] A:7E00 X:7E32 Y:0000 P:envmxdiZc $80/9D4B EB XBA A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D4C 85 8E STA $8E [$00:008E] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D4E AF 25 07 00 LDA $000725[$00:0725] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D52 85 90 STA $90 [$00:0090] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D54 89 02 00 BIT #$0002 A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D57 F0 07 BEQ $07 [$9D60] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D60 A5 90 LDA $90 [$00:0090] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D62 89 01 00 BIT #$0001 A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D65 F0 10 BEQ $10 [$9D77] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D77 A5 90 LDA $90 [$00:0090] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D79 89 04 00 BIT #$0004 A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D7C F0 17 BEQ $17 [$9D95] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D95 A5 8E LDA $8E [$00:008E] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/9D97 60 RTS A:0000 X:7E32 Y:0000 P:envmxdiZc
$80/9DDA ? (Executed when talking to the aerial building)
$80/9DDA AE 21 07 LDX $0721 [$80:0721] A:002A X:0038 Y:000E P:eNvmxdizc $80/9DDD BF 0B 9F 80 LDA $809F0B,x[$80:9F0D] A:002A X:0002 Y:000E P:envmxdizc $80/9DE1 18 CLC A:0000 X:0002 Y:000E P:envmxdiZc $80/9DE2 6D 23 07 ADC $0723 [$80:0723] A:0000 X:0002 Y:000E P:envmxdiZc $80/9DE5 0A ASL A A:0001 X:0002 Y:000E P:envmxdizc $80/9DE6 AA TAX A:0002 X:0002 Y:000E P:envmxdizc $80/9DE7 BF 13 9F 80 LDA $809F13,x[$80:9F15] A:0002 X:0002 Y:000E P:envmxdizc $80/9DEB 85 88 STA $88 [$00:0088] A:9E2F X:0002 Y:000E P:eNvmxdizc $80/9DED 60 RTS A:9E2F X:0002 Y:000E P:eNvmxdizc
$80/9E2F ? (Executed when talking to the aerial building)
$80/9E2F E2 20 SEP #$20 A:0108 X:7E34 Y:0020 P:envmxdiZC $80/9E31 A5 91 LDA $91 [$00:0091] A:0108 X:7E34 Y:0020 P:envMxdiZC $80/9E33 F0 10 BEQ $10 [$9E45] A:0101 X:7E34 Y:0020 P:envMxdizC $80/9E35 1D 00 00 ORA $0000,x[$7E:7E34] A:0101 X:7E34 Y:0020 P:envMxdizC $80/9E38 9D 00 00 STA $0000,x[$7E:7E34] A:01FF X:7E34 Y:0020 P:eNvMxdizC $80/9E3B A5 91 LDA $91 [$00:0091] A:01FF X:7E34 Y:0020 P:eNvMxdizC $80/9E3D 49 FF EOR #$FF A:0101 X:7E34 Y:0020 P:envMxdizC $80/9E3F 3D 01 00 AND $0001,x[$7E:7E35] A:01FE X:7E34 Y:0020 P:eNvMxdizC $80/9E42 9D 01 00 STA $0001,x[$7E:7E35] A:01FE X:7E34 Y:0020 P:eNvMxdizC $80/9E45 A5 90 LDA $90 [$00:0090] A:01FE X:7E34 Y:0020 P:eNvMxdizC $80/9E47 F0 10 BEQ $10 [$9E59] A:0108 X:7E34 Y:0020 P:envMxdizC $80/9E49 1D 10 00 ORA $0010,x[$7E:7E44] A:0108 X:7E34 Y:0020 P:envMxdizC $80/9E4C 9D 10 00 STA $0010,x[$7E:7E44] A:01FF X:7E34 Y:0020 P:eNvMxdizC $80/9E4F A5 90 LDA $90 [$00:0090] A:01FF X:7E34 Y:0020 P:eNvMxdizC $80/9E51 49 FF EOR #$FF A:0108 X:7E34 Y:0020 P:envMxdizC $80/9E53 3D 11 00 AND $0011,x[$7E:7E45] A:01F7 X:7E34 Y:0020 P:eNvMxdizC $80/9E56 9D 11 00 STA $0011,x[$7E:7E45] A:01F7 X:7E34 Y:0020 P:eNvMxdizC $80/9E59 A5 8F LDA $8F [$00:008F] A:01F7 X:7E34 Y:0020 P:eNvMxdizC $80/9E5B F0 10 BEQ $10 [$9E6D] A:0100 X:7E34 Y:0020 P:envMxdiZC $80/9E5D 1D 20 00 ORA $0020,x[$7E:7E58] A:0380 X:7E38 Y:0020 P:eNvMxdizC $80/9E60 9D 20 00 STA $0020,x[$7E:7E58] A:03FF X:7E38 Y:0020 P:eNvMxdizC $80/9E63 A5 8F LDA $8F [$00:008F] A:03FF X:7E38 Y:0020 P:eNvMxdizC $80/9E65 49 FF EOR #$FF A:0380 X:7E38 Y:0020 P:eNvMxdizC $80/9E67 3D 21 00 AND $0021,x[$7E:7E59] A:037F X:7E38 Y:0020 P:envMxdizC $80/9E6A 9D 21 00 STA $0021,x[$7E:7E59] A:037F X:7E38 Y:0020 P:envMxdizC $80/9E6D C2 20 REP #$20 A:0100 X:7E34 Y:0020 P:envMxdiZC $80/9E6F 60 RTS A:0100 X:7E34 Y:0020 P:envmxdiZC
$80/9F1F ? (Executed when talking to the aerial building)
$80/9F1F A4 92 LDY $92 [$00:0092] A:4200 X:7E34 Y:0002 P:envmxdizc $80/9F21 84 8E STY $8E [$00:008E] A:4200 X:7E34 Y:0020 P:envmxdizc $80/9F23 F0 05 BEQ $05 [$9F2A] A:4200 X:7E34 Y:0020 P:envmxdizc $80/9F25 4A LSR A A:4200 X:7E34 Y:0020 P:envmxdizc $80/9F26 66 8E ROR $8E [$00:008E] A:2100 X:7E34 Y:0020 P:envmxdizc $80/9F28 90 FB BCC $FB [$9F25] A:2100 X:7E34 Y:0020 P:envmxdizc $80/9F2A 85 90 STA $90 [$00:0090] A:0108 X:7E34 Y:0020 P:envmxdiZC $80/9F2C 6C 88 00 JMP ($0088)[$80:9E2F] A:0108 X:7E34 Y:0020 P:envmxdiZC
$80/9F55 ? (Executed when talking to the aerial building)
$80/9F55 08 PHP A:00B0 X:0002 Y:000E P:envmxdizC $80/9F56 C2 30 REP #$30 A:00B0 X:0002 Y:000E P:envmxdizC $80/9F58 A7 85 LDA [$85] [$88:A1E1] A:00B0 X:0002 Y:000E P:envmxdizC $80/9F5A 29 FF 00 AND #$00FF A:4081 X:0002 Y:000E P:envmxdizC $80/9F5D AA TAX A:0081 X:0002 Y:000E P:envmxdizC $80/9F5E BF FD A2 80 LDA $80A2FD,x[$80:A37E] A:0081 X:0081 Y:000E P:envmxdizC $80/9F62 29 FF 00 AND #$00FF A:0202 X:0081 Y:000E P:envmxdizC $80/9F65 0A ASL A A:0002 X:0081 Y:000E P:envmxdizC $80/9F66 AA TAX A:0004 X:0081 Y:000E P:envmxdizc $80/9F67 7C 6A 9F JMP ($9F6A,x)[$80:9FE5] A:0004 X:0004 Y:000E P:envmxdizc
$80/9F6A Jump Table for $80/9F55
data is missing here
$80/9F7D ? (Executed when talking to the aerial building)
$80/9F7D AD 3D 07 LDA $073D [$80:073D] A:002A X:823A Y:0018 P:eNvmxdizc $80/9F80 F0 D6 BEQ $D6 [$9F58] A:0000 X:823A Y:0018 P:envmxdiZc
$80/9F85 ? (Executed when talking to the aerial building)
$80/9F85 AD 44 07 LDA $0744 [$80:0744] A:0002 X:0002 Y:000E P:envmxdizc $80/9F88 89 01 00 BIT #$0001 A:0000 X:0002 Y:000E P:envmxdiZc $80/9F8B F0 12 BEQ $12 [$9F9F] A:0000 X:0002 Y:000E P:envmxdiZc
$80/9F9F A7 85 LDA [$85] [$88:A1E5] A:0000 X:0002 Y:000E P:envmxdiZc $80/9FA1 29 FF 00 AND #$00FF A:9520 X:0002 Y:000E P:eNvmxdizc $80/9FA4 C9 20 00 CMP #$0020 A:0020 X:0002 Y:000E P:envmxdizc $80/9FA7 F0 23 BEQ $23 [$9FCC] A:0020 X:0002 Y:000E P:envmxdiZC
$80/9FCC AD 35 07 LDA $0735 [$80:0735] A:0020 X:0002 Y:000E P:envmxdiZC $80/9FCF 18 CLC A:0018 X:0002 Y:000E P:envmxdizC $80/9FD0 69 06 00 ADC #$0006 A:0018 X:0002 Y:000E P:envmxdizc $80/9FD3 CD 1F 07 CMP $071F [$80:071F] A:001E X:0002 Y:000E P:envmxdizc $80/9FD6 F0 05 BEQ $05 [$9FDD] A:001E X:0002 Y:000E P:eNvmxdizc $80/9FD8 90 03 BCC $03 [$9FDD] A:001E X:0002 Y:000E P:eNvmxdizc $80/9FDD 8D 35 07 STA $0735 [$80:0735] A:001E X:0002 Y:000E P:eNvmxdizc $80/9FE0 E6 85 INC $85 [$00:0085] A:001E X:0002 Y:000E P:eNvmxdizc $80/9FE2 82 73 FF BRL $FF73 [$9F58] A:001E X:0002 Y:000E P:eNvmxdizc
$80/9FE5 ? (Executed when talking to the aerial building)
$80/9FE5 AD 44 07 LDA $0744 [$80:0744] A:0004 X:0004 Y:000E P:envmxdizc $80/9FE8 89 01 00 BIT #$0001 A:0000 X:0004 Y:000E P:envmxdiZc $80/9FEB F0 0F BEQ $0F [$9FFC] A:0000 X:0004 Y:000E P:envmxdiZc
$80/9FFC A7 85 LDA [$85] [$88:A1E1] A:0000 X:0004 Y:000E P:envmxdiZc $80/9FFE EB XBA A:4081 X:0004 Y:000E P:envmxdizc $80/9FFF C9 40 81 CMP #$8140 A:8140 X:0004 Y:000E P:envmxdizc $80/A002 F0 22 BEQ $22 [$A026] A:8140 X:0004 Y:000E P:envmxdiZC $80/A004 22 89 9C 80 JSL $809C89[$80:9C89] A:95FA X:0004 Y:000E P:envmxdizC $80/A008 B0 19 BCS $19 [$A023] A:0018 X:0038 Y:000E P:eNvmxdizc $80/A00A AD 35 07 LDA $0735 [$80:0735] A:0018 X:0038 Y:000E P:eNvmxdizc $80/A00D 18 CLC A:001E X:0038 Y:000E P:envmxdizc $80/A00E 6D 39 07 ADC $0739 [$80:0739] A:001E X:0038 Y:000E P:envmxdizc $80/A011 CD 1F 07 CMP $071F [$80:071F] A:002A X:0038 Y:000E P:envmxdizc $80/A014 F0 05 BEQ $05 [$A01B] A:002A X:0038 Y:000E P:eNvmxdizc $80/A016 90 03 BCC $03 [$A01B] A:002A X:0038 Y:000E P:eNvmxdizc $80/A01B 22 83 A7 80 JSL $80A783[$80:A783] A:002A X:0038 Y:000E P:eNvmxdizc $80/A01F E6 85 INC $85 [$00:0085] A:002A X:823A Y:0018 P:eNvmxdizc $80/A021 E6 85 INC $85 [$00:0085] A:002A X:823A Y:0018 P:eNvmxdizc $80/A023 82 57 FF BRL $FF57 [$9F7D] A:002A X:823A Y:0018 P:eNvmxdizc $80/A026 AD 35 07 LDA $0735 [$80:0735] A:8140 X:0004 Y:000E P:envmxdiZC $80/A029 18 CLC A:0000 X:0004 Y:000E P:envmxdiZC $80/A02A 69 0C 00 ADC #$000C A:0000 X:0004 Y:000E P:envmxdiZc $80/A02D CD 1F 07 CMP $071F [$80:071F] A:000C X:0004 Y:000E P:envmxdizc $80/A030 F0 05 BEQ $05 [$A037] A:000C X:0004 Y:000E P:eNvmxdizc $80/A032 90 03 BCC $03 [$A037] A:000C X:0004 Y:000E P:eNvmxdizc $80/A037 8D 35 07 STA $0735 [$80:0735] A:000C X:0004 Y:000E P:eNvmxdizc $80/A03A E6 85 INC $85 [$00:0085] A:000C X:0004 Y:000E P:eNvmxdizc $80/A03C E6 85 INC $85 [$00:0085] A:000C X:0004 Y:000E P:eNvmxdizc $80/A03E 82 17 FF BRL $FF17 [$9F58] A:000C X:0004 Y:000E P:eNvmxdizc
$80/A217 ? (Executed when talking to the aerial building)
$80/A217 AD 3F 07 LDA $073F [$80:073F] A:0008 X:0008 Y:0018 P:envmxdizc $80/A21A 0D 40 07 ORA $0740 [$80:0740] A:0000 X:0008 Y:0018 P:envmxdiZc $80/A21D F0 19 BEQ $19 [$A238] A:0000 X:0008 Y:0018 P:envmxdiZc
code is missing here
$80/A238 28 PLP A:0000 X:0008 Y:0018 P:envmxdiZc $80/A239 C2 40 REP #$40 A:0000 X:0008 Y:0018 P:envmxdizC $80/A23B 08 PHP A:0000 X:0008 Y:0018 P:envmxdizC $80/A23C AD 35 07 LDA $0735 [$80:0735] A:0000 X:0008 Y:0018 P:envmxdizC $80/A23F CD 37 07 CMP $0737 [$80:0737] A:0060 X:0008 Y:0018 P:envmxdizC $80/A242 D0 03 BNE $03 [$A247] A:0060 X:0008 Y:0018 P:envmxdizC $80/A247 E2 10 SEP #$10 A:0060 X:0008 Y:0018 P:envmxdizC $80/A249 AD 2F 07 LDA $072F [$80:072F] A:0060 X:0008 Y:0018 P:envmXdizC $80/A24C 29 FF 03 AND #$03FF A:20B0 X:0008 Y:0018 P:envmXdizC $80/A24F 0A ASL A A:00B0 X:0008 Y:0018 P:envmXdizC $80/A250 0A ASL A A:0160 X:0008 Y:0018 P:envmXdizc $80/A251 0A ASL A A:02C0 X:0008 Y:0018 P:envmXdizc $80/A252 18 CLC A:0580 X:0008 Y:0018 P:envmXdizc $80/A253 6D 27 07 ADC $0727 [$80:0727] A:0580 X:0008 Y:0018 P:envmXdizc $80/A256 48 PHA A:5580 X:0008 Y:0018 P:envmXdizc $80/A257 A2 80 LDX #$80 A:5580 X:0008 Y:0018 P:envmXdizc $80/A259 DA PHX A:5580 X:0080 Y:0018 P:eNvmXdizc $80/A25A AE 21 07 LDX $0721 [$80:0721] A:5580 X:0080 Y:0018 P:eNvmXdizc $80/A25D AD 37 07 LDA $0737 [$80:0737] A:5580 X:0002 Y:0018 P:envmXdizc $80/A260 3F FD A3 80 AND $80A3FD,x[$80:A3FF] A:0000 X:0002 Y:0018 P:envmXdiZc $80/A264 48 PHA A:0000 X:0002 Y:0018 P:envmXdiZc $80/A265 AD 35 07 LDA $0735 [$80:0735] A:0000 X:0002 Y:0018 P:envmXdiZc $80/A268 38 SEC A:0060 X:0002 Y:0018 P:envmXdizc $80/A269 E3 01 SBC $01,s [$00:1E8C] A:0060 X:0002 Y:0018 P:envmXdizC $80/A26B 18 CLC A:0060 X:0002 Y:0018 P:envmXdizC $80/A26C 7F 05 A4 80 ADC $80A405,x[$80:A407] A:0060 X:0002 Y:0018 P:envmXdizc $80/A270 3F FD A3 80 AND $80A3FD,x[$80:A3FF] A:0067 X:0002 Y:0018 P:envmXdizc $80/A274 0A ASL A A:0060 X:0002 Y:0018 P:envmXdizc $80/A275 83 01 STA $01,s [$00:1E8C] A:00C0 X:0002 Y:0018 P:envmXdizc $80/A277 A2 7E LDX #$7E A:00C0 X:0002 Y:0018 P:envmXdizc $80/A279 DA PHX A:00C0 X:007E Y:0018 P:envmXdizc $80/A27A AE 21 07 LDX $0721 [$80:0721] A:00C0 X:007E Y:0018 P:envmXdizc $80/A27D AD 37 07 LDA $0737 [$80:0737] A:00C0 X:0002 Y:0018 P:envmXdizc $80/A280 3F FD A3 80 AND $80A3FD,x[$80:A3FF] A:0000 X:0002 Y:0018 P:envmXdiZc $80/A284 0A ASL A A:0000 X:0002 Y:0018 P:envmXdiZc $80/A285 18 CLC A:0000 X:0002 Y:0018 P:envmXdiZc $80/A286 69 00 7E ADC #$7E00 A:0000 X:0002 Y:0018 P:envmXdiZc $80/A289 48 PHA A:7E00 X:0002 Y:0018 P:envmXdizc $80/A28A A2 02 LDX #$02 A:7E00 X:0002 Y:0018 P:envmXdizc $80/A28C DA PHX A:7E00 X:0002 Y:0018 P:envmXdizc $80/A28D C2 10 REP #$10 A:7E00 X:0002 Y:0018 P:envmXdizc $80/A28F BA TSX A:7E00 X:0002 Y:0018 P:envmxdizc $80/A290 E8 INX A:7E00 X:1E87 Y:0018 P:envmxdizc $80/A291 A9 00 00 LDA #$0000 A:7E00 X:1E88 Y:0018 P:envmxdizc $80/A294 22 2A 8C 80 JSL $808C2A[$80:8C2A] A:0000 X:1E88 Y:0018 P:envmxdiZc $80/A298 3B TSC A:0000 X:1E88 Y:0018 P:envmxdiZc $80/A299 18 CLC A:1E87 X:1E88 Y:0018 P:envmxdizc $80/A29A 69 09 00 ADC #$0009 A:1E87 X:1E88 Y:0018 P:envmxdizc $80/A29D 1B TCS A:1E90 X:1E88 Y:0018 P:envmxdizc $80/A29E E2 10 SEP #$10 A:1E90 X:1E88 Y:0018 P:envmxdizc $80/A2A0 AD 31 07 LDA $0731 [$80:0731] A:1E90 X:0088 Y:0018 P:envmXdizc $80/A2A3 29 FF 03 AND #$03FF A:20BC X:0088 Y:0018 P:envmXdizc $80/A2A6 0A ASL A A:00BC X:0088 Y:0018 P:envmXdizc $80/A2A7 0A ASL A A:0178 X:0088 Y:0018 P:envmXdizc $80/A2A8 0A ASL A A:02F0 X:0088 Y:0018 P:envmXdizc $80/A2A9 18 CLC A:05E0 X:0088 Y:0018 P:envmXdizc $80/A2AA 6D 27 07 ADC $0727 [$80:0727] A:05E0 X:0088 Y:0018 P:envmXdizc $80/A2AD 48 PHA A:55E0 X:0088 Y:0018 P:envmXdizc $80/A2AE A2 80 LDX #$80 A:55E0 X:0088 Y:0018 P:envmXdizc $80/A2B0 DA PHX A:55E0 X:0080 Y:0018 P:eNvmXdizc $80/A2B1 AE 21 07 LDX $0721 [$80:0721] A:55E0 X:0080 Y:0018 P:eNvmXdizc $80/A2B4 AD 37 07 LDA $0737 [$80:0737] A:55E0 X:0002 Y:0018 P:envmXdizc $80/A2B7 3F FD A3 80 AND $80A3FD,x[$80:A3FF] A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2BB 48 PHA A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2BC AD 35 07 LDA $0735 [$80:0735] A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2BF 38 SEC A:0060 X:0002 Y:0018 P:envmXdizc $80/A2C0 E3 01 SBC $01,s [$00:1E8C] A:0060 X:0002 Y:0018 P:envmXdizC $80/A2C2 18 CLC A:0060 X:0002 Y:0018 P:envmXdizC $80/A2C3 7F 05 A4 80 ADC $80A405,x[$80:A407] A:0060 X:0002 Y:0018 P:envmXdizc $80/A2C7 3F FD A3 80 AND $80A3FD,x[$80:A3FF] A:0067 X:0002 Y:0018 P:envmXdizc $80/A2CB 0A ASL A A:0060 X:0002 Y:0018 P:envmXdizc $80/A2CC 83 01 STA $01,s [$00:1E8C] A:00C0 X:0002 Y:0018 P:envmXdizc $80/A2CE A2 7E LDX #$7E A:00C0 X:0002 Y:0018 P:envmXdizc $80/A2D0 DA PHX A:00C0 X:007E Y:0018 P:envmXdizc $80/A2D1 AE 21 07 LDX $0721 [$80:0721] A:00C0 X:007E Y:0018 P:envmXdizc $80/A2D4 AD 37 07 LDA $0737 [$80:0737] A:00C0 X:0002 Y:0018 P:envmXdizc $80/A2D7 3F FD A3 80 AND $80A3FD,x[$80:A3FF] A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2DB 0A ASL A A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2DC 18 CLC A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2DD 69 00 82 ADC #$8200 A:0000 X:0002 Y:0018 P:envmXdiZc $80/A2E0 48 PHA A:8200 X:0002 Y:0018 P:eNvmXdizc $80/A2E1 A2 02 LDX #$02 A:8200 X:0002 Y:0018 P:eNvmXdizc $80/A2E3 DA PHX A:8200 X:0002 Y:0018 P:envmXdizc $80/A2E4 C2 10 REP #$10 A:8200 X:0002 Y:0018 P:envmXdizc $80/A2E6 BA TSX A:8200 X:0002 Y:0018 P:envmxdizc $80/A2E7 E8 INX A:8200 X:1E87 Y:0018 P:envmxdizc $80/A2E8 A9 00 00 LDA #$0000 A:8200 X:1E88 Y:0018 P:envmxdizc $80/A2EB 22 2A 8C 80 JSL $808C2A[$80:8C2A] A:0000 X:1E88 Y:0018 P:envmxdiZc $80/A2EF 3B TSC A:0000 X:1E88 Y:0018 P:envmxdiZc $80/A2F0 18 CLC A:1E87 X:1E88 Y:0018 P:envmxdizc $80/A2F1 69 09 00 ADC #$0009 A:1E87 X:1E88 Y:0018 P:envmxdizc $80/A2F4 1B TCS A:1E90 X:1E88 Y:0018 P:envmxdizc $80/A2F5 28 PLP A:1E90 X:1E88 Y:0018 P:envmxdizc $80/A2F6 18 CLC A:1E90 X:1E88 Y:0018 P:envmxdizC $80/A2F7 6B RTL A:1E90 X:1E88 Y:0018 P:envmxdizc
$80/A605 ? (Executed when talking to the aerial building)
$80/A605 AD 35 07 LDA $0735 [$80:0735] A:1E90 X:1E88 Y:0018 P:envmxdizc $80/A608 CD 37 07 CMP $0737 [$80:0737] A:0060 X:1E88 Y:0018 P:envmxdizc $80/A60B F0 6A BEQ $6A [$A677] A:0060 X:1E88 Y:0018 P:envmxdizC $80/A60D A9 00 7E LDA #$7E00 A:0060 X:1E88 Y:0018 P:envmxdizC $80/A610 85 89 STA $89 [$00:0089] A:7E00 X:1E88 Y:0018 P:envmxdizC $80/A612 85 8C STA $8C [$00:008C] A:7E00 X:1E88 Y:0018 P:envmxdizC $80/A614 A9 00 76 LDA #$7600 A:7E00 X:1E88 Y:0018 P:envmxdizC $80/A617 85 88 STA $88 [$00:0088] A:7600 X:1E88 Y:0018 P:envmxdizC $80/A619 18 CLC A:7600 X:1E88 Y:0018 P:envmxdizC $80/A61A 69 40 00 ADC #$0040 A:7600 X:1E88 Y:0018 P:envmxdizc $80/A61D 85 8B STA $8B [$00:008B] A:7640 X:1E88 Y:0018 P:envmxdizc $80/A61F AD 2D 07 LDA $072D [$80:072D] A:7640 X:1E88 Y:0018 P:envmxdizc $80/A622 0A ASL A A:0010 X:1E88 Y:0018 P:envmxdizc $80/A623 0A ASL A A:0020 X:1E88 Y:0018 P:envmxdizc $80/A624 0A ASL A A:0040 X:1E88 Y:0018 P:envmxdizc $80/A625 0A ASL A A:0080 X:1E88 Y:0018 P:envmxdizc $80/A626 0A ASL A A:0100 X:1E88 Y:0018 P:envmxdizc $80/A627 18 CLC A:0200 X:1E88 Y:0018 P:envmxdizc $80/A628 6D 2B 07 ADC $072B [$80:072B] A:0200 X:1E88 Y:0018 P:envmxdizc $80/A62B 0A ASL A A:0202 X:1E88 Y:0018 P:envmxdizc $80/A62C A8 TAY A:0404 X:1E88 Y:0018 P:envmxdizc $80/A62D AE 21 07 LDX $0721 [$80:0721] A:0404 X:1E88 Y:0404 P:envmxdizc $80/A630 7C 33 A6 JMP ($A633,x)[$80:A63B] A:0404 X:0002 Y:0404 P:envmxdizc
$80/A633 Jump Table for $80/A605
data is missing here
$80/A63B ? (Executed when talking to the aerial building)
$80/A63B AD 37 07 LDA $0737 [$80:0737] A:0404 X:0002 Y:0404 P:envmxdizc $80/A63E 29 F8 FF AND #$FFF8 A:0000 X:0002 Y:0404 P:envmxdiZc $80/A641 48 PHA A:0000 X:0002 Y:0404 P:envmxdiZc $80/A642 AD 35 07 LDA $0735 [$80:0735] A:0000 X:0002 Y:0404 P:envmxdiZc $80/A645 38 SEC A:0060 X:0002 Y:0404 P:envmxdizc $80/A646 E3 01 SBC $01,s [$00:1E8F] A:0060 X:0002 Y:0404 P:envmxdizC $80/A648 FA PLX A:0060 X:0002 Y:0404 P:envmxdizC $80/A649 18 CLC A:0060 X:0000 Y:0404 P:envmxdiZC $80/A64A 69 07 00 ADC #$0007 A:0060 X:0000 Y:0404 P:envmxdiZc $80/A64D 4A LSR A A:0067 X:0000 Y:0404 P:envmxdizc $80/A64E 4A LSR A A:0033 X:0000 Y:0404 P:envmxdizC $80/A64F 4A LSR A A:0019 X:0000 Y:0404 P:envmxdizC $80/A650 AA TAX A:000C X:0000 Y:0404 P:envmxdizC $80/A651 AD 2F 07 LDA $072F [$80:072F] A:000C X:000C Y:0404 P:envmxdizC $80/A654 97 88 STA [$88],y[$7E:7A04] A:20B0 X:000C Y:0404 P:envmxdizC $80/A656 AD 31 07 LDA $0731 [$80:0731] A:20B0 X:000C Y:0404 P:envmxdizC $80/A659 97 8B STA [$8B],y[$7E:7A44] A:20BC X:000C Y:0404 P:envmxdizC $80/A65B EE 2F 07 INC $072F [$80:072F] A:20BC X:000C Y:0404 P:envmxdizC $80/A65E EE 31 07 INC $0731 [$80:0731] A:20BC X:000C Y:0404 P:envmxdizC $80/A661 C8 INY A:20BC X:000C Y:0404 P:envmxdizC $80/A662 C8 INY A:20BC X:000C Y:0405 P:envmxdizC $80/A663 EE 2B 07 INC $072B [$80:072B] A:20BC X:000C Y:0406 P:envmxdizC $80/A666 CA DEX A:20BC X:000C Y:0406 P:envmxdizC $80/A667 D0 E8 BNE $E8 [$A651] A:20BC X:000B Y:0406 P:envmxdizC $80/A669 AD 44 07 LDA $0744 [$80:0744] A:20C7 X:0000 Y:041C P:envmxdiZC $80/A66C 89 02 00 BIT #$0002 A:0000 X:0000 Y:041C P:envmxdiZC $80/A66F D0 06 BNE $06 [$A677] A:0000 X:0000 Y:041C P:envmxdiZC $80/A671 A9 01 00 LDA #$0001 ; Set Flag for VRAM DMA $80/A674 8D 42 07 STA $0742 $80/A677 6B RTL
$80/A6BD ? (Executed when talking to the aerial building)
$80/A6BD AD 35 07 LDA $0735 [$80:0735] A:0081 X:0000 Y:000E P:envmxdizC $80/A6C0 8D 37 07 STA $0737 [$80:0737] A:0000 X:0000 Y:000E P:envmxdiZC $80/A6C3 AE 21 07 LDX $0721 [$80:0721] A:0000 X:0000 Y:000E P:envmxdiZC $80/A6C6 3F F9 A6 80 AND $80A6F9,x[$80:A6FB] A:0000 X:0002 Y:000E P:envmxdizC $80/A6CA F0 19 BEQ $19 [$A6E5] A:0000 X:0002 Y:000E P:envmxdiZC $80/A6E5 AD 2F 07 LDA $072F [$80:072F] A:0000 X:0002 Y:000E P:envmxdiZC $80/A6E8 29 FF 03 AND #$03FF A:20B0 X:0002 Y:000E P:envmxdizC $80/A6EB 8D 33 07 STA $0733 [$80:0733] A:00B0 X:0002 Y:000E P:envmxdizC $80/A6EE 22 55 9F 80 JSL $809F55[$80:9F55] A:00B0 X:0002 Y:000E P:envmxdizC
$80/A6F2 ? (Executed when talking to the aerial building)
$80/A6F2 08 PHP ; Buffer Flag Register value on stack $80/A6F3 22 05 A6 80 JSL $80A605[$80:A605] A:1E90 X:1E88 Y:0018 P:envmxdizc $80/A6F7 28 PLP ; Restore Flag Register value $80/A6F8 6B RTL
$80/A709 ?
$80/A709 08 PHP ; Buffer Flag Register value on stack $80/A70A C2 30 REP #$30 ; A/X/Y = 16-bit $80/A70C A9 00 80 LDA #$8000 A:0010 X:00FF Y:0 P:eNvmxdIzC $80/A70F 8D 1D 07 STA $071D [$80:071D] A:8000 X:00FF Y:0 P:eNvmxdIzC $80/A712 A9 63 A7 LDA #$A763 A:8000 X:00FF Y:0 P:eNvmxdIzC $80/A715 8D 1C 07 STA $071C [$80:071C] A:A763 X:00FF Y:0 P:eNvmxdIzC $80/A718 A9 00 00 LDA #$0000 ; Clear $7E/7600 to $7E/7DFF $80/A71B 22 23 9C 80 JSL $809C23 ; Store A into $7E/7600 to $7E/7DFF $80/A71F A9 01 00 LDA #$0001 A:0 X:FFFE Y:0 P:envmxdIZC $80/A722 8D 42 07 STA $0742 [$80:0742] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A725 A9 02 00 LDA #$0002 A:0001 X:FFFE Y:0 P:envmxdIzC $80/A728 8D 21 07 STA $0721 [$80:0721] A:0002 X:FFFE Y:0 P:envmxdIzC $80/A72B 9C 2F 07 STZ $072F [$80:072F] A:0002 X:FFFE Y:0 P:envmxdIzC $80/A72E 9C 31 07 STZ $0731 [$80:0731] A:0002 X:FFFE Y:0 P:envmxdIzC $80/A731 9C 2B 07 STZ $072B [$80:072B] A:0002 X:FFFE Y:0 P:envmxdIzC $80/A734 9C 2D 07 STZ $072D [$80:072D] A:0002 X:FFFE Y:0 P:envmxdIzC $80/A737 A9 01 00 LDA #$0001 A:0002 X:FFFE Y:0 P:envmxdIzC $80/A73A 8D 23 07 STA $0723 [$80:0723] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A73D 9C 25 07 STZ $0725 [$80:0725] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A740 9C 3D 07 STZ $073D [$80:073D] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A743 9C 27 07 STZ $0727 [$80:0727] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A746 9C 29 07 STZ $0729 [$80:0729] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A749 9C 44 07 STZ $0744 [$80:0744] A:0001 X:FFFE Y:0 P:envmxdIzC $80/A74C A9 E0 00 LDA #$00E0 A:0001 X:FFFE Y:0 P:envmxdIzC $80/A74F 8D 1F 07 STA $071F [$80:071F] A:00E0 X:FFFE Y:0 P:envmxdIzC $80/A752 9C 92 0B STZ $0B92 [$80:0B92] A:00E0 X:FFFE Y:0 P:envmxdIzC $80/A755 9C 98 0B STZ $0B98 [$80:0B98] A:00E0 X:FFFE Y:0 P:envmxdIzC $80/A758 9C 9E 0B STZ $0B9E [$80:0B9E] A:00E0 X:FFFE Y:0 P:envmxdIzC $80/A75B 9C 3F 07 STZ $073F [$80:073F] A:00E0 X:FFFE Y:0 P:envmxdIzC $80/A75E 9C 40 07 STZ $0740 [$80:0740] A:00E0 X:FFFE Y:0 P:envmxdIzC $80/A761 28 PLP ; Restore Flag Register value $80/A762 6B RTL
$80/A783 ? (Executed when talking to the aerial building)
$80/A783 08 PHP A:002A X:0038 Y:000E P:eNvmxdizc $80/A784 C2 30 REP #$30 A:002A X:0038 Y:000E P:eNvmxdizc $80/A786 20 DA 9D JSR $9DDA [$80:9DDA] A:002A X:0038 Y:000E P:eNvmxdizc $80/A789 AD 35 07 LDA $0735 [$80:0735] A:9E2F X:0002 Y:000E P:eNvmxdizc $80/A78C 29 07 00 AND #$0007 A:001E X:0002 Y:000E P:envmxdizc $80/A78F 0A ASL A A:0006 X:0002 Y:000E P:envmxdizc $80/A790 AA TAX A:000C X:0002 Y:000E P:envmxdizc $80/A791 BF FB A7 80 LDA $80A7FB,x[$80:A807] A:000C X:000C Y:000E P:envmxdizc $80/A795 85 92 STA $92 [$00:0092] A:0020 X:000C Y:000E P:envmxdizc $80/A797 AD 35 07 LDA $0735 [$80:0735] A:0020 X:000C Y:000E P:envmxdizc $80/A79A 29 F8 FF AND #$FFF8 A:001E X:000C Y:000E P:envmxdizc $80/A79D 0A ASL A A:0018 X:000C Y:000E P:envmxdizc $80/A79E 18 CLC A:0030 X:000C Y:000E P:envmxdizc $80/A79F 69 00 7E ADC #$7E00 A:0030 X:000C Y:000E P:envmxdizc $80/A7A2 AA TAX A:7E30 X:000C Y:000E P:envmxdizc $80/A7A3 E8 INX A:7E30 X:7E30 Y:000E P:envmxdizc $80/A7A4 E8 INX A:7E30 X:7E31 Y:000E P:envmxdizc $80/A7A5 8B PHB A:7E30 X:7E32 Y:000E P:envmxdizc $80/A7A6 A9 00 7E LDA #$7E00 A:7E30 X:7E32 Y:000E P:envmxdizc $80/A7A9 48 PHA A:7E00 X:7E32 Y:000E P:envmxdizc $80/A7AA AB PLB A:7E00 X:7E32 Y:000E P:envmxdizc $80/A7AB AB PLB A:7E00 X:7E32 Y:000E P:envmxdiZc $80/A7AC A0 00 00 LDY #$0000 A:7E00 X:7E32 Y:000E P:envmxdizc $80/A7AF 20 49 9D JSR $9D49 [$80:9D49] A:7E00 X:7E32 Y:0000 P:envmxdiZc $80/A7B2 F0 05 BEQ $05 [$A7B9] A:0000 X:7E32 Y:0000 P:envmxdiZc $80/A7B4 5A PHY A:4200 X:7E34 Y:0002 P:envmxdizc $80/A7B5 20 1F 9F JSR $9F1F [$80:9F1F] A:4200 X:7E34 Y:0002 P:envmxdizc $80/A7B8 7A PLY A:0100 X:7E34 Y:0020 P:envmxdiZC $80/A7B9 E8 INX A:0000 X:7E32 Y:0000 P:envmxdiZc $80/A7BA E8 INX A:0000 X:7E33 Y:0000 P:envmxdizc $80/A7BB 8A TXA A:0000 X:7E34 Y:0000 P:envmxdizc $80/A7BC 29 0F 00 AND #$000F A:7E34 X:7E34 Y:0000 P:envmxdizc $80/A7BF D0 06 BNE $06 [$A7C7] A:0004 X:7E34 Y:0000 P:envmxdizc $80/A7C1 8A TXA A:0000 X:7E40 Y:000C P:envmxdiZC $80/A7C2 18 CLC A:7E40 X:7E40 Y:000C P:envmxdizC $80/A7C3 69 F0 03 ADC #$03F0 A:7E40 X:7E40 Y:000C P:envmxdizc $80/A7C6 AA TAX A:8230 X:7E40 Y:000C P:eNVmxdizc $80/A7C7 C8 INY A:0004 X:7E34 Y:0000 P:envmxdizc $80/A7C8 C8 INY A:0004 X:7E34 Y:0001 P:envmxdizc $80/A7C9 CC 3B 07 CPY $073B [$7E:073B] A:0004 X:7E34 Y:0002 P:envmxdizc $80/A7CC 90 E1 BCC $E1 [$A7AF] A:0004 X:7E34 Y:0002 P:eNvmxdizc $80/A7CE A0 18 00 LDY #$0018 A:000A X:823A Y:0018 P:enVmxdiZC $80/A7D1 CC 3B 07 CPY $073B [$7E:073B] A:000A X:823A Y:0018 P:enVmxdizC $80/A7D4 90 18 BCC $18 [$A7EE] A:000A X:823A Y:0018 P:enVmxdiZC $80/A7D6 AD 25 07 LDA $0725 [$7E:0725] A:000A X:823A Y:0018 P:enVmxdiZC $80/A7D9 89 08 00 BIT #$0008 A:0000 X:823A Y:0018 P:enVmxdiZC $80/A7DC F0 10 BEQ $10 [$A7EE] A:0000 X:823A Y:0018 P:enVmxdiZC $80/A7EE AB PLB A:0000 X:823A Y:0018 P:enVmxdiZC $80/A7EF AD 35 07 LDA $0735 [$80:0735] A:0000 X:823A Y:0018 P:eNVmxdizC $80/A7F2 18 CLC A:001E X:823A Y:0018 P:enVmxdizC $80/A7F3 6D 39 07 ADC $0739 [$80:0739] A:001E X:823A Y:0018 P:enVmxdizc $80/A7F6 8D 35 07 STA $0735 [$80:0735] A:002A X:823A Y:0018 P:envmxdizc $80/A7F9 28 PLP A:002A X:823A Y:0018 P:envmxdizc $80/A7FA 6B RTL A:002A X:823A Y:0018 P:eNvmxdizc
$80/A9A4 ? (Executed when talking to the aerial building)
$80/A9A4 AD 29 0C LDA $0C29 [$80:0C29] A:1E97 X:0000 Y:0080 P:envmxdiZC $80/A9A7 EB XBA A:E194 X:0000 Y:0080 P:eNvmxdizC $80/A9A8 8D 1D 07 STA $071D [$80:071D] A:94E1 X:0000 Y:0080 P:eNvmxdizC $80/A9AB BD 92 0C LDA $0C92,x[$80:0C92] A:94E1 X:0000 Y:0080 P:eNvmxdizC $80/A9AE 0A ASL A A:0003 X:0000 Y:0080 P:envmxdizC $80/A9AF 0A ASL A A:0006 X:0000 Y:0080 P:envmxdizc $80/A9B0 0A ASL A A:000C X:0000 Y:0080 P:envmxdizc $80/A9B1 0A ASL A A:0018 X:0000 Y:0080 P:envmxdizc $80/A9B2 18 CLC A:0030 X:0000 Y:0080 P:envmxdizc $80/A9B3 6D 27 0C ADC $0C27 [$80:0C27] A:0030 X:0000 Y:0080 P:envmxdizc $80/A9B6 8D 1C 07 STA $071C [$80:071C] A:9909 X:0000 Y:0080 P:eNvmxdizc $80/A9B9 BD 86 0C LDA $0C86,x[$80:0C86] A:9909 X:0000 Y:0080 P:eNvmxdizc $80/A9BC 8D 23 07 STA $0723 [$80:0723] A:0001 X:0000 Y:0080 P:envmxdizc $80/A9BF 6B RTL A:0001 X:0000 Y:0080 P:envmxdizc
$80/A9C0 ? (Executed when talking to the aerial building)
$80/A9C0 BD AA 0C LDA $0CAA,x[$80:0CAA] A:0001 X:0000 Y:0080 P:envmxdizc $80/A9C3 BC 6E 0C LDY $0C6E,x[$80:0C6E] A:00B0 X:0000 Y:0080 P:envmxdizc $80/A9C6 18 CLC A:00B0 X:0000 Y:0000 P:envmxdiZc $80/A9C7 F0 06 BEQ $06 [$A9CF] A:00B0 X:0000 Y:0000 P:envmxdiZc $80/A9CF 7D 62 0C ADC $0C62,x[$80:0C62] A:00B0 X:0000 Y:0000 P:envmxdiZc $80/A9D2 8D 2F 07 STA $072F [$80:072F] A:00B0 X:0000 Y:0000 P:envmxdizc $80/A9D5 BD 9E 0C LDA $0C9E,x[$80:0C9E] A:00B0 X:0000 Y:0000 P:envmxdizc $80/A9D8 EB XBA A:0000 X:0000 Y:0000 P:envmxdiZc $80/A9D9 0A ASL A A:0000 X:0000 Y:0000 P:envmxdiZc $80/A9DA 0A ASL A A:0000 X:0000 Y:0000 P:envmxdiZc $80/A9DB 18 CLC A:0000 X:0000 Y:0000 P:envmxdiZc $80/A9DC 09 00 20 ORA #$2000 A:0000 X:0000 Y:0000 P:envmxdiZc $80/A9DF 0D 2F 07 ORA $072F [$80:072F] A:2000 X:0000 Y:0000 P:envmxdizc $80/A9E2 8D 2F 07 STA $072F [$80:072F] A:20B0 X:0000 Y:0000 P:envmxdizc $80/A9E5 18 CLC A:20B0 X:0000 Y:0000 P:envmxdizc $80/A9E6 7D 4A 0C ADC $0C4A,x[$80:0C4A] A:20B0 X:0000 Y:0000 P:envmxdizc $80/A9E9 8D 31 07 STA $0731 [$80:0731] A:20BC X:0000 Y:0000 P:envmxdizc $80/A9EC 6B RTL A:20BC X:0000 Y:0000 P:envmxdizc
$80/AA0C ? (Executed when talking to the aerial building)
$80/AA0C 48 PHA A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA0D 22 53 AA 80 JSL $80AA53 ; UNNECESSARY LINE - Just write "LDA $0B92"! $80/AA11 D0 3D BNE $3D [$AA50] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA13 A9 01 00 LDA #$0001 A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA16 8D 92 0B STA $0B92 [$81:0B92] A:0001 X:0000 Y:0000 P:envmxdIzc $80/AA19 A3 01 LDA $01,s [$00:1E6A] A:0001 X:0000 Y:0000 P:envmxdIzc $80/AA1B 29 FF 00 AND #$00FF A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA1E 0A ASL A A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA1F 8D 94 0B STA $0B94 [$81:0B94] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA22 A3 01 LDA $01,s [$00:1E6A] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA24 29 00 FF AND #$FF00 A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA27 EB XBA A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA28 8D 3D 07 STA $073D [$81:073D] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA2B A5 21 LDA $21 [$00:0021] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA2D 85 86 STA $86 [$00:0086] A:88A1 X:0000 Y:0000 P:eNvmxdIzc $80/AA2F A5 20 LDA $20 [$00:0020] A:88A1 X:0000 Y:0000 P:eNvmxdIzc $80/AA31 85 85 STA $85 [$00:0085] A:A1E1 X:0000 Y:0000 P:eNvmxdIzc $80/AA33 68 PLA A:A1E1 X:0000 Y:0000 P:eNvmxdIzc $80/AA34 29 FF 00 AND #$00FF A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA37 22 41 B3 80 JSL $80B341[$80:B341] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA3B A9 00 80 LDA #$8000 A:0010 X:0000 Y:0000 P:envmxdIZc $80/AA3E 8D 5E 06 STA $065E [$81:065E] A:8000 X:0000 Y:0000 P:eNvmxdIzc $80/AA41 A9 B4 B0 LDA #$B0B4 A:8000 X:0000 Y:0000 P:eNvmxdIzc $80/AA44 8D 5D 06 STA $065D [$81:065D] A:B0B4 X:0000 Y:0000 P:eNvmxdIzc $80/AA47 22 B6 91 80 JSL $8091B6[$80:91B6] A:B0B4 X:0000 Y:0000 P:eNvmxdIzc $80/AA4B 8D 9A 0B STA $0B9A [$81:0B9A] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA4E 18 CLC A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA4F 6B RTL A:0000 X:0000 Y:0000 P:envmxdIZc
$80/AA53 LDA $0B92 (Executed when talking to the aerial building)
If this isn't just the end of a longer Subroutine, this makes no sense. UNNECESSARY LINE?
$80/AA53 AD 92 0B LDA $0B92 [$81:0B92] A:0000 X:0000 Y:0000 P:envmxdIZc $80/AA56 6B RTL A:0000 X:0000 Y:0000 P:envmxdIZc
$80/AC5E ? (Executed while NMI)
$80/AC5E 08 PHP ; Buffer Flag Register value on stack $80/AC5F E2 10 SEP #$10 ; X/Y = 8-bit $80/AC61 C2 20 REP #$20 ; A = 16-bit $80/AC63 AD B6 0B LDA $0BB6 [$80:0BB6] A:0 X:0 Y:00FF P:envmXdIzC $80/AC66 F0 2A BEQ $2A ; [$AC92]
code is missing here
$80/AC92 28 PLP ; Restore Flag Register value $80/AC93 6B RTL
$80/B0B4 ? (Executed when talking to the aerial building)
$80/B0B4 AE 94 0B LDX $0B94 [$80:0B94] A:1E97 X:0000 Y:0080 P:envmxdizC $80/B0B7 22 A4 A9 80 JSL $80A9A4[$80:A9A4] A:1E97 X:0000 Y:0080 P:envmxdiZC $80/B0BB 22 C0 A9 80 JSL $80A9C0[$80:A9C0] A:0001 X:0000 Y:0080 P:envmxdizc $80/B0BF BD 4A 0C LDA $0C4A,x[$80:0C4A] A:20BC X:0000 Y:0000 P:envmxdizc $80/B0C2 0A ASL A A:000C X:0000 Y:0000 P:envmxdizc $80/B0C3 0A ASL A A:0018 X:0000 Y:0000 P:envmxdizc $80/B0C4 0A ASL A A:0030 X:0000 Y:0000 P:envmxdizc $80/B0C5 8D 1F 07 STA $071F [$80:071F] A:0060 X:0000 Y:0000 P:envmxdizc $80/B0C8 22 F0 9A 80 JSL $809AF0[$80:9AF0] A:0060 X:0000 Y:0000 P:envmxdizc $80/B0CC AD 3D 07 LDA $073D [$80:073D] A:0000 X:0000 Y:000E P:envmxdiZc $80/B0CF 8D 96 0B STA $0B96 [$80:0B96] A:0000 X:0000 Y:000E P:envmxdiZc $80/B0D2 80 3A BRA $3A [$B10E] A:0000 X:0000 Y:000E P:envmxdiZc $80/B0D4 22 BD A6 80 JSL $80A6BD[$80:A6BD] A:0081 X:0000 Y:000E P:envmxdizC $80/B0D8 08 PHP A:0001 X:0000 Y:041C P:envmxdizc $80/B0D9 AE 94 0B LDX $0B94 [$80:0B94] A:0001 X:0000 Y:041C P:envmxdizc $80/B0DC AD 2B 07 LDA $072B [$80:072B] A:0001 X:0000 Y:041C P:envmxdiZc $80/B0DF 38 SEC A:000E X:0000 Y:041C P:envmxdizc $80/B0E0 FD 32 0C SBC $0C32,x[$80:0C32] A:000E X:0000 Y:041C P:envmxdizC $80/B0E3 9D 62 0C STA $0C62,x[$80:0C62] A:000C X:0000 Y:041C P:envmxdizC $80/B0E6 AD 2D 07 LDA $072D [$80:072D] A:000C X:0000 Y:041C P:envmxdizC $80/B0E9 38 SEC A:0010 X:0000 Y:041C P:envmxdizC $80/B0EA FD 3E 0C SBC $0C3E,x[$80:0C3E] A:0010 X:0000 Y:041C P:envmxdizC $80/B0ED 9D 6E 0C STA $0C6E,x[$80:0C6E] A:0000 X:0000 Y:041C P:envmxdiZC $80/B0F0 28 PLP A:0000 X:0000 Y:041C P:envmxdiZC $80/B0F1 70 2E BVS $2E [$B121] A:0000 X:0000 Y:041C P:envmxdizc $80/B0F3 B0 33 BCS $33 [$B128] A:0000 X:0000 Y:041C P:envmxdizc $80/B0F5 AD 3D 07 LDA $073D [$80:073D] A:0000 X:0000 Y:041C P:envmxdizc $80/B0F8 F0 14 BEQ $14 [$B10E] A:0000 X:0000 Y:041C P:envmxdiZc
code is missing here
$80/B10E A7 85 LDA [$85] [$88:A1E1] A:0000 X:0000 Y:000E P:envmxdiZc $80/B110 29 FF 00 AND #$00FF A:4081 X:0000 Y:000E P:envmxdizc $80/B113 F0 13 BEQ $13 [$B128] A:0081 X:0000 Y:000E P:envmxdizc $80/B115 C9 0D 00 CMP #$000D A:0081 X:0000 Y:000E P:envmxdizc $80/B118 F0 26 BEQ $26 [$B140] A:0081 X:0000 Y:000E P:envmxdizC $80/B11A C9 5C 00 CMP #$005C A:0081 X:0000 Y:000E P:envmxdizC $80/B11D F0 24 BEQ $24 [$B143] A:0081 X:0000 Y:000E P:envmxdizC $80/B11F 80 B3 BRA $B3 [$B0D4] A:0081 X:0000 Y:000E P:envmxdizC
code is missing here
$80/B128 AD 3F 07 LDA $073F [$80:073F] A:0000 X:0000 Y:041C P:envmxdiZc $80/B12B 0D 40 07 ORA $0740 [$80:0740] A:0000 X:0000 Y:041C P:envmxdiZc $80/B12E D0 A4 BNE $A4 [$B0D4] A:0000 X:0000 Y:041C P:envmxdiZc $80/B130 9C 25 07 STZ $0725 [$80:0725] A:0000 X:0000 Y:041C P:envmxdiZc $80/B133 9C 44 07 STZ $0744 [$80:0744] A:0000 X:0000 Y:041C P:envmxdiZc $80/B136 9C 92 0B STZ $0B92 [$80:0B92] A:0000 X:0000 Y:041C P:envmxdiZc $80/B139 9C 98 0B STZ $0B98 [$80:0B98] A:0000 X:0000 Y:041C P:envmxdiZc $80/B13C 5C E9 91 80 JMP $8091E9[$80:91E9] A:0000 X:0000 Y:041C P:envmxdiZc
$80/B341 ? (Executed when talking to the aerial building)
$80/B341 DA PHX A:0000 X:0000 Y:0000 P:envmxdIZc $80/B342 5A PHY A:0000 X:0000 Y:0000 P:envmxdIZc $80/B343 0A ASL A A:0000 X:0000 Y:0000 P:envmxdIZc $80/B344 AA TAX A:0000 X:0000 Y:0000 P:envmxdIZc $80/B345 A3 03 LDA $03,s [$00:1E67] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B347 F0 05 BEQ $05 [$B34E] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B34E A3 01 LDA $01,s [$00:1E65] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B350 F0 05 BEQ $05 [$B357] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B357 A3 03 LDA $03,s [$00:1E67] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B359 9D 62 0C STA $0C62,x[$81:0C62] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B35C 18 CLC A:0000 X:0000 Y:0000 P:envmxdIZc $80/B35D 7D 32 0C ADC $0C32,x[$81:0C32] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B360 8D 2B 07 STA $072B [$81:072B] A:0002 X:0000 Y:0000 P:envmxdIzc $80/B363 A3 01 LDA $01,s [$00:1E65] A:0002 X:0000 Y:0000 P:envmxdIzc $80/B365 9D 6E 0C STA $0C6E,x[$81:0C6E] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B368 18 CLC A:0000 X:0000 Y:0000 P:envmxdIZc $80/B369 7D 3E 0C ADC $0C3E,x[$81:0C3E] A:0000 X:0000 Y:0000 P:envmxdIZc $80/B36C 8D 2D 07 STA $072D [$81:072D] A:0010 X:0000 Y:0000 P:envmxdIzc $80/B36F 7A PLY A:0010 X:0000 Y:0000 P:envmxdIzc $80/B370 FA PLX A:0010 X:0000 Y:0000 P:envmxdIZc $80/B371 6B RTL A:0010 X:0000 Y:0000 P:envmxdIZc
$80/B47D ? (Executed when talking to the aerial building)
$80/B47D 08 PHP A:9DAD X:0024 Y:0004 P:eNvmxdIzc $80/B47E C2 30 REP #$30 A:9DAD X:0024 Y:0004 P:eNvmxdIzc $80/B480 A9 B0 00 LDA #$00B0 A:9DAD X:0024 Y:0004 P:eNvmxdIzc $80/B483 8D 30 0C STA $0C30 [$81:0C30] A:00B0 X:0024 Y:0004 P:envmxdIzc $80/B486 A9 02 00 LDA #$0002 A:00B0 X:0024 Y:0004 P:envmxdIzc $80/B489 8D 21 07 STA $0721 [$81:0721] A:0002 X:0024 Y:0004 P:envmxdIzc $80/B48C AD 04 01 LDA $0104 [$81:0104] A:0002 X:0024 Y:0004 P:envmxdIzc $80/B48F 29 07 00 AND #$0007 A:0009 X:0024 Y:0004 P:envmxdIzc $80/B492 C9 01 00 CMP #$0001 A:0001 X:0024 Y:0004 P:envmxdIzc $80/B495 D0 13 BNE $13 [$B4AA] A:0001 X:0024 Y:0004 P:envmxdIZC $80/B497 AD 0B 01 LDA $010B [$81:010B] A:0001 X:0024 Y:0004 P:envmxdIZC $80/B49A 29 0F 00 AND #$000F A:0005 X:0024 Y:0004 P:envmxdIzC $80/B49D EB XBA A:0005 X:0024 Y:0004 P:envmxdIzC $80/B49E 0A ASL A A:0500 X:0024 Y:0004 P:envmxdIZC $80/B49F 0A ASL A A:0A00 X:0024 Y:0004 P:envmxdIzc $80/B4A0 0A ASL A A:1400 X:0024 Y:0004 P:envmxdIzc $80/B4A1 0A ASL A A:2800 X:0024 Y:0004 P:envmxdIzc $80/B4A2 8D 27 07 STA $0727 [$81:0727] A:5000 X:0024 Y:0004 P:envmxdIzc $80/B4A5 8D 29 07 STA $0729 [$81:0729] A:5000 X:0024 Y:0004 P:envmxdIzc $80/B4A8 28 PLP A:5000 X:0024 Y:0004 P:envmxdIzc $80/B4A9 6B RTL A:5000 X:0024 Y:0004 P:eNvmxdIzc
$80/B4BF ? (Executed when talking to the aerial building)
$80/B4BF 86 00 STX $00 [$00:0000] A:0000 X:1002 Y:020C P:envmxdIZc $80/B4C1 84 02 STY $02 [$00:0002] A:0000 X:1002 Y:020C P:envmxdIZc $80/B4C3 0A ASL A A:0000 X:1002 Y:020C P:envmxdIZc $80/B4C4 AA TAX A:0000 X:1002 Y:020C P:envmxdIZc $80/B4C5 A5 00 LDA $00 [$00:0000] A:0000 X:0000 Y:020C P:envmxdIZc $80/B4C7 29 FF 00 AND #$00FF A:1002 X:0000 Y:020C P:envmxdIzc $80/B4CA 9D 32 0C STA $0C32,x[$81:0C32] A:0002 X:0000 Y:020C P:envmxdIzc $80/B4CD A5 00 LDA $00 [$00:0000] A:0002 X:0000 Y:020C P:envmxdIzc $80/B4CF 29 00 FF AND #$FF00 A:1002 X:0000 Y:020C P:envmxdIzc $80/B4D2 EB XBA A:1000 X:0000 Y:020C P:envmxdIzc $80/B4D3 9D 3E 0C STA $0C3E,x[$81:0C3E] A:0010 X:0000 Y:020C P:envmxdIzc $80/B4D6 A5 02 LDA $02 [$00:0002] A:0010 X:0000 Y:020C P:envmxdIzc $80/B4D8 29 FF 00 AND #$00FF A:020C X:0000 Y:020C P:envmxdIzc $80/B4DB 9D 4A 0C STA $0C4A,x[$81:0C4A] A:000C X:0000 Y:020C P:envmxdIzc $80/B4DE A5 02 LDA $02 [$00:0002] A:000C X:0000 Y:020C P:envmxdIzc $80/B4E0 29 00 FF AND #$FF00 A:020C X:0000 Y:020C P:envmxdIzc $80/B4E3 EB XBA A:0200 X:0000 Y:020C P:envmxdIzc $80/B4E4 9D 56 0C STA $0C56,x[$81:0C56] A:0002 X:0000 Y:020C P:envmxdIzc $80/B4E7 A5 02 LDA $02 [$00:0002] A:0002 X:0000 Y:020C P:envmxdIzc $80/B4E9 8D 02 42 STA $4202 [$81:4202] A:020C X:0000 Y:020C P:envmxdIzc $80/B4EC A9 00 00 LDA #$0000 A:020C X:0000 Y:020C P:envmxdIzc $80/B4EF 9D 7A 0C STA $0C7A,x[$81:0C7A] A:0000 X:0000 Y:020C P:envmxdIZc $80/B4F2 A9 01 00 LDA #$0001 A:0000 X:0000 Y:020C P:envmxdIZc $80/B4F5 9D 86 0C STA $0C86,x[$81:0C86] A:0001 X:0000 Y:020C P:envmxdIzc $80/B4F8 A9 03 00 LDA #$0003 A:0001 X:0000 Y:020C P:envmxdIzc $80/B4FB 9D 92 0C STA $0C92,x[$81:0C92] A:0003 X:0000 Y:020C P:envmxdIzc $80/B4FE A9 00 00 LDA #$0000 A:0003 X:0000 Y:020C P:envmxdIzc $80/B501 9D 9E 0C STA $0C9E,x[$81:0C9E] A:0000 X:0000 Y:020C P:envmxdIZc $80/B504 9E 62 0C STZ $0C62,x[$81:0C62] A:0000 X:0000 Y:020C P:envmxdIZc $80/B507 9E 6E 0C STZ $0C6E,x[$81:0C6E] A:0000 X:0000 Y:020C P:envmxdIZc $80/B50A AD 30 0C LDA $0C30 [$81:0C30] A:0000 X:0000 Y:020C P:envmxdIZc $80/B50D 29 FF 03 AND #$03FF A:00B0 X:0000 Y:020C P:envmxdIzc $80/B510 9D AA 0C STA $0CAA,x[$81:0CAA] A:00B0 X:0000 Y:020C P:envmxdIzc $80/B513 18 CLC A:00B0 X:0000 Y:020C P:envmxdIzc $80/B514 6D 16 42 ADC $4216 [$81:4216] A:00B0 X:0000 Y:020C P:envmxdIzc $80/B517 8D 30 0C STA $0C30 [$81:0C30] A:00C8 X:0000 Y:020C P:envmxdIzc $80/B51A 6B RTL A:00C8 X:0000 Y:020C P:envmxdIzc
$80/B569 ? (Executed when talking to the aerial building)
I expect this to be textbox-related. It writes to $7E/7600,x, which is the buffer for some VRAM data.
$80/B569 C2 30 REP #$30 A:0000 X:0024 Y:0004 P:eNvmxdIzc $80/B56B 8B PHB A:0000 X:0024 Y:0004 P:eNvmxdIzc $80/B56C F4 00 7E PEA $7E00 A:0000 X:0024 Y:0004 P:eNvmxdIzc $80/B56F AB PLB A:0000 X:0024 Y:0004 P:eNvmxdIzc $80/B570 AB PLB A:0000 X:0024 Y:0004 P:envmxdIZc $80/B571 0A ASL A A:0000 X:0024 Y:0004 P:envmxdIzc $80/B572 AA TAX A:0000 X:0024 Y:0004 P:envmxdIZc $80/B573 BD 4A 0C LDA $0C4A,x[$7E:0C4A] A:0000 X:0000 Y:0004 P:envmxdIZc $80/B576 85 02 STA $02 [$00:0002] A:000C X:0000 Y:0004 P:envmxdIzc $80/B578 BD 56 0C LDA $0C56,x[$7E:0C56] A:000C X:0000 Y:0004 P:envmxdIzc $80/B57B 85 04 STA $04 [$00:0004] A:0002 X:0000 Y:0004 P:envmxdIzc $80/B57D BD 9E 0C LDA $0C9E,x[$7E:0C9E] A:0002 X:0000 Y:0004 P:envmxdIzc $80/B580 EB XBA A:0000 X:0000 Y:0004 P:envmxdIZc $80/B581 0A ASL A A:0000 X:0000 Y:0004 P:envmxdIZc $80/B582 0A ASL A A:0000 X:0000 Y:0004 P:envmxdIZc $80/B583 18 CLC A:0000 X:0000 Y:0004 P:envmxdIZc $80/B584 7D 92 0C ADC $0C92,x[$7E:0C92] A:0000 X:0000 Y:0004 P:envmxdIZc $80/B587 18 CLC A:0003 X:0000 Y:0004 P:envmxdIzc $80/B588 69 80 20 ADC #$2080 A:0003 X:0000 Y:0004 P:envmxdIzc $80/B58B 85 08 STA $08 [$00:0008] A:2083 X:0000 Y:0004 P:envmxdIzc $80/B58D BD 7A 0C LDA $0C7A,x[$7E:0C7A] A:2083 X:0000 Y:0004 P:envmxdIzc $80/B590 C9 FF 00 CMP #$00FF A:0000 X:0000 Y:0004 P:envmxdIZc $80/B593 D0 03 BNE $03 [$B598] A:0000 X:0000 Y:0004 P:eNvmxdIzc $80/B598 0A ASL A A:0000 X:0000 Y:0004 P:eNvmxdIzc $80/B599 0A ASL A A:0000 X:0000 Y:0004 P:envmxdIZc $80/B59A 0A ASL A A:0000 X:0000 Y:0004 P:envmxdIZc $80/B59B 0A ASL A A:0000 X:0000 Y:0004 P:envmxdIZc $80/B59C 89 10 00 BIT #$0010 A:0000 X:0000 Y:0004 P:envmxdIZc $80/B59F F0 03 BEQ $03 [$B5A4] A:0000 X:0000 Y:0004 P:envmxdIZc $80/B5A4 85 06 STA $06 [$00:0006] A:0000 X:0000 Y:0004 P:envmxdIZc $80/B5A6 BD 3E 0C LDA $0C3E,x[$7E:0C3E] A:0000 X:0000 Y:0004 P:envmxdIZc $80/B5A9 3A DEC A A:0010 X:0000 Y:0004 P:envmxdIzc $80/B5AA 0A ASL A A:000F X:0000 Y:0004 P:envmxdIzc $80/B5AB 0A ASL A A:001E X:0000 Y:0004 P:envmxdIzc $80/B5AC 0A ASL A A:003C X:0000 Y:0004 P:envmxdIzc $80/B5AD 0A ASL A A:0078 X:0000 Y:0004 P:envmxdIzc $80/B5AE 0A ASL A A:00F0 X:0000 Y:0004 P:envmxdIzc $80/B5AF 18 CLC A:01E0 X:0000 Y:0004 P:envmxdIzc $80/B5B0 7D 32 0C ADC $0C32,x[$7E:0C32] A:01E0 X:0000 Y:0004 P:envmxdIzc $80/B5B3 3A DEC A A:01E2 X:0000 Y:0004 P:envmxdIzc $80/B5B4 0A ASL A A:01E1 X:0000 Y:0004 P:envmxdIzc $80/B5B5 85 00 STA $00 [$00:0000] A:03C2 X:0000 Y:0004 P:envmxdIzc $80/B5B7 AA TAX A:03C2 X:0000 Y:0004 P:envmxdIzc $80/B5B8 A9 84 38 LDA #$3884 A:03C2 X:03C2 Y:0004 P:envmxdIzc $80/B5BB 18 CLC A:3884 X:03C2 Y:0004 P:envmxdIzc $80/B5BC 65 06 ADC $06 [$00:0006] A:3884 X:03C2 Y:0004 P:envmxdIzc $80/B5BE 9D 00 76 STA $7600,x[$7E:79C2] A:3884 X:03C2 Y:0004 P:envmxdIzc $80/B5C1 E8 INX A:3884 X:03C2 Y:0004 P:envmxdIzc $80/B5C2 E8 INX A:3884 X:03C3 Y:0004 P:envmxdIzc $80/B5C3 A5 02 LDA $02 [$00:0002] A:3884 X:03C4 Y:0004 P:envmxdIzc $80/B5C5 F0 10 BEQ $10 [$B5D7] A:000C X:03C4 Y:0004 P:envmxdIzc $80/B5C7 3A DEC A A:000C X:03C4 Y:0004 P:envmxdIzc $80/B5C8 A8 TAY A:000B X:03C4 Y:0004 P:envmxdIzc $80/B5C9 A9 85 38 LDA #$3885 A:000B X:03C4 Y:000B P:envmxdIzc $80/B5CC 18 CLC A:3885 X:03C4 Y:000B P:envmxdIzc $80/B5CD 65 06 ADC $06 [$00:0006] A:3885 X:03C4 Y:000B P:envmxdIzc $80/B5CF 9D 00 76 STA $7600,x[$7E:79C4] A:3885 X:03C4 Y:000B P:envmxdIzc $80/B5D2 E8 INX A:3885 X:03C4 Y:000B P:envmxdIzc $80/B5D3 E8 INX A:3885 X:03C5 Y:000B P:envmxdIzc $80/B5D4 88 DEY A:3885 X:03C6 Y:000B P:envmxdIzc $80/B5D5 10 F8 BPL $F8 [$B5CF] A:3885 X:03C6 Y:000A P:envmxdIzc $80/B5D7 A9 86 38 LDA #$3886 A:3885 X:03DC Y:FFFF P:eNvmxdIzc $80/B5DA 18 CLC A:3886 X:03DC Y:FFFF P:envmxdIzc $80/B5DB 65 06 ADC $06 [$00:0006] A:3886 X:03DC Y:FFFF P:envmxdIzc $80/B5DD 9D 00 76 STA $7600,x[$7E:79DC] A:3886 X:03DC Y:FFFF P:envmxdIzc $80/B5E0 A5 00 LDA $00 [$00:0000] A:3886 X:03DC Y:FFFF P:envmxdIzc $80/B5E2 18 CLC A:03C2 X:03DC Y:FFFF P:envmxdIzc $80/B5E3 69 40 00 ADC #$0040 A:03C2 X:03DC Y:FFFF P:envmxdIzc $80/B5E6 85 00 STA $00 [$00:0000] A:0402 X:03DC Y:FFFF P:envmxdIzc $80/B5E8 AA TAX A:0402 X:03DC Y:FFFF P:envmxdIzc $80/B5E9 A5 04 LDA $04 [$00:0004] A:0402 X:0402 Y:FFFF P:envmxdIzc $80/B5EB F0 34 BEQ $34 [$B621] A:0002 X:0402 Y:FFFF P:envmxdIzc $80/B5ED 3A DEC A A:0002 X:0402 Y:FFFF P:envmxdIzc $80/B5EE A8 TAY A:0001 X:0402 Y:FFFF P:envmxdIzc $80/B5EF 5A PHY A:0001 X:0402 Y:0001 P:envmxdIzc $80/B5F0 A9 87 38 LDA #$3887 A:0001 X:0402 Y:0001 P:envmxdIzc $80/B5F3 18 CLC A:3887 X:0402 Y:0001 P:envmxdIzc $80/B5F4 65 06 ADC $06 [$00:0006] A:3887 X:0402 Y:0001 P:envmxdIzc $80/B5F6 9D 00 76 STA $7600,x[$7E:7A02] A:3887 X:0402 Y:0001 P:envmxdIzc $80/B5F9 E8 INX A:3887 X:0402 Y:0001 P:envmxdIzc $80/B5FA E8 INX A:3887 X:0403 Y:0001 P:envmxdIzc $80/B5FB A5 02 LDA $02 [$00:0002] A:3887 X:0404 Y:0001 P:envmxdIzc $80/B5FD F0 0C BEQ $0C [$B60B] A:000C X:0404 Y:0001 P:envmxdIzc $80/B5FF 3A DEC A A:000C X:0404 Y:0001 P:envmxdIzc $80/B600 A8 TAY A:000B X:0404 Y:0001 P:envmxdIzc $80/B601 A5 08 LDA $08 [$00:0008] A:000B X:0404 Y:000B P:envmxdIzc $80/B603 9D 00 76 STA $7600,x[$7E:7A04] A:2083 X:0404 Y:000B P:envmxdIzc $80/B606 E8 INX A:2083 X:0404 Y:000B P:envmxdIzc $80/B607 E8 INX A:2083 X:0405 Y:000B P:envmxdIzc $80/B608 88 DEY A:2083 X:0406 Y:000B P:envmxdIzc $80/B609 10 F8 BPL $F8 [$B603] A:2083 X:0406 Y:000A P:envmxdIzc $80/B60B A9 88 38 LDA #$3888 A:2083 X:041C Y:FFFF P:eNvmxdIzc $80/B60E 18 CLC A:3888 X:041C Y:FFFF P:envmxdIzc $80/B60F 65 06 ADC $06 [$00:0006] A:3888 X:041C Y:FFFF P:envmxdIzc $80/B611 9D 00 76 STA $7600,x[$7E:7A1C] A:3888 X:041C Y:FFFF P:envmxdIzc $80/B614 A5 00 LDA $00 [$00:0000] A:3888 X:041C Y:FFFF P:envmxdIzc $80/B616 18 CLC A:0402 X:041C Y:FFFF P:envmxdIzc $80/B617 69 40 00 ADC #$0040 A:0402 X:041C Y:FFFF P:envmxdIzc $80/B61A 85 00 STA $00 [$00:0000] A:0442 X:041C Y:FFFF P:envmxdIzc $80/B61C AA TAX A:0442 X:041C Y:FFFF P:envmxdIzc $80/B61D 7A PLY A:0442 X:0442 Y:FFFF P:envmxdIzc $80/B61E 88 DEY A:0442 X:0442 Y:0001 P:envmxdIzc $80/B61F 10 CE BPL $CE [$B5EF] A:0442 X:0442 Y:0000 P:envmxdIZc $80/B621 A9 89 38 LDA #$3889 A:0482 X:0482 Y:FFFF P:eNvmxdIzc $80/B624 18 CLC A:3889 X:0482 Y:FFFF P:envmxdIzc $80/B625 65 06 ADC $06 [$00:0006] A:3889 X:0482 Y:FFFF P:envmxdIzc $80/B627 9D 00 76 STA $7600,x[$7E:7A82] A:3889 X:0482 Y:FFFF P:envmxdIzc $80/B62A E8 INX A:3889 X:0482 Y:FFFF P:envmxdIzc $80/B62B E8 INX A:3889 X:0483 Y:FFFF P:envmxdIzc $80/B62C A5 02 LDA $02 [$00:0002] A:3889 X:0484 Y:FFFF P:envmxdIzc $80/B62E F0 10 BEQ $10 [$B640] A:000C X:0484 Y:FFFF P:envmxdIzc $80/B630 3A DEC A A:000C X:0484 Y:FFFF P:envmxdIzc $80/B631 A8 TAY A:000B X:0484 Y:FFFF P:envmxdIzc $80/B632 A9 8A 38 LDA #$388A A:000B X:0484 Y:000B P:envmxdIzc $80/B635 18 CLC A:388A X:0484 Y:000B P:envmxdIzc $80/B636 65 06 ADC $06 [$00:0006] A:388A X:0484 Y:000B P:envmxdIzc $80/B638 9D 00 76 STA $7600,x[$7E:7A84] A:388A X:0484 Y:000B P:envmxdIzc $80/B63B E8 INX A:388A X:0484 Y:000B P:envmxdIzc $80/B63C E8 INX A:388A X:0485 Y:000B P:envmxdIzc $80/B63D 88 DEY A:388A X:0486 Y:000B P:envmxdIzc $80/B63E 10 F8 BPL $F8 [$B638] A:388A X:0486 Y:000A P:envmxdIzc $80/B640 A9 8B 38 LDA #$388B A:388A X:049C Y:FFFF P:eNvmxdIzc $80/B643 18 CLC A:388B X:049C Y:FFFF P:envmxdIzc $80/B644 65 06 ADC $06 [$00:0006] A:388B X:049C Y:FFFF P:envmxdIzc $80/B646 9D 00 76 STA $7600,x[$7E:7A9C] A:388B X:049C Y:FFFF P:envmxdIzc $80/B649 A9 01 00 LDA #$0001 A:388B X:049C Y:FFFF P:envmxdIzc $80/B64C 8D 42 07 STA $0742 [$7E:0742] A:0001 X:049C Y:FFFF P:envmxdIzc $80/B64F AB PLB A:0001 X:049C Y:FFFF P:envmxdIzc $80/B650 6B RTL A:0001 X:049C Y:FFFF P:eNvmxdIzc
$80/B91E ? (Executed when talking to the aerial building)
$80/B91E 08 PHP ; Buffer Flag Register value and Program Bank on stack $80/B91F 8B PHB $80/B920 F4 00 7E PEA $7E00 ; Set Program Bank to $7E $80/B923 AB PLB $80/B924 AB PLB $80/B925 C2 30 REP #$30 ; A/X/Y = 16-bit $80/B927 A2 FE 07 LDX #$07FE A:9F3A X:0024 Y:0004 P:envmxdIzc $80/B92A A9 80 00 LDA #$0080 A:9F3A X:07FE Y:0004 P:envmxdIzc $80/B92D 9D 00 76 STA $7600,x[$7E:7DFE] A:0080 X:07FE Y:0004 P:envmxdIzc $80/B930 CA DEX A:0080 X:07FE Y:0004 P:envmxdIzc $80/B931 CA DEX A:0080 X:07FD Y:0004 P:envmxdIzc $80/B932 10 F6 BPL $F6 [$B92A] A:0080 X:07FC Y:0004 P:envmxdIzc $80/B934 A9 01 00 LDA #$0001 A:0080 X:FFFE Y:0004 P:eNvmxdIzc $80/B937 8D 42 07 STA $0742 [$7E:0742] A:0001 X:FFFE Y:0004 P:envmxdIzc $80/B93A AB PLB A:0001 X:FFFE Y:0004 P:envmxdIzc $80/B93B 28 PLP A:0001 X:FFFE Y:0004 P:eNvmxdIzc $80/B93C 6B RTL A:0001 X:FFFE Y:0004 P:eNvmxdIzc
$80/BB84 MCC Memory Controller Settings: Enable Flash R/W
$80/BB84 08 PHP ; Buffer Flag Register value on stack $80/BB85 E2 20 SEP #$20 ; A = 8-bit $80/BB87 A9 00 LDA #$00 $80/BB89 8F 00 50 05 STA $055000 ; Bank $40-$4F: PSRAM $80/BB8D 8F 00 50 06 STA $065000 ; Bank $50-$5F: PSRAM $80/BB91 8F 00 50 04 STA $045000 ; LoROM Mapping $80/BB95 8F 00 50 01 STA $015000 ; Bank $00-$3F: Flash $80/BB99 A9 80 LDA #$80 $80/BB9B 8F 00 50 02 STA $025000 ; Flash: HiROM $80/BB9F 8F 00 50 03 STA $035000 ; Bank $60-$6F: Flash $80/BBA3 8F 00 50 0C STA $0C5000 ; Enable Bank $C0-$FF Flash Reads $80/BBA7 8F 00 50 0D STA $0D5000 ; Enable Bank $C0-$FF Flash Writes $80/BBAB 8F 00 50 0E STA $0E5000 ; Apply Changes to Other MCC Registers $80/BBAF 28 PLP ; Restore Flag Register value $80/BBB0 6B RTL
$80/BBB1 MCC Memory Controller Settings: Disable Flash R/W
$80/BBB1 08 PHP ; Buffer Flag Register value on stack $80/BBB2 E2 20 SEP #$20 ; A = 8-bit $80/BBB4 A9 00 LDA #$00 $80/BBB6 8F 00 50 05 STA $055000 ; Bank $40-$4F: PSRAM $80/BBBA 8F 00 50 06 STA $065000 ; Bank $50-$5F: PSRAM $80/BBBE 8F 00 50 04 STA $045000 ; LoROM Mapping $80/BBC2 8F 00 50 01 STA $015000 ; Bank $00-$3F: Flash $80/BBC6 8F 00 50 0C STA $0C5000 ; Disable Bank $C0-$FF Flash Reads $80/BBCA 8F 00 50 0D STA $0D5000 ; Disable Bank $C0-$FF Flash Writes $80/BBCE A9 80 LDA #$80 $80/BBD0 8F 00 50 02 STA $025000 ; Flash: HiROM $80/BBD4 8F 00 50 03 STA $035000 ; Bank $60-$6F: Flash $80/BBD8 8F 00 50 0E STA $0E5000 ; Apply Changes to Other MCC Registers $80/BBDC 28 PLP ; Restore Flag Register value $80/BBDD 6B RTL
$80/BD6C ? (Execute Subroutine from Jump Table)
$80/BD6C 08 PHP ; Buffer Flag Register value on stack $80/BD6D E2 30 SEP #$30 ; A/X/Y = 8-bit $80/BD6F AD 41 14 LDA $1441 ; Load Jump Table Index $80/BD72 0A ASL A ; Multiply by 2 (each Jump Table Entry is 2 bytes in size) $80/BD73 AA TAX ; Transfer to X $80/BD74 FC 79 BD JSR ($BD79,x) ; JUMP $80/BD77 28 PLP ; Restore Flag Register value $80/BD78 6B RTL
$80/BD79 Jump Table for $80/BD6C
81 BD 86 BD 8B BD 90 BD
$80/BD81 ?
$80/BD81 22 94 5A 10 JSL $105A94[$10:5A94] A:0 X:0 Y:0 P:envMXdIZc $80/BD85 60 RTS A:00FF X:0 Y:0 P:eNvMXdIzc
$80/BD95 ?
$80/BD95 A9 FF LDA #$FF A:0 X:0 Y:0 P:envMXdIZc $80/BD97 8F 00 00 C0 STA $C00000[$C0:0000] A:00FF X:0 Y:0 P:eNvMXdIzc $80/BD9B 6B RTL A:00FF X:0 Y:0 P:eNvMXdIzc
$80/C177 ? (Check if Data from Flash Cart is valid)
$80/C177 08 PHP ; Buffer Flag Register value on stack $80/C178 E2 20 SEP #$20 ; A = 8-bit $80/C17A C2 10 REP #$10 ; X/Y = 16-bit $80/C17C 22 10 5B 10 JSL $105B10[$10:5B10] A:0080 X:0007 Y:0 P:eNvMxdIzC $80/C180 AF D6 99 7E LDA $7E99D6[$7E:99D6] A:00FF X:0 Y:0 P:eNvMxdIzC $80/C184 C9 4D CMP #$4D A:004D X:0 Y:0 P:envMxdIzC $80/C186 D0 36 BNE $36 [$C1BE] A:004D X:0 Y:0 P:envMxdIZC $80/C188 AF D7 99 7E LDA $7E99D7[$7E:99D7] A:004D X:0 Y:0 P:envMxdIZC $80/C18C C9 50 CMP #$50 A:0050 X:0 Y:0 P:envMxdIzC $80/C18E D0 2E BNE $2E [$C1BE] A:0050 X:0 Y:0 P:envMxdIZC $80/C190 AF D8 99 7E LDA $7E99D8[$7E:99D8] A:0050 X:0 Y:0 P:envMxdIZC $80/C194 29 81 AND #$81 A:0 X:0 Y:0 P:envMxdIZC $80/C196 D0 26 BNE $26 [$C1BE] A:0 X:0 Y:0 P:envMxdIZC $80/C198 E2 10 SEP #$10 A:0 X:0 Y:0 P:envMxdIZC $80/C19A AF D9 99 7E LDA $7E99D9[$7E:99D9] A:0 X:0 Y:0 P:envMXdIZC $80/C19E 4A LSR A A:002B X:0 Y:0 P:envMXdIzC $80/C19F 4A LSR A A:0015 X:0 Y:0 P:envMXdIzC $80/C1A0 4A LSR A A:000A X:0 Y:0 P:envMXdIzC $80/C1A1 4A LSR A A:0005 X:0 Y:0 P:envMXdIzc $80/C1A2 3A DEC A A:0002 X:0 Y:0 P:envMXdIzC $80/C1A3 8D 41 14 STA $1441 [$80:1441] A:0001 X:0 Y:0 P:envMXdIzC $80/C1A6 C9 04 CMP #$04 A:0001 X:0 Y:0 P:envMXdIzC $80/C1A8 B0 14 BCS $14 [$C1BE] A:0001 X:0 Y:0 P:eNvMXdIzc $80/C1AA AF D9 99 7E LDA $7E99D9[$7E:99D9] A:0001 X:0 Y:0 P:eNvMXdIzc $80/C1AE 29 0F AND #$0F A:002B X:0 Y:0 P:envMXdIzc $80/C1B0 38 SEC A:000B X:0 Y:0 P:envMXdIzc $80/C1B1 E9 06 SBC #$06 A:000B X:0 Y:0 P:envMXdIzC $80/C1B3 90 09 BCC $09 [$C1BE] A:0005 X:0 Y:0 P:envMXdIzC $80/C1B5 AA TAX A:0005 X:0 Y:0 P:envMXdIzC $80/C1B6 A9 01 LDA #$01 A:0005 X:0005 Y:0 P:envMXdIzC $80/C1B8 CA DEX A:0001 X:0005 Y:0 P:envMXdIzC $80/C1B9 F0 05 BEQ $05 ; [$C1C0] Exit $80/C1BB 0A ASL A A:0001 X:0004 Y:0 P:envMXdIzC $80/C1BC 80 FA BRA $FA [$C1B8] A:0002 X:0004 Y:0 P:envMXdIzc
code is missing here (executed if values don't match)
$80/C1C0 8D 40 14 STA $1440 [$80:1440] A:0010 X:0 Y:0 P:envMXdIZc $80/C1C3 28 PLP ; Restore Flag Register value $80/C1C4 6B RTL
$80/C1C5 ?
See nocash's FullSNES, Section "SNES Cart Satellaview I/O FLASH Detection"
$80/C1C5 08 PHP ; Buffer Flag Register value on stack $80/C1C6 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/C1C8 A9 38 LDA #$38 ; DETECTION SEQUENCE FOR FLASH CHIP $80/C1CA 8F 00 00 C0 STA $C00000 ; Send #$38 and #$D0 to Flash Chip $80/C1CE A9 D0 LDA #$D0 $80/C1D0 8F 00 00 C0 STA $C00000 $80/C1D4 48 PHA ; Wait $80/C1D5 68 PLA $80/C1D6 48 PHA $80/C1D7 68 PLA $80/C1D8 48 PHA $80/C1D9 68 PLA $80/C1DA A9 71 LDA #$71 ; "Enter Status Mode" $80/C1DC 8F 00 00 C0 STA $C00000 $80/C1E0 AF 02 00 C0 LDA $C00002 ; Wait until Flash Cart sets MSB (ready) $80/C1E4 10 FA BPL $FA ; [$C1E0] $80/C1E6 A9 72 LDA #$72 ; "Request Chip Info Part 2" ($72, $75) $80/C1E8 8F 00 00 C0 STA $C00000 $80/C1EC A9 75 LDA #$75 $80/C1EE 8F 00 00 C0 STA $C00000 $80/C1F2 AF 00 FF C0 LDA $C0FF00[$C0:FF00] A:0075 X:0007 Y:0 P:envMXdIzC $80/C1F6 8F D6 99 7E STA $7E99D6[$7E:99D6] A:004D X:0007 Y:0 P:envMXdIzC $80/C1FA AF 02 FF C0 LDA $C0FF02[$C0:FF02] A:004D X:0007 Y:0 P:envMXdIzC $80/C1FE 8F D7 99 7E STA $7E99D7[$7E:99D7] A:0050 X:0007 Y:0 P:envMXdIzC $80/C202 AF 04 FF C0 LDA $C0FF04[$C0:FF04] A:0050 X:0007 Y:0 P:envMXdIzC $80/C206 8F D8 99 7E STA $7E99D8[$7E:99D8] A:0 X:0007 Y:0 P:envMXdIZC $80/C20A AF 06 FF C0 LDA $C0FF06[$C0:FF06] A:0 X:0007 Y:0 P:envMXdIZC $80/C20E 8F D9 99 7E STA $7E99D9[$7E:99D9] A:002B X:0007 Y:0 P:envMXdIzC $80/C212 AF 08 FF C0 LDA $C0FF08[$C0:FF08] A:002B X:0007 Y:0 P:envMXdIzC $80/C216 8F DA 99 7E STA $7E99DA[$7E:99DA] A:0 X:0007 Y:0 P:envMXdIZC $80/C21A AF 0A FF C0 LDA $C0FF0A[$C0:FF0A] A:0 X:0007 Y:0 P:envMXdIZC $80/C21E 8F DB 99 7E STA $7E99DB[$7E:99DB] A:0 X:0007 Y:0 P:envMXdIZC $80/C222 AF 0C FF C0 LDA $C0FF0C[$C0:FF0C] A:0 X:0007 Y:0 P:envMXdIZC $80/C226 8F DC 99 7E STA $7E99DC[$7E:99DC] A:0 X:0007 Y:0 P:envMXdIZC $80/C22A AF 0E FF C0 LDA $C0FF0E[$C0:FF0E] A:0 X:0007 Y:0 P:envMXdIZC $80/C22E 8F DD 99 7E STA $7E99DD[$7E:99DD] A:0 X:0007 Y:0 P:envMXdIZC $80/C232 AF 10 FF C0 LDA $C0FF10[$C0:FF10] A:0 X:0007 Y:0 P:envMXdIZC $80/C236 8F DE 99 7E STA $7E99DE[$7E:99DE] A:0 X:0007 Y:0 P:envMXdIZC $80/C23A AF 12 FF C0 LDA $C0FF12[$C0:FF12] A:0 X:0007 Y:0 P:envMXdIZC $80/C23E 8F DF 99 7E STA $7E99DF[$7E:99DF] A:0 X:0007 Y:0 P:envMXdIZC $80/C242 22 90 5A 10 JSL $105A90[$10:5A90] A:0 X:0007 Y:0 P:envMXdIZC $80/C246 28 PLP ; Restore Flag Register value $80/C247 6B RTL
$80/C2AD Check if Satellaview Stream Number Registers work
If something went wrong, A != #$00 at the end. If everything is fine, A = #$00.
$80/C2AD A9 01 LDA #$01 ; Set Power Bit for Satellaview $80/C2AF 8D 94 21 STA $2194 $80/C2B2 A9 AA LDA #$AA ; Check if you can write into $2188 and check if it keeps its value $80/C2B4 8D 88 21 STA $2188 $80/C2B7 CD 88 21 CMP $2188 $80/C2BA D0 22 BNE $22 ; [$C2DE] Exit if it doesn't work $80/C2BC A9 55 LDA #$55 ; Check if you can write into $2188 and check if it keeps its value $80/C2BE 8D 88 21 STA $2188 $80/C2C1 CD 88 21 CMP $2188 $80/C2C4 D0 18 BNE $18 ; [$C2DE] Exit if it doesn't work $80/C2C6 9C 88 21 STZ $2188 ; Check if you can clear $2189/9/E/F and the values stay cleared $80/C2C9 9C 89 21 STZ $2189 $80/C2CC 9C 8E 21 STZ $218E $80/C2CF 9C 8F 21 STZ $218F $80/C2D2 AD 88 21 LDA $2188 $80/C2D5 0D 89 21 ORA $2189 $80/C2D8 0D 8E 21 ORA $218E $80/C2DB 0D 8F 21 ORA $218F $80/C2DE 6B RTL
$80/C36D Transfer (fixed Set of) Data to Satellaview
This subroutine transfers data to the Satellaview via Serial Port 2.
First, it sends "08" and then "00" (maybe the "$08" says that there will come eight double-bytes in total?). Then it sends one byte with a counter value and one data byte from $C392. So the transfered data is:
08 00 00 xx 01 xx 02 xx 03 xx 04 xx 05 xx 06 xx (xx = data bytes from $80/C392)
$80/C36D 8B PHB ; Buffer Program Bank on Stack $80/C36E 4B PHK ; Set Program Bank to $80 $80/C36F AB PLB $80/C370 A9 41 LDA #$41 ; Select port 1 (to signalize a transfer comes up!?), set Clock bit $80/C372 8D 99 21 STA $2199 $80/C375 A9 00 LDA #$00 ; Setup first double-byte to transfer: $08 $00 $80/C377 EB XBA $80/C378 A9 08 LDA #$08 $80/C37A 22 B0 59 10 JSL $1059B0 ; Transfer Data to Satellaview via Serial I/O Port 2 $80/C37E A2 00 00 LDX #$0000 ; Setup counter for Data Loading/Transfer $80/C381 BD 92 C3 LDA $C392,x ; Load byte to transfer $80/C384 EB XBA $80/C385 8A TXA ; Transfer Counter Value from X to A $80/C386 22 B0 59 10 JSL $1059B0 ; Transfer Data to Satellaview via Serial I/O Port 2 $80/C38A E8 INX ; Increment Counter $80/C38B E0 07 00 CPX #$0007 ; Branch if the counter hasn't reached #$0007 yet $80/C38E 90 F1 BCC $F1 ; [$C381] $80/C390 AB PLB ; Restore Program Bank $80/C391 6B RTL
$80/C392 Data for Satellaview (transfered at $80/C36D)
§80/C392 88 80 04 00 08 00 70
$80/C3D6 Transfer Data to Satellaview via Serial I/O Port 2
From nocash's FullSNES document:
2198h Serial I/O Port 1 (R/W) 2199h Serial I/O Port 2 (R/W) These ports are basically 3-bit parallel ports, which can be used as three-wire serial ports (with clock, data.in, data.out lines) (by doing the "serial" transfer by software). Outgoing data must be written before toggling clock, incoming data can be read thereafter. 0 Clock (must be manually toggled per data bit) 1-5 Unknown/unused (should be 0) 6 Chip Select - For Port 1: 1=Select / For Port 2: 0=Select 7 Data (Write=Data.Out, Read=Data.in) (data-in is directly poll-able) Bits are transferred MSB first. Unknown which chips these ports are connected to. One port does most probably connect to the 64pin MN88821 chip (which should do have a serial port; assuming that it is a MN88831 variant). The other port <might> connect to the small 8pin SPR-BSA chip? Possible purposes might be configuration/calibration, Audio volume control, and Audio channel selection (assuming that the hardware can decode audio data and inject it to SNES Expansion Port sound inputs).
A contains a 16-bit value that gets transfered via Serial I/O Port 2 ($2199) to the Satellaview. The MSB gets transfered first.
As mentioned: A contains a 16-bit value, even though A has to be set to 8-bit-size before this Subroutine gets executed.
$80/C3D6 A0 08 00 LDY #$0008 ; Setup counter for first byte $80/C3D9 48 PHA ; Buffer first byte on stack $80/C3DA 29 80 AND #$80 ; Transfer bit $80/C3DC 8D 99 21 STA $2199 $80/C3DF 09 01 ORA #$01 ; Toggle Clock bit $80/C3E1 8D 99 21 STA $2199 $80/C3E4 68 PLA ; Restore byte $80/C3E5 0A ASL A ; Prepare byte to transfer next bit $80/C3E6 88 DEY ; Decrement Loop Counter $80/C3E7 D0 F0 BNE $F0 ; [$C3D9] $80/C3E9 EB XBA ; Now do the second byte $80/C3EA A0 08 00 LDY #$0008 ; Reset counter for second byte $80/C3ED 48 PHA ; Buffer second byte on stack $80/C3EE 29 80 AND #$80 ; Transfer bit $80/C3F0 8D 99 21 STA $2199 $80/C3F3 09 01 ORA #$01 ; Toggle Clock bit $80/C3F5 8D 99 21 STA $2199 $80/C3F8 68 PLA ; Restore byte $80/C3F9 0A ASL A ; Prepare byte to transfer next bit $80/C3FA 88 DEY ; Decrement Loop Counter $80/C3FB D0 F0 BNE $F0 ; [$C3ED] $80/C3FD A9 41 LDA #$41 ; Select port 1 (to make sure this transfer is over?), set Clock bit $80/C3FF 8D 99 21 STA $2199 $80/C402 6B RTL
This transfers the original Hook Vectors & Reset function from ROM to SRAM (after the SRAM is reset).
$80/C5BC 08 PHP ; Buffer Flag Register value on stack $80/C5BD C2 30 REP #$30 ; A/X/Y = 16 bit $80/C5BF A2 12 03 LDX #$0312 $80/C5C2 BF D0 C5 80 LDA $80C5D0,x $80/C5C6 9F 8C 59 10 STA $10598C,x $80/C5CA CA DEX $80/C5CB CA DEX $80/C5CC 10 F4 BPL $F4 ; [$C5C2] $80/C5CE 28 PLP ; Restore Flag Register $80/C5CF 6B RTL
$80/C8E4 ?
$80/C8E4 08 PHP A:0000 X:0000 Y:E280 P:envmxdIzc $80/C8E5 E2 20 SEP #$20 A:0000 X:0000 Y:E280 P:envmxdIzc $80/C8E7 A9 00 LDA #$00 A:0000 X:0000 Y:E280 P:envMxdIzc $80/C8E9 8F 00 50 10 STA $105000[$10:5000] A:0000 X:0000 Y:E280 P:envMxdIZc $80/C8ED 8F 00 50 13 STA $135000[$13:5000] A:0000 X:0000 Y:E280 P:envMxdIZc $80/C8F1 22 F7 C8 80 JSL $80C8F7[$80:C8F7] A:0000 X:0000 Y:E280 P:envMxdIZc $80/C8F5 28 PLP A:0000 X:FFFE Y:E280 P:envMxdIZc $80/C8F6 6B RTL A:0000 X:FFFE Y:E280 P:envmxdIzc
I am not entirely sure, but $02 is at least used as a flag (maybe for more):
First, it gets cleared (everything is fine). If something is wrong, it gets checked if it is clear. If it is, the backup from banks $13-15 gets transfered to $10-$12, its value gets incremented and the subroutine starts over. If something goes wrong again, the subroutine branches to a different path.
$80/C8F7 08 PHP ; Buffer Flag Register value on stack $80/C8F8 C2 30 REP #$30 ; A/X/Y = 16 bit $80/C8FA 9C 02 00 STZ $0002 [$80:0002] A:0 X:0 Y:E280 P:envmxdIzc $80/C8FD AF 00 50 10 LDA $105000 ; Check if a Satellaview is connected $80/C901 C9 53 47 CMP #$4753 ; If it is, it has #$4753 in $10/5000 (ASCII: "SG") $80/C904 D0 45 BNE $45 ; [$C94B] Branch if not $80/C906 AF 04 50 10 LDA $105004 ; Load Checksum $80/C90A 4F 02 50 10 EOR $105002 ; EOR it with the Checksum Complement $80/C90E C9 FF FF CMP #$FFFF ; Does Checksum fit with its complement? $80/C911 D0 38 BNE $38 ; [$C94B] Branch if not $80/C913 64 00 STZ $00 [$00:0000] A:FFFF X:0 Y:E280 P:envmxdIZC $80/C915 A2 FF 0F LDX #$0FFF ; CALCULATE CHECKSUM $80/C918 BF 00 50 10 LDA $105000,x ; The Checksum is every byte between $5000-$5FFF (from banks $10-$12) added together $80/C91C 29 FF 00 AND #$00FF $80/C91F 18 CLC $80/C920 65 00 ADC $00 $80/C922 85 00 STA $00 $80/C924 BF 00 50 11 LDA $115000,x $80/C928 29 FF 00 AND #$00FF $80/C92B 18 CLC $80/C92C 65 00 ADC $00 $80/C92E 85 00 STA $00 $80/C930 BF 00 50 12 LDA $125000,x $80/C934 29 FF 00 AND #$00FF $80/C937 18 CLC $80/C938 65 00 ADC $00 $80/C93A 85 00 STA $00 $80/C93C CA DEX $80/C93D 10 D9 BPL $D9 ; [$C918] Loop $80/C93F CF 04 50 10 CMP $105004 ; Is the calculated Checksum the same as the one in $10/5004? $80/C943 D0 06 BNE $06 ; [$C94B] Branch if not $80/C945 22 1B CA 80 JSL $80CA1B ; Copy data from banks $10-$12 to $13-$15 $80/C949 80 42 BRA $42 ; [$C98D] Exit
(executed when Satellaview does not respond correctly)
$80/C94B A5 02 LDA $02 [$00:0002] A:4700 X:0000 Y:E280 P:eNvmxdIzc $80/C94D D0 08 BNE $08 [$C957] A:0000 X:0000 Y:E280 P:envmxdIZc $80/C94F E6 02 INC $02 [$00:0002] A:0000 X:0000 Y:E280 P:envmxdIZc $80/C951 22 F7 C9 80 JSL $80C9F7 ; Satellaview-related: Copy data from banks $13-$15 to $10-$12 $80/C955 80 A6 BRA $A6 ; [$C8FD] Go back to the start and check if everything works now $80/C957 22 8F C9 80 JSL $80C98F ; Clear banks $10-$12 $80/C95B 22 FF BC 94 JSL $94BCFF ; Clear BS-X SRAM $80/C95F AD 8E C9 LDA $C98E ; This could be optimized with an "LDA #$6B" (UNNECESSARY LINE) $80/C962 8F 74 59 10 STA $105974 ; "Boot Hook" $80/C966 8F 78 59 10 STA $105978 ; "NMI Hook" $80/C96A 8F 7C 59 10 STA $10597C ; "IRQ Vector" $80/C96E 8F 80 59 10 STA $105980 ; "Download Start Hook" $80/C972 8F 84 59 10 STA $105984 ; "File Start Hook" $80/C976 8F 88 59 10 STA $105988 ; "Whatever Hook" $80/C97A A9 53 47 LDA #$4753 ; Store ASCII text "SG" in $10/5000 $80/C97D 8F 00 50 10 STA $105000 $80/C981 22 D7 C5 81 JSL $81C5D7 ; Restore original Hook Vectors $80/C985 22 BC C5 80 JSL $80C5BC ; Restore original Fuction Hook Vectors & Reset function $80/C989 22 AA C9 80 JSL $80C9AA ; Calculate new SRAM Checksum $80/C98D 28 PLP ; Restore Flag Register value $80/C98E 6B RTL
$80/C98F 08 PHP ; Buffer Flag Register value on stack $80/C990 C2 30 REP #$30 ; $80/C992 A9 00 00 LDA #$0000 A:0001 X:FFFE Y:E280 P:envmxdIzc $80/C995 A2 FE 0F LDX #$0FFE A:0000 X:FFFE Y:E280 P:envmxdIZc $80/C998 9F 00 50 10 STA $105000,x[$10:5FFE] A:0000 X:0FFE Y:E280 P:envmxdIzc $80/C99C 9F 00 50 11 STA $115000,x[$11:5FFE] A:0000 X:0FFE Y:E280 P:envmxdIzc $80/C9A0 9F 00 50 12 STA $125000,x[$12:5FFE] A:0000 X:0FFE Y:E280 P:envmxdIzc $80/C9A4 CA DEX A:0000 X:0FFE Y:E280 P:envmxdIzc $80/C9A5 CA DEX A:0000 X:0FFD Y:E280 P:envmxdIzc $80/C9A6 10 F0 BPL $F0 ; [$C998] Loop until everything is done $80/C9A8 28 PLP ; Restore Flag Register value $80/C9A9 6B RTL
$80/C9AA Calculate new SRAM Checksum
$80/C9AA 08 PHP ; Buffer Flag Register value on stack $80/C9AB C2 30 REP #$30 ; A/X/Y = 16 bit $80/C9AD A9 00 00 LDA #$0000 ; Set temporary Checksum: #$0000 $80/C9B0 8F 04 50 10 STA $105004 $80/C9B4 3A DEC A ; Set temporary Checksum Complement: #$FFFF $80/C9B5 8F 02 50 10 STA $105002 $80/C9B9 9C 00 00 STZ $0000 ; Clear Buffer for Checksum $80/C9BC A2 FF 0F LDX #$0FFF ; CALCULATE CHECKSUM $80/C9BF BF 00 50 10 LDA $105000,x ; The Checksum is every byte between $5000-$5FFF (from banks $10-$12) added together $80/C9C3 29 FF 00 AND #$00FF $80/C9C6 18 CLC $80/C9C7 65 00 ADC $00 $80/C9C9 85 00 STA $00 $80/C9CB BF 00 50 11 LDA $115000,x $80/C9CF 29 FF 00 AND #$00FF $80/C9D2 18 CLC $80/C9D3 65 00 ADC $00 $80/C9D5 85 00 STA $00 $80/C9D7 BF 00 50 12 LDA $125000,x $80/C9DB 29 FF 00 AND #$00FF $80/C9DE 18 CLC $80/C9DF 65 00 ADC $00 $80/C9E1 85 00 STA $00 $80/C9E3 CA DEX $80/C9E4 10 D9 BPL $D9 ; [$C9BF] $80/C9E6 8F 04 50 10 STA $105004 ; Store Checksum $80/C9EA 49 FF FF EOR #$FFFF ; Form Checksum Complement and store it $80/C9ED 8F 02 50 10 STA $105002 $80/C9F1 28 PLP ; Restore Flag Register value $80/C9F2 22 1B CA 80 JSL $80CA1B ; Copy data from banks $10-$12 to $13-$15 $80/C9F6 6B RTL
This subroutine copies the data from $5000-$5FFF from the banks $13-15 to $10-12.
$80/C9F7 08 PHP ; Buffer Flag Register value on stack $80/C9F8 C2 30 REP #$30 ; A/X/Y = 16 bit $80/C9FA A2 FE 0F LDX #$0FFE ; Setup Load/Store Index/Loop Counter $80/C9FD BF 00 50 13 LDA $135000,x ; Transfer from bank $13 to $10 $80/CA01 9F 00 50 10 STA $105000,x $80/CA05 BF 00 50 14 LDA $145000,x ; Transfer from bank $14 to $11 $80/CA09 9F 00 50 11 STA $115000,x $80/CA0D BF 00 50 15 LDA $155000,x ; Transfer from bank $15 to $12 $80/CA11 9F 00 50 12 STA $125000,x $80/CA15 CA DEX ; Decrement Load/Store Index twice $80/CA16 CA DEX $80/CA17 10 E4 BPL $E4 ; [$C9FD] Loop until everything is done $80/CA19 28 PLP ; Restore Flag Register value $80/CA1A 6B RTL
This subroutine copies the data from $5000-$5FFF from the banks $10-12 to $13-15.
$80/CA1B 08 PHP ; Buffer Flag Register value on stack $80/CA1C C2 30 REP #$30 ; A/X/Y = 16 bit $80/CA1E A2 FE 0F LDX #$0FFE ; Setup Load/Store Index/Loop Counter $80/CA21 BF 00 50 10 LDA $105000,x ; Transfer from bank $10 to $13 $80/CA25 9F 00 50 13 STA $135000,x $80/CA29 BF 00 50 11 LDA $115000,x ; Transfer from bank $11 to $14 $80/CA2D 9F 00 50 14 STA $145000,x $80/CA31 BF 00 50 12 LDA $125000,x ; Transfer from bank $12 to $15 $80/CA35 9F 00 50 15 STA $155000,x $80/CA39 CA DEX ; Decrement Load/Store Index twice $80/CA3A CA DEX $80/CA3B 10 E4 BPL $E4 ; [$CA21] Loop until everything is done $80/CA3D 28 PLP ; Restore Flag Register value $80/CA3E 6B RTL
$80/E7A3 ?
Executed while NMI.
$80/E7A3 08 PHP ; Buffer Flag Register value on stack $80/E7A4 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/E7A6 AD D2 13 LDA $13D2 [$80:13D2] A:0 X:00FF Y:0 P:envMXdIzC $80/E7A9 D0 35 BNE $35 [$E7E0] A:0 X:00FF Y:0 P:envMXdIZC $80/E7AB AE DD 13 LDX $13DD [$80:13DD] A:0 X:00FF Y:0 P:envMXdIZC $80/E7AE EC DE 13 CPX $13DE [$80:13DE] A:0 X:0 Y:0 P:envMXdIZC $80/E7B1 F0 2D BEQ $2D [$E7E0] A:0 X:0 Y:0 P:envMXdIZC
code is missing here
$80/E7E0 28 PLP ; Restore Flag Register value $80/E7E1 6B RTL
$80/EA28 ?
Executed while NMI.
$80/EA28 08 PHP ; Buffer Flag Register value on stack $80/EA29 AD D2 13 LDA $13D2 [$80:13D2] A:0 X:0 Y:0 P:envMxdIzC $80/EA2C F0 0C BEQ $0C [$EA3A] A:0 X:0 Y:0 P:envMxdIZC
code is missing here
$80/EA3A 28 PLP ; Restore Flag Register value $80/EA3B 6B RTL
$80/EFD6 ?
Executed while NMI.
$80/EFD6 08 PHP ; Buffer Flag Register value on stack $80/EFD7 E2 30 SEP #$30 ; A/X/Y = 8-bit $80/EFD9 AD C9 13 LDA $13C9 [$80:13C9] A:0 X:00FF Y:0 P:envMXdIzC $80/EFDC F0 0B BEQ $0B [$EFE9] A:0 X:00FF Y:0 P:envMXdIZC
code is missing here
$80/EFE9 28 PLP ; Restore Flag Register value $80/EFEA 6B RTL
$80/F1EB ?
$80/F1EB 08 PHP A:0061 X:FFFE Y:0 P:eNvmxdIzC $80/F1EC E2 20 SEP #$20 A:0061 X:FFFE Y:0 P:eNvmxdIzC $80/F1EE C2 10 REP #$10 A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F1F0 9C D1 13 STZ $13D1 [$80:13D1] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F1F3 9C D2 13 STZ $13D2 [$80:13D2] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F1F6 9C DD 13 STZ $13DD [$80:13DD] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F1F9 9C DE 13 STZ $13DE [$80:13DE] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F1FC 9C DF 13 STZ $13DF [$80:13DF] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F1FF 9C C4 13 STZ $13C4 [$80:13C4] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F202 9C B6 13 STZ $13B6 [$80:13B6] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F205 9C B2 13 STZ $13B2 [$80:13B2] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F208 9C B4 13 STZ $13B4 [$80:13B4] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F20B 9C B5 13 STZ $13B5 [$80:13B5] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F20E 9C BF 13 STZ $13BF [$80:13BF] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F211 9C 42 14 STZ $1442 [$80:1442] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F214 9C B7 13 STZ $13B7 [$80:13B7] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F217 9C 74 0B STZ $0B74 [$80:0B74] A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F21A A2 FF FF LDX #$FFFF A:0061 X:FFFE Y:0 P:eNvMxdIzC $80/F21D 8E 33 14 STX $1433 [$80:1433] A:0061 X:FFFF Y:0 P:eNvMxdIzC $80/F220 A9 FF LDA #$FF A:0061 X:FFFF Y:0 P:eNvMxdIzC $80/F222 8D 4F 14 STA $144F [$80:144F] A:00FF X:FFFF Y:0 P:eNvMxdIzC $80/F225 A9 09 LDA #$09 A:00FF X:FFFF Y:0 P:eNvMxdIzC $80/F227 8D 50 14 STA $1450 [$80:1450] A:0009 X:FFFF Y:0 P:envMxdIzC $80/F22A A9 06 LDA #$06 A:0009 X:FFFF Y:0 P:envMxdIzC $80/F22C 8D 51 14 STA $1451 [$80:1451] A:0006 X:FFFF Y:0 P:envMxdIzC $80/F22F 28 PLP A:0006 X:FFFF Y:0 P:envMxdIzC $80/F230 6B RTL A:0006 X:FFFF Y:0 P:eNvmxdIzC
$80/F231 ? (Check if Errors have occured)
$80/F231 08 PHP ; Buffer Flag Register value on stack $80/F232 E2 20 SEP #$20 ; A = 8-bit $80/F234 C2 10 REP #$10 ; X/Y = 16-bit $80/F236 AD 3F 14 LDA $143F ; Check if Errors occured(?) $80/F239 D0 3C BNE $3C ; [$F277] Exit if it has $80/F23B AD DF 13 LDA $13DF [$80:13DF] A:0 X:00FF Y:0 P:envMxdIZC $80/F23E D0 37 BNE $37 ; [$F277] Exit $80/F240 EE DF 13 INC $13DF [$80:13DF] A:0 X:00FF Y:0 P:envMxdIZC $80/F243 22 0C 5C 10 JSL $105C0C[$10:5C0C] A:0 X:00FF Y:0 P:envMxdIzC $80/F247 22 70 5B 10 JSL $105B70[$10:5B70] A:0 X:00FF Y:0 P:envMxdIzC $80/F24B 22 AC 5B 10 JSL $105BAC[$10:5BAC] A:0 X:0 Y:0 P:envMxdIzC $80/F24F AD D1 13 LDA $13D1 [$80:13D1] A:0 X:0 Y:0 P:envMxdIzC $80/F252 F0 20 BEQ $20 [$F274] A:0 X:0 Y:0 P:envMxdIZC
code is missing here
$80/F274 9C DF 13 STZ $13DF [$80:13DF] A:0 X:0 Y:0 P:envMxdIZC $80/F277 28 PLP ; Restore Flag Register value $80/F278 6B RTL
$80/F2AB ?
$80/F2AB 08 PHP ; Buffer Flag Register value on stack $80/F2AC E2 30 SEP #$30 ; A/X/Y = 8-bit $80/F2AE AD 94 21 LDA $2194 [$80:2194] A:0 X:0 Y:00FF P:envMXdIzC $80/F2B1 AE 4F 14 LDX $144F [$80:144F] A:0001 X:0 Y:00FF P:envMXdIzC $80/F2B4 F0 0E BEQ $0E [$F2C4] A:0001 X:00FF Y:00FF P:eNvMXdIzC $80/F2B6 E0 FF CPX #$FF A:0001 X:00FF Y:00FF P:eNvMXdIzC $80/F2B8 D0 07 BNE $07 [$F2C1] A:0001 X:00FF Y:00FF P:envMXdIZC $80/F2BA 29 F3 AND #$F3 ; Deactivate Access LED $80/F2BC 8D 94 21 STA $2194 $80/F2BF 80 19 BRA $19 ; [$F2DA] Exit
code is missing here
$80/F2DA 28 PLP ; Restore Flag Register value $80/F2DB 6B RTL
$80/F2F2 Deactivate Satellaview Power Down Mode
From FullSNES:
2197h Control (only bit7 is modified) (R/W) 0-6 Unknown/unused (should be left unchanged) 7 Power Down Mode? (0=Power Down, 1=Operate/Normal) (Soundlink enable?) Bit7 is set by various BIOS functions, and, notably: When [7FD9h/FFD9h].Bit4 (in Satellaview FLASH File Header) is set. Also notably: Bit7 is set/cleared depending on Town Status Entry[07h].Bit6-7.
$80/F2F2 08 PHP ; Buffer Flag Register value and A on stack $80/F2F3 E2 20 SEP #$20 $80/F2F5 48 PHA $80/F2F6 AF 97 21 00 LDA $002197 ; Load $2197 value, set MSB, store back $80/F2FA 09 80 ORA #$80 $80/F2FC 8F 97 21 00 STA $002197 $80/F300 68 PLA ; Restore Flag Register value and A $80/F301 28 PLP $80/F302 6B RTL
Bank $81
$81/8002 ? (Executed when talking to the aerial building)
$81/8002 A5 AC LDA $AC [$00:00AC] A:8001 X:0024 Y:0007 P:envmxdIzc $81/8004 1A INC A A:9DF8 X:0024 Y:0007 P:eNvmxdIzc $81/8005 1A INC A A:9DF9 X:0024 Y:0007 P:eNvmxdIzc $81/8006 1A INC A A:9DFA X:0024 Y:0007 P:eNvmxdIzc $81/8007 1A INC A A:9DFB X:0024 Y:0007 P:eNvmxdIzc $81/8008 20 49 C1 JSR $C149 [$81:C149] A:9DFC X:0024 Y:0007 P:eNvmxdIzc $81/800B A5 AD LDA $AD [$00:00AD] A:9DFC X:0024 Y:1000 P:eNvmxdIzc $81/800D 20 49 C1 JSR $C149 [$81:C149] A:889D X:0024 Y:1000 P:eNvmxdIzc $81/8010 A0 01 00 LDY #$0001 A:889D X:0024 Y:0FFE P:eNvmxdIzc $81/8013 B7 AC LDA [$AC],y[$88:9DF9] A:889D X:0024 Y:0001 P:envmxdIzc $81/8015 85 20 STA $20 [$00:0020] A:DE65 X:0024 Y:0001 P:eNvmxdIzc $81/8017 C8 INY A:DE65 X:0024 Y:0001 P:eNvmxdIzc $81/8018 B7 AC LDA [$AC],y[$88:9DFA] A:DE65 X:0024 Y:0002 P:envmxdIzc $81/801A 85 21 STA $21 [$00:0021] A:88DE X:0024 Y:0002 P:eNvmxdIzc $81/801C 20 96 BA JSR $BA96 [$81:BA96] A:88DE X:0024 Y:0002 P:eNvmxdIzc $81/801F A5 21 LDA $21 [$00:0021] A:0088 X:0024 Y:0002 P:envmxdIzc $81/8021 85 AD STA $AD [$00:00AD] A:88DE X:0024 Y:0002 P:eNvmxdIzc $81/8023 A5 20 LDA $20 [$00:0020] A:88DE X:0024 Y:0002 P:eNvmxdIzc $81/8025 85 AC STA $AC [$00:00AC] A:DE65 X:0024 Y:0002 P:eNvmxdIzc $81/8027 60 RTS A:DE65 X:0024 Y:0002 P:eNvmxdIzc
$81/8028 ? (Executed when talking to the aerial building)
$81/8028 20 8B C1 JSR $C18B [$81:C18B] A:8027 X:0024 Y:0007 P:envmxdIzc $81/802B 85 AD STA $AD [$00:00AD] A:889D X:0024 Y:0FFE P:envmxdIzc $81/802D 20 8B C1 JSR $C18B [$81:C18B] A:889D X:0024 Y:0FFE P:envmxdIzc $81/8030 85 AC STA $AC [$00:00AC] A:9DFC X:0024 Y:1000 P:envmxdIzc $81/8032 60 RTS A:9DFC X:0024 Y:1000 P:envmxdIzc
$81/A551 ? (Executed when talking to the aerial building)
$81/A551 DA PHX A:9DB5 X:0024 Y:0004 P:eNvmxdIzc $81/A552 A7 AC LDA [$AC] [$88:9DB5] A:9DB5 X:0024 Y:0004 P:eNvmxdIzc $81/A554 48 PHA A:0000 X:0024 Y:0004 P:envmxdIZc $81/A555 E6 AC INC $AC [$00:00AC] A:0000 X:0024 Y:0004 P:envmxdIZc $81/A557 E6 AC INC $AC [$00:00AC] A:0000 X:0024 Y:0004 P:eNvmxdIzc $81/A559 A7 AC LDA [$AC] [$88:9DB7] A:0000 X:0024 Y:0004 P:eNvmxdIzc $81/A55B AA TAX A:1002 X:0024 Y:0004 P:envmxdIzc $81/A55C E6 AC INC $AC [$00:00AC] A:1002 X:1002 Y:0004 P:envmxdIzc $81/A55E E6 AC INC $AC [$00:00AC] A:1002 X:1002 Y:0004 P:eNvmxdIzc $81/A560 A7 AC LDA [$AC] [$88:9DB9] A:1002 X:1002 Y:0004 P:eNvmxdIzc $81/A562 A8 TAY A:020C X:1002 Y:0004 P:envmxdIzc $81/A563 E6 AC INC $AC [$00:00AC] A:020C X:1002 Y:020C P:envmxdIzc $81/A565 E6 AC INC $AC [$00:00AC] A:020C X:1002 Y:020C P:eNvmxdIzc $81/A567 68 PLA A:020C X:1002 Y:020C P:eNvmxdIzc $81/A568 22 BF B4 80 JSL $80B4BF[$80:B4BF] A:0000 X:1002 Y:020C P:envmxdIZc $81/A56C FA PLX A:00C8 X:0000 Y:020C P:envmxdIzc $81/A56D 6B RTL A:00C8 X:0024 Y:020C P:envmxdIzc
$81/AFFD ? (Executed when talking to the aerial building)
$81/AFFD 86 00 STX $00 [$00:0000] A:0005 X:0026 Y:0002 P:eNvmxdIzc $81/AFFF 0A ASL A A:0005 X:0026 Y:0002 P:eNvmxdIzc $81/B000 AA TAX A:000A X:0026 Y:0002 P:envmxdIzc $81/B001 7C 0D B0 JMP ($B00D,x)[$81:B07E] A:000A X:000A Y:0002 P:envmxdIzc
$81/B00D Jump Table for $81/AFFD
data is missing here
$81/B088 ? (Executed when talking to the aerial building)
$81/B088 9E 52 11 STZ $1152,x[$81:1178] A:000A X:0026 Y:0002 P:envmxdIzc $81/B08B 9E 42 12 STZ $1242,x[$81:1268] A:000A X:0026 Y:0002 P:envmxdIzc $81/B08E 9E 30 18 STZ $1830,x[$81:1856] A:000A X:0026 Y:0002 P:envmxdIzc $81/B091 9E 1A 12 STZ $121A,x[$81:1240] A:000A X:0026 Y:0002 P:envmxdIzc $81/B094 9E 08 18 STZ $1808,x[$81:182E] A:000A X:0026 Y:0002 P:envmxdIzc $81/B097 9E 80 18 STZ $1880,x[$81:18A6] A:000A X:0026 Y:0002 P:envmxdIzc $81/B09A 9E 6A 0D STZ $0D6A,x[$81:0D90] A:000A X:0026 Y:0002 P:envmxdIzc $81/B09D 9E 92 0D STZ $0D92,x[$81:0DB8] A:000A X:0026 Y:0002 P:envmxdIzc $81/B0A0 9E F2 11 STZ $11F2,x[$81:1218] A:000A X:0026 Y:0002 P:envmxdIzc $81/B0A3 A9 10 00 LDA #$0010 A:000A X:0026 Y:0002 P:envmxdIzc $81/B0A6 9D AA 0E STA $0EAA,x[$81:0ED0] A:0010 X:0026 Y:0002 P:envmxdIzc $81/B0A9 6B RTL A:0010 X:0026 Y:0002 P:envmxdIzc
$81/B088 ? (Executed when talking to the aerial building)
$81/B0AA A0 01 00 LDY #$0001 A:B0A9 X:0026 Y:0006 P:envmxdIzc $81/B0AD 20 EA BD JSR $BDEA [$81:BDEA] A:B0A9 X:0026 Y:0001 P:envmxdIzc $81/B0B0 9D CA 11 STA $11CA,x[$81:11F0] A:178E X:0026 Y:0004 P:envmxdIzc $81/B0B3 A0 04 00 LDY #$0004 A:178E X:0026 Y:0004 P:envmxdIzc $81/B0B6 B7 AC LDA [$AC],y[$88:8E46] A:178E X:0026 Y:0004 P:envmxdIzc $81/B0B8 29 FF 00 AND #$00FF A:A801 X:0026 Y:0004 P:eNvmxdIzc $81/B0BB 85 00 STA $00 [$00:0000] A:0001 X:0026 Y:0004 P:envmxdIzc $81/B0BD C8 INY A:0001 X:0026 Y:0004 P:envmxdIzc $81/B0BE B7 AC LDA [$AC],y[$88:8E47] A:0001 X:0026 Y:0005 P:envmxdIzc $81/B0C0 85 20 STA $20 [$00:0020] A:9DA8 X:0026 Y:0005 P:eNvmxdIzc $81/B0C2 C8 INY A:9DA8 X:0026 Y:0005 P:eNvmxdIzc $81/B0C3 B7 AC LDA [$AC],y[$88:8E48] A:9DA8 X:0026 Y:0006 P:envmxdIzc $81/B0C5 85 21 STA $21 [$00:0021] A:889D X:0026 Y:0006 P:eNvmxdIzc $81/B0C7 20 96 BA JSR $BA96 [$81:BA96] A:889D X:0026 Y:0006 P:eNvmxdIzc $81/B0CA 20 53 BA JSR $BA53 [$81:BA53] A:0088 X:0026 Y:0006 P:envmxdIzc $81/B0CD B0 0F BCS $0F [$B0DE] A:0001 X:0026 Y:178E P:envmxdIzc $81/B0CF A9 01 00 LDA #$0001 A:0001 X:0026 Y:178E P:envmxdIzc $81/B0D2 8D 98 19 STA $1998 [$81:1998] A:0001 X:0026 Y:178E P:envmxdIzc $81/B0D5 A5 AC LDA $AC [$00:00AC] A:0001 X:0026 Y:178E P:envmxdIzc $81/B0D7 18 CLC A:8E42 X:0026 Y:178E P:eNvmxdIzc $81/B0D8 69 08 00 ADC #$0008 A:8E42 X:0026 Y:178E P:eNvmxdIzc $81/B0DB 85 AC STA $AC [$00:00AC] A:8E4A X:0026 Y:178E P:eNvmxdIzc $81/B0DD 60 RTS A:8E4A X:0026 Y:178E P:eNvmxdIzc
$81/BA2A ? (Executed when talking to the aerial building and on the title screen)
$81/BA2A 9E E0 17 STZ $17E0,x[$81:1804] A:0001 X:0024 Y:1000 P:envmxdIzc $81/BA2D 9E 30 18 STZ $1830,x[$81:1854] A:0001 X:0024 Y:1000 P:envmxdIzc $81/BA30 9E 1A 12 STZ $121A,x[$81:123E] A:0001 X:0024 Y:1000 P:envmxdIzc $81/BA33 9E 42 12 STZ $1242,x[$81:1266] A:0001 X:0024 Y:1000 P:envmxdIzc $81/BA36 9E 6A 0D STZ $0D6A,x[$81:0D8E] A:0001 X:0024 Y:1000 P:envmxdIzc $81/BA39 BC 90 17 LDY $1790,x[$81:17B4] A:0001 X:0024 Y:1000 P:envmxdIzc $81/BA3C C0 FF FF CPY #$FFFF A:0001 X:0024 Y:0026 P:envmxdIzc $81/BA3F F0 11 BEQ $11 [$BA52] A:0001 X:0024 Y:0026 P:envmxdIzc $81/BA41 B9 CA 11 LDA $11CA,y[$81:11F0] A:0001 X:0024 Y:0026 P:envmxdIzc $81/BA44 A8 TAY A:178E X:0024 Y:0026 P:envmxdIzc $81/BA45 B9 00 00 LDA $0000,y[$81:178E] A:178E X:0024 Y:178E P:envmxdIzc $81/BA48 3A DEC A A:0001 X:0024 Y:178E P:envmxdIzc $81/BA49 99 00 00 STA $0000,y[$81:178E] A:0000 X:0024 Y:178E P:envmxdIZc $81/BA4C A9 FF FF LDA #$FFFF A:0000 X:0024 Y:178E P:envmxdIZc $81/BA4F 9D 90 17 STA $1790,x[$81:17B4] A:FFFF X:0024 Y:178E P:eNvmxdIzc $81/BA52 60 RTS A:FFFF X:0024 Y:178E P:eNvmxdIzc
$81/BA53 ? (Executed when talking to the aerial building)
$81/BA53 DA PHX A:0088 X:0026 Y:0006 P:envmxdIzc $81/BA54 BD CA 11 LDA $11CA,x[$81:11F0] A:0088 X:0026 Y:0006 P:envmxdIzc $81/BA57 85 02 STA $02 [$00:0002] A:178E X:0026 Y:0006 P:envmxdIzc $81/BA59 B2 02 LDA ($02) [$81:178E] A:178E X:0026 Y:0006 P:envmxdIzc $81/BA5B C5 00 CMP $00 [$00:0000] A:0000 X:0026 Y:0006 P:envmxdIZc $81/BA5D 10 15 BPL $15 [$BA74] A:0000 X:0026 Y:0006 P:eNvmxdIzc $81/BA5F BD A0 16 LDA $16A0,x[$81:16C6] A:0000 X:0026 Y:0006 P:eNvmxdIzc $81/BA62 A8 TAY A:01A5 X:0026 Y:0006 P:envmxdIzc $81/BA63 BD 50 16 LDA $1650,x[$81:1676] A:01A5 X:0026 Y:01A5 P:envmxdIzc $81/BA66 AA TAX A:0129 X:0026 Y:01A5 P:envmxdIzc $81/BA67 A5 22 LDA $22 [$00:0022] A:0129 X:0129 Y:01A5 P:envmxdIzc $81/BA69 8D BE 00 STA $00BE [$81:00BE] A:6C88 X:0129 Y:01A5 P:envmxdIzc $81/BA6C A5 20 LDA $20 [$00:0020] A:6C88 X:0129 Y:01A5 P:envmxdIzc $81/BA6E 22 B0 C2 81 JSL $81C2B0[$81:C2B0] A:9DA8 X:0129 Y:01A5 P:eNvmxdIzc $81/BA72 90 03 BCC $03 [$BA77] A:16C4 X:0024 Y:01A5 P:eNvmxdIzc $81/BA77 9B TXY A:16C4 X:0024 Y:01A5 P:eNvmxdIzc $81/BA78 FA PLX A:16C4 X:0024 Y:0024 P:envmxdIzc $81/BA79 8A TXA A:16C4 X:0026 Y:0024 P:envmxdIzc $81/BA7A 99 90 17 STA $1790,y[$81:17B4] A:0026 X:0026 Y:0024 P:envmxdIzc $81/BA7D BD 32 0E LDA $0E32,x[$81:0E58] A:0026 X:0026 Y:0024 P:envmxdIzc $81/BA80 99 32 0E STA $0E32,y[$81:0E56] A:0200 X:0026 Y:0024 P:envmxdIzc $81/BA83 BD 0A 0E LDA $0E0A,x[$81:0E30] A:0200 X:0026 Y:0024 P:envmxdIzc $81/BA86 99 0A 0E STA $0E0A,y[$81:0E2E] A:0020 X:0026 Y:0024 P:envmxdIzc $81/BA89 BD CA 11 LDA $11CA,x[$81:11F0] A:0020 X:0026 Y:0024 P:envmxdIzc $81/BA8C A8 TAY A:178E X:0026 Y:0024 P:envmxdIzc $81/BA8D B9 00 00 LDA $0000,y[$81:178E] A:178E X:0026 Y:178E P:envmxdIzc $81/BA90 1A INC A A:0000 X:0026 Y:178E P:envmxdIZc $81/BA91 99 00 00 STA $0000,y[$81:178E] A:0001 X:0026 Y:178E P:envmxdIzc $81/BA94 18 CLC A:0001 X:0026 Y:178E P:envmxdIzc $81/BA95 60 RTS A:0001 X:0026 Y:178E P:envmxdIzc
$81/BA96 ?
$81/BA96 DA PHX A:9582 X:0026 Y:0002 P:eNvmxdIzc $81/BA97 A5 22 LDA $22 [$00:0022] A:9582 X:0026 Y:0002 P:eNvmxdIzc $81/BA99 29 FF 00 AND #$00FF A:CB95 X:0026 Y:0002 P:eNvmxdIzc $81/BA9C C9 F0 00 CMP #$00F0 A:0095 X:0026 Y:0002 P:envmxdIzc $81/BA9F 30 41 BMI $41 [$BAE2] A:0095 X:0026 Y:0002 P:eNvmxdIzc
code is missing here
$81/BAE2 FA PLX A:0095 X:0026 Y:0002 P:eNvmxdIzc $81/BAE3 60 RTS A:0095 X:0026 Y:0002 P:envmxdIzc
$81/C149 ? (Executed when talking to the aerial building)
$81/C149 48 PHA A:9DFC X:0024 Y:0007 P:eNvmxdIzc $81/C14A AD BA 0C LDA $0CBA [$81:0CBA] A:9DFC X:0024 Y:0007 P:eNvmxdIzc $81/C14D D0 1D BNE $1D [$C16C] A:0000 X:0024 Y:0007 P:envmxdIZc $81/C14F DE 82 0E DEC $0E82,x[$81:0EA6] A:0000 X:0024 Y:0007 P:envmxdIZc $81/C152 DE 82 0E DEC $0E82,x[$81:0EA6] A:0000 X:0024 Y:0007 P:envmxdIzc $81/C155 BD 82 0E LDA $0E82,x[$81:0EA6] A:0000 X:0024 Y:0007 P:envmxdIzc $81/C158 30 2F BMI $2F [$C189] A:000E X:0024 Y:0007 P:envmxdIzc $81/C15A BF D0 C1 81 LDA $81C1D0,x[$81:C1F4] A:000E X:0024 Y:0007 P:envmxdIzc $81/C15E 18 CLC A:0120 X:0024 Y:0007 P:envmxdIzc $81/C15F 69 D2 0E ADC #$0ED2 A:0120 X:0024 Y:0007 P:envmxdIzc $81/C162 18 CLC A:0FF2 X:0024 Y:0007 P:envmxdIzc $81/C163 7D 82 0E ADC $0E82,x[$81:0EA6] A:0FF2 X:0024 Y:0007 P:envmxdIzc $81/C166 A8 TAY A:1000 X:0024 Y:0007 P:envmxdIzc $81/C167 68 PLA A:1000 X:0024 Y:1000 P:envmxdIzc $81/C168 99 00 00 STA $0000,y[$81:1000] A:9DFC X:0024 Y:1000 P:eNvmxdIzc $81/C16B 60 RTS A:9DFC X:0024 Y:1000 P:eNvmxdIzc
$81/C18B ? (Executed when talking to the aerial building)
$81/C18B AD BA 0C LDA $0CBA [$81:0CBA] A:8027 X:0024 Y:0007 P:envmxdIzc $81/C18E D0 1F BNE $1F [$C1AF] A:0000 X:0024 Y:0007 P:envmxdIZc $81/C190 BD 82 0E LDA $0E82,x[$81:0EA6] A:0000 X:0024 Y:0007 P:envmxdIZc $81/C193 C9 10 00 CMP #$0010 A:000C X:0024 Y:0007 P:envmxdIzc $81/C196 10 36 BPL $36 [$C1CE] A:000C X:0024 Y:0007 P:eNvmxdIzc $81/C198 BF D0 C1 81 LDA $81C1D0,x[$81:C1F4] A:000C X:0024 Y:0007 P:eNvmxdIzc $81/C19C 18 CLC A:0120 X:0024 Y:0007 P:envmxdIzc $81/C19D 69 D2 0E ADC #$0ED2 A:0120 X:0024 Y:0007 P:envmxdIzc $81/C1A0 18 CLC A:0FF2 X:0024 Y:0007 P:envmxdIzc $81/C1A1 7D 82 0E ADC $0E82,x[$81:0EA6] A:0FF2 X:0024 Y:0007 P:envmxdIzc $81/C1A4 A8 TAY A:0FFE X:0024 Y:0007 P:envmxdIzc $81/C1A5 B9 00 00 LDA $0000,y[$81:0FFE] A:0FFE X:0024 Y:0FFE P:envmxdIzc $81/C1A8 FE 82 0E INC $0E82,x[$81:0EA6] A:889D X:0024 Y:0FFE P:eNvmxdIzc $81/C1AB FE 82 0E INC $0E82,x[$81:0EA6] A:889D X:0024 Y:0FFE P:envmxdIzc $81/C1AE 60 RTS A:889D X:0024 Y:0FFE P:envmxdIzc
$81/C210 ?
$81/C210 08 PHP A:0001 X:0 Y:0 P:envmxdIzC $81/C211 8B PHB A:0001 X:0 Y:0 P:envmxdIzC $81/C212 C2 30 REP #$30 A:0001 X:0 Y:0 P:envmxdIzC $81/C214 A2 26 00 LDX #$0026 A:0001 X:0 Y:0 P:envmxdIzC $81/C217 20 2A BA JSR $BA2A [$81:BA2A] A:0001 X:0026 Y:0 P:envmxdIzC $81/C21A CA DEX A:FFFF X:0026 Y:0 P:eNvmxdIzc $81/C21B CA DEX A:FFFF X:0025 Y:0 P:envmxdIzc $81/C21C 10 F9 BPL $F9 [$C217] A:FFFF X:0024 Y:0 P:envmxdIzc $81/C21E 22 25 C2 81 JSL $81C225[$81:C225] A:FFFF X:FFFE Y:0 P:eNvmxdIzc $81/C222 AB PLB A:000A X:FFFE Y:0 P:envmxdIzc $81/C223 28 PLP A:000A X:FFFE Y:0 P:eNvmxdIzc $81/C224 6B RTL A:000A X:FFFE Y:0 P:envmxdIzC
$81/C225 ?
$81/C225 A9 C0 FF LDA #$FFC0 A:FFFF X:FFFE Y:0 P:eNvmxdIzc $81/C228 8D CE 0C STA $0CCE [$80:0CCE] A:FFC0 X:FFFE Y:0 P:eNvmxdIzc $81/C22B 8D D6 0C STA $0CD6 [$80:0CD6] A:FFC0 X:FFFE Y:0 P:eNvmxdIzc $81/C22E A9 40 01 LDA #$0140 A:FFC0 X:FFFE Y:0 P:eNvmxdIzc $81/C231 8D D0 0C STA $0CD0 [$80:0CD0] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C234 8D D8 0C STA $0CD8 [$80:0CD8] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C237 A9 C0 FF LDA #$FFC0 A:0140 X:FFFE Y:0 P:envmxdIzc $81/C23A 8D D2 0C STA $0CD2 [$80:0CD2] A:FFC0 X:FFFE Y:0 P:eNvmxdIzc $81/C23D 8D DA 0C STA $0CDA [$80:0CDA] A:FFC0 X:FFFE Y:0 P:eNvmxdIzc $81/C240 A9 40 01 LDA #$0140 A:FFC0 X:FFFE Y:0 P:eNvmxdIzc $81/C243 8D D4 0C STA $0CD4 [$80:0CD4] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C246 8D DC 0C STA $0CDC [$80:0CDC] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C249 9C C2 0C STZ $0CC2 [$80:0CC2] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C24C 9C C4 0C STZ $0CC4 [$80:0CC4] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C24F 9C C0 0C STZ $0CC0 [$80:0CC0] A:0140 X:FFFE Y:0 P:envmxdIzc $81/C252 A9 0A 00 LDA #$000A A:0140 X:FFFE Y:0 P:envmxdIzc $81/C255 8D BC 0C STA $0CBC [$80:0CBC] A:000A X:FFFE Y:0 P:envmxdIzc $81/C258 8D BE 0C STA $0CBE [$80:0CBE] A:000A X:FFFE Y:0 P:envmxdIzc $81/C25B 9C EE 0C STZ $0CEE [$80:0CEE] A:000A X:FFFE Y:0 P:envmxdIzc $81/C25E 9C A3 13 STZ $13A3 [$80:13A3] A:000A X:FFFE Y:0 P:envmxdIzc $81/C261 9C A7 13 STZ $13A7 [$80:13A7] A:000A X:FFFE Y:0 P:envmxdIzc $81/C264 9C A5 13 STZ $13A5 [$80:13A5] A:000A X:FFFE Y:0 P:envmxdIzc $81/C267 6B RTL A:000A X:FFFE Y:0 P:envmxdIzc
$81/C29A ?
$81/C29A 08 PHP A:000A X:FFFE Y:0 P:envmxdIzC $81/C29B C2 20 REP #$20 A:000A X:FFFE Y:0 P:envmxdIzC $81/C29D A9 00 80 LDA #$8000 A:000A X:FFFE Y:0 P:envmxdIzC $81/C2A0 0C B8 0C TSB $0CB8 [$80:0CB8] A:8000 X:FFFE Y:0 P:eNvmxdIzC $81/C2A3 28 PLP A:8000 X:FFFE Y:0 P:eNvmxdIZC $81/C2A4 6B RTL A:8000 X:FFFE Y:0 P:envmxdIzC
$81/C2B0 ? (Executed when talking to the aerial building and at start up)
$81/C2B0 08 PHP A:9DA8 X:0129 Y:01A5 P:eNvmxdIzc $81/C2B1 5A PHY A:9DA8 X:0129 Y:01A5 P:eNvmxdIzc $81/C2B2 DA PHX A:9DA8 X:0129 Y:01A5 P:eNvmxdIzc $81/C2B3 48 PHA A:9DA8 X:0129 Y:01A5 P:eNvmxdIzc $81/C2B4 A2 26 00 LDX #$0026 A:9DA8 X:0129 Y:01A5 P:eNvmxdIzc $81/C2B7 BD E0 17 LDA $17E0,x[$81:1806] A:9DA8 X:0026 Y:01A5 P:envmxdIzc $81/C2BA F0 0A BEQ $0A [$C2C6] A:8887 X:0026 Y:01A5 P:eNvmxdIzc $81/C2BC CA DEX A:8887 X:0026 Y:01A5 P:eNvmxdIzc $81/C2BD CA DEX A:8887 X:0025 Y:01A5 P:envmxdIzc $81/C2BE 10 F7 BPL $F7 [$C2B7] A:8887 X:0024 Y:01A5 P:envmxdIzc $81/C2C6 AD BE 00 LDA $00BE [$81:00BE] A:0000 X:0024 Y:01A5 P:envmxdIZc $81/C2C9 EB XBA A:6C88 X:0024 Y:01A5 P:envmxdIzc $81/C2CA 9D E0 17 STA $17E0,x[$81:1804] A:886C X:0024 Y:01A5 P:envmxdIzc $81/C2CD 68 PLA A:886C X:0024 Y:01A5 P:envmxdIzc $81/C2CE 9D B8 17 STA $17B8,x[$81:17DC] A:9DA8 X:0024 Y:01A5 P:eNvmxdIzc $81/C2D1 68 PLA A:9DA8 X:0024 Y:01A5 P:eNvmxdIzc $81/C2D2 9D 50 16 STA $1650,x[$81:1674] A:0129 X:0024 Y:01A5 P:envmxdIzc $81/C2D5 68 PLA A:0129 X:0024 Y:01A5 P:envmxdIzc $81/C2D6 9D A0 16 STA $16A0,x[$81:16C4] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2D9 9E 30 18 STZ $1830,x[$81:1854] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2DC 9E 08 18 STZ $1808,x[$81:182C] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2DF 9E 58 18 STZ $1858,x[$81:187C] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2E2 9E 80 18 STZ $1880,x[$81:18A4] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2E5 9E 1A 0D STZ $0D1A,x[$81:0D3E] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2E8 9E 42 0D STZ $0D42,x[$81:0D66] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2EB 9E 6A 0D STZ $0D6A,x[$81:0D8E] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2EE 9E 92 0D STZ $0D92,x[$81:0DB6] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2F1 9E BA 0D STZ $0DBA,x[$81:0DDE] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2F4 9E E2 0D STZ $0DE2,x[$81:0E06] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2F7 9E 0A 0E STZ $0E0A,x[$81:0E2E] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2FA 9E 32 0E STZ $0E32,x[$81:0E56] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C2FD 9E 1A 12 STZ $121A,x[$81:123E] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C300 9E 42 12 STZ $1242,x[$81:1266] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C303 9E C8 16 STZ $16C8,x[$81:16EC] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C306 9E F0 16 STZ $16F0,x[$81:1714] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C309 9E 68 17 STZ $1768,x[$81:178C] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C30C 9E 40 17 STZ $1740,x[$81:1764] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C30F 9E F2 11 STZ $11F2,x[$81:1216] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C312 9E 7A 11 STZ $117A,x[$81:119E] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C315 9E A2 11 STZ $11A2,x[$81:11C6] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C318 9E 52 11 STZ $1152,x[$81:1176] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C31B 9E 48 19 STZ $1948,x[$81:196C] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C31E 9E 70 19 STZ $1970,x[$81:1994] A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C321 A9 FF FF LDA #$FFFF A:01A5 X:0024 Y:01A5 P:envmxdIzc $81/C324 9D 90 17 STA $1790,x[$81:17B4] A:FFFF X:0024 Y:01A5 P:eNvmxdIzc $81/C327 9D 18 17 STA $1718,x[$81:173C] A:FFFF X:0024 Y:01A5 P:eNvmxdIzc $81/C32A A9 00 30 LDA #$3000 A:FFFF X:0024 Y:01A5 P:eNvmxdIzc $81/C32D 9D 5A 0E STA $0E5A,x[$81:0E7E] A:3000 X:0024 Y:01A5 P:envmxdIzc $81/C330 A9 10 00 LDA #$0010 A:3000 X:0024 Y:01A5 P:envmxdIzc $81/C333 9D 82 0E STA $0E82,x[$81:0EA6] A:0010 X:0024 Y:01A5 P:envmxdIzc $81/C336 9D AA 0E STA $0EAA,x[$81:0ECE] A:0010 X:0024 Y:01A5 P:envmxdIzc $81/C339 8A TXA A:0010 X:0024 Y:01A5 P:envmxdIzc $81/C33A 4A LSR A A:0024 X:0024 Y:01A5 P:envmxdIzc $81/C33B 9D 00 16 STA $1600,x[$81:1624] A:0012 X:0024 Y:01A5 P:envmxdIzc $81/C33E 8A TXA A:0012 X:0024 Y:01A5 P:envmxdIzc $81/C33F 18 CLC A:0024 X:0024 Y:01A5 P:envmxdIzc $81/C340 69 A0 16 ADC #$16A0 A:0024 X:0024 Y:01A5 P:envmxdIzc $81/C343 9D 20 19 STA $1920,x[$81:1944] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C346 9E B2 19 STZ $19B2,x[$81:19D6] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C349 9E DA 19 STZ $19DA,x[$81:19FE] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C34C 9E 02 1A STZ $1A02,x[$81:1A26] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C34F 9E 2A 1A STZ $1A2A,x[$81:1A4E] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C352 9E 52 1A STZ $1A52,x[$81:1A76] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C355 9E 7A 1A STZ $1A7A,x[$81:1A9E] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C358 9E A2 1A STZ $1AA2,x[$81:1AC6] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C35B 9E CA 1A STZ $1ACA,x[$81:1AEE] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C35E 9E F2 1A STZ $1AF2,x[$81:1B16] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C361 9E 1A 1B STZ $1B1A,x[$81:1B3E] A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C364 28 PLP A:16C4 X:0024 Y:01A5 P:envmxdIzc $81/C365 18 CLC A:16C4 X:0024 Y:01A5 P:eNvmxdIzc $81/C366 6B RTL A:16C4 X:0024 Y:01A5 P:eNvmxdIzc
$81/C3C9 ?
$81/C3C9 C2 30 REP #$30 A:9500 X:0026 Y:0077 P:eNvmxdIzc $81/C3CB BD 50 16 LDA $1650,x[$81:1676] A:9500 X:0026 Y:0077 P:eNvmxdIzc $81/C3CE 38 SEC A:0000 X:0026 Y:0077 P:envmxdIZc $81/C3CF ED C2 0C SBC $0CC2 [$81:0CC2] A:0000 X:0026 Y:0077 P:envmxdIZC $81/C3D2 CD D2 0C CMP $0CD2 [$81:0CD2] A:0000 X:0026 Y:0077 P:envmxdIZC $81/C3D5 30 18 BMI $18 [$C3EF] A:0000 X:0026 Y:0077 P:envmxdIzc $81/C3D7 CD D4 0C CMP $0CD4 [$81:0CD4] A:0000 X:0026 Y:0077 P:envmxdIzc $81/C3DA 10 13 BPL $13 [$C3EF] A:0000 X:0026 Y:0077 P:eNvmxdIzc $81/C3DC BD A0 16 LDA $16A0,x[$81:16C6] A:0000 X:0026 Y:0077 P:eNvmxdIzc $81/C3DF 38 SEC A:0077 X:0026 Y:0077 P:envmxdIzc $81/C3E0 ED C4 0C SBC $0CC4 [$81:0CC4] A:0077 X:0026 Y:0077 P:envmxdIzC $81/C3E3 CD CE 0C CMP $0CCE [$81:0CCE] A:0077 X:0026 Y:0077 P:envmxdIzC $81/C3E6 30 07 BMI $07 [$C3EF] A:0077 X:0026 Y:0077 P:envmxdIzc $81/C3E8 CD D0 0C CMP $0CD0 [$81:0CD0] A:0077 X:0026 Y:0077 P:envmxdIzc $81/C3EB 10 02 BPL $02 [$C3EF] A:0077 X:0026 Y:0077 P:eNvmxdIzc $81/C3ED 80 08 BRA $08 [$C3F7] A:0077 X:0026 Y:0077 P:eNvmxdIzc $81/C3F7 18 CLC A:0077 X:0026 Y:0077 P:eNvmxdIzc $81/C3F8 60 RTS
$81/C3FB ?
$81/C3FB C2 30 REP #$30 A:0000 X:0026 Y:0077 P:envmxdIZc $81/C3FD 9C BA 0C STZ $0CBA [$81:0CBA] A:0000 X:0026 Y:0077 P:envmxdIZc $81/C400 BD 58 18 LDA $1858,x[$81:187E] A:0000 X:0026 Y:0077 P:envmxdIZc $81/C403 8D B6 0C STA $0CB6 [$81:0CB6] A:0000 X:0026 Y:0077 P:envmxdIZc $81/C406 BD E0 17 LDA $17E0,x[$81:1806] A:0000 X:0026 Y:0077 P:envmxdIZc $81/C409 85 AD STA $AD [$00:00AD] A:9500 X:0026 Y:0077 P:eNvmxdIzc $81/C40B BD B8 17 LDA $17B8,x[$81:17DE] A:9500 X:0026 Y:0077 P:eNvmxdIzc $81/C40E 85 AC STA $AC [$00:00AC] A:82F5 X:0026 Y:0077 P:eNvmxdIzc $81/C410 A7 AC LDA [$AC] [$95:82F5] A:82F5 X:0026 Y:0077 P:eNvmxdIzc $81/C412 29 FF 00 AND #$00FF A:EB00 X:0026 Y:0077 P:eNvmxdIzc $81/C415 8D EC 0C STA $0CEC [$81:0CEC] A:0000 X:0026 Y:0077 P:envmxdIZc $81/C418 0A ASL A A:0000 X:0026 Y:0077 P:envmxdIZc $81/C419 86 00 STX $00 [$00:0000] A:0000 X:0026 Y:0077 P:envmxdIZc $81/C41B AA TAX A:0000 X:0026 Y:0077 P:envmxdIZc $81/C41C F4 27 C4 PEA $C427 A:0000 X:0000 Y:0077 P:envmxdIZc $81/C41F BF A0 5C 10 LDA $105CA0,x[$10:5CA0] A:0000 X:0000 Y:0077 P:envmxdIZc $81/C423 3A DEC A A:AFBF X:0000 Y:0077 P:eNvmxdIzc $81/C424 48 PHA A:AFBE X:0000 Y:0077 P:eNvmxdIzc $81/C425 A6 00 LDX $00 [$00:0000] A:AFBE X:0000 Y:0077 P:eNvmxdIzc $81/C427 60 RTS A:AFBE X:0026 Y:0077 P:envmxdIzc
$81/C520 ? (Add the sprites of objects to the OAM buffer)
$81/C520 A2 28 00 LDX #$0028 A:0 X:FFFE Y:0001 P:eNvmxdIzc $81/C523 BD F0 0C LDA $0CF0,x[$81:0D18] A:0 X:0028 Y:0001 P:envmxdIzc $81/C526 C9 FF FF CMP #$FFFF A:FFFF X:0028 Y:0001 P:eNvmxdIzc $81/C529 D0 01 BNE $01 [$C52C] A:FFFF X:0028 Y:0001 P:envmxdIZC $81/C52B 60 RTS A:FFFF X:0028 Y:0001 P:envmxdIZC $81/C52C AA TAX A:0026 X:0028 Y:0028 P:envmxdIzc $81/C52D BD F2 11 LDA $11F2,x[$81:1218] A:0026 X:0026 Y:0028 P:envmxdIzc $81/C530 29 00 F0 AND #$F000 A:0 X:0026 Y:0028 P:envmxdIZc $81/C533 F0 29 BEQ $29 [$C55E] A:0 X:0026 Y:0028 P:envmxdIZc
code is missing here
$81/C55E BD 6A 0D LDA $0D6A,x[$81:0D90] A:0 X:0026 Y:0028 P:envmxdIZc $81/C561 F0 4F BEQ $4F [$C5B2] A:9582 X:0026 Y:0028 P:eNvmxdIzc $81/C563 85 21 STA $21 [$00:0021] A:9582 X:0026 Y:0028 P:eNvmxdIzc $81/C565 BD 1A 0D LDA $0D1A,x[$81:0D40] A:9582 X:0026 Y:0028 P:eNvmxdIzc $81/C568 85 20 STA $20 [$00:0020] A:82AD X:0026 Y:0028 P:eNvmxdIzc $81/C56A BD 50 16 LDA $1650,x[$81:1676] A:82AD X:0026 Y:0028 P:eNvmxdIzc $81/C56D 38 SEC A:0008 X:0026 Y:0028 P:envmxdIzc $81/C56E ED C2 0C SBC $0CC2 [$81:0CC2] A:0008 X:0026 Y:0028 P:envmxdIzC $81/C571 CD D2 0C CMP $0CD2 [$81:0CD2] A:0008 X:0026 Y:0028 P:envmxdIzC $81/C574 30 3C BMI $3C [$C5B2] A:0008 X:0026 Y:0028 P:envmxdIzc $81/C576 CD D4 0C CMP $0CD4 [$81:0CD4] A:0008 X:0026 Y:0028 P:envmxdIzc $81/C579 10 37 BPL $37 [$C5B2] A:0008 X:0026 Y:0028 P:eNvmxdIzc $81/C57B 85 00 STA $00 [$00:0000] A:0008 X:0026 Y:0028 P:eNvmxdIzc $81/C57D BD A0 16 LDA $16A0,x[$81:16C6] A:0008 X:0026 Y:0028 P:eNvmxdIzc $81/C580 38 SEC A:0077 X:0026 Y:0028 P:envmxdIzc $81/C581 ED C4 0C SBC $0CC4 [$81:0CC4] A:0077 X:0026 Y:0028 P:envmxdIzC $81/C584 CD CE 0C CMP $0CCE [$81:0CCE] A:0077 X:0026 Y:0028 P:envmxdIzC $81/C587 30 29 BMI $29 [$C5B2] A:0077 X:0026 Y:0028 P:envmxdIzc $81/C589 CD D0 0C CMP $0CD0 [$81:0CD0] A:0077 X:0026 Y:0028 P:envmxdIzc $81/C58C 10 24 BPL $24 [$C5B2] A:0077 X:0026 Y:0028 P:eNvmxdIzc $81/C58E 85 02 STA $02 [$00:0002] A:0077 X:0026 Y:0028 P:eNvmxdIzc $81/C590 64 08 STZ $08 [$00:0008] A:0077 X:0026 Y:0028 P:eNvmxdIzc $81/C592 A9 FF FF LDA #$FFFF A:0077 X:0026 Y:0028 P:eNvmxdIzc $81/C595 85 0A STA $0A [$00:000A] A:FFFF X:0026 Y:0028 P:eNvmxdIzc $81/C597 AD EE 0C LDA $0CEE [$81:0CEE] A:FFFF X:0026 Y:0028 P:eNvmxdIzc $81/C59A D0 10 BNE $10 [$C5AC] A:0001 X:0026 Y:0028 P:envmxdIzc $81/C5AC DA PHX A:0001 X:0026 Y:0028 P:envmxdIzc $81/C5AD 22 49 88 80 JSL $808849 ; Set Sprites in OAM buffer $81/C5B1 FA PLX A:0030 X:0030 Y:003E P:envmxdIZc $81/C5B2 4C 23 C5 JMP $C523 [$81:C523] A:0030 X:0026 Y:003E P:envmxdIzc
$81/C5D7 Restore original Token Handlers
This transfers the original Token Handlers from ROM to SRAM (after the SRAM is reset).
$81/C5D7 DA PHX ; Buffer X on stack $81/C5D8 A2 00 02 LDX #$0200 $81/C5DB BF E9 C5 81 LDA $81C5E9,x $81/C5DF 9F A0 5C 10 STA $105CA0,x $81/C5E3 CA DEX $81/C5E4 CA DEX $81/C5E5 10 F4 BPL $F4 ; [$C5DB] $81/C5E7 FA PLX ; Restore X $81/C5E8 6B RTL
$81/C5E9 Hook Vectors
The #$200 byte here get transfered to $10/5CA0-$10/5EA0 if the SRAM got reset.
$81/C7DD ?
$81/C7DD DA PHX A:8000 X:FFFE Y:0 P:envmxdIzC $81/C7DE 08 PHP A:8000 X:FFFE Y:0 P:envmxdIzC $81/C7DF AD 01 01 LDA $0101 [$80:0101] A:8000 X:FFFE Y:0 P:envmxdIzC $81/C7E2 18 CLC A:0003 X:FFFE Y:0 P:envmxdIzC $81/C7E3 6A ROR A A:0003 X:FFFE Y:0 P:envmxdIzc $81/C7E4 6A ROR A A:0001 X:FFFE Y:0 P:envmxdIzC $81/C7E5 6A ROR A A:8000 X:FFFE Y:0 P:eNvmxdIzC $81/C7E6 6A ROR A A:C000 X:FFFE Y:0 P:eNvmxdIzc $81/C7E7 29 00 E0 AND #$E000 A:6000 X:FFFE Y:0 P:envmxdIzc $81/C7EA 8D 78 12 STA $1278 [$80:1278] A:6000 X:FFFE Y:0 P:envmxdIzc $81/C7ED A9 01 20 LDA #$2001 A:6000 X:FFFE Y:0 P:envmxdIzc $81/C7F0 8D 7C 12 STA $127C [$80:127C] A:2001 X:FFFE Y:0 P:envmxdIzc $81/C7F3 A9 00 00 LDA #$0000 A:2001 X:FFFE Y:0 P:envmxdIzc $81/C7F6 8D 7A 12 STA $127A [$80:127A] A:0 X:FFFE Y:0 P:envmxdIZc $81/C7F9 A9 00 00 LDA #$0000 A:0 X:FFFE Y:0 P:envmxdIZc $81/C7FC 0A ASL A A:0 X:FFFE Y:0 P:envmxdIZc $81/C7FD 8D 7E 12 STA $127E [$80:127E] A:0 X:FFFE Y:0 P:envmxdIZc $81/C800 8D 82 12 STA $1282 [$80:1282] A:0 X:FFFE Y:0 P:envmxdIZc $81/C803 A9 07 00 LDA #$0007 A:0 X:FFFE Y:0 P:envmxdIZc $81/C806 1A INC A A:0007 X:FFFE Y:0 P:envmxdIzc $81/C807 0A ASL A A:0008 X:FFFE Y:0 P:envmxdIzc $81/C808 8D 80 12 STA $1280 [$80:1280] A:0010 X:FFFE Y:0 P:envmxdIzc $81/C80B 28 PLP A:0010 X:FFFE Y:0 P:envmxdIzc $81/C80C FA PLX A:0010 X:FFFE Y:0 P:envmxdIzC $81/C80D 6B RTL A:0010 X:FFFE Y:0 P:eNvmxdIzC
$81/C80E ?
$81/C80E DA PHX A:0010 X:FFFE Y:0 P:eNvmxdIzC $81/C80F 08 PHP A:0010 X:FFFE Y:0 P:eNvmxdIzC $81/C810 A9 00 00 LDA #$0000 A:0010 X:FFFE Y:0 P:eNvmxdIzC $81/C813 8D A6 12 STA $12A6 [$80:12A6] A:0 X:FFFE Y:0 P:envmxdIZC $81/C816 8D 20 13 STA $1320 [$80:1320] A:0 X:FFFE Y:0 P:envmxdIZC $81/C819 AD 7E 12 LDA $127E [$80:127E] A:0 X:FFFE Y:0 P:envmxdIZC $81/C81C 0A ASL A A:0 X:FFFE Y:0 P:envmxdIZC $81/C81D 0A ASL A A:0 X:FFFE Y:0 P:envmxdIZc $81/C81E 0A ASL A A:0 X:FFFE Y:0 P:envmxdIZc $81/C81F 0A ASL A A:0 X:FFFE Y:0 P:envmxdIZc $81/C820 85 00 STA $00 [$00:0000] A:0 X:FFFE Y:0 P:envmxdIZc $81/C822 AD 80 12 LDA $1280 [$80:1280] A:0 X:FFFE Y:0 P:envmxdIZc $81/C825 0A ASL A A:0010 X:FFFE Y:0 P:envmxdIzc $81/C826 0A ASL A A:0020 X:FFFE Y:0 P:envmxdIzc $81/C827 0A ASL A A:0040 X:FFFE Y:0 P:envmxdIzc $81/C828 0A ASL A A:0080 X:FFFE Y:0 P:envmxdIzc $81/C829 85 02 STA $02 [$00:0002] A:0100 X:FFFE Y:0 P:envmxdIzc $81/C82B A6 00 LDX $00 [$00:0000] A:0100 X:FFFE Y:0 P:envmxdIzc $81/C82D A9 00 00 LDA #$0000 A:0100 X:0 Y:0 P:envmxdIZc $81/C830 9F 00 21 7E STA $7E2100,x[$7E:2100] A:0 X:0 Y:0 P:envmxdIZc $81/C834 A5 00 LDA $00 [$00:0000] A:0 X:0 Y:0 P:envmxdIZc $81/C836 69 10 00 ADC #$0010 A:0 X:0 Y:0 P:envmxdIZc $81/C839 85 00 STA $00 [$00:0000] A:0010 X:0 Y:0 P:envmxdIzc $81/C83B C5 02 CMP $02 [$00:0002] A:0010 X:0 Y:0 P:envmxdIzc $81/C83D 30 EC BMI $EC [$C82B] A:0010 X:0 Y:0 P:eNvmxdIzc $81/C83F A0 28 00 LDY #$0028 A:0100 X:00F0 Y:0 P:envmxdIZC $81/C842 A9 00 00 LDA #$0000 A:0100 X:00F0 Y:0028 P:envmxdIzC $81/C845 99 A8 12 STA $12A8,y[$80:12D0] A:0 X:00F0 Y:0028 P:envmxdIZC $81/C848 99 D0 12 STA $12D0,y[$80:12F8] A:0 X:00F0 Y:0028 P:envmxdIZC $81/C84B 99 F8 12 STA $12F8,y[$80:1320] A:0 X:00F0 Y:0028 P:envmxdIZC $81/C84E 99 22 13 STA $1322,y[$80:134A] A:0 X:00F0 Y:0028 P:envmxdIZC $81/C851 99 4A 13 STA $134A,y[$80:1372] A:0 X:00F0 Y:0028 P:envmxdIZC $81/C854 99 72 13 STA $1372,y[$80:139A] A:0 X:00F0 Y:0028 P:envmxdIZC $81/C857 88 DEY A:0 X:00F0 Y:0028 P:envmxdIZC $81/C858 88 DEY A:0 X:00F0 Y:0027 P:envmxdIzC $81/C859 10 E7 BPL $E7 [$C842] A:0 X:00F0 Y:0026 P:envmxdIzC $81/C85B A0 20 00 LDY #$0020 A:0 X:00F0 Y:FFFE P:eNvmxdIzC $81/C85E A9 00 00 LDA #$0000 A:0 X:00F0 Y:0020 P:envmxdIzC $81/C861 99 84 12 STA $1284,y[$80:12A4] A:0 X:00F0 Y:0020 P:envmxdIZC $81/C864 88 DEY A:0 X:00F0 Y:0020 P:envmxdIZC $81/C865 88 DEY A:0 X:00F0 Y:001F P:envmxdIzC $81/C866 10 F6 BPL $F6 [$C85E] A:0 X:00F0 Y:001E P:envmxdIzC $81/C868 9C A3 13 STZ $13A3 [$80:13A3] A:0 X:00F0 Y:FFFE P:eNvmxdIzC $81/C86B 9C A5 13 STZ $13A5 [$80:13A5] A:0 X:00F0 Y:FFFE P:eNvmxdIzC $81/C86E 28 PLP A:0 X:00F0 Y:FFFE P:eNvmxdIzC $81/C86F FA PLX A:0 X:00F0 Y:FFFE P:eNvmxdIzC $81/C870 6B RTL A:0 X:FFFE Y:FFFE P:eNvmxdIzC
Bank $83
$83/AFC8 ?
Executed during NMI.
$83/AFC8 08 PHP ; Buffer Flag Register value, Program Bank and Direct Page on stack $83/AFC9 8B PHB $83/AFCA 0B PHD $83/AFCB E2 20 SEP #$20 ; A = 8-bit $83/AFCD A9 81 LDA #$81 A:0 X:0001 Y:0 P:envMxdIzC $83/AFCF 8D 15 21 STA $2115 [$80:2115] A:0081 X:0001 Y:0 P:eNvMxdIzC $83/AFD2 A9 7E LDA #$7E ; Set Program Bank to $7E $83/AFD4 48 PHA $83/AFD5 AB PLB $83/AFD6 C2 30 REP #$30 ; A/X/Y = 16-bit $83/AFD8 A9 00 21 LDA #$2100 ; Set Direct Page to $2100 $83/AFDB 5B TCD $83/AFDC A2 00 00 LDX #$0000 A:2100 X:0001 Y:0 P:envmxdIzC $83/AFDF BC 15 87 LDY $8715,x[$7E:8715] A:2100 X:0 Y:0 P:envmxdIZC $83/AFE2 30 21 BMI $21 [$B005] A:2100 X:0 Y:FFFF P:eNvmxdIzC
code is missing here
$83/B005 8C 15 87 STY $8715 [$7E:8715] A:2100 X:0 Y:FFFF P:eNvmxdIzC $83/B008 2B PLD ; Restore Flag Register value, Program Bank and Direct Page $83/B009 AB PLB $83/B00A 28 PLP $83/B00B 6B RTL
$83/B0E1 ?
Executed during NMI.
$83/B0E1 DA PHX ; Buffer X on stack $83/B0E2 9C 84 0B STZ $0B84 [$80:0B84] A:1C00 X:00F0 Y:0001 P:envmxdIzc $83/B0E5 A0 00 00 LDY #$0000 A:1C00 X:00F0 Y:0001 P:envmxdIzc $83/B0E8 B9 13 0A LDA $0A13,y[$80:0A13] A:1C00 X:00F0 Y:0 P:envmxdIZc $83/B0EB C9 FF FF CMP #$FFFF A:FFFF X:00F0 Y:0 P:eNvmxdIzc $83/B0EE F0 3B BEQ $3B [$B12B] A:FFFF X:00F0 Y:0 P:envmxdIZC
code is missing here
$83/B12B FA PLX ; Restore X $83/B12C 6B RTL
$83/C346 ? (Executed when talking to the aerial building)
$83/C346 08 PHP ; Buffer Flag Register value and X on stack $83/C347 DA PHX $83/C348 AD B2 13 LDA $13B2 [$81:13B2] A:86B8 X:0026 Y:0004 P:eNvmxdIzc $83/C34B 29 FF 00 AND #$00FF A:0000 X:0026 Y:0004 P:envmxdIZc $83/C34E F0 0C BEQ $0C [$C35C] A:0000 X:0026 Y:0004 P:envmxdIZc
code is missing here
$83/C35C A9 00 83 LDA #$8300 ; Set up 24-bit address in $20-2: $83/C517 $83/C35F 85 21 STA $21 $83/C361 A9 17 C5 LDA #$C517 $83/C364 85 20 STA $20 $83/C366 AD 0F 0A LDA $0A0F [$81:0A0F] A:C517 X:0026 Y:0004 P:eNvmxdIzc $83/C369 D0 06 BNE $06 [$C371] A:0001 X:0026 Y:0004 P:envmxdIzc $83/C371 AE 5F 07 LDX $075F [$81:075F] A:0001 X:0026 Y:0004 P:envmxdIzc $83/C374 BD 50 16 LDA $1650,x[$81:1676] A:0001 X:0026 Y:0004 P:envmxdIzc $83/C377 8D 07 0A STA $0A07 [$81:0A07] A:0129 X:0026 Y:0004 P:envmxdIzc $83/C37A BD A0 16 LDA $16A0,x[$81:16C6] A:0129 X:0026 Y:0004 P:envmxdIzc $83/C37D 8D 09 0A STA $0A09 [$81:0A09] A:01A5 X:0026 Y:0004 P:envmxdIzc $83/C380 C9 98 02 CMP #$0298 A:01A5 X:0026 Y:0004 P:envmxdIzc $83/C383 B0 6A BCS $6A [$C3EF] A:01A5 X:0026 Y:0004 P:eNvmxdIzc $83/C385 AD 07 0A LDA $0A07 [$81:0A07] A:01A5 X:0026 Y:0004 P:eNvmxdIzc $83/C388 4A LSR A A:0129 X:0026 Y:0004 P:envmxdIzc $83/C389 4A LSR A A:0094 X:0026 Y:0004 P:envmxdIzC $83/C38A 4A LSR A A:004A X:0026 Y:0004 P:envmxdIzc $83/C38B 4A LSR A A:0025 X:0026 Y:0004 P:envmxdIzc $83/C38C 85 00 STA $00 [$00:0000] A:0012 X:0026 Y:0004 P:envmxdIzC $83/C38E AD 09 0A LDA $0A09 [$81:0A09] A:0012 X:0026 Y:0004 P:envmxdIzC $83/C391 4A LSR A A:01A5 X:0026 Y:0004 P:envmxdIzC $83/C392 4A LSR A A:00D2 X:0026 Y:0004 P:envmxdIzC $83/C393 4A LSR A A:0069 X:0026 Y:0004 P:envmxdIzc $83/C394 4A LSR A A:0034 X:0026 Y:0004 P:envmxdIzC $83/C395 EB XBA A:001A X:0026 Y:0004 P:envmxdIzc $83/C396 05 00 ORA $00 [$00:0000] A:1A00 X:0026 Y:0004 P:envmxdIZc $83/C398 8D 76 0B STA $0B76 [$81:0B76] A:1A12 X:0026 Y:0004 P:envmxdIzc $83/C39B A2 00 00 LDX #$0000 A:1A12 X:0026 Y:0004 P:envmxdIzc $83/C39E BF 7D C5 83 LDA $83C57D,x[$83:C57D] A:1A12 X:0000 Y:0004 P:envmxdIZc $83/C3A2 C9 FF FF CMP #$FFFF A:1F06 X:0000 Y:0004 P:envmxdIzc $83/C3A5 F0 3C BEQ $3C [$C3E3] A:1F06 X:0000 Y:0004 P:envmxdIzc $83/C3A7 CD 76 0B CMP $0B76 [$81:0B76] A:1F06 X:0000 Y:0004 P:envmxdIzc $83/C3AA F0 06 BEQ $06 [$C3B2] A:1F06 X:0000 Y:0004 P:envmxdIzC $83/C3AC E8 INX A:1F06 X:0000 Y:0004 P:envmxdIzC $83/C3AD E8 INX A:1F06 X:0001 Y:0004 P:envmxdIzC $83/C3AE E8 INX A:1F06 X:0002 Y:0004 P:envmxdIzC $83/C3AF E8 INX A:1F06 X:0003 Y:0004 P:envmxdIzC $83/C3B0 80 EC BRA $EC [$C39E] A:1F06 X:0004 Y:0004 P:envmxdIzC $83/C3B2 E8 INX A:1A12 X:0010 Y:0004 P:envmxdIZC $83/C3B3 E8 INX A:1A12 X:0011 Y:0004 P:envmxdIzC $83/C3B4 BF 7D C5 83 LDA $83C57D,x[$83:C58F] A:1A12 X:0012 Y:0004 P:envmxdIzC $83/C3B8 EB XBA A:0200 X:0012 Y:0004 P:envmxdIzC $83/C3B9 29 FF 00 AND #$00FF A:0002 X:0012 Y:0004 P:envmxdIzC $83/C3BC 8D 78 0B STA $0B78 [$81:0B78] A:0002 X:0012 Y:0004 P:envmxdIzC $83/C3BF C9 0F 00 CMP #$000F A:0002 X:0012 Y:0004 P:envmxdIzC $83/C3C2 D0 0A BNE $0A [$C3CE] A:0002 X:0012 Y:0004 P:eNvmxdIzc
code is missing here
$83/C3CE BF 7D C5 83 LDA $83C57D,x[$83:C58F] A:0002 X:0012 Y:0004 P:eNvmxdIzc $83/C3D2 89 01 00 BIT #$0001 A:0200 X:0012 Y:0004 P:envmxdIzc $83/C3D5 D0 06 BNE $06 [$C3DD] A:0200 X:0012 Y:0004 P:envmxdIZc $83/C3D7 22 61 C4 83 JSL $83C461[$83:C461] A:0200 X:0012 Y:0004 P:envmxdIZc $83/C3DB 80 1B BRA $1B [$C3F8] A:0002 X:0012 Y:0007 P:envmxdIZc
code is missing here
$83/C3F8 FA PLX ; Restore Flag Register value and X $83/C3F9 28 PLP $83/C3FA 6B RTL
$83/C461 ? (Executed when talking to the aerial building)
$83/C461 08 PHP ; Buffer Flag Register value and X on stack $83/C462 DA PHX $83/C463 AD B2 13 LDA $13B2 [$81:13B2] A:0200 X:0012 Y:0004 P:envmxdIZc $83/C466 29 FF 00 AND #$00FF A:0000 X:0012 Y:0004 P:envmxdIZc $83/C469 F0 0C BEQ $0C [$C477] A:0000 X:0012 Y:0004 P:envmxdIZc
code is missing here
$83/C477 A9 00 83 LDA #$8300 ; Set up 24-bit address in $20-2: $83/C517 $83/C47A 85 21 STA $21 $83/C47C A9 17 C5 LDA #$C517 $83/C47F 85 20 STA $20 $83/C481 AD 76 0B LDA $0B76 [$81:0B76] A:C517 X:0012 Y:0004 P:eNvmxdIzc $83/C484 29 FF 00 AND #$00FF A:1A12 X:0012 Y:0004 P:envmxdIzc $83/C487 0A ASL A A:0012 X:0012 Y:0004 P:envmxdIzc $83/C488 0A ASL A A:0024 X:0012 Y:0004 P:envmxdIzc $83/C489 0A ASL A A:0048 X:0012 Y:0004 P:envmxdIzc $83/C48A 0A ASL A A:0090 X:0012 Y:0004 P:envmxdIzc $83/C48B 18 CLC A:0120 X:0012 Y:0004 P:envmxdIzc $83/C48C 69 08 00 ADC #$0008 A:0120 X:0012 Y:0004 P:envmxdIzc $83/C48F 8D 82 0B STA $0B82 [$81:0B82] A:0128 X:0012 Y:0004 P:envmxdIzc $83/C492 AD 76 0B LDA $0B76 [$81:0B76] A:0128 X:0012 Y:0004 P:envmxdIzc $83/C495 EB XBA A:1A12 X:0012 Y:0004 P:envmxdIzc $83/C496 29 FF 00 AND #$00FF A:121A X:0012 Y:0004 P:envmxdIzc $83/C499 0A ASL A A:001A X:0012 Y:0004 P:envmxdIzc $83/C49A 0A ASL A A:0034 X:0012 Y:0004 P:envmxdIzc $83/C49B 0A ASL A A:0068 X:0012 Y:0004 P:envmxdIzc $83/C49C 0A ASL A A:00D0 X:0012 Y:0004 P:envmxdIzc $83/C49D 8D 84 0B STA $0B84 [$81:0B84] A:01A0 X:0012 Y:0004 P:envmxdIzc $83/C4A0 AD 78 0B LDA $0B78 [$81:0B78] A:01A0 X:0012 Y:0004 P:envmxdIzc $83/C4A3 29 3F 00 AND #$003F A:0002 X:0012 Y:0004 P:envmxdIzc $83/C4A6 0A ASL A A:0002 X:0012 Y:0004 P:envmxdIzc $83/C4A7 0A ASL A A:0004 X:0012 Y:0004 P:envmxdIzc $83/C4A8 AA TAX A:0008 X:0012 Y:0004 P:envmxdIzc $83/C4A9 AD 82 0B LDA $0B82 [$81:0B82] A:0008 X:0008 Y:0004 P:envmxdIzc $83/C4AC 3A DEC A A:0128 X:0008 Y:0004 P:envmxdIzc $83/C4AD 38 SEC A:0127 X:0008 Y:0004 P:envmxdIzc $83/C4AE FF 1B C6 83 SBC $83C61B,x[$83:C623] A:0127 X:0008 Y:0004 P:envmxdIzC $83/C4B2 CD 07 0A CMP $0A07 [$81:0A07] A:011F X:0008 Y:0004 P:envmxdIzC $83/C4B5 B0 54 BCS $54 [$C50B] A:011F X:0008 Y:0004 P:eNvmxdIzc $83/C4B7 AD 82 0B LDA $0B82 [$81:0B82] A:011F X:0008 Y:0004 P:eNvmxdIzc $83/C4BA 18 CLC A:0128 X:0008 Y:0004 P:envmxdIzc $83/C4BB 7F 1B C6 83 ADC $83C61B,x[$83:C623] A:0128 X:0008 Y:0004 P:envmxdIzc $83/C4BF CD 07 0A CMP $0A07 [$81:0A07] A:0130 X:0008 Y:0004 P:envmxdIzc $83/C4C2 90 47 BCC $47 [$C50B] A:0130 X:0008 Y:0004 P:envmxdIzC $83/C4C4 E8 INX A:0130 X:0008 Y:0004 P:envmxdIzC $83/C4C5 E8 INX A:0130 X:0009 Y:0004 P:envmxdIzC $83/C4C6 AD 84 0B LDA $0B84 [$81:0B84] A:0130 X:000A Y:0004 P:envmxdIzC $83/C4C9 3A DEC A A:01A0 X:000A Y:0004 P:envmxdIzC $83/C4CA CD 09 0A CMP $0A09 [$81:0A09] A:019F X:000A Y:0004 P:envmxdIzC $83/C4CD B0 3C BCS $3C [$C50B] A:019F X:000A Y:0004 P:eNvmxdIzc $83/C4CF AD 84 0B LDA $0B84 [$81:0B84] A:019F X:000A Y:0004 P:eNvmxdIzc $83/C4D2 18 CLC A:01A0 X:000A Y:0004 P:envmxdIzc $83/C4D3 7F 1B C6 83 ADC $83C61B,x[$83:C625] A:01A0 X:000A Y:0004 P:envmxdIzc $83/C4D7 CD 09 0A CMP $0A09 [$81:0A09] A:01AD X:000A Y:0004 P:envmxdIzc $83/C4DA 90 2F BCC $2F [$C50B] A:01AD X:000A Y:0004 P:envmxdIzC $83/C4DC AD 78 0B LDA $0B78 [$81:0B78] A:01AD X:000A Y:0004 P:envmxdIzC $83/C4DF 0A ASL A A:0002 X:000A Y:0004 P:envmxdIzC $83/C4E0 18 CLC A:0004 X:000A Y:0004 P:envmxdIzc $83/C4E1 6D 78 0B ADC $0B78 [$81:0B78] A:0004 X:000A Y:0004 P:envmxdIzc $83/C4E4 A8 TAY A:0006 X:000A Y:0004 P:envmxdIzc $83/C4E5 AD 78 0B LDA $0B78 [$81:0B78] A:0006 X:000A Y:0006 P:envmxdIzc $83/C4E8 29 3F 00 AND #$003F A:0002 X:000A Y:0006 P:envmxdIzc $83/C4EB C9 18 00 CMP #$0018 A:0002 X:000A Y:0006 P:envmxdIzc $83/C4EE B0 10 BCS $10 [$C500] A:0002 X:000A Y:0006 P:eNvmxdIzc $83/C4F0 B7 20 LDA [$20],y[$83:C51D] A:0002 X:000A Y:0006 P:eNvmxdIzc $83/C4F2 8D 80 07 STA $0780 [$81:0780] A:0000 X:000A Y:0006 P:envmxdIZc $83/C4F5 C8 INY A:0000 X:000A Y:0006 P:envmxdIZc $83/C4F6 B7 20 LDA [$20],y[$83:C51E] A:0000 X:000A Y:0007 P:envmxdIzc $83/C4F8 8D 81 07 STA $0781 [$81:0781] A:0000 X:000A Y:0007 P:envmxdIZc $83/C4FB AD 78 0B LDA $0B78 [$81:0B78] A:0000 X:000A Y:0007 P:envmxdIZc $83/C4FE 80 14 BRA $14 [$C514] A:0002 X:000A Y:0007 P:envmxdIzc
code is missing here
$83/C514 FA PLX ; Restore Flag Register value and X $83/C515 28 PLP $83/C516 6B RTL
$83/C517 Data for $83/C346
?
$83/C57D Data for $83/C346
?
Bank $84
$84/8000 Graphic Data
Should be the BS-X logo stuff at the very beginning. Get's decompressed at $94/8000
Bank $94
$94/8000 ? Start of the program after Boot
$94/8000 E2 10 SEP #$10 ; A = 8-bit $94/8002 C2 20 REP #$20 ; X/Y = 16-bit $94/8004 22 11 84 80 JSL $808411 ; Transfer a chain of variables to $01xx
Arguments: $80/8FE1 CB 80 94 ; Data for $01xx registers is at $94/80CB
$94/800B 22 BD 83 80 JSL $8083BD ; Clear whole VRAM $94/800F A2 80 LDX #$80 ; VRAM transfer settings: 16-bit (for upcoming decompression Subroutine) $94/8011 8E 15 21 STX $2115 $94/8014 A9 00 80 LDA #$8000 ; Address of compressed Graphics Data: $84/8000 $94/8017 85 78 STA $78 $94/8019 A2 84 LDX #$84 $94/801B 86 7A STX $7A $94/801D 64 7D STZ $7D ; VRAM Destination: $0000 $94/801F 22 1E 95 80 JSL $80951E ; Graphics Decompression directly to VRAM $94/8023 A9 A7 A9 LDA #$A9A7 ; Address of Compressed Graphics Data: $84/A9A7 $94/8026 85 78 STA $78 $94/8028 A2 84 LDX #$84 $94/802A 86 7A STX $7A $94/802C A9 00 80 LDA #$8000 ; VRAM Destination: $4000 $94/802F 85 7D STA $7D $94/8031 22 1E 95 80 JSL $80951E ; Graphics Decompression directly to VRAM $94/8035 A9 1B AE LDA #$AE1B ; Address of Compressed Graphics Data: $84/AE1B $94/8038 85 78 STA $78 $94/803A A2 84 LDX #$84 $94/803C 86 7A STX $7A $94/803E A9 00 98 LDA #$9800 ; VRAM Destination: $4C00 $94/8041 85 7D STA $7D $94/8043 22 1E 95 80 JSL $80951E ; Graphics Decompression directly to VRAM $94/8047 A9 52 AD LDA #$AD52 ; Address of Compressed Graphics Data: $84/AD52 $94/804A 85 78 STA $78 $94/804C A2 84 LDX #$84 $94/804E 86 7A STX $7A $94/8050 A9 00 A0 LDA #$A000 ; VRAM Destination: $5000 $94/8053 85 7D STA $7D $94/8055 22 1E 95 80 JSL $80951E ; Graphics Decompression directly to VRAM $94/8059 A9 F7 F6 LDA #$F6F7 ; Address of Compressed Graphics Data: $95/F6F7 $94/805C 85 78 STA $78 $94/805E A2 95 LDX #$95 $94/8060 86 7A STX $7A $94/8062 A9 00 C0 LDA #$C000 ; VRAM Destination: $6000 $94/8065 85 7D STA $7D $94/8067 22 1E 95 80 JSL $80951E ; Graphics Decompression directly to VRAM $94/806B A9 BB A8 LDA #$A8BB A:0195 X:0 Y:0 P:eNvmXdIzC $94/806E 85 78 STA $78 [$00:0078] A:A8BB X:0 Y:0 P:eNvmXdIzC $94/8070 A2 84 LDX #$84 A:A8BB X:0 Y:0 P:eNvmXdIzC $94/8072 86 7A STX $7A [$00:007A] A:A8BB X:0084 Y:0 P:eNvmXdIzC $94/8074 22 9F 93 80 JSL $80939F[$80:939F] A:A8BB X:0084 Y:0 P:eNvmXdIzC
arguments are missing here
$94/807B A9 01 00 LDA #$0001 A:0084 X:0 Y:0 P:eNvmXdIzC $94/807E 8D 1C 02 STA $021C [$80:021C] A:0001 X:0 Y:0 P:envmXdIzC $94/8081 C2 30 REP #$30 A:0001 X:0 Y:0 P:envmXdIzC $94/8083 22 10 C2 81 JSL $81C210[$81:C210] A:0001 X:0 Y:0 P:envmxdIzC $94/8087 22 9A C2 81 JSL $81C29A[$81:C29A] A:000A X:FFFE Y:0 P:envmxdIzC $94/808B 22 D0 C7 81 JSL $81C7D0[$81:C7D0] A:8000 X:FFFE Y:0 P:envmxdIzC $94/808F A9 03 00 LDA #$0003 A:0 X:FFFE Y:FFFE P:eNvmxdIzC $94/8092 A0 00 00 LDY #$0000 A:0003 X:FFFE Y:FFFE P:envmxdIzC $94/8095 22 1C 5C 10 JSL $105C1C[$10:5C1C] A:0003 X:FFFE Y:0 P:envmxdIZC $94/8099 9C 6B 06 STZ $066B [$80:066B] A:0003 X:FFFE Y:0001 P:eNvmxdIzc $94/809C 9C 6D 06 STZ $066D [$80:066D] A:0003 X:FFFE Y:0001 P:eNvmxdIzc $94/809F 9C 71 06 STZ $0671 [$80:0671] A:0003 X:FFFE Y:0001 P:eNvmxdIzc $94/80A2 9C 73 06 STZ $0673 [$80:0673] A:0003 X:FFFE Y:0001 P:eNvmxdIzc $94/80A5 9C 6F 06 STZ $066F [$80:066F] A:0003 X:FFFE Y:0001 P:eNvmxdIzc $94/80A8 A9 06 00 LDA #$0006 A:0003 X:FFFE Y:0001 P:eNvmxdIzc $94/80AB 8D 77 06 STA $0677 [$80:0677] A:0006 X:FFFE Y:0001 P:envmxdIzc $94/80AE A9 00 94 LDA #$9400 A:0006 X:FFFE Y:0001 P:envmxdIzc $94/80B1 8D 5E 06 STA $065E [$80:065E] A:9400 X:FFFE Y:0001 P:eNvmxdIzc $94/80B4 A9 72 85 LDA #$8572 A:9400 X:FFFE Y:0001 P:eNvmxdIzc $94/80B7 8D 5D 06 STA $065D [$80:065D] A:8572 X:FFFE Y:0001 P:eNvmxdIzc $94/80BA 22 B6 91 80 JSL $8091B6[$80:91B6] A:8572 X:FFFE Y:0001 P:eNvmxdIzc
$94/80CB Data for Graphics Settings
This data gets transfered to the $01xx Graphics Register buffer via $80/8411 at $94/8004.
This is executed while the start-up, these values serve to clear those Graphics Registers.
$94/80CB 00 00 - Value for $0100 = $2100 - 0% Brightness $94/80CD 01 03 - Value for $0101 = $2101 - $94/80CF 04 09 - Value for $0104 = $2105 - BG Mode 1, BG3 Priority Bit $94/80D1 06 43 - Value for $0106 = $2107 - BG1 Tilemap at $4000, V/H Mirroring $94/80D3 07 52 - Value for $0107 = $2108 - BG2 Tilemap at $5000, H Mirroring $94/80D5 08 70 - Value for $0108 = $2109 - BG3 Tilemap at $7000, no Mirroring $94/80D7 0A 00 - Value for $010A = $210B - BG1/2 Tileset at $0000 $94/80D9 0B 07 - Value for $010B = $210C - BG3 Tileset at $7000 $94/80DB 0F 00 - Value for $010F/10 = $210D - BG1 H-Scroll = #$0100 $94/80DD 10 01 $94/80DF 11 88 - Value for $0111/12 = $210E - BG1 V-Scroll = #$0188 $94/80E1 12 01 $94/80E3 13 00 - Value for $0113/14 = $210F - BG2 H-Scroll = #$0000 $94/80E5 14 00 $94/80E7 15 00 - Value for $0115/16 = $2110 - BG2 V-Scroll = #$0000 $94/80E9 16 00 $94/80EB 17 00 - Value for $0117/18 = $2111 - BG3 H-Scroll = #$0000 $94/80ED 18 00 $94/80EF 19 00 - Value for $0119/1A = $2112 - BG3 V-Scroll = #$0000 $94/80F1 1A 00 $94/80F3 26 03 - Value for $0126 = $212C - BG1/2 on Main Screen $94/80F5 27 10 - Value for $0127 = $212E - Disable Sprites on Main Screen in Window $94/80F7 28 01 - Value for $0128 = $212D - BG1 on Sub Screen $94/80F9 0D 03 - Value for $010D = $2123 - Window 1 on BG1, outside $94/80FB 20 80 - Value for $0120 = $2126 - Window 1 Left Position: $80 $94/80FD 21 7F - Value for $0121 = $2127 - Window 1 Right Position: $7F $94/80FF 2A 00 - Value for $012A = $212A - Mask Logic for BGs: OR $94/8101 2B 03 - Value for $012B = $212B - Mask Logic for Sprites: XNOR $94/8103 2C 00 - Value for $012C $94/8105 3A 00 - Value for $013A = $420C - Disable HDMAs $94/8107 FF
$94/BCFF Clear BS-X SRAM
$94/BCFF 08 PHP ; Buffer Flag Register value and Data Bank on stack $94/BD00 8B PHB $94/BD01 F4 00 10 PEA $1000 ; Set Data Bank to $10 $94/BD04 AB PLB $94/BD05 AB PLB $94/BD06 E2 20 SEP #$20 ; A = 8-bit $94/BD08 C2 10 REP #$10 ; X/Y = 16-bit $94/BD0A A2 6D 09 LDX #$096D ; Clear $10/5006 to $10/5973 $94/BD0D A9 00 LDA #$00 $94/BD0F 9D 06 50 STA $5006,x $94/BD12 CA DEX $94/BD13 10 FA BPL $FA ; [$BD0F] $94/BD15 A2 88 13 LDX #$1388 ; Set Money Start Value: 5000 (= #$1388) $94/BD18 8E 1E 50 STX $501E $94/BD1B A2 D9 98 LDX #$98D9 ; Set GUI Border Scheme to standard value (= $94/98D9) $94/BD1E 8E 6A 59 STX $596A $94/BD21 A9 94 LDA #$94 $94/BD23 8D 6C 59 STA $596C $94/BD26 A2 31 A4 LDX #$A431 ; Set GUI Color Scheme pointer (= $94/A431) $94/BD29 8E 6D 59 STX $596D $94/BD2C A9 94 LDA #$94 $94/BD2E 8D 6F 59 STA $596F $94/BD31 AB PLB ; Restore Data Bank $94/BD32 22 AA C9 80 JSL $80C9AA ; Calculate new SRAM Checksum $94/BD36 28 PLP ; Restore Flag Register value $94/BD37 6B RTL
Bank $9F
$9F/FFF0 Address of the SPC program
This gets used at $80/8FF7. This is an UNNECESSARY LINE: It makes no sense why this address isn't directly loaded there. This must be a remnant of the development that was left the few bytes it saves would make no difference.
$9F/FFF0 00 80 9D ; SPC program is at $9D/8000
Internal Data for BS-X BIOS
| |
---|---|