From ad5b78b3d1441854ec267ddb9942cd848aaf27ba Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 1 Nov 2021 02:09:05 -0500 Subject: [PATCH] Preserve Sanc music change in Standard --- drhooks.asm | 6 +++--- music.asm | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drhooks.asm b/drhooks.asm index 1d3b485..a271577 100644 --- a/drhooks.asm +++ b/drhooks.asm @@ -186,9 +186,9 @@ Main_ShowTextMessage: ; 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 : + +JSL.l Underworld_DoorDown_Entry : CPX #$FF +BEQ + : db $80, $1C ; BRA $028B04 +NOP #6 : + org $02C3F2 ; <- Bank02.asm:10521 Unused call Underworld_DoorDown_Call: diff --git a/music.asm b/music.asm index a65c7b1..810d49b 100644 --- a/music.asm +++ b/music.asm @@ -289,14 +289,15 @@ Overworld_MosaicDarkWorldChecks: ; ; On entry, A=16bit XY=8bit, A & X safe to mod, Y unknown Underworld_DoorDown_Entry: - LDA.l $7EF3C5 : TAX : CPX #2 : !BLT .vanilla + LDX #$FF ; some junk value to be used later to determine if the below lines will change the track + LDA.l $7EF3C5 : AND.w #$00FF : CMP.w #2 : !BLT .vanilla LDA.l DRMode : BNE .done .vanilla ; thing we wrote over LDA $A0 : CMP.w #$0012 : BNE + LDX.b #$14 ; value for Sanc music BRA .done - + CMP.w #$0002 : BNE .done + + LDA $A2 : CMP.w #$0012 : BNE .done LDX.b #$10 ; value for Hyrule Castle music .done RTL