Tactics Ogre:ROM map

From Data Crystal
Revision as of 09:35, 6 May 2016 by Lytron (talk | contribs) (Other Updates of the past 24 hours)
Jump to: navigation, search

Contents

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/9EEB VRAM DMA with accompanying Data Bytes

Important: Whenever and from wherever this subroutine is called, the next few bytes AFTER the JSL $809EEB is Data for this subroutine. So, the first part of this subroutine is changing the Jump-Back-Address on stack so the program does not accidentally try to interpret these data bytes as code, but skip them.

The rest is the regular VRAM DMA subroutine at $80/9F2C

The Data following this Subroutine's called are structured as follows:

2 Bytes - DMA Source Address

1 Byte - DMA Source Bank

2 Bytes - VRAM Destination Address

2 Bytes - Number of Bytes

$80/9EEB 8B          PHB           ; Push Program Bank
$80/9EEC C2 21       REP #$21      ; 16 bit A, clear Carry
$80/9EEE A3 02       LDA $02,s     ; Load the address from stack, where to return when the program reaches a RTL
$80/9EF0 AA          TAX           ; Copy it into X
$80/9EF1 69 07 00    ADC #$0007    ; Add 7 to the return address - skip 7 bytes
$80/9EF4 83 02       STA $02,s     ; Store it back on stack
$80/9EF6 E2 20       SEP #$20      ; 8 bit A
$80/9EF8 A3 04       LDA $04,s     ; Load the Bank Byte from the Return address
$80/9EFA 48          PHA           ; Set it as Program Bank for now
$80/9EFB AB          PLB
$80/9EFC D4 0C	PEI ($0C)          ; Preserve current values in $0C-$0F on Stack
$80/9EFE D4 0E	PEI ($0E)
$80/9F00 A9 80       LDA #$80      ; VRAM settings (for $2115)
$80/9F02 85 0E       STA $0E
$80/9F04 BD 03 00    LDA $0003,x   ; DMA Source Bank
$80/9F07 48          PHA           ; Push it on stack, it gets pulled right before the Subroutine Jump
$80/9F08 C2 20       REP #$20
$80/9F0A BD 06 00    LDA $0006,x   ; Number of Bytes to transfer
$80/9F0D 85 0C       STA $0C
$80/9F0F BC 04 00    LDY $0004,x   ; VRAM Destination Address
$80/9F12 BD 01 00    LDA $0001,x   ; DMA Source Address
$80/9F15 AA          TAX
$80/9F16 E2 20       SEP #$20
$80/9F18 68          PLA           ; Pull Source Bank
$80/9F19 20 2C 9F    JSR $9F2C     ; VRAM DMA
$80/9F1C FA          PLX           ; Restore old values of $0C-$0F
$80/9F1D 86 0E       STX $0E
$80/9F1F FA          PLX
$80/9F20 86 0C       STX $0C
$80/9F22 AB          PLB           ; Pull Program Bank
$80/9F23 6B          RTL

$80/9F24 Long Jump to VRAM DMA

This jumps to the VRAM DMA subroutine, but stores the current program bank on stack and restores the old one afterwards.

$80/9F24 8B          PHB
$80/9F25 4B          PHK
$80/9F26 AB          PLB
$80/9F27 20 2C 9F    JSR $9F2C     ; VRAM DMA
$80/9F2A AB          PLB
$80/9F2B 6B          RTL

$80/9F2C VRAM DMA

This Subroutine executes an DMA to VRAM.

First it checks if currently FBLANK is active. Then it checks if a HDMA is active. If it is, it pauses the HDMA for the time the DMA gets prepared and executed. The following preparations have been made in order to make this subroutine work properly:

A contains the DMA Source Bank

X contains the DMA Source Address

Y contains the VRAM Destination Address

$0C/$0D contain the number of bytes to transfer

$0E contains the VRAM settings (for register $2115)

$80/9F2C 48          PHA           ; Preserve the Original A content on Stack
$80/9F2D AD 6A 05    LDA $056A     ; Is currently a FBLANK active?
$80/9F30 10 38       BPL $38       ; [$9F6A] branch if not - If not, don't execute the DMA NOW, but put it in Pipeline
$80/9F32 68          PLA           ; Restore Original A content...
$80/9F33 EB          XBA           ; ... and put it in the other half of the Accumulator
$80/9F34 AD 86 05    LDA $0586     ; Are any HDMAs active/planned?
$80/9F37 F0 0D       BEQ $0D       ; [$9F46] If not, skip the next part - immediate execution of the DMA
$80/9F39 9C 0C 42    STZ $420C     ; Remove HDMA activation flags
$80/9F3C 20 46 9F    JSR $9F46     ; Execute the stuff you were branched to before as a subroutine now
$80/9F3F AD 86 05    LDA $0586     ; ... afterwards, restore the HDMA-Flags again
$80/9F42 8D 0C 42    STA $420C
$80/9F45 60          RTS
$80/9F46 A9 01       LDA #$01      ; DMA Settings
$80/9F48 8D 00 43    STA $4300
$80/9F4B A9 18       LDA #$18      ; Destination: $2118 - VRAM
$80/9F4D 8D 01 43    STA $4301
$80/9F50 EB          XBA           ; Restore Original A value
$80/9F51 8C 16 21    STY $2116     ; Original Y Value: VRAM Address
$80/9F54 8E 02 43    STX $4302     ; Original X Value: Source Address
$80/9F57 8D 04 43    STA $4304     ; Original A Value: Source Bank
$80/9F5A A6 0C       LDX $0C       ; $0C contains the number of bytes to transfer
$80/9F5C 8E 05 43    STX $4305
$80/9F5F A5 0E       LDA $0E       ; $0E contains the VRAM transfer settings
$80/9F61 8D 15 21    STA $2115
$80/9F64 A9 01       LDA #$01      ; Activate DMA
$80/9F66 8D 0B 42    STA $420B
$80/9F69 60          RTS
$80/9F6A A3 01       LDA $01,s     ; Load the last byte on stack (Original A) without removing it from stack
$80/9F6C C9 7E       CMP #$7E      ; is the DMA source Bank $7E?
$80/9F6E D0 18       BNE $18       ; [$9F88] branch if not
$80/9F70 E4 5C       CPX $5C       ; ???
$80/9F72 90 14       BCC $14       ; [$9F88]
$80/9F74 E4 5E       CPX $5E       ; ???
$80/9F76 B0 10       BCS $10       ; [$9F88]
$80/9F78 C2 21       REP #$21      ; A = 16 bit, Carry cleared
$80/9F7A 8A          TXA           ; DMA Source Address is now in A
$80/9F7B 65 0C       ADC $0C       ; Add the number of Bytes transfered
$80/9F7D 3A          DEC A         ; Decrement it by one
$80/9F7E C5 5E       CMP $5E       ; ???
$80/9F80 90 03       BCC $03       ; [$9F85]
$80/9F85 1A          INC A         ; ???
$80/9F86 85 5C       STA $5C       ; ???
$80/9F88 C2 21       REP #$21      ; A = 16 bit, Carry cleared
$80/9F8A AD C5 0E    LDA $0EC5     ; ???
$80/9F8D 65 0C       ADC $0C       ; ???
$80/9F8F 8D C5 0E    STA $0EC5     ; ???
$80/9F92 DA          PHX           ; Push DMA Source Address from Stack
$80/9F93 AD C7 0E    LDA $0EC7     ; Load Number of already occupied Pipeline Slots
$80/9F96 29 FF 00    AND #$00FF    ; This Number is 8 bit in size
$80/9F99 0A          ASL A         ; multiply by 2 - each pipeline entry is 2 bytes in size
$80/9F9A AA          TAX           ; Transfer in X as Index
$80/9F9B 98          TYA           ; Y still held the VRAM Destination
$80/9F9C 9D 49 10    STA $1049,x   ; Put in Pipeline - VRAM Destination ($2116)
$80/9F9F A5 0C       LDA $0C
$80/9FA1 9D C9 0E    STA $0EC9,x   ; Put in Pipeline - Data Size ($4305)
$80/9FA4 68          PLA           ; Get DMA Source Address (see $80/9F92)
$80/9FA5 9D 89 0F    STA $0F89,x   ; Put in Pipeline - Source Address ($4302)
$80/9FA8 E2 20       SEP #$20
$80/9FAA 68          PLA
$80/9FAB 9D 0A 11    STA $110A,x   ; Put in Pipeline - Source Bank ($4304)
$80/9FAE A5 0E       LDA $0E
$80/9FB0 9D 09 11    STA $1109,x   ; Put in Pipeline - VRAM Settings ($2115)
$80/9FB3 EE C7 0E    INC $0EC7     ; Increment Number of occupied Pipeline Slots
$80/9FB6 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/A405 Long Jump to the Tilemap Rectangle Writer

If this subroutine should be used while the program pointer is currently on a different bank

$80/A405 20 09 A4    JSR $A409     ; See below
$80/A408 6B          RTL


$80/A409 Tilemap Rectangle Writer

This subroutine transfers a line of tilemap entries into a rectangle inside the tilemap buffer.

$00 contains the rectangle's number of columns

$01 is used as counter for the current column

$02 contains the rectangle's number of rows

$03 is used as counter for the current row

X contains the Index to the Load Address (the Bank has to be adjusted before this subroutine is called)

Y Contains the Index where to write - the rest of the write address has to be set up in $20-$22


$80/A409 A5 02       LDA $02       ; Copy Row/Column number into counter registers that can be decremented
$80/A40B 85 03       STA $03
$80/A40D A5 00       LDA $00
$80/A40F 85 01       STA $01
$80/A411 5A          PHY           ; Push the write index on Stack (the starting point of a new line of the rectangle)
$80/A412 C2 20       REP #$20
$80/A414 BD 00 00    LDA $0000,x   ; Read Byte
$80/A417 C9 FF FF    CMP #$FFFF    ; If in the read data is a #$FFFF, it does not overwrite that tile
$80/A41A F0 02       BEQ $02       ; [$A41E] Leave out the write command if 
$80/A41C 97 20       STA [$20],y   ; Write into the Tilemap Buffer
$80/A41E E2 20       SEP #$20
$80/A420 E8          INX           ; Increment Read & Write Index
$80/A421 E8          INX
$80/A422 C8          INY
$80/A423 C8          INY
$80/A424 C6 01       DEC $01       ; Decrement column/(=tile) counter
$80/A426 D0 EA       BNE $EA       ; [$A412] Loop if not all tiles in that row are done yet
$80/A428 C2 21       REP #$21      ; 16-bit A + Clear Carry
$80/A42A 68          PLA           ; Pull the starting point of the rectangle's new line from stack
$80/A42B 69 40 00    ADC #$0040    ; Add #$40 - move one line down
$80/A42E A8          TAY           ; Transfer new starting point into Y (so it can be used + Pushed on stack again)
$80/A42F E2 20       SEP #$20
$80/A431 C6 03       DEC $03       ; Decrement Row Counter
$80/A433 D0 D8       BNE $D8       ; [$A40D] Loop if not all rows are done yet
$80/A435 60          RTS

$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     ; ???
$80/AFDD 20 D8 B3    JSR $B3D8     ; CGRAM Update
$80/AFE0 20 2B B3    JSR $B32B     ; ???
$80/AFE3 20 7B B3    JSR $B37B     ; ???
$80/AFE6 AD 86 05    LDA $0586     ; Reactivate HDMAs
$80/AFE9 8D 0C 42    STA $420C
$80/AFEC 20 6D B2    JSR $B26D     ; Update Graphic Setup Registers
$80/AFEF AD 6A 05    LDA $056A     ; Load the (old) Screen Settings
$80/AFF2 2C 12 42    BIT $4212     ; Wait for the next HBLANK to end
$80/AFF5 70 FB       BVS $FB       ; [$AFF2]
$80/AFF7 2C 12 42    BIT $4212
$80/AFFA 50 FB       BVC $FB       ; [$AFF7]
$80/AFFC 8D 00 21    STA $2100     ; Update Screen brightness
$80/AFFF 20 0B B4    JSR $B40B     ; Joypad Data Fetching
$80/B002 22 61 80 88 JSL $888061   ; ???
$80/B006 22 00 80 88 JSL $888000   ; ???
$80/B00A 22 18 81 88 JSL $888118   ; ???
$80/B00E AD BA 05    LDA $05BA
$80/B011 F0 04       BEQ $04       ; [$B017]

Missing Code

$80/B017 AE BB 05    LDX $05BB
$80/B01A F0 04       BEQ $04       ; [$B020]

Missing Code

$80/B020 20 40 B2    JSR $B240     ; ???
$80/B023 22 73 81 88 JSL $888173   ; ???
$80/B027 A6 32       LDX $32       ; ???
$80/B029 86 34       STX $34       ; ???
$80/B02B AE F0 05    LDX $05F0     ; Update V Timer - At which Scan Line an IRQ should come
$80/B02E 8E 09 42    STX $4209
$80/B031 AD 11 42    LDA $4211     ; Load (and remove) IRQ Flag
$80/B034 AD AF 05    LDA $05AF     ; Update NMI/IRQ/Auto-Joypad Flags
$80/B037 8D 00 42    STA $4200
$80/B03A EE B9 05    INC $05B9     ; ??? (Frame counter!? Flag register?)
$80/B03D AD BD 05    LDA $05BD     ; ??? (Check Flag register?)
$80/B040 89 C0       BIT #$C0      ; ??? (If bit 6 is set, CGRAM needs an update; bit 7 yet unknown)
$80/B042 D0 1C       BNE $1C       ; [$B060]
$80/B044 AD 38 00    LDA $0038     ; ???
$80/B047 F0 17       BEQ $17       ; [$B060]

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/B32B VRAM DMA Pipeline

$80/B32B AD C7 0E    LDA $0EC7     ; Are there any VRAM DMAs in the pipeline?
$80/B32E F0 44       BEQ $44       ; [$B374] If not, exit
$80/B330 A9 01       LDA #$01      ; DMA Settings
$80/B332 8D 00 43    STA $4300
$80/B335 A9 18       LDA #$18      ; DMA Destination: $2118
$80/B337 8D 01 43    STA $4301
$80/B33A A0 00 00    LDY #$0000
$80/B33D BE C9 0E    LDX $0EC9,y   ; DMA Data Size
$80/B340 8E 05 43    STX $4305
$80/B343 BE 89 0F    LDX $0F89,y   ; DMA Adress
$80/B346 8E 02 43    STX $4302
$80/B349 B9 0A 11    LDA $110A,y   ; DMA Bank
$80/B34C 8D 04 43    STA $4304
$80/B34F B9 09 11    LDA $1109,y   ; VRAM Transfer Setting
$80/B352 8D 15 21    STA $2115
$80/B355 BE 49 10    LDX $1049,y   ; VRAM Destination
$80/B358 8E 16 21    STX $2116
$80/B35B A9 01       LDA #$01      ; Activate DMA
$80/B35D 8D 0B 42    STA $420B
$80/B360 C8          INY           ; Increment Index
$80/B361 C8          INY
$80/B362 CE C7 0E    DEC $0EC7     ; Decrement number of occupied Pipelines entries
$80/B365 D0 D6       BNE $D6       ; [$B33D] Loop until all are done
$80/B367 A2 00 00    LDX #$0000
$80/B36A 8E D6 16    STX $16D6     ; ???
$80/B36D 8E D8 16    STX $16D8     ; ???
$80/B370 A6 5A       LDX $5A       ; ???
$80/B372 86 5C       STX $5C       ; ???
$80/B374 A2 00 00    LDX #$0000    ; ???
$80/B377 8E C5 0E    STX $0EC5     ; ???
$80/B37A 60          RTS

$80/B3D8 ?

$80/B3D8 AD BD 05    LDA $05BD     ; ???
$80/B3DB 89 40       BIT #$40      ; ??? If bit 6 in $05BD is set, this forces a CGRAM update
$80/B3DD D0 05       BNE $05       ; [$B3E4]
$80/B3DF AD 49 12    LDA $1249     ; Is "Update CGRAM" Flag set?
$80/B3E2 F0 26       BEQ $26       ; [$B40A] Exit if not
$80/B3E4 9C 21 21    STZ $2121     ; CGRAM Destination: $00
$80/B3E7 A9 22       LDA #$22      ; DMA Destination: $2122 (= CGRAM)
$80/B3E9 8D 01 43    STA $4301
$80/B3EC A2 00 02    LDX #$0200    ; Transfer #$200 Byte
$80/B3EF 8E 05 43    STX $4305
$80/B3F2 A2 4B 12    LDX #$124B    ; Source: $00124B (CGRAM Buffer)
$80/B3F5 8E 02 43    STX $4302
$80/B3F8 A9 00       LDA #$00
$80/B3FA 8D 04 43    STA $4304
$80/B3FD A9 00       LDA #$00      ; DMA Settings
$80/B3FF 8D 00 43    STA $4300
$80/B402 A9 01       LDA #$01      ; Activate DMA
$80/B404 8D 0B 42    STA $420B
$80/B407 9C 49 12    STZ $1249     ; Clear "Update CGRAM" Flag
$80/B40A 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/B4C8 An IRQ-Handler

This is an IRQ Handler. In Battle. With Battle Stats Menu on.

$80/B4C8 E2 20       SEP #$20
$80/B4CA 48          PHA           ; Buffer A value on stack
$80/B4CB AF 11 42 00 LDA $004211   ; Check if the IRQ flag is set
$80/B4CF 10 72       BPL $72       ; [$B543] If not, branch, pull A from Stack and exit
$80/B4D1 8B          PHB           ; Else, buffer the current Program bank and change  it
$80/B4D2 4B          PHK
$80/B4D3 AB          PLB
$80/B4D4 6C 34 00    JMP ($0034)   ; Jump to the IRQ Handler [$80:B4D7]

$80/B4D7 Possibility where IRQ-Handler $80/B4C8 can jump to

A possibility where $80/B4C8 can jump to

$80/B4D7 AD F0 05    LDA $05F0     ; ???
$80/B4DA C9 DA       CMP #$DA      ; ???
$80/B4DC B0 4F       BCS $4F       ; [$B52D] ??? Branch is taken if A is higher
$80/B4DE C2 10       REP #$10      ; ???
$80/B4E0 DA          PHX           ; ???
$80/B4E1 5A          PHY           ; ???
$80/B4E2 0B          PHD           ; ???
$80/B4E3 A2 00 21    LDX #$2100    ; This sets the direc bank to $2100, so every two-digit register is a $21xx register!
$80/B4E6 DA          PHX           ; I guess this is done so the HBLANKs are optimally used
$80/B4E7 2B          PLD
$80/B4E8 A9 09       LDA #$09      ; Prepare value so it can be stored right after the HBLANK
$80/B4EA 2C 12 42    BIT $4212     ; V/HBLANK-Flag register
$80/B4ED 70 FB       BVS $FB       ; [$B4EA] Loop until flag is set (HBLANK begins)
$80/B4EF 2C 12 42    BIT $4212
$80/B4F2 50 FB       BVC $FB       ; [$B4EF] Loop until flag is cleared, HBLANK has just ended
$80/B4F4 64 00       STZ $00       ; $2100 - turn down the Brightness
$80/B4F6 85 05       STA $05       ; $2105 - BG mode 1 with priority bit
$80/B4F8 64 31       STZ $31       ; $2131 - Deactivate color math
$80/B4FA A0 07 00    LDY #$0007    ; Load next bunch of values
$80/B4FD A2 38 38    LDX #$3838
$80/B500 A9 34       LDA #$34
$80/B502 2C 12 42    BIT $4212     ; Wait for the next passing of a HBLANK
$80/B505 70 FB       BVS $FB       ; [$B502]
$80/B507 2C 12 42    BIT $4212
$80/B50A 50 FB       BVC $FB       ; [$B507]
$80/B50C 84 2C       STY $2C       ; $212C - BG1/2/3 (No sprites!) on Main Screen, nothing on subscreen
$80/B50E 86 08       STX $08       ; BG2/3 Tilemap at $3800 in VRAM
$80/B510 85 07       STA $07       ; BG1 Tilemap at $3400
$80/B512 A9 02       LDA #$02      ; BG1 Tiles at $2000
$80/B514 85 0B       STA $0B
$80/B516 AD 6A 05    LDA $056A     ; Restore old brightness settings
$80/B519 85 00       STA $00
$80/B51B 2B          PLD           ; Restore old Direct Bank
$80/B51C A2 2D B5    LDX #$B52D    ; Setting up the Address of the IRQ Handler
$80/B51F 86 34       STX $34       ; For the last part, the IRQ Handler now jumps to $80/B52D
$80/B521 A2 DC 00    LDX #$00DC    ; V Timer on #$DC = (#220, the bottom line) - once executed is enough?
$80/B524 8E 09 42    STX $4209
$80/B527 7A          PLY           ; Restore Y, X and Program Bank
$80/B528 FA          PLX
$80/B529 AB          PLB
$80/B52A 4C 43 B5    JMP $B543     ; Pull A from Stack and RTI

$80/B52D 2C 12 42    BIT $4212     ; V/HBLANK-Flag register
$80/B530 70 FB       BVS $FB       ; [$B52D] Loop until flag is set (HBLANK begins)
$80/B532 2C 12 42    BIT $4212
$80/B535 50 FB       BVC $FB       ; [$B532] Loop until flag is cleared, HBLANK has just ended
$80/B537 9C 00 21    STZ $2100     ; No FBLANK, but screen brightness = 0
$80/B53A AD AF 05    LDA $05AF     ; Deactivate(?) HBLANK
$80/B53D 29 CF       AND #$CF
$80/B53F 8D 00 42    STA $4200
$80/B542 AB          PLB           ; Restore Program Bank and A
$80/B543 68          PLA
$80/B544 40          RTI

$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 $82

$82/98AA Battle Stats Menu - Buffer Character's data

When you open the Stats Menu in Battle (the one in the bottom part of the menu), this subroutine collects all the stats values and puts them in a number of buffer registers.

$82/98AA 8B          PHB           ; Buffer Data Bank Register on stack
$82/98AB 4B          PHK
$82/98AC AB          PLB
$82/98AD A6 39       LDX $39       ; Character number as Index
$82/98AF BD AE 17    LDA $17AE,x   ; Character graphic
$82/98B2 8D 9F 1E    STA $1E9F
$82/98B5 BD AF 17    LDA $17AF,x   ; ???
$82/98B8 8D 66 1E    STA $1E66
$82/98BB BD D7 17    LDA $17D7,x   ; Character Element
$82/98BE 8D 67 1E    STA $1E67
$82/98C1 BD FE 17    LDA $17FE,x   ; Level
$82/98C4 8D 68 1E    STA $1E68
$82/98C7 BD FF 17    LDA $17FF,x   ; Exp
$82/98CA 8D 69 1E    STA $1E69
$82/98CD BD B6 19    LDA $19B6,x   ; LUK
$82/98D0 8D 7E 1E    STA $1E7E
$82/98D3 BD D6 17    LDA $17D6,x   ; ???
$82/98D6 8D 7F 1E    STA $1E7F
$82/98D9 BD DE 19    LDA $19DE,x   ; ??? (Status Effects?)
$82/98DC 8D 80 1E    STA $1E80
$82/98DF BD DF 19    LDA $19DF,x   ; ???
$82/98E2 8D A0 1E    STA $1EA0
$82/98E5 BD 2E 1A    LDA $1A2E,x   ; ???
$82/98E8 8D 81 1E    STA $1E81
$82/98EB BD 2F 1A    LDA $1A2F,x   ; ???
$82/98EE 8D 82 1E    STA $1E82
$82/98F1 BD 56 1A    LDA $1A56,x   ; ???
$82/98F4 8D 8F 1E    STA $1E8F
$82/98F7 BD 57 1A    LDA $1A57,x   ; ???
$82/98FA 8D 90 1E    STA $1E90
$82/98FD BD 6E 1B    LDA $1B6E,x   ; ???
$82/9900 8D 91 1E    STA $1E91
$82/9903 BD C7 1D    LDA $1DC7,x   ; ???
$82/9906 8D 96 1E    STA $1E96
$82/9909 BD EE 1D    LDA $1DEE,x   ; Number of Moves
$82/990C 8D 97 1E    STA $1E97
$82/990F BD B7 19    LDA $19B7,x   ; ???
$82/9912 8D 9D 1E    STA $1E9D
$82/9915 BD 26 1D    LDA $1D26,x   ; ???
$82/9918 8D 9E 1E    STA $1E9E
$82/991B C2 20       REP #$20      ; 16 bit values ahead
$82/991D BD 26 18    LDA $1826,x   ; Current HP
$82/9920 8D 6A 1E    STA $1E6A
$82/9923 BD 4E 18    LDA $184E,x   ; Max HP
$82/9926 8D 6C 1E    STA $1E6C
$82/9929 BD 76 18    LDA $1876,x   ; Current MP
$82/992C 8D 6E 1E    STA $1E6E
$82/992F BD 9E 18    LDA $189E,x   ; Max MP
$82/9932 8D 70 1E    STA $1E70
$82/9935 BD C6 18    LDA $18C6,x   ; STR
$82/9938 8D 72 1E    STA $1E72
$82/993B BD EE 18    LDA $18EE,x   ; INT
$82/993E 8D 74 1E    STA $1E74
$82/9941 BD 16 19    LDA $1916,x   ; AGI
$82/9944 8D 76 1E    STA $1E76
$82/9947 BD 3E 19    LDA $193E,x   ; DEX
$82/994A 8D 78 1E    STA $1E78
$82/994D BD 66 19    LDA $1966,x   ; VIT
$82/9950 8D 7A 1E    STA $1E7A
$82/9953 BD 8E 19    LDA $198E,x   ; MEN
$82/9956 8D 7C 1E    STA $1E7C
$82/9959 BD 7E 1A    LDA $1A7E,x   ; ???
$82/995C 8D 83 1E    STA $1E83
$82/995F BD A6 1A    LDA $1AA6,x   ; ???
$82/9962 8D 85 1E    STA $1E85
$82/9965 BD CE 1A    LDA $1ACE,x   ; ???
$82/9968 8D 87 1E    STA $1E87
$82/996B BD F6 1A    LDA $1AF6,x   ; ???
$82/996E 8D 89 1E    STA $1E89
$82/9971 BD 1E 1B    LDA $1B1E,x   ; ???
$82/9974 8D 8B 1E    STA $1E8B
$82/9977 BD 46 1B    LDA $1B46,x   ; ???
$82/997A 8D 8D 1E    STA $1E8D
$82/997D BD 96 1B    LDA $1B96,x   ; ???
$82/9980 8D 92 1E    STA $1E92
$82/9983 BD 9E 1D    LDA $1D9E,x   ; 16-bit Address (on WRAM bank $7E) of the Character's name, class etc.
$82/9986 8D 94 1E    STA $1E94
$82/9989 E2 20       SEP #$20
$82/998B BD 3E 1E    LDA $1E3E,x   ; ???
$82/998E 8D 98 1E    STA $1E98
$82/9991 A6 39       LDX $39       ; Load Character's number (again)
$82/9993 AB          PLB           ; Restore Data Bank Register
$82/9994 6B          RTL

$82/AE91 Battle Stats Menu - Tilemap builder

This subroutine is called when the game has to build the status menu at the bottom of the battle screen. It builds some tiles into the tilemap - it is used quite often. This writes a rectangle shape into the tilemap, you have to give it the number of columns and rows it has to span.

Before it is called, certain values have to be set up.

X contains the 16-bit address where to read the tile data that has to be implemented into the tilemap.

$0A/B and $98/9 contain adress data that, together, form another part of the offset for the write address. Not sure what component each one brings in.

$0C contains what has to be added to the ROM read data before it is added to the tilemap, i. e. flipping or palette stuff.

$0E contains the number of rows this should edit, $0F the number of lines; these get transfered to $00/$01

$2C contains the 24-bit address of the tilemap buffer.

$82/AE91 C2 21       REP #$21
$82/AE93 A5 0A       LDA $0A       ; ??? This forms the where-to-write starting address
$82/AE95 65 98       ADC $98       ; ??? Dunno what each part of this addition means singularly, though
$82/AE97 A8          TAY           ; Transfer where-to-write index in Y
$82/AE98 E2 20       SEP #$20
$82/AE9A A5 0F       LDA $0F       ; Transfer row count into the loop counter
$82/AE9C 85 01       STA $01
$82/AE9E A5 0E       LDA $0E       ; Transfer column count into the loop counter
$82/AEA0 85 00       STA $00
$82/AEA2 5A          PHY           ; Push the start of this line on stack
$82/AEA3 C2 21       REP #$21
$82/AEA5 BD 00 00    LDA $0000,x   ; Load the tilemap entry from ROM
$82/AEA8 65 0C       ADC $0C       ; Add additional information to it if there is some
$82/AEAA 97 2C       STA [$2C],y   ; Write it in the buffered tilemap
$82/AEAC E2 20       SEP #$20
$82/AEAE C8          INY           ; Increment read and write counters
$82/AEAF C8          INY
$82/AEB0 E8          INX
$82/AEB1 E8          INX
$82/AEB2 C6 00       DEC $00       ; Decrement inner loop counter (columns)
$82/AEB4 D0 ED       BNE $ED       ; [$AEA3] Loop if it isn't depleted
$82/AEB6 C2 21       REP #$21
$82/AEB8 68          PLA           ; Pull the address of the start of the row from  stack
$82/AEB9 69 40 00    ADC #$0040    ; Calculate the address of the start of the next row
$82/AEBC A8          TAY           ; Transfer in Y (so it gets pushed on stack at $AEA2 after looping)
$82/AEBD E2 20       SEP #$20
$82/AEBF C6 01       DEC $01       ; Decrement outer loop counter (rows)
$82/AEC1 D0 DB       BNE $DB       ; [$AE9E] Loop if it isn't depleted
$82/AEC3 60          RTS

$82/B235 Battle Stats Menu - transfer the buffered tilemaps into VRAM

This simple subroutine transfers the three buffered BG1 to BG3 tilemaps for the menu to VRAM.

$82/B235 A9 80       LDA #$80      ; VRAM transfer settings (for $2115)
$82/B237 85 0E       STA $0E
$82/B239 A0 00 36    LDY #$3600    ; BG1 tilemap: VRAM destination
$82/B23C A2 00 14    LDX #$1400    ; BG1 tilemap: Source Data Position: $7F/1400
$82/B23F A9 7F       LDA #$7F
$82/B241 22 24 9F 80 JSL $809F24   ; BG1 tilemap: VRAM DMA
$82/B245 A0 00 3A    LDY #$3A00    ; BG2 tilemap: VRAM destination
$82/B248 A2 00 18    LDX #$1800    ; BG2 tilemap: Source Data Position: $7F/1800
$82/B24B A9 7F       LDA #$7F
$82/B24D 22 24 9F 80 JSL $809F24   ; BG2 tilemap: VRAM DMA
$82/B251 A0 00 38    LDY #$3800    ; BG3 tilemap: VRAM destination
$82/B254 A2 00 1C    LDX #$1C00    ; BG3 tilemap: Source Data Position: $7F/1C00
$82/B257 A9 7F       LDA #$7F
$82/B259 22 24 9F 80 JSL $809F24   ; BG3 tilemap: VRAM DMA
$82/B25D 60          RTS

Bank $84

$84/B98A Battle figure moving animation?

This is executed in the title screen demo, when the soldier jumps over the gap and beats the archeress(?)

This executes an VRAM DMA - I can imagine this is the graphics update for a marching game figure animation.

There are some values to this subroutine carried in before it is called:

A contains some Index for a table at $84/BA03 ($0002:3A03)

Y contains the VRAM destination address

$20 to $22 contains an offset for the DMA Source Address

$84/B98A 8B          PHB           ; Preserve Bank on Stack
$84/B98B 4B          PHK           ; Change Bank
$84/B98C AB          PLB
$84/B98D D4 00	PEI ($00)          ; Push current content of $00 on stack
$84/B98F D4 02	PEI ($02)          ; Push current content of $02 on stack
$84/B991 D4 0C	PEI ($0C)          ; Push current content of $0C on stack
$84/B993 D4 0E	PEI ($0E)          ; Push current content of $0E on stack
$84/B995 09 00       ORA #$00      ; Set the "focus" of the flag register back on the Accumulator???
$84/B997 10 0A       BPL $0A       ; [$B9A3] Branch if A value is between #$00 and #$7F
$84/B999 29 7F       AND #$7F      ; If not, remove the MSB anyways
$84/B99B 85 00       STA $00       ; Store Original A minus MSB in $00
$84/B99D A9 02       LDA #$02      ; Set up a counter for left/right side of the  graphic
$84/B99F 85 01       STA $01       ; Yeah, I wouldn't understand that comment, too
$84/B9A1 80 04       BRA $04       ; [$B9A7]

Code is missing here

$84/B9A7 84 02       STY $02       ; Buffer VRAM destination in $02
$84/B9A9 A2 40 00    LDX #$0040    ; Number of Bytes to transfer
$84/B9AC 86 0C       STX $0C
$84/B9AE A9 80       LDA #$80      ; VRAM settings for the DMA (for $2115)
$84/B9B0 85 0E       STA $0E
$84/B9B2 7B          TDC           ; Clear 16-bit A
$84/B9B3 A5 00       LDA $00       ; Load Original A value
$84/B9B5 0A          ASL A         ; Multiply by 4 (4 byte sized table entries?)
$84/B9B6 0A          ASL A
$84/B9B7 A8          TAY           ; Transfer in Y
$84/B9B8 7B          TDC           ; Clear 16-bit A
$84/B9B9 B9 03 BA    LDA $BA03,y   ; Load Table entry
$84/B9BC C9 FF       CMP #$FF      ; ???
$84/B9BE F0 0F       BEQ $0F       ; [$B9CF] ???
$84/B9C0 C2 20       REP #$20      ; Multiply loaded byte by #$20 (thirty-two)
$84/B9C2 EB          XBA
$84/B9C3 4A          LSR A
$84/B9C4 4A          LSR A
$84/B9C5 4A          LSR A
$84/B9C6 65 20       ADC $20       ; Add some DMA Source Address Offset that was set up before this subroutine
$84/B9C8 AA          TAX           ; Transfer in X as DMA Source Address
$84/B9C9 E2 20       SEP #$20
$84/B9CB A5 22       LDA $22       ; Load $22 in A as DMA SOurce Bank
$84/B9CD 80 05       BRA $05       ; [$B9D4] Branch

Code is missing here

$84/B9D4 5A          PHY           ; Push Y on stack - it's the Load Index for the table at $BA03
$84/B9D5 A4 02       LDY $02       ; Load VRAM destination address in Y
$84/B9D7 22 24 9F 80 JSL $809F24   ; VRAM DMA
$84/B9DB 7A          PLY           ; Restore the Load Index for the table at $BA03
$84/B9DC C8          INY           ; Increment it
$84/B9DD 98          TYA           ; Copy it to A
$84/B9DE 29 03       AND #$03      ; Look if it has done 4 graphics; 4 sprite graphics per Unit
$84/B9E0 F0 13       BEQ $13       ; [$B9F5] If so, exit
$84/B9E2 7B          TDC           ; Clear 16-bit A
$84/B9E3 A9 20       LDA #$20      ; ??? This has something to do with the positioning of sprites in VRAM
$84/B9E5 C6 01       DEC $01       ; ??? The right sprite is $20 away from the left, the one below $100 ($20+$E0)
$84/B9E7 D0 02       BNE $02       ; [$B9EB] ??? $01 is a counter for this, whether it should add...
$84/B9E9 A9 E0       LDA #$E0      ; ??? $20 or $E0 to get to the VRAM address to reach the next graphic
$84/B9EB C2 21       REP #$21      ; Add this $20 or $E0 to the VRAM address, store it in it's buffer...
$84/B9ED 65 02       ADC $02
$84/B9EF 85 02       STA $02
$84/B9F1 E2 20       SEP #$20
$84/B9F3 80 C3       BRA $C3       ; [$B9B8] ... and loop
$84/B9F5 FA          PLX           ; Restore the old values of $0E, $0C, $02 and $00
$84/B9F6 86 0E       STX $0E
$84/B9F8 FA          PLX
$84/B9F9 86 0C       STX $0C
$84/B9FB FA          PLX
$84/B9FC 86 02       STX $02
$84/B9FE FA          PLX
$84/B9FF 86 00       STX $00
$84/BA01 AB          PLB           ; Restore old bank
$84/BA02 6B          RTL

Bank $86

$86/8019 ?

This is executed in the title screen demo, when the soldier jumps over the gap and beats the archeress(?)

$86/8019 8B          PHB           ; Preserve Bank on Stack
$86/801A 4B          PHK           ; Change Bank
$86/801B AB          PLB
$86/801C A2 20 05    LDX #$0520    ; [assumed] start of the OAM high table buffer
$86/801F A0 20 03    LDY #$0320    ; [assumed] start of the OAM low table buffer
$86/8022 CC 45 05    CPY $0545     ; Is this actually the position?
$86/8025 D0 06       BNE $06       ; [$802D] If it isn't, skip this next part
$86/8027 A2 00 03    LDX #$0300    ; ??? Change position of OAM high table buffer?
$86/802A A0 00 01    LDY #$0100    ; ??? Change position of OAM high table buffer?
$86/802D 86 26       STX $26       ; Store in Temp Register
$86/802F 84 29       STY $29       ; Store in Temp Register
$86/8031 C2 20       REP #$20
$86/8033 AD 43 05    LDA $0543     ; ??? Load number currently used sprites?
$86/8036 0A          ASL A
$86/8037 0A          ASL A         ; Multiply by 4 (each sprite needs 4 bytes in Low Table)
$86/8038 65 29       ADC $29       ; Add Low Table Offset
$86/803A 85 29       STA $29       ; Store in $29
$86/803C AD 43 05    LDA $0543     ; ??? Load number currently used sprites?
$86/803F 4A          LSR A
$86/8040 4A          LSR A         ; Divide by 4 (each sprite needs 2 bits in High Table)
$86/8041 65 26       ADC $26       ; Add High Table Offset
$86/8043 85 26       STA $26       ; Store in $26
$86/8045 E2 20       SEP #$20
$86/8047 A9 80       LDA #$80      ; Max. number of sprites
$86/8049 38          SEC
$86/804A ED 43 05    SBC $0543     ; Subtract number of used sprites(?)
$86/804D 85 2B       STA $2B       ; Store in $2B
$86/804F A9 80       LDA #$80      ; ???
$86/8051 85 28       STA $28       ; ???
$86/8053 A0 00 00    LDY #$0000    ; ???
$86/8056 BE 83 0E    LDX $0E83,y   ; ???
$86/8059 30 4A       BMI $4A       ; [$80A5]
$86/805B 5A          PHY           ; ???
$86/805C 7B          TDC           ; ???
$86/805D BD C3 09    LDA $09C3,x   ; ???
$86/8060 10 05       BPL $05       ; [$8067]
$86/8062 20 81 81    JSR $8181     ; ???
$86/8065 80 37       BRA $37       ; [$809E]

Code is missing here

$86/809E 7A          PLY           ; ???
$86/809F C8          INY           ; ???
$86/80A0 C8          INY           ; ???
$86/80A1 A5 2B       LDA $2B       ; ???
$86/80A3 D0 B1       BNE $B1       ; [$8056]

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 $9B

$9B/9BA5 (Decompress(?) and) Transfer graphic data sets to VRAM

At $9B/9C17 ($000D:9C17) is an address table. When this subroutine gets called, A contains an entry number for this address table. The corresponding address is loaded. The data there is a chain of different "graphic sets" that are transfered here. The data's first value (16 bit) can be negative or positive:

If negative, this is a standard VRAM DMA. The first two byte are the VRAM destination (MSB gets removed), the next three bytes are the 24 bit address of the graphic data in the ROM, the last two byte are the 16 bit value of how many bytes are to be transfered

If the first value is positive... I don't know. Some preparation is done and a subroutine is called, but what it does is quite complicated. To me, it looks like a decompression of some sorts.

This stuff gets executed when you start a new game, screwing this up removes the script from the text boxes, so I can imagine this is for the whole Kanji sets / Hiragana / Katakana.

$9B/9BA5 8B          PHB           ; Preserve Program Bank on stack
$9B/9BA6 4B          PHK           ; Change Program Bank
$9B/9BA7 AB          PLB
$9B/9BA8 C2 20       REP #$20
$9B/9BAA 29 FF 00    AND #$00FF    ; The value that was in A at the start is an index for a Table
$9B/9BAD 0A          ASL A         ; It gets multiplied by 2 and transfered in Y...
$9B/9BAE A8          TAY
$9B/9BAF B9 17 9C    LDA $9C17,y   ; ... and the table value gets loaded
$9B/9BB2 A8          TAY           ; The value itself is an address...
$9B/9BB3 B9 00 00    LDA $0000,y   ; ... from which we load data
$9B/9BB6 30 33       BMI $33       ; [$9BEB] Branch if the loaded data is between #$8000-#$FFFF
$9B/9BB8 5A          PHY           ; IF POSITIVE: Push the address that was loaded at the very beginning on stack
$9B/9BB9 48          PHA           ; Put the secondly loaded value on stack, too
$9B/9BBA E2 20       SEP #$20      ; ???
$9B/9BBC BE 05 00    LDX $0005,y   ; ???
$9B/9BBF B9 07 00    LDA $0007,y   ; ???
$9B/9BC2 86 20       STX $20       ; ???
$9B/9BC4 85 22       STA $22       ; ???
$9B/9BC6 C9 7E       CMP #$7E      ; ???
$9B/9BC8 D0 0E       BNE $0E       ; [$9BD8] ???
$9B/9BCA E0 00 20    CPX #$2000    ; ???
$9B/9BCD D0 09       BNE $09       ; [$9BD8] ???
$9B/9BCF AD 6A 05    LDA $056A     ; ???
$9B/9BD2 30 04       BMI $04       ; [$9BD8] ???

Code is missing here

$9B/9BD8 BE 02 00    LDX $0002,y   ; ???
$9B/9BDB B9 04 00    LDA $0004,y   ; ???
$9B/9BDE 7A          PLY           ; ???
$9B/9BDF 22 7B 9E 80 JSL $809E7B   ; ??? Not sure, but this looks like some decompression subroutine to me
$9B/9BE3 C2 21       REP #$21      ; A = 16 bit, clear carry
$9B/9BE5 68          PLA           ; Load the address from the address table
$9B/9BE6 69 08 00    ADC #$0008    ; Add 8 (next entry)
$9B/9BE9 80 C7       BRA $C7       ; [$9BB2] Loop, do the next entry in this list
$9B/9BEB C9 FF FF    CMP #$FFFF    ; Is the loaded data #$FFFF?
$9B/9BEE F0 23       BEQ $23       ; [$9C13] Exit if it is
$9B/9BF0 5A          PHY           ; Push the address that was loaded at the very beginning on stack
$9B/9BF1 29 FF 7F    AND #$7FFF    ; Remove the MSB from the secondly loaded data
$9B/9BF4 48          PHA           ; And throw it on stack
$9B/9BF5 E2 20       SEP #$20      ; Now, a VRAM DMA is built
$9B/9BF7 A9 80       LDA #$80      ; These are VRAM transfer settings (for $2115)
$9B/9BF9 85 0E       STA $0E
$9B/9BFB BE 05 00    LDX $0005,y   ; Loaded Data Address + 5 contains the number of bytes to be transfered (16 bit value)
$9B/9BFE 86 0C       STX $0C
$9B/9C00 BE 02 00    LDX $0002,y   ; Loaded Data Address + 2 contains the DMA Source Address (16 bit, of course)
$9B/9C03 B9 04 00    LDA $0004,y   ; Loaded Data Address + 4 contains the DMA Source Bank (8 bit)
$9B/9C06 7A          PLY           ; The modified loaded data value is the VRAM destination address
$9B/9C07 22 24 9F 80 JSL $809F24   ; VRAM DMA
$9B/9C0B C2 21       REP #$21      ; A = 16 bit, clear carry
$9B/9C0D 68          PLA           ; Load the address from the address table
$9B/9C0E 69 07 00    ADC #$0007    ; Add 7 (next entry)
$9B/9C11 80 9F       BRA $9F       ; [$9BB2] Loop, do the next entry in this list
$9B/9C13 E2 20       SEP #$20      ; Restore everything and exit
$9B/9C15 AB          PLB
$9B/9C16 6B          RTL

$9B/9C17 Address Table for $9B/9BA5

$9B/9C17 31 9C       Entry $00: $9C31
$9B/9C19 58 9C       Entry $01: $9C58
$9B/9C1B 62 9C       Entry $02: $9C62
$9B/9C1D 6B 9C       Entry $03: $9C6B
$9B/9C1F 31 9C       Entry $04-$0C: The same as Entry $00
$9B/9C21 31 9C 
$9B/9C23 31 9C 
$9B/9C25 31 9C 
$9B/9C27 31 9C 
$9B/9C29 31 9C 
$9B/9C2B 31 9C 
$9B/9C2D 31 9C 
$9B/9C2F 31 9C

$9B/9C31 Graphic Set $00 for $9B/9BA5

$9B/9C31 00 C0 00 80 B7 00 04      ; B78000 These are Debug(???) Numbers and Symbols that are never seen(?)
$9B/9C38 00 28 00 80 BF 00 20 7E
$9B/9C40 00 2A DB 80 DA 00 20 7E
$9B/9C48 00 30 D0 81 DA 00 20 7E

After this, the stuff for the next Graphic Set gets executed, too. Graphic Set 1 is a part of Graphic Set 0

$9B/9C50 Graphic Set $01 for $9B/9BA5

$9B/9C50 00 65 65 88 DA 00 20 7E
$9B/9C58 00 61 58 97 DA 00 20 7E
$9B/9C60 FF FF

$9B/9C62 Graphic Set $01 for $9B/9BA5

$9B/9C62 00 C0 00 80 B7 00 04
$9B/9C69 FF FF

$9B/9C6B Graphic Set $03 for $9B/9BA5

$9B/9C6B 00 65 65 88 DA 00 20 7E
$9B/9C73 00 61 58 97 DA 00 20 7E
$9B/9C7B 00 10 D0 81 DA 00 20 7E
$9B/9C83 00 78 41 BE DB 00 20 7E
$9B/9C8B 00 00 AB CA DB 00 20 7E
$9B/9C93 00 50 9E F1 DB 00 20 7E
$9B/9C9B C0 8F 74 EA 9B 80 00
$9B/9CA2 FF FF

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