Tactics Ogre:ROM map

From Data Crystal
Revision as of 02:38, 5 May 2016 by Lytron (talk | contribs) (Bank $9C)
Jump to: navigation, search

ROM offsets

These are ROM offsets for the starting points of each section (all in hex), pretty sure it's headerless (latest ROM revision, has Lakmir's translation patch applied to it):

40c33 - Spell Areas
40cc9 - Spell Function Bytes
40fb7 - Spell Accuracy Types (Auto-Hit, Dex-Based, etc.)
4104d - Spell Cost Type (Whether it eats HP or MP, how much, etc.)
41179 - Spell Formula Table
4133B - Spell Elements (Fire, Air, Virtue, etc.)
42703 - Character Sprite pointers
429e3 - Character Name pointers
42ad2 - Job IDs
42bc2 - Starting Elements
42cb0 - Starting Alignments
42dbf - Number of Magic Slots
42ead - Starting Level
42f9b - Starting HP
430bb - HP Growth
4314b - Starting MP
4326b - MP Growth
432fb - Starting Strength
4338b - Strength Growth
4341b - Starting Vitality
434ab - Vitality Growth
4353b - Starting Intelligence
435cb - Intelligence Growth
4365b - Starting Mentality
436eb - Mentality Growth
4377b - Starting Agility
4380b - Agility Growth
4389b - Starting Dexterity
4392b - Dexterity Growth
43a4c - Class Weight Penalties
43add - Physical Resistance
43b6e - Air Resistance
43bff - Fire Resistance
43c90 - Earth Resistance
43d21 - Water Resistance
43db2 - Virtue Resistance
43e43 - Bane Resistance
43ef4 - Attack+ Capability
440b1 - Species Table
441a1 - Basic Indirect Attack Type
442b0 - Magic Set that can be equipped
443a0 - Class Special Attacks (Slot 1)
4448f - Class Special Attacks (Slot 2)
4457e - Class Special Attacks (Slot 3)
4466d - Class Special Attacks (Slot 4)
4475b - Movement Types
44849 - Movement Rates
44937 - Starting Loyalties
44a26 - Weather Tolerance
451da - Item Types
452ca - Item Elements
453ba - Weapon Handedness
454aa - Item Equip Slot Locations (Finger, Head, etc.)
45655 - Item Weights
4572e - Item Strength Modifiers (Atk. Power)
4580e - Item Intelligence Modifiers
458ee - Item Agility Modifiers
459ce - Item Dexterity Modifiers
45aae - Item Vitality Modifiers
45b8e - Item Mentality Modifiers
45c6e - Item Luck Modifiers
45d4e - Item Physical Resistance (Def. Power) (signed)
45e2e - Item Air Resistance (signed)
45f0e - Item Fire Resistance (signed)
45fee - Item Earth Resistance (signed)
460ce - Item Water Resistance (signed)
461ae - Item Virtue Resistance (signed)
4628e - Item Bane Resistance (signed)
4646f - Item Prices (multiplied by 10 in-game)
46612 - Item Strength Raise at Level Up
466e4 - Item Intelligence Raise at Level Up
467b4 - Item Agility Raise at Level Up
46884 - Item Dexterity Raise at Level Up
46956 - Item Vitality Raise at Level Up
46a26 - Item Mentality Raise at Level Up
46af6 - Item Luck Raise at Level Up
46bc6 - Item Special Effects (Stuns on hit, Anti-Dragon, etc.)
46cb6 - Item Special Skills (used in the Item menu)
46d86 - Item Status Guards (immunity to petrification, etc.)
46e76 - Item Passive Effects (wearer can fly, HP regen, etc.)
47047 - Spell MP cost/Targeting Information
47172 - Spell Schools (Hahnela, Ishtar, DragonGod, etc.)
47208 - Spell Ranges
4729e - Special Spell Conditions #1 (Summons, Line-of-sight spells, whether equipment is needed, etc.)
4732f - Spell Prices (multiplied by 10 in-game)
47431 - Spell Set Modifiers
474a1 - How the caster behaves when using the spell/skill. NOTE: Each half of the bytes here specifies one skill.
474f1 - Special Spell Conditions #2 (If equipment is needed, this specifies the type (swords, spears, etc.) NOTE: Each half of the bytes here specifies one skill.
ea0dc - Class Grids (determines what you can change into)
ebba7 - Denim's Base Class
ebca1 - Denim's Initial Equipment (Slot 1)
ebcac - Denim's Initial Equipment (Slot 2)
ebcb7 - Denim's Initial Equipment (Slot 3)
ebcc2 - Denim's Initial Equipment (Slot 4)
ebc94 - Denim's Initial Spells (doesn't insert into Magic menu, need to use a JMP routine to get anything out of it)
ed61e - Item Shop pointers/data
ed6d9 - Magic Shop pointers/data
f3195 - Job Stat Requirements (what's needed to change into that job stat-wise, might also cover alignment but I couldn't tell from a glance).

Bank $80

This is all taken from the Japanese V1.0 version

$80/8000 ROM Start

$00/8000 18          CLC           ; Switch to Native Mode
$00/8001 FB          XCE
$00/8002 78          SEI           ; Disable Interrupts
$00/8003 D8          CLD           ; Deactivate Decimal Mode (if accidentally turned on)
$00/8004 4B          PHK           ; Push Bank Register
$00/8005 AB          PLB           ; Pull Data Bank Register
$00/8006 E2 20       SEP #$20
$00/8008 C2 10       REP #$10
$00/800A A2 FF 1F    LDX #$1FFF    ; Set Stack to $7E:1FFF
$00/800D 9A          TXS
$00/800E F4 00 00    PEA $0000     ; Direct Page Register = #$0000
$00/8011 2B          PLD
$00/8012 9C 00 42    STZ $4200     ; Deactivate NMI / Auto-Joypad
$00/8015 9C AF 05    STZ $05AF     ; Backup for $4200?
$00/8018 20 6A 80    JSR $806A     ; De-activate HDMAs, FBLANK, Clear Screen Destination Registers

Clear $7E:2000 to $7E:FFFF

$00/801B A0 00 E0    LDY #$E000    ; DMA Size: #$E000
$00/801E 8C 05 43    STY $4305
$00/8021 A0 00 20    LDY #$2000    ; WRAM Destination: $(7E)2000
$00/8024 18          CLC           ; WRAM-Destination: Bank $7E
$00/8025 A2 69 80    LDX #$8069    ; DMA Source Address: $00/8069 (ROM: $0000.0069
$00/8028 A9 00       LDA #$00
$00/802A 22 A7 9D 80 JSL $809DA7   ; Long Branch to the DMA setup and activation


$00/802E A9 01       LDA #$01      ; Activate Fast ROM
$00/8030 8D 0D 42    STA $420D
$00/8033 22 00 80 8F JSL $8F8000   ; Jump to ??? (Sound Setup?)

$00/8037 64 59       STZ $59       ; ???
$00/8039 64 EA       STZ $EA
$00/803B C6 EA       DEC $EA       ; ??? ($EA = #$FF)
$00/803D A9 01       LDA #$01
$00/803F 85 51       STA $51       ; ??? ($51 = #$01)
$00/8041 78          SEI           ; Disable Interrupts (again)
$00/8042 D8          CLD           ; Deactivate Decimal Mode (again)
$00/8043 4B          PHK           ; Push Bank Register
$00/8044 AB          PLB           ; Pull Data Bank Register
$00/8045 E2 20       SEP #$20
$00/8047 C2 10       REP #$10
$00/8049 A2 00 02    LDX #$0200
$00/804C 8E 5F 05    STX $055F     ; ???
$00/804F 9C 00 42    STZ $4200     ; Deactivate NMI / Auto-Joypad (again)
$00/8052 9C AF 05    STZ $05AF     ; Backup for $4200?
$00/8055 20 6A 80    JSR $806A     ; De-activate HDMAs, FBLANK, Clear Screen Destination Registers 

$00/8058 A9 01       LDA #$01      ; Activate Fast ROM (again)
$00/805A 8D 0D 42    STA $420D
$00/805D AF F0 FF 00 LDA $00FFF0   ; = #$FF
$00/8061 8F F3 00 00 STA $0000F3   ; ???
$00/8065 5C 91 80 80 JMP $808091   ; Jump to ???

$80/8069 Clear Byte

$00/8069 00                        ; Clear Byte for $80/801B

$80/806A De-activate HDMAs, FBLANK, Clear Screen Destination Registers

$00/806A 9C 0C 42    STZ $420C     ; De-activate HDMAs
$00/806D 9C B0 05    STZ $05B0     ; Backup for $420C?
$00/8070 9C 86 05    STZ $0586     ; Backup for $420C?
$00/8073 A9 80       LDA #$80
$00/8075 8D 00 21    STA $2100     ; FBLANK
$00/8078 8D 87 05    STA $0587     ; Backup for $2100
$00/807B 8D 6A 05    STA $056A     ; Backup for $2100
$00/807E 9C 2C 21    STZ $212C     ; Clear Main Screen Destinations
$00/8081 9C 2D 21    STZ $212D     ; Clear Subscreen Destinations
$00/8084 60          RTS

$80/8085 NMI Handler

$00/8085 5C 7E AF 80 JMP $80AF7E   ; NMI Handler ("Jump to" Fast ROM)

$80/8091 ???

$80/8091 22 4A A1 80 JSL $80A14A   ; Long-Jump to Deactivation of NMI, Auto-Joypad & HDMAs
$80/8095 A2 FF 1F    LDX #$1FFF    ; Set Stack to $7E:1FFF
$80/8098 9A          TXS
$80/8099 F4 00 00    PEA $0000     ; Direct Page Register = #$0000
$80/809C 2B          PLD
$80/809D 4B          PHK           ; Push Bank Register
$80/809E AB          PLB           ; Pull Data Bank Register
$80/809F 22 B6 A1 80 JSL $80A1B6   ; Jump to ???

$80/9D32 DMA Subroutine

Destination has to be set before this Subroutine is called

$80/9D32 8D 04 43    STA $4304     ; A: Source Bank (8 bit)
$80/9D35 8E 02 43    STX $4302     ; X: Source Address (16 bit)
$80/9D38 8C 05 43    STY $4305     ; Y: Number of Bytes to transfer
$80/9D3B A9 00       LDA #$00      ; DMA options
$80/9D3D 8D 00 43    STA $4300
$80/9D40 A9 01       LDA #$01      ; Activate DMA
$80/9D42 8D 0B 42    STA $420B
$80/9D45 60          RTS

$80/9D89 VRAM Clear

$80/9D89 8D 04 43    STA $4304     ; A: Source Bank (8 bit)
$80/9D8C 8E 02 43    STX $4302     ; X: Source Address (16 bit)
$80/9D8F 8C 16 21    STY $2116     ; Y: Destination VRAM Address (16 bit)
$80/9D92 A9 80       LDA #$80      ; Increment after writing $2119
$80/9D94 8D 15 21    STA $2115
$80/9D97 A9 09       LDA #$09      ; FIXED TRANSFER, 16 bit Transfer
$80/9D99 8D 00 43    STA $4300
$80/9D9C A9 18       LDA #$18      ; DMA Destination: $2118, VRAM
$80/9D9E 8D 01 43    STA $4301
$80/9DA1 A9 01       LDA #$01      ; Activate DMA
$80/9DA3 8D 0B 42    STA $420B
$80/9DA6 60          RTS

$80/9DA7 Long Jump to the WRAM-Clear-DMA

$80/9DA7 20 AB 9D    JSR $9DAB     ; Setup of the rest of the DMA and activation
$80/9DAA 6B          RTL

$80/9DAB WRAM-Clear-DMA

This Subroutine is half a setup for a DMA and starts the DMA. The first half of the setup has to be done before this Subroutine gets called. A call can be found at $80/801B. This is a fixed Transfer, so it's used for Clear Up DMAs. Furthermore, due to it's construction it is fixed to WRAM addresses. Before this subroutine is called, there are additional values that are loaded into certain registers:

A: Source Bank (8 bit)

X: Source Address (16 bit)

Y: Destination WRAM Address (16 bit)

Carry Bit Set: WRAM Bank $7F / Carry Bit Clear: WRAM Bank $7E

$80/9DAB 8D 04 43    STA $4304     ; A: Source Bank (8 bit)
$80/9DAE 8E 02 43    STX $4302     ; X: Source Address (16 bit)
$80/9DB1 8C 81 21    STY $2181     ; Y: Destination WRAM Address (16 bit)
$80/9DB4 2A          ROL A         ; Roll Carry-Bit in A
$80/9DB5 8D 83 21    STA $2183     ; If carry bit was set: Bank $7F, if clear: $7E
$80/9DB8 A9 08       LDA #$08      ; FIXED TRANSFER
$80/9DBA 8D 00 43    STA $4300
$80/9DBD A9 80       LDA #$80      ; DMA to Register $2180 --> to the WRAM address previously set up
$80/9DBF 8D 01 43    STA $4301
$80/9DC2 A9 01       LDA #$01      ; Activate DMA
$80/9DC4 8D 0B 42    STA $420B
$80/9DC7 60          RTS

$80/A12F Activate NMI and Auto-Joypad Read

$80/A12F AD 10 42    LDA $4210     ; Load (and thus, remove) the NMI Flag
$80/A132 A9 81       LDA #$81      ; Activate NMI and Auto-Joypad Read
$80/A134 8D 00 42    STA $4200
$80/A137 0C AF 05    TSB $05AF     ; Update Buffer accordingly
$80/A13A 60          RTS

$80/A14A Long Jump to Deactivate NMI, Auto-Joypad and HDMAs

$80/A14A 8B          PHB           ; Buffer Data Bank Register on Stack
$80/A14B 4B          PHK           ; Set Bank Register as Data Bank Register
$80/A14C AB          PLB
$80/A14D 20 52 A1    JSR $A152     ; Jump to Deactivation of NMI, Auto-Joypad & HDMAs
$80/A150 AB          PLB           ; Pull Original Data Bank Register
$80/A151 6B          RTL

$80/A152 Deactivate NMI, Auto-Joypad and HDMAs

$80/A152 9C 00 42    STZ $4200     ; Deactivate NMI / Auto-Joypad
$80/A155 9C AF 05    STZ $05AF     ; Backup for $4200?
$80/A158 9C 0C 42    STZ $420C     ; De-activate HDMAs
$80/A15B 9C B0 05    STZ $05B0     ; Backup for $420C?
$80/A15E 9C 86 05    STZ $0586     ; Backup for $420C?
$80/A161 60          RTS

$80/A19F Execute code built in WRAM

$80/A19F A9 80       LDA #$80      ; ???
$80/A1A1 0C BD 05    TSB $05BD
$80/A1A4 22 D9 05 00 JSL $0005D9   ; Jump and execute the code built in WRAM
$80/A1A8 60          RTS

$80/A1E4 RTL

$80/A19F can jump here (via $0005D9). A standard "do nothing, just exit right away"

$80/A1E4 6B          RTL

$80/AF7E Actual NMI Handler

$80/AF7E C2 30       REP #$30      ; A/X/Y = 16 bit (to make sure everything is put on stack)
$80/AF80 48          PHA
$80/AF81 8B          PHB
$80/AF82 0B          PHD
$80/AF83 DA          PHX
$80/AF84 5A          PHY
$80/AF85 4B          PHK
$80/AF86 AB          PLB
$80/AF87 A9 00 00    LDA #$0000
$80/AF8A 5B          TCD
$80/AF8B E2 20       SEP #$20
$80/AF8D AD 10 42    LDA $4210     ; Remove NMI Flag
$80/AF90 A9 80       LDA #$80
$80/AF92 8D 00 21    STA $2100     ; FBLANK
$80/AF95 AD BD 05    LDA $05BD     ; ???
$80/AF98 10 03       BPL $03       ; ???

Missing Code

$80/AF9D 20 C2 B2    JSR $B2C2     ; ???

OAM Update

$80/AFA0 AD B0 05    LDA $05B0     ; ???
$80/AFA3 8D 86 05    STA $0586
$80/AFA6 9C 0C 42    STZ $420C     ; Deactivate HDMAs
$80/AFA9 AD 40 05    LDA $0540     ; If $0540 is empty, don't update OAM?
$80/AFAC F0 29       BEQ $29       ; [$AFD7]
$80/AFAE A2 00 00    LDX #$0000    ; OAM Address
$80/AFB1 8E 02 21    STX $2102
$80/AFB4 9C 04 43    STZ $4304     ; Source Bank: $00
$80/AFB7 AE 45 05    LDX $0545
$80/AFBA 8E 02 43    STX $4302     ; Source Address: $0545
$80/AFBD A9 04       LDA #$04      ; DMA Destination: $2104 (OAM)
$80/AFBF 8D 01 43    STA $4301
$80/AFC2 A2 20 02    LDX #$0220    ; Transfer $220 Bytes - both OAM Tables
$80/AFC5 8E 05 43    STX $4305
$80/AFC8 A9 00       LDA #$00      ; DMA Transfer settings
$80/AFCA 8D 00 43    STA $4300
$80/AFCD A9 01       LDA #$01      ; Activate DMA
$80/AFCF 8D 0B 42    STA $420B
$80/AFD2 9C 40 05    STZ $0540     ; Clear OAM Update Flag
$80/AFD5 80 03       BRA $03       ; [$AFDA] --- ???
$80/AFD7 20 01 B1    JSR $B101     ; ???
$80/AFDA 20 35 B1    JSR $B135     ; ???

Missing Code

$80/B0CA C2 30       REP #$30      ; Restore everything from Stack
$80/B0CC 7A          PLY
$80/B0CD FA          PLX
$80/B0CE 2B          PLD
$80/B0CF AB          PLB
$80/B0D0 68          PLA
$80/B0D1 40          RTI           ; End Interrupt Handler

$80/B26D Update Graphic Setup Registers

$80/B26D AD 6B 05    LDA $056B     ; BG Mode
$80/B270 8D 05 21    STA $2105
$80/B273 AD 6C 05    LDA $056C     ; Sprite sizes
$80/B276 8D 01 21    STA $2101
$80/B279 AE A6 05    LDX $05A6     ; Main Screen/Subscreen Destination (16 bit!)
$80/B27C 8E 2C 21    STX $212C
$80/B27F AE 8F 05    LDX $058F     ; BG1-4 Tileset Addresses (16 bit!)
$80/B282 8E 0B 21    STX $210B
$80/B285 AE 6D 05    LDX $056D     ; BG1/2 Tilemap Address
$80/B288 8E 07 21    STX $2107
$80/B28B AE 6F 05    LDX $056F     ; BG3/4 Tilemap Address
$80/B28E 8E 09 21    STX $2109
$80/B291 AE 81 05    LDX $0581     ; Color Addition Select
$80/B294 8E 30 21    STX $2130
$80/B297 AD 85 05    LDA $0585     ; Fixed Color Data
$80/B29A 8D 32 21    STA $2132
$80/B29D AD 84 05    LDA $0584     ; Fixed Color Data
$80/B2A0 8D 32 21    STA $2132
$80/B2A3 AD 83 05    LDA $0583     ; Fixed Color Data
$80/B2A6 8D 32 21    STA $2132
$80/B2A9 A0 00 00    LDY #$0000    ; Update the BG Scroll registers
$80/B2AC A2 71 05    LDX #$0571
$80/B2AF B5 00       LDA $00,x
$80/B2B1 99 0D 21    STA $210D,y
$80/B2B4 B5 01       LDA $01,x
$80/B2B6 99 0D 21    STA $210D,y
$80/B2B9 E8          INX
$80/B2BA E8          INX
$80/B2BB C8          INY
$80/B2BC C0 08 00    CPY #$0008
$80/B2BF D0 EE       BNE $EE       ; [$B2AF]
$80/B2C1 60          RTS

$80/B40B Joypad Data Fetching

$80/B40B AD 12 42    LDA $4212     ; Load PPU-Status
$80/B40E 4A          LSR A         ; Move Bit 0 (Auto-Joypad Status) into Carry
$80/B40F B0 FA       BCS $FA       ; [$B40B] Loop until Auto-Joypad Read is done
$80/B411 A0 00 00    LDY #$0000
$80/B414 A2 00 00    LDX #$0000
$80/B417 B9 18 42    LDA $4218,y
$80/B41A 29 0F       AND #$0F
$80/B41C D0 40       BNE $40       ; [$B45E] I think this is a security measure; if this isn't 0, something's wrong
$80/B41E BF 16 40 00 LDA $004016,x ; ???
$80/B422 29 01       AND #$01
$80/B424 F0 38       BEQ $38       ; [$B45E] Another security measure?
$80/B426 BD 47 05    LDA $0547,x   ; ???
$80/B429 F0 1B       BEQ $1B       ; [$B446]
$80/B42B C2 20       REP #$20
$80/B42D B9 49 05    LDA $0549,y   ; Load Joypad Data from the last frame, store it in $0551,y and push it on stack
$80/B430 99 51 05    STA $0551,y
$80/B433 48          PHA
$80/B434 B9 18 42    LDA $4218,y   ; Load Joypad-Input and store it in $0549-054C
$80/B437 99 49 05    STA $0549,y
$80/B43A 68          PLA
$80/B43B 39 49 05    AND $0549,y   ; Calculate, which buttons are held from the last frame, and store them in $054D,y
$80/B43E 59 49 05    EOR $0549,y
$80/B441 99 4D 05    STA $054D,y
$80/B444 80 26       BRA $26       ; [$B46C] Leave out the "other" Fetching method
$80/B446 A9 01       LDA #$01      ; ???
$80/B448 9D 47 05    STA $0547,x
$80/B44B C2 20       REP #$20
$80/B44D B9 18 42    LDA $4218,y   ; Load Joypad-Input and store it in $0549-054C
$80/B450 99 49 05    STA $0549,y
$80/B453 A9 00 00    LDA #$0000    ; 
$80/B456 99 4D 05    STA $054D,y   ; Clear held buttons
$80/B459 99 51 05    STA $0551,y   ; Clear last frame's Joypad input
$80/B45C 80 0E       BRA $0E       ; [$B46C]
$80/B46C E2 20       SEP #$20
$80/B46E A5 F9       LDA $F9       ; ???
$80/B470 30 12       BMI $12       ; [$B484] If $F9 is negative, no Soft Reset is accepted?
$80/B472 C2 20       REP #$20
$80/B474 B9 49 05    LDA $0549,y   ; Check newly fetched Joypad data
$80/B477 C9 30 30    CMP #$3030    ; Is Start, Select, L + R pressed?
$80/B47A D0 08       BNE $08       ; [$B484]

Code is missing here

$80/B484 E2 20       SEP #$20
$80/B486 C8          INY           ; Increment index registers
$80/B487 C8          INY
$80/B488 E8          INX
$80/B489 E0 02 00    CPX #$0002
$80/B48C 90 89       BCC $89       ; [$B417] Repeat this for the second controller
$80/B48E 60          RTS


$80/B54D Clear Graphic Setup Registers

$80/B54D 9C 33 21    STZ $2133
$80/B550 A9 02       LDA #$02      ; 8x8 and 32x32 sprites
$80/B552 8D 01 21    STA $2101
$80/B555 8D 88 05    STA $0588
$80/B558 A9 09       LDA #$09      ; Mode 1, Priority Bit
$80/B55A 8D 05 21    STA $2105
$80/B55D 8D 89 05    STA $0589
$80/B560 A9 71       LDA #$71      ; BG1 Tilemap at $7000 in VRAM, h mirroring
$80/B562 8D 07 21    STA $2107
$80/B565 8D 8B 05    STA $058B
$80/B568 A9 79       LDA #$79      ; BG2 Tilemap at $7000 in VRAM, h/v mirroring
$80/B56A 8D 08 21    STA $2108
$80/B56D 8D 8C 05    STA $058C
$80/B570 A9 3C       LDA #$3C      ; BG3 Tilemap at $3C00 in VRAM
$80/B572 8D 09 21    STA $2109
$80/B575 8D 8D 05    STA $058D
$80/B578 A9 3C       LDA #$3C      ; BG3 Tilemap at $3C00 in VRAM
$80/B57A 8D 0A 21    STA $210A
$80/B57D 8D 8E 05    STA $058E
$80/B580 A9 00       LDA #$00      ; BG1/2 Tiles at $0000 in VRAM
$80/B582 8D 0B 21    STA $210B
$80/B585 8D 8F 05    STA $058F
$80/B588 A9 55       LDA #$55      ; BG3/4 Tiles at $5000 in VRAM
$80/B58A 8D 0C 21    STA $210C
$80/B58D 8D 90 05    STA $0590
$80/B590 A9 17       LDA #$17      ; BG1-3 and Sprites for Main Screen
$80/B592 8D 2C 21    STA $212C
$80/B595 8D A6 05    STA $05A6
$80/B598 A9 04       LDA #$04      ; BG4 for Subscreen
$80/B59A 8D 2D 21    STA $212D
$80/B59D 8D A7 05    STA $05A7
$80/B5A0 9C A8 05    STZ $05A8     ; Window Mask Registers
$80/B5A3 9C 2E 21    STZ $212E
$80/B5A6 9C A9 05    STZ $05A9
$80/B5A9 9C 2F 21    STZ $212F
$80/B5AC A9 02       LDA #$02
$80/B5AE 8D AA 05    STA $05AA     ; ???
$80/B5B1 A9 23       LDA #$23
$80/B5B3 8D AB 05    STA $05AB     ; ???
$80/B5B6 A9 E0       LDA #$E0
$80/B5B8 8D AC 05    STA $05AC     ; ???
$80/B5BB 8D AD 05    STA $05AD     ; ???
$80/B5BE 8D AE 05    STA $05AE     ; ???
$80/B5C1 9C 8A 05    STZ $058A     ; ???
$80/B5C4 60          RTS

$80/B673 Clear Registers, clear WRAM Bank $7F

$80/B673 A2 02 42    LDX #$4202    ; Clear $4202 to $420C
$80/B676 A9 0B       LDA #$0B
$80/B678 74 00       STZ $00,x
$80/B67A E8          INX
$80/B67B 3A          DEC A
$80/B67C D0 FA       BNE $FA    [$B678]
$80/B67E A9 FF       LDA #$FF      ; "Programmable I/O Port"
$80/B680 8D 01 42    STA $4201
$80/B683 A2 06 21    LDX #$2106    ; Clear $2106 to $2114
$80/B686 A9 0F       LDA #$0F
$80/B688 74 00       STZ $00,x
$80/B68A 74 00       STZ $00,x
$80/B68C E8          INX
$80/B68D 3A          DEC A
$80/B68E D0 F8       BNE $F8
$80/B690 A9 80       LDA #$80
$80/B692 95 00       STA $00,x  [$00:2115]
$80/B694 A9 01       LDA #$01
$80/B696 A2 1A 21    LDX #$211A    ; Mode 7 Settings
$80/B699 74 00       STZ $00,x     ; Clear a lot of Mode 7 Registers
$80/B69B 74 01       STZ $01,x
$80/B69D 95 01       STA $01,x
$80/B69F 74 02       STZ $02,x
$80/B6A1 74 02       STZ $02,x
$80/B6A3 74 03       STZ $03,x
$80/B6A5 74 03       STZ $03,x
$80/B6A7 74 04       STZ $04,x
$80/B6A9 95 04       STA $04,x
$80/B6AB 74 05       STZ $05,x
$80/B6AD 74 05       STZ $05,x
$80/B6AF 74 06       STZ $06,x
$80/B6B1 74 06       STZ $06,x
$80/B6B3 A2 23 21    LDX #$2123    ; Clear $2123 to $212E
$80/B6B6 A9 0C       LDA #$0C
$80/B6B8 74 00       STZ $00,x
$80/B6BA E8          INX
$80/B6BB 3A          DEC A
$80/B6BC D0 FA       BNE $FA    [$B6B8]
$80/B6BE A2 30 21    LDX #$2130
$80/B6C1 A9 30       LDA #$30
$80/B6C3 95 00       STA $00,x     ; $2130 - Color Addition
$80/B6C5 74 01       STZ $01,x     ; $2131 - Color Subtraction
$80/B6C7 A9 E0       LDA #$E0
$80/B6C9 95 02       STA $02,x     ; $2132 - Fixed Color DAta
$80/B6CB 74 03       STZ $03,x     ; $2133 - Screen Mode/Video Select

And then proceeds on the next part

$80/B6CD Set up $7F Clear DMA

$80/B6CD A0 00 00    LDY #$0000    ; Transfer $10000 Byte
$80/B6D0 8C 05 43    STY $4305
$80/B6D3 A0 00 00    LDY #$0000    ; Destination: #$7F:0000
$80/B6D6 38          SEC
$80/B6D7 A2 F1 B6    LDX #$B6F1    ; Position of the Clear Byte: $80/B6F1
$80/B6DA A9 80       LDA #$80
$80/B6DC 20 AB 9D    JSR $9DAB     ; Fixed WRAM Clear DMA

$80/B6DF Set up VRAM Clear DMA

$80/B6DF A0 00 00    LDY #$0000    ; Transfer $10000 Byte
$80/B6E2 8C 05 43    STY $4305
$80/B6E5 A0 00 00    LDY #$0000    ; (VRAM-)Destination: #0000
$80/B6E8 A2 F1 B6    LDX #$B6F1    ; Position of the Clear Byte: $80/B6F1
$80/B6EB A9 80       LDA #$80
$80/B6ED 20 89 9D    JSR $9D89     ; Fixed VRAM Clear DMA

Bank $8F

$8F/83DB Sound-related stuff

$8F/83DB C5 FA       CMP $FA       ; ???
$8F/83DD D0 2B       BNE $2B    [$840A]
$8F/83DF A5 F5       LDA $F5
$8F/83E1 05 F6       ORA $F6
$8F/83E3 05 F7       ORA $F7
$8F/83E5 F0 21       BEQ $21       ; If $F5/$F6/$F7 are empty, exit
$8F/83E7 A5 F5       LDA $F5       ; Transfer buffer to $2140
$8F/83E9 8D 40 21    STA $2140
$8F/83EC A5 F6       LDA $F6       ; Transfer buffer to $2141
$8F/83EE 8D 41 21    STA $2141
$8F/83F1 A5 F7       LDA $F7       ; Transfer buffer to $2142
$8F/83F3 8D 42 21    STA $2142
$8F/83F6 64 F5       STZ $F5       ; Clear buffers $F5, $F6 and $F7
$8F/83F8 64 F6       STZ $F6
$8F/83FA 64 F7       STZ $F7
$8F/83FC A5 FA       LDA $FA       ; Transfer buffer to $2143
$8F/83FE 8D 43 21    STA $2143
$8F/8401 1A          INC A         ; Increment $FA value
$8F/8402 29 7F       AND #$7F      ; If it turned #$80 ==> #$00
$8F/8404 F0 FB       BEQ $FB       ; If #$00 ==> Increment again
$8F/8406 85 FA       STA $FA       ; Store back in $FA
$8F/8408 18          CLC           ; ???
$8F/8409 6B          RTL

Bank $9C

$9C/8B49 Jump Table for $05C0

$9C/8B49 AD C0 05    LDA $05C0     ; Load Jump Table Index
$9C/8B4C EB          XBA           ; Fill the other byte of A with #$00
$9C/8B4D A9 00       LDA #$00
$9C/8B4F EB          XBA           ; Switch it back and multiply by 2
$9C/8B50 0A          ASL A
$9C/8B51 AA          TAX           ; Transfer in X
$9C/8B52 7C 55 8B    JMP ($8B55,x) ; Table is at $9C/8B55, jump to the entry


$9C/8C31 Quest Logo?

A lot of loading, some Mode 7 stuff

$9C/8C31 C2 20       REP #$20
$9C/8C33 7B          TDC           ; Clear 16-bit A
$9C/8C34 AA          TAX           ; Clear X
$9C/8C35 A0 A0 00    LDY #$00A0
$9C/8C38 BF 47 A0 CB LDA $CBA047,x ; ??? Some ROM ==> WRAM transfer
$9C/8C3C 9D 4B 12    STA $124B,x   ; ???
$9C/8C3F 9D 4B 14    STA $144B,x   ; ???
$9C/8C42 E8          INX
$9C/8C43 E8          INX
$9C/8C44 88          DEY
$9C/8C45 D0 F1       BNE $F1       ; [$8C38]
$9C/8C47 E2 20       SEP #$20
$9C/8C49 A9 09       LDA #$09      ; BG Mode 1
$9C/8C4B 8D 05 21    STA $2105
$9C/8C4E 8D 89 05    STA $0589     ; Update Buffer register, too
$9C/8C51 A9 1C       LDA #$1C      ; BG Tilemap 1 is at $1C00 in VRAM
$9C/8C53 8D 07 21    STA $2107
$9C/8C56 8D 8B 05    STA $058B     ; Update Buffer register, too
$9C/8C59 A9 14       LDA #$14      ; BG Tilemap 2 is at $1400 in VRAM
$9C/8C5B 8D 08 21    STA $2108
$9C/8C5E 8D 8C 05    STA $058C     ; Update Buffer register, too
$9C/8C61 A9 1C       LDA #$1C      ; BG Tilemap 3 is at $1C00 in VRAM
$9C/8C63 8D 09 21    STA $2109
$9C/8C66 8D 8D 05    STA $058D     ; Update Buffer register, too
$9C/8C69 A9 02       LDA #$02      ; Sprite size 8x8 and 64x64
$9C/8C6B 8D 88 05    STA $0588     ; Store only buffer
$9C/8C6E A9 35       LDA #$35      ; BG1 Tiles at $3000, BG2 Tiles at $5000
$9C/8C70 8D 0B 21    STA $210B
$9C/8C73 8D 8F 05    STA $058F     ; Update Buffer register, too
$9C/8C76 9C 0C 21    STZ $210C     ; BG3/4 Tiles at $0000
$9C/8C79 9C 90 05    STZ $0590     ; Update Buffer register, too
$9C/8C7C A9 02       LDA #$02      ; Only BG2 on Main Screen
$9C/8C7E 8D 2C 21    STA $212C
$9C/8C81 8D A6 05    STA $05A6     ; Update Buffer register, too
$9C/8C84 9C 2D 21    STZ $212D     ; Nothing on Subscreen
$9C/8C87 9C A7 05    STZ $05A7     ; Update Buffer register, too
$9C/8C8A A9 05       LDA #$05      ; BG3 Window Mask Designation on Main Screen
$9C/8C8C 8D A8 05    STA $05A8     ; Update Buffer register, too
$9C/8C8F 8D 2E 21    STA $212E
$9C/8C92 9C A9 05    STZ $05A9     ; Update Buffer register, too
$9C/8C95 9C 2F 21    STZ $212F     ; No Window Mask Designation on Subscreen
$9C/8C98 A9 02       LDA #$02      ; ???
$9C/8C9A 8D AA 05    STA $05AA
$9C/8C9D A9 E0       LDA #$E0
$9C/8C9F 8D AC 05    STA $05AC     ; ???
$9C/8CA2 8D AD 05    STA $05AD     ; ???
$9C/8CA5 8D AE 05    STA $05AE     ; ???
$9C/8CA8 9C 8A 05    STZ $058A     ; ???
$9C/8CAB A2 68 97    LDX #$9768    ; Window 1 Left/Right Position
$9C/8CAE 8E 26 21    STX $2126
$9C/8CB1 A2 03 03    LDX #$0303    ; Enable Window 1 and Window 1 Inversion for BG1/3
$9C/8CB4 8E 23 21    STX $2123
$9C/8CB7 A9 30       LDA #$30      ; Enable Window 1 and Window 1 Inversion for Color
$9C/8CB9 8D 25 21    STA $2125
$9C/8CBC A9 26       LDA #$26      ; ???
$9C/8CBE 8D AB 05    STA $05AB
$9C/8CC1 A9 01       LDA #$01      ; ???
$9C/8CC3 8D 49 12    STA $1249
$9C/8CC6 7B          TDC           ; Clear 16-bit A
$9C/8CC7 AA          TAX           ; Clear X
$9C/8CC8 8E 91 05    STX $0591     ; ???
$9C/8CCB 8E 93 05    STX $0593     ; ???
$9C/8CCE 8E 97 05    STX $0597     ; ???
$9C/8CD1 CA          DEX           ; X = #$FFFF
$9C/8CD2 8E 9B 05    STX $059B     ; ???
$9C/8CD5 A2 04 00    LDX #$0004
$9C/8CD8 8E 95 05    STX $0595     ; ???
$9C/8CDB 9C B0 05    STZ $05B0     ; HDMA Activation Flag Buffer?
$9C/8CDE A9 42       LDA #$42      ; HDMA Addressing Mode, 1 register write twice
$9C/8CE0 8D 10 43    STA $4310
$9C/8CE3 8D 20 43    STA $4320
$9C/8CE6 A9 1B       LDA #$1B      ; First HDMA Destination: $211B (Mode 7 Matrix A)
$9C/8CE8 8D 11 43    STA $4311
$9C/8CEB A9 1E       LDA #$1E      ; First HDMA Destination: $211E (Mode 7 Matrix D)
$9C/8CED 8D 21 43    STA $4321
$9C/8CF0 A2 11 9B    LDX #$9B11    ; HDMA Source address for both: $9C/9B11
$9C/8CF3 8E 12 43    STX $4312
$9C/8CF6 8E 22 43    STX $4322
$9C/8CF9 A9 9C       LDA #$9C
$9C/8CFB 8D 14 43    STA $4314
$9C/8CFE 8D 24 43    STA $4324
$9C/8D01 A9 00       LDA #$00      ; Both HDMA Indirect addresses are on Bank $00
$9C/8D03 8D 17 43    STA $4317
$9C/8D06 8D 27 43    STA $4327
$9C/8D09 A9 00       LDA #$00      ; Mode 7 Settings
$9C/8D0B 8D 1A 21    STA $211A
$9C/8D0E 9C 1B 21    STZ $211B     ; Mode 7 Matrix A
$9C/8D11 A9 01       LDA #$01
$9C/8D13 8D 1B 21    STA $211B
$9C/8D16 9C 1C 21    STZ $211C     ; Mode 7 Matrix B
$9C/8D19 9C 1C 21    STZ $211C
$9C/8D1C 9C 1D 21    STZ $211D     ; Mode 7 Matrix C
$9C/8D1F 9C 1D 21    STZ $211D
$9C/8D22 A9 01       LDA #$01
$9C/8D24 9C 1E 21    STZ $211E     ; Mode 7 Matrix D
$9C/8D27 8D 1E 21    STA $211E
$9C/8D2A A9 80       LDA #$80
$9C/8D2C 8D 1F 21    STA $211F     ; Mode 7 Center X
$9C/8D2F 9C 1F 21    STZ $211F
$9C/8D32 A9 58       LDA #$58
$9C/8D34 8D 20 21    STA $2120     ; Mode 7 Center X
$9C/8D37 9C 20 21    STZ $2120
$9C/8D3A C2 20       REP #$20
$9C/8D3C A2 00 02    LDX #$0200    ; ???
$9C/8D3F A0 00 01    LDY #$0100    ; ???
$9C/8D42 A9 00 E0    LDA #$E000    ; ??? 
$9C/8D45 22 C8 9D 80 JSL $809DC8   ; ???
$9C/8D49 A2 00 02    LDX #$0200    ; ???
$9C/8D4C A0 20 03    LDY #$0320    ; ???
$9C/8D4F A9 00 E0    LDA #$E000    ; ???
$9C/8D52 22 C8 9D 80 JSL $809DC8   ; ???
$9C/8D56 A2 20 00    LDX #$0020    ; ???
$9C/8D59 A0 00 03    LDY #$0300    ; ???
$9C/8D5C A9 00 00    LDA #$0000    ; ???
$9C/8D5F 22 C8 9D 80 JSL $809DC8   ; ???
$9C/8D63 A2 20 00    LDX #$0020    ; ???
$9C/8D66 A0 20 05    LDY #$0520    ; ???
$9C/8D69 A9 00 00    LDA #$0000    ; ???
$9C/8D6C 22 C8 9D 80 JSL $809DC8   ; ???
$9C/8D70 7B          TDC           ; Clear 16-bit A
$9C/8D71 AA          TAX           ; Clear X
$9C/8D72 BF 9A DD 9C LDA $9CDD9A,x ; Transfer Data from ROM to WRAM
$9C/8D76 9D 00 01    STA $0100,x   ; This is for a OAM Low Table
$9C/8D79 E8          INX
$9C/8D7A E8          INX
$9C/8D7B E0 08 01    CPX #$0108
$9C/8D7E D0 F2       BNE $F2       ; [$8D72]      A:6C40 X:0002 Y:0540 P:eNvmxdizc
$9C/8D80 E2 20       SEP #$20
$9C/8D82 7B          TDC           ; Clear 16-bit A
$9C/8D83 AA          TAX           ; Clear X
$9C/8D84 BF 74 DD 9C LDA $9CDD74,x ; Transfer Data from ROM to WRAM
$9C/8D88 9D 00 03    STA $0300,x   ; This is for a OAM Hi Table
$9C/8D8B E8          INX
$9C/8D8C E0 11 00    CPX #$0011
$9C/8D8F D0 F3       BNE $F3       ; [$8D84]
$9C/8D91 A2 00 01    LDX #$0100    ; OAM Buffer is at $0100
$9C/8D94 8E 45 05    STX $0545
$9C/8D97 A9 01       LDA #$01      ; Update OAM
$9C/8D99 8D 40 05    STA $0540
$9C/8D9C A9 7F       LDA #$7F      ; Data Bank = $7F
$9C/8D9E 48          PHA
$9C/8D9F AB          PLB
$9C/8DA0 C2 20       REP #$20
$9C/8DA2 A2 00 80    LDX #$8000    ; ???
$9C/8DA5 A0 00 00    LDY #$0000    ; ???
$9C/8DA8 A9 1F 00    LDA #$001F    ; ???
$9C/8DAB 22 C8 9D 80 JSL $809DC8   ; ???
$9C/8DAF E2 20       SEP #$20      ; ???
$9C/8DB1 4B          PHK           ; ???
$9C/8DB2 AB          PLB           ; ???
$9C/8DB3 A9 7F       LDA #$7F      ; ???
$9C/8DB5 48          PHA           ; ???
$9C/8DB6 AB          PLB           ; ???
$9C/8DB7 C2 20       REP #$20      ; ???
$9C/8DB9 A2 00 60    LDX #$6000    ; ???
$9C/8DBC A0 00 A0    LDY #$A000    ; ???
$9C/8DBF A9 00 00    LDA #$0000    ; ???
$9C/8DC2 22 C8 9D 80 JSL $809DC8   ; ???
$9C/8DC6 E2 20       SEP #$20
$9C/8DC8 4B          PHK           ; ???
$9C/8DC9 AB          PLB           ; ???
$9C/8DCA A9 85       LDA #$85      ; Address for the coming Subroutine: $85/B170
$9C/8DCC 85 22       STA $22
$9C/8DCE A2 70 B1    LDX #$B170
$9C/8DD1 86 20       STX $20
$9C/8DD3 20 AB 9C    JSR $9CAB     ; ???
$9C/8DD6 A9 CA       LDA #$CA      ; Set up address for transfer loop: $CA/BD25
$9C/8DD8 85 22       STA $22
$9C/8DDA A2 25 BD    LDX #$BD25
$9C/8DDD 86 20       STX $20
$9C/8DDF 7B          TDC           ; Clear 16-bit A
$9C/8DE0 AA          TAX           ; Clear X
$9C/8DE1 A8          TAY           ; Clear Y
$9C/8DE2 A9 20       LDA #$20      ; Set up transfer loop counter
$9C/8DE4 85 00       STA $00
$9C/8DE6 B7 20       LDA [$20],y   ; ???
$9C/8DE8 9F 00 00 7F STA $7F0000,x ; ???
$9C/8DEC C8          INY
$9C/8DED C6 00       DEC $00
$9C/8DEF D0 0E       BNE $0E       ; [$8DFF]
$9C/8DFF E8          INX
$9C/8E00 E8          INX
$9C/8E01 C0 A0 01    CPY #$01A0
$9C/8E04 D0 E0       BNE $E0       ; [$8DE6]
$9C/8DF1 C2 20       REP #$20
$9C/8DF3 8A          TXA           ; ???
$9C/8DF4 18          CLC           ; ???
$9C/8DF5 69 C0 00    ADC #$00C0    ; ???
$9C/8DF8 AA          TAX           ; ???
$9C/8DF9 E2 20       SEP #$20
$9C/8DFB A9 20       LDA #$20      ; ???
$9C/8DFD 85 00       STA $00       ; ???
$9C/8E06 A9 00       LDA #$00      ; ???
$9C/8E08 22 03 80 8F JSL $8F8003   ; ???
$9C/8E0C A9 20       LDA #$20      ; ???
$9C/8E0E 22 03 80 8F JSL $8F8003   ; ???
$9C/8E12 64 E7       STZ $E7       ; ???
$9C/8E14 9C 9C 17    STZ $179C     ; ???
$9C/8E17 9C E6 1E    STZ $1EE6     ; ???
$9C/8E1A 7B          TDC           ; ???
$9C/8E1B AA          TAX           ; ???
$9C/8E1C 8E 61 00    STX $0061     ; ???
$9C/8E1F 8E 63 00    STX $0063     ; ???
$9C/8E22 8E 65 00    STX $0065     ; ???
$9C/8E25 8F 28 B2 7E STA $7EB228   ; ???
$9C/8E29 8F 29 B2 7E STA $7EB229   ; ???
$9C/8E2D 8F A9 B2 7E STA $7EB2A9   ; ???
$9C/8E31 EE C0 05    INC $05C0     ; ???
$9C/8E34 A9 00       LDA #$00      ; Deactivate FBLANK, Screen Brightness = 0%
$9C/8E36 8D 00 21    STA $2100
$9C/8E39 8D 87 05    STA $0587     ; Update Buffer register, too
$9C/8E3C 8D 6A 05    STA $056A     ; Update (second?) Buffer register, too
$9C/8E3F 22 27 A1 80 JSL $80A127   ; ???
$9C/8E43 A9 81       LDA #$81      ; Activate NMI and Auto-Joypad Read
$9C/8E45 0C AF 05    TSB $05AF     ; Store in Buffer
$9C/8E48 60          RTS

$9C/9053 ?

A tilemap builder?

$9C/9053 85 00       STA $00       ; Carried in A value is the counter value for the transfer
$9C/9055 64 01       STZ $01       ; Clear upper Byte of the counter
$9C/9057 7B          TDC           ; Clear 16 bit A
$9C/9058 A8          TAY           ; Clear Y
$9C/9059 C2 20       REP #$20
$9C/905B B7 20       LDA [$20],y   ; Transfer data from address
$9C/905D 9D 4B 12    STA $124B,x   ; ??? Store somewhere in WRAM
$9C/9060 C8          INY
$9C/9061 C8          INY
$9C/9062 E8          INX
$9C/9063 E8          INX
$9C/9064 C6 00       DEC $00
$9C/9066 D0 F3       BNE $F3       ; [$905B]
$9C/9068 E2 20       SEP #$20
$9C/906A A9 01       LDA #$01      ; ???
$9C/906C 8D 49 12    STA $1249
$9C/906F 60          RTS

$9C/98A1 Title Screen BG1 Tilemap builder

This builds the BG1 tilemap for the TO start screen in WRAM at $7F:E000

$9C/98A1 A9 7F       LDA #$7F      ; Setup 24-bit Address in $20: $7F:E000
$9C/98A3 85 22       STA $22
$9C/98A5 A2 00 E0    LDX #$E000
$9C/98A8 86 20       STX $20
$9C/98AA 7B          TDC           ; Clear 16-bit A
$9C/98AB AA          TAX           ; Clear X
$9C/98AC A8          TAY           ; Clear Y
$9C/98AD BF 25 BD CA LDA $CABD25,x ; This loads the Low byte of the Tilemap from the ROM
$9C/98B1 EB          XBA
$9C/98B2 A9 32       LDA #$32      ; This adds the Tilemap high byte of #$32
$9C/98B4 EB          XBA
$9C/98B5 C2 20       REP #$20      ; A = 16 bit
$9C/98B7 97 20       STA [$20],y   ; This now stores both bytes in WRAM
$9C/98B9 E2 20       SEP #$20      ; A = 8 bit
$9C/98BB C8          INY           ; Increment the index registers
$9C/98BC C8          INY
$9C/98BD E8          INX
$9C/98BE E0 A0 01    CPX #$01A0
$9C/98C1 D0 EA       BNE $EA       ; [$98AD]

Data for the last visible line of the BG1 Titlescreen Tilemap, I guess

$9C/98C3 A9 CB       LDA #$CB      ; New Data Address: $CB/A047 (= $0025:A047)
$9C/98C5 85 22       STA $22
$9C/98C7 A2 47 A0    LDX #$A047
$9C/98CA 86 20       STX $20
$9C/98CC A9 10       LDA #$10      ; ???
$9C/98CE A2 80 00    LDX #$0080    ; ???
$9C/98D1 20 53 90    JSR $9053     ; ???
$9C/98D4 A9 20       LDA #$20      ; ???
$9C/98D6 A2 00 00    LDX #$0000    ; ???
$9C/98D9 20 53 90    JSR $9053     ; ???
$9C/98DC A9 08       LDA #$08      ; ???
$9C/98DE A2 A0 00    LDX #$00A0    ; ???
$9C/98E1 20 53 90    JSR $9053     ; ???
$9C/98E4 A9 CB       LDA #$CB      ; Reset the address to $CB/A047 as before
$9C/98E6 85 22       STA $22
$9C/98E8 A2 47 A0    LDX #$A047
$9C/98EB 86 20       STX $20
$9C/98ED A9 10       LDA #$10      ; ???
$9C/98EF A2 20 00    LDX #$0020    ; ???
$9C/98F2 20 53 90    JSR $9053     ; ???
$9C/98F5 A2 FE 01    LDX #$01FE    ; ???
$9C/98F8 8E 91 05    STX $0591     ; ???
$9C/98FB A2 FF 01    LDX #$01FF    ; ???
$9C/98FE 8E 93 05    STX $0593     ; ???
$9C/9901 A9 03       LDA #$03      ; BG1 Tiles are at $3000 in VRAM (BG2 Tiles at $0000)
$9C/9903 8D 8F 05    STA $058F     ; Store in Buffer register
$9C/9906 A9 11       LDA #$11      ; BG3/4 Tiles are at $1000 in VRAM
$9C/9908 8D 90 05    STA $0590     ; Store in Buffer register
$9C/990B A9 70       LDA #$70      ; BG1 Tilemap at $7000 in VRAM
$9C/990D 8D 8B 05    STA $058B     ; Store in Buffer register
$9C/9910 A9 01       LDA #$01      ; Show BG1 on Main Screen
$9C/9912 8D A6 05    STA $05A6     ; Store in Buffer register
$9C/9915 A9 29       LDA #$29      ; Mode 1 + BG3 priority, BG2 with big Tiles
$9C/9917 8D 89 05    STA $0589     ; Store in Buffer register
$9C/991A A9 80       LDA #$80      ; Settings for $2115 for the upcoming VRAM DMA
$9C/991C 85 0E       STA $0E
$9C/991E A0 00 70    LDY #$7000    ; VRAM destination: $7000 (BG1 Tilemap)
$9C/9921 A2 40 03    LDX #$0340    ; Transfer $0340 Bytes
$9C/9924 86 0C       STX $0C
$9C/9926 A2 00 E0    LDX #$E000    ; Source Address: $7F/E000
$9C/9929 A9 7F       LDA #$7F
$9C/992B 22 24 9F 80 JSL $809F24   ; Sets up and executes a DMA from $7F/E000 to VRAM $7000
$9C/992F 7B          TDC           ; Clear 16-bit A
$9C/9930 AA          TAX           ; Clear X
$9C/9931 8E 99 05    STX $0599     ; ???
$9C/9934 A9 78       LDA #$78      ; BG2 Tilemap at $7800
$9C/9936 8D 8C 05    STA $058C     ; Store in Buffer register
$9C/9939 A9 74       LDA #$74      ; BG3 Tilemap at $7400
$9C/993B 8D 8D 05    STA $058D     ; Store in Buffer register
$9C/993E A9 15       LDA #$15      ; Show BG1-3 + Sprites on Main Screen
$9C/9940 8D A6 05    STA $05A6     ; Store in Buffer register
$9C/9943 A9 02       LDA #$02      ; Show BG2 on Subscreen
$9C/9945 8D A7 05    STA $05A7     ; Store in Buffer register
$9C/9948 A9 04       LDA #$04      ; ???
$9C/994A 8D AB 05    STA $05AB     ; ???
$9C/994D A9 10       LDA #$10      ; ???
$9C/994F 8D A6 17    STA $17A6     ; ???
$9C/9952 9C A7 17    STZ $17A7     ; ???
$9C/9955 A9 CB       LDA #$CB      ; Reset the address to $CB/A047 as before
$9C/9957 85 22       STA $22
$9C/9959 A2 47 A0    LDX #$A047
$9C/995C 86 20       STX $20
$9C/995E A9 9C       LDA #$9C      ; Setup 24-bit addresss in $23: $9C/DEA2
$9C/9960 85 25       STA $25
$9C/9962 A2 A2 DE    LDX #$DEA2
$9C/9965 86 23       STX $23
$9C/9967 22 14 AA 83 JSL $83AA14   ; ???
$9C/996B 9C 9C 17    STZ $179C     ; ???
$9C/996E 9C 9D 17    STZ $179D     ; ???
$9C/9971 EE C0 05    INC $05C0     ; ???
$9C/9974 60          RTS

$9C/9CAB ?

$9C/9CAB A0 06 00    LDY #$0006    ; ???
$9C/9CAE A2 42 01    LDX #$0142    ; ???
$9C/9CB1 A9 03       LDA #$03      ; ???
$9C/9CB3 5A          PHY           ; ???
$9C/9CB4 DA          PHX           ; ???
$9C/9CB5 20 53 90    JSR $9053     ; ???
$9C/9CB8 FA          PLX           ; ???
$9C/9CB9 7A          PLY           ; ???
$9C/9CBA 88          DEY           ; ???
$9C/9CBB F0 14       BEQ $14       ; [$9CD1]
$9C/9CBD C2 20       REP #$20      ; ???
$9C/9CBF A5 20       LDA $20       ; ???
$9C/9CC1 18          CLC           ; ???
$9C/9CC2 69 06 00    ADC #$0006    ; ???
$9C/9CC5 85 20       STA $20       ; ???
$9C/9CC7 8A          TXA           ; ???
$9C/9CC8 18          CLC           ; ???
$9C/9CC9 69 20 00    ADC #$0020    ; ???
$9C/9CCC AA          TAX           ; ???
$9C/9CCD E2 20       SEP #$20
$9C/9CCF 80 E0       BRA $E0       ; [$9CB1]
$9C/9CD1 60          RTS

$9C/C7D3 Stuff with the NES-Style Controller Registers

$9C/C7D3 08          PHP           ; Push Flag Register
$9C/C7D4 E2 20       SEP #$20
$9C/C7D6 A9 00       LDA #$00      ; Deactivate NMI and Auto-Joypad Read
$9C/C7D8 8F 00 42 00 STA $004200
$9C/C7DC A9 01       LDA #$01      ; The NES-style Joypad Access... Doin' some latchin'
$9C/C7DE 8F 16 40 00 STA $004016
$9C/C7E2 A9 00       LDA #$00
$9C/C7E4 8F 16 40 00 STA $004016
$9C/C7E8 85 00       STA $00       ; ???
$9C/C7EA 85 01       STA $01       ; ???
$9C/C7EC 85 02       STA $02       ; ???
$9C/C7EE 85 03       STA $03       ; ???
$9C/C7F0 A2 08 00    LDX #$0008    ; ???
$9C/C7F3 AF 17 40 00 LDA $004017   ; ???
$9C/C7F7 4A          LSR A         ; ???
$9C/C7F8 26 01       ROL $01       ; ???
$9C/C7FA CA          DEX           ; ???
$9C/C7FB D0 F6       BNE $F6       ; ???
$9C/C7FD A2 08 00    LDX #$0008    ; ???
$9C/C800 AF 17 40 00 LDA $004017   ; ???
$9C/C804 4A          LSR A         ; ???
$9C/C805 26 00       ROL $00       ; ???
$9C/C807 CA          DEX           ; ???
$9C/C808 D0 F6       BNE $F6       ; ???
$9C/C80A A2 08 00    LDX #$0008    ; ???
$9C/C80D AF 17 40 00 LDA $004017   ; ???
$9C/C811 4A          LSR A         ; ???
$9C/C812 26 02       ROL $02       ; ???
$9C/C814 CA          DEX           ; ???
$9C/C815 D0 F6       BNE $F6       ; ???
$9C/C817 A9 81       LDA #$81      ; Reactivate NMI and Auto Joypad Read
$9C/C819 8F 00 42 00 STA $004200
$9C/C81D 28          PLP           ; Restore Flag Register
$9C/C81E 60          RTS