diff --git a/patches/ips/map_progress_maintain.ips b/patches/ips/map_progress_maintain.ips index a2837aff3..daaf0afa3 100644 Binary files a/patches/ips/map_progress_maintain.ips and b/patches/ips/map_progress_maintain.ips differ diff --git a/patches/rom_map/Bank 90.txt b/patches/rom_map/Bank 90.txt index 47a776daa..61083a813 100644 --- a/patches/rom_map/Bank 90.txt +++ b/patches/rom_map/Bank 90.txt @@ -7,4 +7,5 @@ F980 - F99E: ; respin.asm FC00 - FC0F: ; Fake Lava.asm FC10 - FC1C: ; crash_handle_yapping.asm FC20 - FC3A: ; remove_spikesuit.asm -FC40 - FCBA: ; split_speed.asm \ No newline at end of file +FC40 - FCBA: ; split_speed.asm +FD00 - FD40: ; map_progress_maintain.asm \ No newline at end of file diff --git a/patches/src/map_progress_maintain.asm b/patches/src/map_progress_maintain.asm index 7068b672a..2ff0db578 100644 --- a/patches/src/map_progress_maintain.asm +++ b/patches/src/map_progress_maintain.asm @@ -385,4 +385,40 @@ fix_mb: ldx #$0122 rtl -assert pc() <= !bank_a4_free_space_end \ No newline at end of file +assert pc() <= !bank_a4_free_space_end + +!bank_90_free_space_start = $90FD00 +!bank_90_free_space_end = $90FD40 + +org $90aa29 ;;; jsr $ab75 (seam fix) + jsr minimapfix + +org !bank_90_free_space_start + +minimapfix: + lda $22 + beq .page0 + lda $2e + beq .right_edge ; page 1, same byte -> right edge of map + bra .seam +.page0: + lda $2e + bne .left_edge ; page 0, origin in earlier byte -> left edge of map +.seam: + jmp $ab75 + +.right_edge: ; off-map tiles are in the low bytes + sep #$20 + stz $18 : stz $1a : stz $1c + stz $26 : stz $28 : stz $2a + rep #$20 + rts + +.left_edge: ; off-map tiles are in the high bytes + sep #$20 + stz $19 : stz $1b : stz $1d + stz $27 : stz $29 : stz $2b + rep #$20 + rts + +assert pc() <= !bank_90_free_space_end