Skip to content
Open
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,5 +1,6 @@
[unused vanilla code]
8B18 - 8B1F: [free] [unused vanilla code] - 8 bytes
8D51 - 8DBC: [free] [vanilla bg2 code, patched out in vanilla_bugfixes] - 108 bytes
A3D9 - A424: [free] [unused vanilla code] - 76 bytes
B5E8 - B62A: [free] [unused vanilla code] - 67 bytes
B650 - B671: [free] [unused vanilla code] - 34 bytes
Expand Down
1 change: 1 addition & 0 deletions patches/rom_map/RAM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ $7ED823: randomizer-specific event flags:
$0010: metal pirates room door unlocked
$7ED825: pause menu room name enabled (map_area.asm)
$7ed86c: bomb_torizo.asm
$7EDF5C-$7EEF5B: [FREE] (vanilla_bugfixes removes the BG2 backup that used this block of ram.)
$7EF4A0-$7EF4AF: temp storage for special tile (reserve_hud.asm)
$7EF4B0-$7EF4E0: backup of DMA registers in decompression.asm
$7EF4E0-$7EF4E4: pending MSU/SPC playback state (msu1.asm)
Expand Down
23 changes: 21 additions & 2 deletions patches/src/vanilla_bugfixes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ org $84B7EF ; PLM $B8AC (speed booster escape) LDA $09A4 [$7E:09A4]
; this is due to a missing conditional branch instruction in the vanilla code.
; updated for split_speed compatibility, now fits in vanilla location with external table.
;
; -nn357
; nn_357

org $82ac00
.loop
Expand All @@ -248,4 +248,23 @@ bootstable:
dw $0100, $0200, $2000, $0040, $0080
bootscat:
dw $0003, $0103, $0203, $0203, $0303
assert pc() <= !bank_82_free_space_end
assert pc() <= !bank_82_free_space_end

; Pause menu tiles routine DMA transfer size bug fix.
; Vanilla code transfers too many bytes, destroying the BG2 tilemap.
; Correcting the DMA transfer size means the backup/restore BG2 pause hook isn't needed.
; Which also frees up the 4k block of ram used for the backup / restore.
; nn_357

;org $828ed2 ; Correct DMA transfer size $1000, [hud_expansion_opaque already fixes this, included for reference].
; db $10

org $828d08 ; Back up BG2 tilemap for pause menu
bra +
nop
+

org $829377 ; Restore BG2 tilemap from pause menu
bra +
nop
+
Loading