From 3764deb4d34f77df5ccef9ba7d67f4c0e2bef24c Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Mon, 29 Jan 2018 19:18:59 -0500 Subject: [PATCH 1/3] fix Alt Door frame table (Apparently trailing commas break things) --- tables.asm | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tables.asm b/tables.asm index 7af601d..6c75632 100644 --- a/tables.asm +++ b/tables.asm @@ -1373,22 +1373,22 @@ dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 dw $0000, $0AA8, $07AA, $0000, $0000, $0000, $0000, $0000 dw $0000, $0000, $0000, $0000, $0000, $0000 EntranceAltDoorFrameTable: -dw $0000, $01aa, $8124, $87be, $8158, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $82be, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, -dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, +dw $0000, $01aa, $8124, $87be, $8158, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $82be, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 +dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 dw $0000 ;=============================================================================== org $30B000 ; PC 0x183000 - 0x183054 From 16259ce158ab19fe1d16510de2e27fb1acbaa17f Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Mon, 29 Jan 2018 20:47:58 -0500 Subject: [PATCH 2/3] Add light world check to more unbunny-ing code This time the code that tries to unbunny you when leaving a dungeon.This is needed to make ER's new cross world connects work properly. Move the fake world fix to happen in time for this. --- bugfixes.asm | 14 ++++++++++++-- hooks.asm | 7 +++++-- inventory.asm | 1 - 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/bugfixes.asm b/bugfixes.asm index c5fbf59..04c9038 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -24,7 +24,7 @@ RTL ;1 = Don't Reset Music MSMusicReset: LDA $8A : CMP.b #$80 : BNE + - LDA $23 + LDA $23 + RTL ;-------------------------------------------------------------------------------- @@ -42,4 +42,14 @@ RTL ; CPX.b #$1B : BNE + : LDA.b #$01 : RTL : + ; LDA $7EF340, X ;RTL -;-------------------------------------------------------------------------------- \ No newline at end of file +;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +FixBunnyOnExitToLightWorld: + JSL.l FakeWorldFix + LDA.w $02E0 : BEQ + + JMP.w DecideIfBunny + + + LDA $7EF357; thing we overwrote +RTL +;-------------------------------------------------------------------------------- diff --git a/hooks.asm b/hooks.asm index 3bb2506..e8255ba 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1091,8 +1091,12 @@ JSL.l LoadModifiedTileBufferAddress : NOP #2 ; Permabunny Fix ;-------------------------------------------------------------------------------- org $078F32 ; <- 38F32 - Bank07.asm:2420 - (LDA $7EF357) -JSL.l DecideIfBunny +JSL.l DecideIfBunny ; for bunny beams ;-------------------------------------------------------------------------------- +org $028468 ; <- 10468 Bank02.asm:911 - (LDA $7EF357) +JSL.l FixBunnyOnExitToLightWorld ; for cross-world connections +;-------------------------------------------------------------------------------- + ;================================================================================ ; Open Mode Fixes @@ -2018,4 +2022,3 @@ org $00DF62 ; <- Bank00.asm:4672 (LDX.w #$0000 : LDY.w #$0040) org $00DF6E ; <- A few instructions later, right after JSR Do3To4High16Bit ReloadingFloorsCancel: ;================================================================================ - diff --git a/inventory.asm b/inventory.asm index 34e66ad..60abf0e 100644 --- a/inventory.asm +++ b/inventory.asm @@ -830,7 +830,6 @@ RTL ;-------------------------------------------------------------------------------- ClearOWKeys: PHA - JSL.l FakeWorldFix LDA.l GenericKeys : BEQ + PLA : LDA $7EF38B : STA $7EF36F RTL From 0c72ca9e0e63ac4b58630b07822c5ff13487c386 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Mon, 5 Feb 2018 19:36:27 -0500 Subject: [PATCH 3/3] Fix not being bunny after defeating aga2 w/o moon Pearl --- LTTP_RND_GeneralBugfixes.asm | 3 +++ bugfixes.asm | 25 +++++++++++++++++++++++++ hooks.asm | 6 ++++++ 3 files changed, 34 insertions(+) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 2ad0946..37f7732 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -351,6 +351,9 @@ Dungeon_SaveRoomData_justKeys: org $02B861 Dungeon_SaveRoomQuadrantData: +org $02FD8A ; 17D8A - Bank07.asm: 3732 Note: Different bank +LoadGearPalettes_bunny: + org $05A51D Sprite_SpawnFallingItem: diff --git a/bugfixes.asm b/bugfixes.asm index 04c9038..2c5bc4f 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -53,3 +53,28 @@ FixBunnyOnExitToLightWorld: LDA $7EF357; thing we overwrote RTL ;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; fix issue where if a player beats aga1 without moon pearl, they don't turn into +; bunny on the pyramid +FixAga2Bunny: + LDA.l FixFakeWorld : BEQ + ; Only use this fix is fakeworld fix is in use + JSL DecideIfBunny : BNE + + JSR MakeBunny + LDA.b #$04 : STA.w $012C ; play bunny music + BRA .done + + + LDA.b #$09 : STA.w $012C ; what we wrote over + .done +RTL +;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +MakeBunny: + PHX : PHY + LDA.b #$17 : STA $5D ; set player mode to permabunny + LDA.b #$01 : STA $02E0 : STA $56 ; make player look like bunny + JSL LoadGearPalettes_bunny + PLY : PLX +RTS +;-------------------------------------------------------------------------------- diff --git a/hooks.asm b/hooks.asm index e8255ba..72f1683 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1097,6 +1097,12 @@ org $028468 ; <- 10468 Bank02.asm:911 - (LDA $7EF357) JSL.l FixBunnyOnExitToLightWorld ; for cross-world connections ;-------------------------------------------------------------------------------- +;================================================================================ +; Other bunny Fixes +;-------------------------------------------------------------------------------- +org $029E7C; <- 11E7C - module_ganon_emerges.asm:127 - (LDA.b #$09 : STA $012C) +JSL.l FixAga2Bunny : NOP +;-------------------------------------------------------------------------------- ;================================================================================ ; Open Mode Fixes