diff --git a/hooks.asm b/hooks.asm index 8abb934..a180750 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1671,6 +1671,17 @@ dw !REG_MUSIC_CONTROL org $0CF05F dw !REG_MUSIC_CONTROL + +; Conditionally disable UW music changes in Door Rando +org $028ADB ; <- Bank02.asm:2088-2095 (LDX.b #$14 : LDA $A0 ...) +JSL.l Underworld_DoorDown_Entry : CPX #$10 +db $B0, $21 ; BCS $028B04 +BRA + : NOP #6 : + + +org $02C3F2 ; <- Bank02.asm:10521 Unused call +Underworld_DoorDown_Call: +org $02C3F3 +dw $8AD9 ; address of Bank02.asm:2085 ;-------------------------------------------------------------------------------- ;================================================================================ diff --git a/music.asm b/music.asm index 2375c56..694485d 100644 --- a/music.asm +++ b/music.asm @@ -283,3 +283,21 @@ Overworld_MosaicDarkWorldChecks: .done RTL ;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; This is the where the music can change due to an UW transition +; +; On entry, A=16bit XY=8bit, A & X safe to mod, Y unknown +Underworld_DoorDown_Entry: + LDA.l DRMode : TAX : LDA $A0 : CPX #0 : BNE .done + +.vanilla ; thing we wrote over + LDX #$14 ;: LDA $A0 + CMP.w #$0012 : BEQ .done + + LDX.b #$10 ; value for Hyrule Castle music + CMP.w #$0002 : BEQ .done + +.done + RTL +;-------------------------------------------------------------------------------- diff --git a/normal.asm b/normal.asm index a8ab959..aabb24d 100644 --- a/normal.asm +++ b/normal.asm @@ -398,7 +398,7 @@ StraightStairsTrapDoor: .animateTraps lda #$05 : sta $11 inc $0468 : stz $068e : stz $0690 - ++ rtl + ++ JSL Underworld_DoorDown_Call : rtl + JML Dungeon_ApproachFixedColor ; what we wrote over }