From 0bce51af4efb7a42e42c2b8a2522ad4d83cfde48 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 12 Jul 2021 15:41:59 -0500 Subject: [PATCH 1/3] Supressed awkward/abrupt music changes in dungeons when DR is enabled --- hooks.asm | 4 ++++ music.asm | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/hooks.asm b/hooks.asm index 8abb934..1b30c0e 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1671,6 +1671,10 @@ dw !REG_MUSIC_CONTROL org $0CF05F dw !REG_MUSIC_CONTROL + +; Conditionally disable UW music changes in Door Rando +org $028ADB ; <- Bank02.asm:2088 (LDX.b #$14 : LDA $A0) +JSL.l Underworld_DoorDown_Entry ;-------------------------------------------------------------------------------- ;================================================================================ diff --git a/music.asm b/music.asm index 2375c56..bb747cc 100644 --- a/music.asm +++ b/music.asm @@ -283,3 +283,17 @@ 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.w #0 : CPX #0 : BNE .done + +.vanilla + LDX #$14 : LDA $A0 ; thing we wrote over - prepare Sanc music track, load current room ID + +.done + RTL +;-------------------------------------------------------------------------------- From 30d8bdd81388552424e5cd583f14da9b4745d865 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 12 Jul 2021 19:22:57 -0500 Subject: [PATCH 2/3] Suppressed awkward/abrupt music changes in dungeons when DR is enabled --- hooks.asm | 6 ++++-- music.asm | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hooks.asm b/hooks.asm index 1b30c0e..da3760e 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1673,8 +1673,10 @@ org $0CF05F dw !REG_MUSIC_CONTROL ; Conditionally disable UW music changes in Door Rando -org $028ADB ; <- Bank02.asm:2088 (LDX.b #$14 : LDA $A0) -JSL.l Underworld_DoorDown_Entry +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 : + ;-------------------------------------------------------------------------------- ;================================================================================ diff --git a/music.asm b/music.asm index bb747cc..694485d 100644 --- a/music.asm +++ b/music.asm @@ -289,10 +289,14 @@ Overworld_MosaicDarkWorldChecks: ; ; On entry, A=16bit XY=8bit, A & X safe to mod, Y unknown Underworld_DoorDown_Entry: - LDA.l DRMode : TAX : LDA.w #0 : CPX #0 : BNE .done + LDA.l DRMode : TAX : LDA $A0 : CPX #0 : BNE .done -.vanilla - LDX #$14 : LDA $A0 ; thing we wrote over - prepare Sanc music track, load current room ID +.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 From c01c6f337a1a98e8771aaf7e4f84f019e3ab505f Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 12 Jul 2021 20:59:47 -0500 Subject: [PATCH 3/3] Fixed boss music when boss room entered thru Straight Stairs in DR --- hooks.asm | 5 +++++ normal.asm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hooks.asm b/hooks.asm index da3760e..a180750 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1677,6 +1677,11 @@ 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/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 }