Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified patches/ips/vanilla_bugfixes.ips
Binary file not shown.
1 change: 1 addition & 0 deletions patches/rom_map/Bank 82.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
B5E8 - B62B: ; vanilla_bugfixes.asm [boots ui fix, overwrites unused vanilla instruction.]
F70F - F808: ; map_area.asm
F810 - F827: ; crash_handle_springball.asm
F830 - F9DE: ; disableable_etanks.asm
Expand Down
3 changes: 2 additions & 1 deletion patches/rom_map/vanilla_hooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ A7E4 - A7E6: ; map_area.asm
A802 - A804: ; map_area.asm
A820 - A822: ; pause_menu_objectives.asm
A83E - A840: ; pause_menu_objectives.asm
AC03 - AC07: ; vanilla_bugfixes.asm
AC00 - AC15: ; vanilla_bugfixes.asm
AC5A - AC5C: ; disableable_etanks.asm
AC7C - AC7E: ; reserve_backward_fill.asm
AC87 - AC8A: ; reserve_backward_fill.asm
Expand Down Expand Up @@ -238,6 +238,7 @@ B51E - B520: ; split_speed.asm
B545 - B547: ; split_speed.asm
B56B - B56F: ; disableable_etanks.asm
B585 - B587: ; disable_major_glitches.asm
B5E8 - B62B: ; vanilla_bugfixes.asm
B672 - B676: ; map_area.asm
B924 - B92F: ; fast_pause_menu.asm
B9A0 - B9C7: ; fast_pause_menu.asm
Expand Down
65 changes: 50 additions & 15 deletions patches/src/vanilla_bugfixes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ lorom

incsrc "constants.asm"

!bank_82_free_space_start = $82C27D ; reserve icon ui fix.
!bank_82_free_space_end = $82C298
!bank_82_free_space_start = $82B5E8 ; reserve icon ui fix. [;;; $B5E8: Unused. Convert [A] to three decimal digits ;;;]
!bank_82_free_space_end = $82B62B

!bank_86_free_space_start = $86F4B0 ; powamp projectile fix
!bank_86_free_space_end = $86F4D0
Expand Down Expand Up @@ -221,20 +221,55 @@ org $829f90
org $84B7EF ; PLM $B8AC (speed booster escape) LDA $09A4 [$7E:09A4]
lda $09A2

; vanilla bugfix, ui shows reserve icon when only boots item is equipped.
; this is due to a missing conditional branch instruction.
; vanilla bugfix, ui shows the reserve tank select icon when only a boots item is available.
; this is due to a missing conditional branch instruction in the vanilla code.
; updated for split_speed compatibility.
; -nn357

org $82AC03
jmp $c27d ; !bank_82_free_space_start [bankless form of this]
nop #2
org $82ac15 ;;; $AB47: Equipment screen - set up reserve mode and determine initial selection ;;; ; $82:AC15 BRANCH_RETURN
bootsfinish:

org !bank_82_free_space_start
bne .found
inx
org $82ac00 ;;; $AB47: Equipment screen - set up reserve mode and determine initial selection ;;; ; $82:AC00 LOOP_BOOTS
.loop
bit bootstable, x
bne .foundboots
inx
inx
cpx #$0006
jmp $AC08
.found
jmp $AC0C
cpx #$000a
bmi .loop
jmp bootsfinish
.foundboots
jmp found_boots
nop #3

assert pc() <= $82ac15

assert pc() <= !bank_82_free_space_end
org !bank_82_free_space_start
found_boots:
cpx #$0006
beq .bluebooster
cpx #$0008
beq .sparkbooster
txa
lsr a
bra .store
.bluebooster
lda #$0002
bra .store
.sparkbooster
lda #$0003
.store
xba
ora #$0003
sta $0755
jmp bootsfinish
nop #25

bootstable:
dw $0100 ; boots - hi-jump boots
dw $0200 ; boots - space jump
dw $2000 ; boots - speed booster
dw $0040 ; boots - blue booster
dw $0080 ; boots - spark booster

assert pc() <= !bank_82_free_space_end
Loading