From b10dff8a30382233da39095353bfbc85fa2d376b Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 14 Mar 2023 16:33:02 -0600 Subject: [PATCH 1/3] Minor clean up --- keydrop/standing_items.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index c2c9023..f6c88c3 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -307,7 +307,7 @@ RTS ClearSpriteData: STZ.b $02 : STZ.b $03 ; what we overrode -ClearSpriteData_Shared: + .shared: PHX LDA #$00 : LDX #$00 .loop @@ -319,7 +319,7 @@ ClearSpriteData_Shared: ClearSpriteData2: LDA.b #$82 : STA.b $99 - JMP ClearSpriteData_Shared + JMP ClearSpriteData_shared ; Runs during sprite load of the room LoadSpriteData: From bd2432d2cef52fe73bd2d91f1bac2466434d898d Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 17 Mar 2023 20:06:56 -0500 Subject: [PATCH 2/3] Moving some hijacked DR code to new location --- LTTP_RND_GeneralBugfixes.asm | 3 +++ doorrando/drhooks.asm | 7 +++---- doorrando/normal.asm | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 8ebfb5e..5da2f9a 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -510,6 +510,9 @@ Module_PreDungeon: org $028296 .setAmbientSfx +org $828AD9 +Underworld_SetBossOrSancMusicUponEntry: + org $02A0A8 Dungeon_SaveRoomData: diff --git a/doorrando/drhooks.asm b/doorrando/drhooks.asm index 8904c29..8f7816a 100644 --- a/doorrando/drhooks.asm +++ b/doorrando/drhooks.asm @@ -192,10 +192,9 @@ JSL.l Underworld_DoorDown_Entry : CPX #$FF BEQ + : db $80, $1C ; BRA $028B04 NOP #6 : + -org $82C3F2 ; <- Bank02.asm:10521 Unused call -Underworld_DoorDown_Call: -org $82C3F3 -dw $8AD9 ; address of Bank02.asm:2085 +org $82FD00 ; unreachable code +Underworld_SetBossOrSancMusicUponEntry_long: +JSR Underworld_SetBossOrSancMusicUponEntry : RTL org $81AA90 JSL BigKeyDoorCheck : NOP diff --git a/doorrando/normal.asm b/doorrando/normal.asm index e1fc8ee..2f45420 100644 --- a/doorrando/normal.asm +++ b/doorrando/normal.asm @@ -412,7 +412,7 @@ StraightStairsTrapDoor: .animateTraps lda #$05 : sta $11 inc $0468 : stz $068e : stz $0690 - ++ JSL Underworld_DoorDown_Call : rtl + ++ JML Underworld_SetBossOrSancMusicUponEntry_long + JML Dungeon_ApproachFixedColor ; what we wrote over } From 08c178a97478074aa7ddfb2246b07c05bdd2d7c1 Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 10 Apr 2023 12:18:52 -0600 Subject: [PATCH 3/3] Fix Kholdstare shell collision at Lanmo 2 or other tiles where the shell could limit movement. --- .../bugfix/kholdstare_shell_collision.asm | 51 +++++++++++++++++++ doorrando/doorrando.asm | 1 + 2 files changed, 52 insertions(+) create mode 100644 doorrando/bugfix/kholdstare_shell_collision.asm diff --git a/doorrando/bugfix/kholdstare_shell_collision.asm b/doorrando/bugfix/kholdstare_shell_collision.asm new file mode 100644 index 0000000..cfbf7a4 --- /dev/null +++ b/doorrando/bugfix/kholdstare_shell_collision.asm @@ -0,0 +1,51 @@ +pushpc + +org $9E9463 +JSL CheckKholdShellCoordinates +BCC Sprite_A3_KholdstareShell_link_not_close +BRA Sprite_A3_KholdstareShell_link_close +NOP #13 + +Sprite_A3_KholdstareShell_link_close = $9E9478 +Sprite_A3_KholdstareShell_link_not_close = $9E9480 + +pullpc + +CheckKholdShellCoordinates: + +LDA.w $0D30, X +XBA +LDA.w $0D10, X ; full 16 bit X coordinate of sprite + +REP #$21 +SBC.w #$0020 +CMP.b $22 +BCS .not_colliding + +ADC.w #$0040 +CMP.b $22 +BCC .not_colliding + +SEP #$20 +LDA.w $0D20, X +XBA +LDA.w $0D00, X ; full 16 bit Y coordinate of sprite + +REP #$21 +SBC.w #$001F ; could go to 27 and let link squeeze in at Lanmo 2 (please adjust the following one) +CMP.b $20 +BCS .not_colliding + +ADC.w #$0037 +CMP.b $20 +BCC .not_colliding + +SEP #$20 ; collision detected +SEC +RTL + +.not_colliding +SEP #$30 +CLC +RTL + diff --git a/doorrando/doorrando.asm b/doorrando/doorrando.asm index 6511dd2..08bdccd 100644 --- a/doorrando/doorrando.asm +++ b/doorrando/doorrando.asm @@ -58,6 +58,7 @@ incsrc math.asm incsrc hudadditions.asm incsrc dr_lobby.asm incsrc entrance_fixes.asm +incsrc bugfix/kholdstare_shell_collision.asm warnpc $A79C00 incsrc doortables.asm