diff --git a/patches/ips/vanilla_bugfixes.ips b/patches/ips/vanilla_bugfixes.ips index 97aad0bd3..7787949c8 100644 Binary files a/patches/ips/vanilla_bugfixes.ips and b/patches/ips/vanilla_bugfixes.ips differ diff --git a/patches/rom_map/Bank 82.txt b/patches/rom_map/Bank 82.txt index 5ca9c5edb..7a6e78e64 100644 --- a/patches/rom_map/Bank 82.txt +++ b/patches/rom_map/Bank 82.txt @@ -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 diff --git a/patches/rom_map/RAM.txt b/patches/rom_map/RAM.txt index 6a1ad7731..434235e4f 100644 --- a/patches/rom_map/RAM.txt +++ b/patches/rom_map/RAM.txt @@ -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) diff --git a/patches/src/vanilla_bugfixes.asm b/patches/src/vanilla_bugfixes.asm index 4c99ef01c..ec86d16e4 100644 --- a/patches/src/vanilla_bugfixes.asm +++ b/patches/src/vanilla_bugfixes.asm @@ -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 @@ -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 \ No newline at end of file +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 ++ \ No newline at end of file