If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Notes:Final Fight (SNES)/Bank 01

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Notes:Final Fight (SNES).

Bank 01

Thrasher on TV

$01/877C CE 24 01    DEC $0124  [$00:0124]   //Countdown timer
$01/877F D0 0B       BNE $0B    [$878C]      //Skip to $878C if countdown timer not zero
$01/8781 EA          NOP                     //*
$01/8782 EA          NOP
$01/8783 EA          NOP
$01/8784 EA          NOP
$01/8785 EA          NOP
$01/8786 EA          NOP
$01/8787 A9 0C       LDA #$0C
$01/8789 8D 21 01    STA $0121  [$00:0121]
$01/878C 60          RTS

* A mysterious string of 6 NOP's (could've contained two local subroutine jumps)

Opening

$01/8D28 AD 19 01    LDA $0119  [$00:0119]   //Controller 1
$01/8D2B 2D 11 01    AND $0111  [$00:0111]   //Controller 1
$01/8D2E 29 10       AND #$10                //Start button
$01/8D30 D0 0B       BNE $0B    [$8D3D]      //Skip to $8D3D if Start pressed
$01/8D32 AD 1B 01    LDA $011B  [$00:011B]   //Controller 2
$01/8D35 2D 13 01    AND $0113  [$00:0113]   //Controller 2
$01/8D38 29 10       AND #$10                //Start button
$01/8D3A D0 04       BNE $04    [$8D40]      //Skip to $8D40 if Start pressed
$01/8D3C 60          RTS
Start Pressed on Controller 1*
$01/8D3D A9 01       LDA #$01
$01/8D3F 60          RTS
Start Pressed on Controller 2*
$01/8D40 A9 02       LDA #$02
$01/8D42 60          RTS

* A distinction is made between controller 1 and 2, but the programming that checks the result only looks for a non-zero value.

Title Screen

$01/903C 20 28 8D    JSR $8D28  [$01:8D28]   //Check for Start being pressed on controller 1 or 2
$01/903F F0 12       BEQ $12    [$9053]      //Skip to $9053 if Start not pressed
$01/9041 9C 22 01    STZ $0122  [$00:0122]
$01/9044 9C 23 01    STZ $0123  [$00:0123]
$01/9047 AD 10 01    LDA $0110  [$00:0110]   //Controller 1
$01/904A 89 20       BIT #$20                //L button
$01/904C D0 06       BNE $06    [$9054]      //Skip to $9054 if L pressed
$01/904E A9 06       LDA #$06                //Proceed to character select screen
$01/9050 8D 21 01    STA $0121  [$00:0121]
$01/9053 60          RTS 
$01/9054 9C 21 01    STZ $0121  [$00:0121]
$01/9057 A9 12       LDA #$12                //Proceed to Option Mode
$01/9059 8D 20 01    STA $0120  [$00:0120]
$01/905C 60          RTS
$01/9144 A9 01       LDA #$01                //Demo mode off
$01/9146 8D CC 00    STA $00CC  [$00:00CC]
$01/9149 AD 28 01    LDA $0128  [$00:0128]
$01/914C 8D CD 00    STA $00CD  [$00:00CD]   //Copy number of players

Character Select Screen

$01/986B A9 02       LDA #$02
$01/986D 8D A0 0C    STA $0CA0  [$00:0CA0]   //Open Round
$01/9870 60          RTS

Unknown Player 1 and Player 2 Swap (unused)

$01/99B4 A9 02       LDA #$02
$01/99B6 85 A0       STA $A0    [$00:00A0]
$01/99B8 A9 7F       LDA #$7F
$01/99BA 1C 68 0D    TRB $0D68  [$00:0D68]
$01/99BD A2 7F 00    LDX #$007F
$01/99C0 BD 00 0D    LDA $0D00,x
$01/99C3 EB          XBA
$01/99C4 BD 80 0D    LDA $0D80,x
$01/99C7 9D 00 0D    STA $0D00,x
$01/99CA EB          XBA
$01/99CB 9D 80 0D    STA $0D80,x
$01/99CE CA          DEX
$01/99CF 10 EF       BPL $EF    [$99C0]      //Loop until Player 1 stats swapped with Player 2 stats
$01/99D1 A9 02       LDA #$02                //Round open
$01/99D3 8D A0 0C    STA $0CA0  [$00:0CA0]
$01/99D6 A2 5F 00    LDX #$005F
$01/99D9 BD A0 0C    LDA $0CA0,x
$01/99DC EB          XBA
$01/99DD BF 00 10 7F LDA $7F1000,x
$01/99E1 9D A0 0C    STA $0CA0,x
$01/99E4 EB          XBA
$01/99E5 9F 00 10 7F STA $7F1000,x
$01/99E9 CA          DEX
$01/99EA 10 ED       BPL $ED    [$99D9]      //Loop until game stats 7E0CA0-7E0CFF swapped with 7F1000-7F105F
$01/99EC 60          RTS

Gameplay Mode $08 - Clear Area

$01/9A10 A9 00       LDA #$00
$01/9A12 22 3B 8F 00 JSL $008F3B[$00:8F3B]
$01/9A16 AD B0 0C    LDA $0CB0  [$00:0CB0]   //Round
$01/9A19 C9 03       CMP #$03                //Industrial Area
$01/9A1B D0 0A       BNE $0A    [$9A27]      //Skip to $9A27 if not on Industrial Area
$01/9A1D AD B1 0C    LDA $0CB1  [$00:0CB1]   //Area
$01/9A20 C9 00       CMP #$00
$01/9A22 D0 03       BNE $03    [$9A27]      //Skip to $9A27 if on elevator area
$01/9A24 EE B1 0C    INC $0CB1  [$00:0CB1]   //Area +1 (this causes the second area of the Industrial Area to be skipped)
$01/9A27 EE B1 0C    INC $0CB1  [$00:0CB1]   //Area +1
$01/9A2A 22 0C A4 01 JSL $01A40C[$01:A40C]   //Load Number of Areas in Round
$01/9A2E CD B1 0C    CMP $0CB1  [$00:0CB1]
$01/9A31 B0 06       BCS $06    [$9A39]      //Skip to $9A39 if more areas remaining
$01/9A33 A9 0A       LDA #$0A                //Finished Round
$01/9A35 8D A0 0C    STA $0CA0  [$00:0CA0]
$01/9A38 60          RTS
$01/9A39 A9 04       LDA #$04                //Open (next) area
$01/9A3B 8D A0 0C    STA $0CA0  [$00:0CA0]
$01/9A3E 60          RTS

Gameplay Mode $0A - Clear Round

$01/9A3F 20 4D 9D    JSR $9D4D  [$01:9D4D]   //Set index value for upcoming Round
$01/9A42 AD B2 0C    LDA $0CB2  [$00:0CB2]   //Rounds cleared
$01/9A45 C9 07       CMP #$07
$01/9A47 B0 0C       BCS $0C    [$9A55]      //Skip to $9A55 if finished game
$01/9A49 20 22 A4    JSR $A422  [$01:A422]   //Lower Current DifficultyA After Clearing Round
$01/9A4C 9C B1 0C    STZ $0CB1  [$00:0CB1]   //Reset Area
$01/9A4F A9 02       LDA #$02                //Open Round
$01/9A51 8D A0 0C    STA $0CA0  [$00:0CA0]
$01/9A54 60          RTS
$01/9A55 A9 0C       LDA #$0C                //Finished game
$01/9A57 8D A0 0C    STA $0CA0  [$00:0CA0]
$01/9A5A 60          RTS

Gameplay Mode $0C - Finished Game

$01/9A61 A2 40 00    LDX #$0040
$01/9A64 A9 00       LDA #$00
$01/9A66 EB          XBA
$01/9A67 A9 12       LDA #$12                //Ending
$01/9A69 22 5E 81 00 JSL $00815E[$00:815E]
$01/9A6D A9 00       LDA #$00
$01/9A6F 22 9C 81 00 JSL $00819C[$00:819C]

Set Upcoming Round and Bonus Round Flag

$01/9D4D EE B2 0C    INC $0CB2  [$00:0CB2]   //Rounds cleared +1
$01/9D50 A9 00       LDA #$00
$01/9D52 EB          XBA
$01/9D53 AD B2 0C    LDA $0CB2  [$00:0CB2]   //Rounds cleared
$01/9D56 0A          ASL A
$01/9D57 AA          TAX
$01/9D58 BF 9C 9D 01 LDA $019D9C,x           //Index of upcoming Round
$01/9D5C 8D B0 0C    STA $0CB0  [$00:0CB0]
$01/9D5F BF 9D 9D 01 LDA $019D9D,x           //Bonus Round true/false flag
$01/9D63 8D B3 0C    STA $0CB3  [$00:0CB3]
$01/9D66 60          RTS

Copy Option Mode Starting Round and Area

$01/9D67 AF FE FF 7E LDA $7EFFFE[$7E:FFFE]   //Round (normally unused in Option Mode)
$01/9D6B 8D B0 0C    STA $0CB0  [$00:0CB0]
$01/9D6E AF FF FF 7E LDA $7EFFFF[$7E:FFFF]   //Area (normally unused in Option Mode)
$01/9D72 8D B1 0C    STA $0CB1  [$00:0CB1]
$01/9D75 A2 0E 00    LDX #$000E              //Number of rounds to cycle through (8)
$01/9D78 BF 9C 9D 01 LDA $019D9C,x
$01/9D7C CD B0 0C    CMP $0CB0  [$00:0CB0]   //Compare Round set in Option Mode to table
$01/9D7F F0 07       BEQ $07    [$9D88]      //Skip to $9D88 if values match
$01/9D81 CA          DEX
$01/9D82 CA          DEX
$01/9D83 10 F3       BPL $F3    [$9D78]      //Loop back to $9D78 if no match
...
$01/9D88 BF 9C 9D 01 LDA $019D9C,x
$01/9D8C 8D B0 0C    STA $0CB0  [$00:0CB0]
$01/9D8F BF 9D 9D 01 LDA $019D9D,x           //Bonus Round true/false flag
$01/9D93 8D B3 0C    STA $0CB3  [$00:0CB3]
$01/9D96 8A          TXA
$01/9D97 4A          LSR A
$01/9D98 8D B2 0C    STA $0CB2  [$00:0CB2]   //Rounds cleared counter
$01/9D9B 60          RTS

Upcoming Round Index and Bonus Round Flag Table

The first byte is the round index, and the second byte is a bonus round true/false flag ($01 = true)

019D9C 0000 Slum
019D9E 0100 Subway
019DA0 0601 Break Car
019DA2 0200 West Side
019DA4 0400 Bay Area
019DA6 0701 Break Glass
019DA8 0500 Up Town
019DAA 0300 Industrial Area
019DAC 0900 Unused slot
019DAE 0900 Unused slot
019DB0 0900 Unused slot

Upcoming Round Index and Bonus Round Flag Table - Unused Copy

An unused copy of the above, but this one has the Industrial Area included in the correct spot!

019DB2 0000 Slum
019DB4 0100 Subway
019DB6 0601 Break Car
019DB8 0200 West Side
019DBA 0300 Industrial Area
019DBC 0701 Break Glass
019DBE 0400 Bay Area
019DC0 0500 Up Town
019DC2 0800 Unused slot
019DC4 0900 Unused slot

Character Select Screen cont'd

$01/9DF3 AD CC 00    LDA $00CC  [$00:00CC]   //Demo mode
$01/9DF6 F0 06       BEQ $06    [$9DFE]      //Skip to $9DFE if in demo mode
$01/9DF8 AF F5 FF 7E LDA $7EFFF5[$7E:FFF5]   //DifficultyB set in Option Mode
...
$01/9DFE A9 01       LDA #$01                //Demo mode DifficultyB
$01/9E00 8D BA 0C    STA $0CBA  [$00:0CBA]   //DifficultyB
Easy DifficultyA Bonus 
$01/9E0B AF F1 FF 7E LDA $7EFFF1[$7E:FFF1]   //Counter for number of times a new game has been started
$01/9E0F 29 0F       AND #$0F                //Limits counter to every 16 games
$01/9E11 D0 16       BNE $16    [$9E29]      //Skip to $9E29 if not the first new game or counter hasn't rolled over
$01/9E13 22 E1 B0 00 JSL $00B0E1[$00:B0E1]   //Get random number
$01/9E17 29 0F       AND #$0F                //Keep only lower 4 bits of random number (16 possibilities)
$01/9E19 AA          TAX
$01/9E1A BF 33 9E 01 LDA $019E33,x           //Use the random number to get a success/fail result from the table
$01/9E1E F0 09       BEQ $09    [$9E29]      //Skip to $9E29 if zero (failed, ie didn't read value at SNES address $019E3C) 
$01/9E20 9C B6 0C    STZ $0CB6  [$00:0CB6]   //Easiest DifficultyA
$01/9E23 9C B8 0C    STZ $0CB8  [$00:0CB8]   //Easiest DifficultyA
$01/9E26 9C C6 0C    STZ $0CC6  [$00:0CC6]   //Easiest DifficultyA
$01/9E29 AF F1 FF 7E LDA $7EFFF1[$7E:FFF1]
$01/9E2D 1A          INC A                   //Increment counter for number of times a new game has been started
$01/9E2E 8F F1 FF 7E STA $7EFFF1[$7E:FFF1]
$01/9E32 60          RTS

Easy DifficultyA Bonus Table

019E33 0000 0000 0000 0000 0001 0000 0000 0000
                             ^^ 1-in-16 chance for Easy DifficultyA Bonus

Gameplay Mode $02

$01/9E4F A2 00 0D    LDX #$0D00              //Player 1 stats
$01/9E52 20 35 A6    JSR $A635  [$01:A635]   //Restore to Max HP
$01/9E55 22 A6 D0 00 JSL $00D0A6[$00:D0A6]   //Set Platform Height in Round
$01/9E59 60          RTS

Examine and Increase DifficultyA

$01/A280 AF FA FF 7E LDA $7EFFFA[$7E:FFFA]   //Debug mode
$01/A284 F0 03       BEQ $03    [$A289]      //Skip to $A289 if debug mode is off
$01/A286 20 D6 A2    JSR $A2D6  [$01:A2D6]   //Add debug display below health bar (need to verify)
$01/A289 AD D1 0C    LDA $0CD1  [$00:0CD1]   //This and the next 3 operations check if in active gameplay (eg, not showing the city map or similar)?
$01/A28C 0D D0 0C    ORA $0CD0  [$00:0CD0]
$01/A28F 0D B3 0C    ORA $0CB3  [$00:0CB3]
$01/A292 0D C3 0C    ORA $0CC3  [$00:0CC3]
$01/A295 D0 26       BNE $26    [$A2BD]
$01/A297 C2 20       REP #$20
$01/A299 EE C8 0C    INC $0CC8  [$00:0CC8]   //Increment DifficultyB frame counter
$01/A29C AD BA 0C    LDA $0CBA  [$00:0CBA]   //DifficultyB
$01/A29F 0A          ASL A
$01/A2A0 AA          TAX
$01/A2A1 BF BE A2 01 LDA $01A2BE,x           //Load DifficultyB frame counter max based on the DifficultyB
$01/A2A5 CD C8 0C    CMP $0CC8  [$00:0CC8]   //Compare to frame counter current value
$01/A2A8 B0 11       BCS $11    [$A2BB]      //Skip to $A2BB if not at max
$01/A2AA 9C C8 0C    STZ $0CC8  [$00:0CC8]   //Reset DifficultyB frame counter
$01/A2AD BF C6 A2 01 LDA $01A2C6,x           //Load DifficultyA maximum based on the DifficultyB
$01/A2B1 CD B6 0C    CMP $0CB6  [$00:0CB6]   //Compare to current DifficultyA
$01/A2B4 90 05       BCC $05    [$A2BB]      //Skip to $A2BB if current DifficultyA is higher than the table max
$01/A2B6 F0 03       BEQ $03    [$A2BB]      //Skip to $A2BB if current DifficultyA is the same as the table max
$01/A2B8 EE B6 0C    INC $0CB6  [$00:0CB6]   //Increment current DifficultyA
$01/A2BB E2 20       SEP #$20
$01/A2BD 60          RTS

Max DifficultyA Table

Max DifficultyA based on DifficultyB setting. DifficultyB 00=17, 01=18, 02=19, 03=1A, and the rest are unused? Were 8 settings for DifficultyB planned at one point?

01A2C6 1700 1800 1900 1A00 1B00 1C00 1D00 1F00

Load Number of Areas in Round

$01/A40C A9 00       LDA #$00
$01/A40E EB          XBA
$01/A40F AD B0 0C    LDA $0CB0  [$00:0CB0]   //Round
$01/A412 AA          TAX
$01/A413 BF 18 A4 01 LDA $01A418,x           //Number of Areas in Round Table
$01/A417 6B          RTL

Number of Areas in Round Table

01A418 02 Slum
01A419 03 Subway
01A41A 02 West Side
01A41B 01 Industrial Area
01A41C 00 Bay Area
01A41D 03 Up Town
01A41E 00 Break Car
01A41F 00 Break Glass
01A420 00 Unused slot
01A421 00 Unused slot

Lower Current DifficultyA After Clearing Round

$01/A422 9C C8 0C    STZ $0CC8  [$00:0CC8]
$01/A425 9C C9 0C    STZ $0CC9  [$00:0CC9]
$01/A428 AD B3 0C    LDA $0CB3  [$00:0CB3]   //Bonus round flag
$01/A42B D0 24       BNE $24    [$A451]      //Skip to $A541 if playing a bonus round
$01/A42D C2 20       REP #$20
$01/A42F AD BA 0C    LDA $0CBA  [$00:0CBA]   //DifficultyB
$01/A432 0A          ASL A
$01/A433 AA          TAX
$01/A434 AD B6 0C    LDA $0CB6  [$00:0CB6]   //Current DifficultyA
$01/A437 38          SEC
$01/A438 FF 52 A4 01 SBC $01A452,x           //Subtract value from DifficultyA based on DifficultyB
$01/A43C 30 0B       BMI $0B    [$A449]      //Skip to $A449 if negative
$01/A43E CD C6 0C    CMP $0CC6  [$00:0CC6]   //Compare to initial DifficultyA
$01/A441 90 06       BCC $06    [$A449]      //Skip to $A449 if result is lower than the initial DifficultyA
$01/A443 8D B6 0C    STA $0CB6  [$00:0CB6]   //Store updated DifficultyA
$01/A446 E2 20       SEP #$20
$01/A448 60          RTS
$01/A449 AD C6 0C    LDA $0CC6  [$00:0CC6]   //Initial DifficultyA
$01/A44C 8D B6 0C    STA $0CB6  [$00:0CB6]   //Restore initial DifficultyA
$01/A44F E2 20       SEP #$20
$01/A451 60          RTS

DifficultyB Subtraction Table

01A452 0300 0200 0100 0100

Lower Current DifficultyA Using DifficultyB Setting

$01/A45A C2 20       REP #$20
$01/A45C 9C C8 0C    STZ $0CC8  [$00:0CC8]
$01/A45F AD BA 0C    LDA $0CBA  [$00:0CBA]   //DifficultyB
$01/A462 0A          ASL A
$01/A463 AA          TAX
$01/A464 AD B6 0C    LDA $0CB6  [$00:0CB6]   //Current DifficultyA
$01/A467 38          SEC
$01/A468 FF 82 A4 01 SBC $01A482,x           //Subtract value from DifficultyA based on DifficultyB
$01/A46C 30 0B       BMI $0B    [$A479]      //Skip to $A479 if negative
$01/A46E CD C6 0C    CMP $0CC6  [$00:0CC6]   //Compare to initial DifficultyA
$01/A471 90 06       BCC $06    [$A479]      //Skip to $A479 if result is lower than the initial DifficultyA
$01/A473 8D B6 0C    STA $0CB6  [$00:0CB6]   //Store updated DifficultyA
$01/A476 E2 20       SEP #$20
$01/A478 6B          RTL
$01/A479 AD C6 0C    LDA $0CC6  [$00:0CC6]   //Initial DiffiucltyA
$01/A47C 8D B6 0C    STA $0CB6  [$00:0CB6]   //Restore Initial DifficultyA
$01/A47F E2 20       SEP #$20
$01/A481 6B          RTL

DifficultyB Subtraction Table

01A482 0300 0200 0100 0100

Lower DifficultyA After Using Credit

$01/A48A A9 00       LDA #$00
$01/A48C EB          XBA
$01/A48D AD CC 0C    LDA $0CCC  [$00:0CCC]   //Counter for the number of credits used
$01/A490 AA          TAX
$01/A491 AD B6 0C    LDA $0CB6  [$00:0CB6]   //Current DifficultyA
$01/A494 38          SEC
$01/A495 FF BB A4 01 SBC $01A4BB,x
$01/A499 30 0A       BMI $0A    [$A4A5]      //Skip to $A4A5 if negative
$01/A49B CD C6 0C    CMP $0CC6  [$00:0CC6]   //Initial DifficultyA
$01/A49E 90 05       BCC $05    [$A4A5]      //Skip to $A4A5 if new value is lower than the initial DifficultyA
$01/A4A0 8D B6 0C    STA $0CB6  [$00:0CB6]   //Update current DifficultyA
$01/A4A3 80 06       BRA $06    [$A4AB]
$01/A4A5 AD C6 0C    LDA $0CC6  [$00:0CC6]
$01/A4A8 8D B6 0C    STA $0CB6  [$00:0CB6]   //Restore initial DifficultyA
$01/A4AB EE CC 0C    INC $0CCC  [$00:0CCC]   //Credit used counter +1
$01/A4AE AD CC 0C    LDA $0CCC  [$00:0CCC]
$01/A4B1 C9 1F       CMP #$1F
$01/A4B3 90 05       BCC $05    [$A4BA]      //Skip to $A4BA if $1F or higher
$01/A4B5 A9 1F       LDA #$1F                //Reset to max $1F
$01/A4B7 8D CC 0C    STA $0CCC  [$00:0CCC]   //Update credits used counter
$01/A4BA 6B          RTL

Lower DifficultyA After Using Credit Table

01A4BB 0102 0203 0303 0304 0404 0404 0505 0505
01A4CB 0505 0606 0606 0606 0606 0606 0606 0606

Unknown $01A4DB

$01/A4DB AD CD 00    LDA $00CD  [$00:00CD]   //Number of players
$01/A4DE C9 03       CMP #$03                //2 player mode
$01/A4E0 D0 09       BNE $09    [$A4EB]      //Skip to $A4EB if not in 2 player mode
$01/A4E2 20 EC A4    JSR $A4EC  [$01:A4EC]   //Copy 7E0CA0-7E0CFF general stats to 7F1000-7F105F
$01/A4E5 A9 02       LDA #$02                //Round open?
$01/A4E7 8F 00 10 7F STA $7F1000[$7F:1000]
$01/A4EB 60          RTS

Backup 7E0CA0-7E0CFF

$01/A4EC A2 5F 00    LDX #$005F
$01/A4EF BD A0 0C    LDA $0CA0,x
$01/A4F2 9F 00 10 7F STA $7F1000,x
$01/A4F6 CA          DEX
$01/A4F7 10 F6       BPL $F6    [$A4EF]      //Loop until 7E0CA0-7E0CFF general stats copied to 7F1000-7F105F
$01/A4F9 60          RTS

Cody Walking Away in Ending Setup

$01/A57C A2 00 0D    LDX #$0D00
$01/A57F A0 7F 00    LDY #$007F
$01/A582 A9 00       LDA #$00
$01/A584 99 00 0D    STA $0D00,y
$01/A587 88          DEY
$01/A588 10 FA       BPL $FA    [$A584]      //Loop until 7E0D00-7E0D7F (Player 1 stats) cleared
$01/A58A A9 01       LDA #$01                //Active slot
$01/A58C 9D 00 00    STA $0000,x[$00:0D00]
$01/A58F A9 00       LDA #$00
$01/A591 9D 11 00    STA $0011,x[$00:0D11]   //Controller 1
$01/A594 A9 02       LDA #$02                //Cody
$01/A596 9D 12 00    STA $0012,x[$00:0D12]
$01/A599 A9 02       LDA #$02
$01/A59B 9D 22 00    STA $0022,x[$00:0D22]
$01/A59E A9 30       LDA #$30
$01/A5A0 9D 23 00    STA $0023,x[$00:0D23]
$01/A5A3 A9 00       LDA #$00
$01/A5A5 9D 21 00    STA $0021,x[$00:0D21]
$01/A5A8 A2 02 00    LDX #$0002              //Cody graphics index
$01/A5AB A0 00 00    LDY #$0000
$01/A5AE 22 FC A1 00 JSL $00A1FC[$00:A1FC]
$01/A5B2 A2 0C 00    LDX #$000C              //Cody palette index
$01/A5B5 22 F6 8C 00 JSL $008CF6[$00:8CF6]   //Load palette into ram
$01/A5B9 6B          RTL

Haggar Unknown in Ending Setup (unused)

$01/A5BA A2 80 0D    LDX #$0D80
$01/A5BD A0 7F 00    LDY #$007F
$01/A5C0 A9 00       LDA #$00
$01/A5C2 99 80 0D    STA $0D80,y
$01/A5C5 88          DEY
$01/A5C6 10 FA       BPL $FA    [$A5C2]      //Loop until 7E0D80-7E0DFF (Player 2 stats) cleared
$01/A5C8 A9 01       LDA #$01                //Active slot
$01/A5CA 9D 00 00    STA $0000,x[$00:0D80]
$01/A5CD A9 02       LDA #$02
$01/A5CF 9D 11 00    STA $0011,x[$00:0D91]   //Controller 2
$01/A5D2 A9 04       LDA #$04                //Haggar
$01/A5D4 9D 12 00    STA $0012,x[$00:0D92]
$01/A5D7 6B          RTL

Check For Player 2 and Setup

$01/A5ED AD CD 00    LDA $00CD  [$00:00CD]   //Number of players
$01/A5F0 89 02       BIT #$02                //Player 2 bit
$01/A5F2 F0 07       BEQ $07    [$A5FB]      //Skip to $A5FB if no Player 2
$01/A5F4 A0 80 0D    LDY #$0D80              //Start of Player 2 stat block (7E0D80-7E0DFF)
$01/A5F7 22 FC A5 01 JSL $01A5FC[$01:A5FC]   //Player stats setup
$01/A5FB 60          RTS                     

Player Stats Setup

$01/A5FC A9 00       LDA #$00
$01/A5FE EB          XBA
$01/A5FF B9 12 00    LDA $0012,y             //Player character index
$01/A602 0A          ASL A
$01/A603 AA          TAX
$01/A604 C2 20       REP #$20
$01/A606 BF 29 A6 01 LDA $01A629,x           //TODO
$01/A60A 99 2A 00    STA $002A,y
$01/A60D BF 2B A6 01 LDA $01A62B,x           //TODO
$01/A611 99 28 00    STA $0028,y
$01/A614 E2 20       SEP #$20
$01/A616 A9 00       LDA #$00
$01/A618 99 43 00    STA $0043,y
$01/A61B A9 00       LDA #$00
$01/A61D EB          XBA
$01/A61E C2 20       REP #$20
$01/A620 A9 50 00    LDA #$0050              //Max HP (80)
$01/A623 99 18 00    STA $0018,y[$00:0D18]
$01/A626 E2 20       SEP #$20
$01/A628 6B          RTL

Restore to Max HP

$01/A635 C2 20       REP #$20
$01/A637 BD 18 00    LDA $0018,x[$00:0D18]   //Max HP
$01/A63A 9D 14 00    STA $0014,x[$00:0D14]   //Current HP
$01/A63D 9D 16 00    STA $0016,x[$00:0D16]   //Previous HP
$01/A640 E2 20       SEP #$20
$01/A642 60          RTS

Reload Round Countdown Timer

$01/A68D AE C4 0C    LDX $0CC4  [$00:0CC4]   //Load round's timer maximum
$01/A690 8E BC 0C    STX $0CBC  [$00:0CBC]   //Restore countdown timer to full
$01/A693 9C BE 0C    STZ $0CBE  [$00:0CBE]   //This and the following operation resets the counter responsible for lowering the countdown timer by 1
$01/A696 9C BF 0C    STZ $0CBF  [$00:0CBF]
$01/A699 22 9B E5 00 JSL $00E59B[$00:E59B]   //Update Countdown Timer HUD
$01/A69D 6B          RTL

Flying Bottle

(partial)

$01/B7E0 EA          NOP                     //*
$01/B7E1 A9 02       LDA #$02
$01/B7E3 24 00       BIT $00    [$00:1C00]
$01/B7E5 F0 49       BEQ $49    [$B830]
...

* The first operation of the subroutine appears to have once served as a debug feature - using $6B RTL in place of $EA NOP disables collision (can't punch bottle out of the air)

Projectiles

(partial)

$01/B806 EA          NOP                     //*
$01/B807 A9 02       LDA #$02
$01/B809 24 00       BIT $00    [$00:1C00]
$01/B80B F0 23       BEQ $23    [$B830]
...

* The first operation of the subroutine appears to have once served as a debug feature - using $6B RTL in place of $EA NOP disables collision for knives, bullets and arrows

Damage Enemy

$01/C967 8B          PHB
$01/C968 DA          PHX
$01/C969 B9 60 00    LDA $0060,y[$00:0D60]   //?
$01/C96C 29 FF 00    AND #$00FF
$01/C96F 18          CLC
$01/C970 79 28 00    ADC $0028,y[$00:0D28]   //Lower 16 bits of pointer to damage table
$01/C973 AA          TAX
$01/C974 E2 20       SEP #$20
$01/C976 B9 22 00    LDA $0022,y[$00:0D22]   //Pointer to damage table (bank)
$01/C979 48          PHA
$01/C97A AB          PLB
$01/C97B C2 20       REP #$20
$01/C97D BD 00 00    LDA $0000,x
$01/C980 29 FF 00    AND #$00FF
$01/C983 8D 00 00    STA $0000  [$02:0000]   //Player damage value
$01/C986 FA          PLX
$01/C987 E2 20       SEP #$20
$01/C989 BD 43 00    LDA $0043,x             //Enemy defense
$01/C98C 8D 02 00    STA $0002  [$02:0002]
$01/C98F 20 9C CB    JSR $CB9C  [$01:CB9C]   //Damage Calculation
$01/C992 C2 20       REP #$20
$01/C994 B5 14       LDA $14,x  [$00:11F4]
$01/C996 95 16       STA $16,x  [$00:11F6]   //Copy current enemy HP to previous HP
$01/C998 38          SEC
$01/C999 ED 00 00    SBC $0000  [$02:0000]   //Subtract HP from enemy
$01/C99C 95 14       STA $14,x  [$00:11F4]   //Update enemy current HP
$01/C99E AB          PLB
$01/C99F 60          RTS

Damage Calculation

$01/CB9C A5 00       LDA $00    [$00:0000]   //First value to multiply
$01/CB9E 8D 02 42    STA $4202  [$02:4202]
$01/CBA1 A5 02       LDA $02    [$00:0002]   //Second value to multiply
$01/CBA3 8D 03 42    STA $4203  [$02:4203]
$01/CBA6 EA          NOP                     //Delay required before multiplication result is ready
$01/CBA7 EA          NOP
$01/CBA8 EA          NOP
$01/CBA9 C2 20       REP #$20
$01/CBAB AD 16 42    LDA $4216  [$02:4216]   //Get result
$01/CBAE 4A          LSR A                   //Divide result by two 5 times
$01/CBAF 4A          LSR A
$01/CBB0 4A          LSR A
$01/CBB1 4A          LSR A
$01/CBB2 4A          LSR A
$01/CBB3 D0 01       BNE $01    [$CBB6]      //Skip to $CBB6 if not zero damage
$01/CBB5 1A          INC                     //Minimum 1 damage
$01/CBB6 85 00       STA $00    [$00:0000]   //Damage total
$01/CBB8 E2 20       SEP #$20
$01/CBBA 60          RTS