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 added patches/ips/fix_kraid_door.ips
Binary file not shown.
3 changes: 2 additions & 1 deletion patches/rom_map/Bank A7.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
0000 - FF82: used by vanilla game
FF82 - FFC0: escape.asm (for dachora)
FFC0 - FFDF: map_area (for kraid)
FFC0 - FFD0: fix_kraid_door.asm
FFD0 - FFE0: [FREE]
FFE0 - FFFF: flashing_placebo (for phantoon)
1 change: 1 addition & 0 deletions patches/rom_map/vanilla_hooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,7 @@ $a6b2ba - gray_doors.asm
$a6b297 - gray_doors.asm

[BANK A7]
$a7b0fb - fix_kraid_door.asm
$a7c81e - escape.asm
$a7f892 - escape.asm
$a7dd7f - flashing_placebo.asm
Expand Down
27 changes: 27 additions & 0 deletions patches/src/fix_kraid_door.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
; Fix bug when entering Kraid from right door and leaving just as he
; finishes ascending. The boss AI checks that Samus is left of Kraid,
; and will adjust her X coordinate if needed. This can lead to a bugged
; Samus position or OOB error if it occurs during the door transition.
;
; Reported by P.JBoy, fix by Stag Shot

lorom

!bank_a7_free_space_start = $a7ffc0
!bank_a7_free_space_end = $a7ffd0

org $a7b0fb
jmp fix_kraid_door

org !bank_a7_free_space_start
fix_kraid_door:
lda $795 ; door transition flag
beq .resume
rts ; skip rest of func

.resume
lda $af6 ; replaced code
clc ;
jmp $b0ff ; resume func

assert pc() < !bank_a7_free_space_end
1 change: 1 addition & 0 deletions rust/maprando/src/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ impl Patcher<'_> {
"fast_big_boy_cutscene",
"fix_kraid_vomit",
"fix_kraid_hud",
"fix_kraid_door",
"escape_autosave",
"boss_exit",
"load_plms_early",
Expand Down
Loading