From 4c5adfbee212ca23931dbbf82ecf69a1828f6aa0 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 19 Aug 2025 10:08:00 -0500 Subject: [PATCH 1/7] Fix issue with LH/BS half volume issue when exiting to Kakariko --- hooks.asm | 3 +++ music.asm | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/hooks.asm b/hooks.asm index 941bdde..c73c23c 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2282,6 +2282,9 @@ JSL Overworld_DetermineAndSetMusic : NOP ;-------------------------------------------------------------------------------- org $9DFD27 JSL Overworld_DetermineAndSetMusic : NOP +;-------------------------------------------------------------------------------- +org $829253 +JSL FixHalfVolumeOnSpawnExitToOverworld : NOP ;================================================================================ ;================================================================================ diff --git a/music.asm b/music.asm index 821970f..ffe4fd1 100644 --- a/music.asm +++ b/music.asm @@ -229,3 +229,13 @@ FallingMusicFadeOut: .return RTL ;-------------------------------------------------------------------------------- +FixHalfVolumeOnSpawnExitToOverworld: + BEQ .exit : STA.w MusicControlRequest ; what we wrote over + LDA.w DungeonID : BNE .exit + LDA.b LinkPosY+1 : ROR : LDA.b LinkPosY : ROR + CMP.b #$DC : BCS .exit ; check if link loading in room from a spawn + ; set queue to half volume to trigger full volume on exit + LDA.b #$F2 : STA.w MusicControlQueue +.exit + RTL +;-------------------------------------------------------------------------------- From 34fa1cd98e854916f5dd81864f6984876e0c6fa9 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 19 Aug 2025 10:10:08 -0500 Subject: [PATCH 2/7] Fix issue with music silence in DR when straight stairs lead to pre-Aga room --- hooks.asm | 4 ++++ music.asm | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/hooks.asm b/hooks.asm index c73c23c..782757f 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2285,6 +2285,10 @@ JSL Overworld_DetermineAndSetMusic : NOP ;-------------------------------------------------------------------------------- org $829253 JSL FixHalfVolumeOnSpawnExitToOverworld : NOP +;-------------------------------------------------------------------------------- +org $8292D9 +BRA + : NOP #4 : + +JSL FixPreAgaMusicFadeOut : db $B0 ; BCS ;================================================================================ ;================================================================================ diff --git a/music.asm b/music.asm index ffe4fd1..3224ea6 100644 --- a/music.asm +++ b/music.asm @@ -239,3 +239,12 @@ FixHalfVolumeOnSpawnExitToOverworld: .exit RTL ;-------------------------------------------------------------------------------- +FixPreAgaMusicFadeOut: + LDA.l DRMode : TAX : CPX.b #$01 : BCS .exit_no_fade+1 + LDA.b RoomIndex : CMP.w #$0030 : BEQ .exit_and_fade ; what we + CMP.w #$0040 : BEQ .exit_and_fade ; wrote over +.exit_no_fade + SEC : RTL +.exit_and_fade + CLC : RTL +;-------------------------------------------------------------------------------- From 11ff5825aeb78f4022671a575fadcee629cf8f7b Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 19 Aug 2025 10:10:51 -0500 Subject: [PATCH 3/7] Fix music change after dig game ends --- hooks.asm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hooks.asm b/hooks.asm index 782757f..2535b05 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2280,6 +2280,9 @@ BRA + : NOP #12 : + org $88C442 JSL Overworld_DetermineAndSetMusic : NOP ;-------------------------------------------------------------------------------- +org $9BD1CD +JSL Overworld_DetermineAndSetMusic : NOP +;-------------------------------------------------------------------------------- org $9DFD27 JSL Overworld_DetermineAndSetMusic : NOP ;-------------------------------------------------------------------------------- From 8ac480947d5e2587177f4505ff446111286812ba Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 19 Aug 2025 10:12:05 -0500 Subject: [PATCH 4/7] Fix for music so it doesn't change when going into special OW screens --- hooks.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks.asm b/hooks.asm index 2535b05..b99bb98 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2261,8 +2261,9 @@ JSL Overworld_DetermineMusic BRA + : NOP #42 : + ;-------------------------------------------------------------------------------- org $82B0C4 +LDA.b OverworldIndex : CMP.b #$80 : BCS + JSL Overworld_DetermineAndSetMusic -BRA + : NOP #16 : + +BRA + : NOP #10 : + ;-------------------------------------------------------------------------------- org $82B1C1 JSL Overworld_DetermineAmbientSFX From ea4f39e116b4f300a44b10391ad07384a0d2fbde Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 19 Aug 2025 10:14:04 -0500 Subject: [PATCH 5/7] Corrected some music fade-outs during mosaic transitions --- hooks.asm | 2 -- music.asm | 29 +++++++++++++---------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/hooks.asm b/hooks.asm index b99bb98..2d40cd3 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2234,8 +2234,6 @@ org $82A9B0 ; (BCS $A9B7) NOP #2 org $82C1C8 ; (BCS $C1CC) NOP #2 -org $82ADA0 ; (LDA.b #$F1 : STA $012C) -JSL Overworld_MosaicDarkWorldChecks : NOP ;-------------------------------------------------------------------------------- org $85CC58 ; <- Bank05.asm:1307 (LDA $040A : CMP.b #$18) JSL PsychoSolder_MusicCheck : NOP #1 diff --git a/music.asm b/music.asm index 3224ea6..a22c48d 100644 --- a/music.asm +++ b/music.asm @@ -173,24 +173,21 @@ RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- -; Additional dark world checks to determine whether or not to fade out music -; on mosaic transitions -; -; On entry, A = $8A (overworld area being loaded) -Overworld_MosaicDarkWorldChecks: - CMP.b #$40 : BEQ .checkCrystals - CMP.b #$42 : BEQ .checkCrystals - CMP.b #$50 : BEQ .checkCrystals - CMP.b #$51 : BNE .doFade +pushpc +org $82AD6C +; Determine whether or not to fade out music on mosaic transitions +OverworldMosaicTransition_HandleSong: + LDA.b GameSubMode : CMP.b #$0D : BNE .dont_fade + LDA.w CurrentControlRequest : CMP.b #$04 : BEQ .dont_fade + BRA .fade_song -.checkCrystals - LDA.l CrystalsField : CMP.b #$7F : BEQ .done +warnpc $82ADA0 +org $82ADA0 +.fade_song +org $82ADA5 +.dont_fade -.doFade - LDA.b #$F1 : STA.w MusicControlRequest ; thing we wrote over, fade out music - -.done - RTL +pullpc ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- From e236543180d60fa798ada11c8baebc62072cf94d Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 19 Aug 2025 10:17:04 -0500 Subject: [PATCH 6/7] New gfx for chicken item --- itemdatatables.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itemdatatables.asm b/itemdatatables.asm index 7cd109f..75301f7 100644 --- a/itemdatatables.asm +++ b/itemdatatables.asm @@ -1437,7 +1437,7 @@ StandingItemGraphicsOffsets: dw $0960 ; D0 - Bee trap dw $0 ; D1 - Apples dw $0 ; D2 - Fairy - dw $11E0 ; D3 - Chicken + dw BigDecompressionBuffer+$0140 ; D3 - Chicken dw $01E0 ; D4 - Big Magic dw $11E0 ; D5 - 5 Arrows dw $0 ; D6 - Good Bee From 060554a5fbf7d536a24adf88aa638ba60065a495 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 22 Aug 2025 12:47:54 -0500 Subject: [PATCH 7/7] Implemented ability to change GT cutscene gfx --- goalitem.asm | 30 ++++++++++++++++++++++++++++++ hooks.asm | 4 +++- tables.asm | 7 ++++++- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/goalitem.asm b/goalitem.asm index a73610a..b52f757 100644 --- a/goalitem.asm +++ b/goalitem.asm @@ -109,6 +109,36 @@ CheckGanonVulnerability: BCC .fail BRA .all_dungeons +;-------------------------------------------------------------------------------- +GTCutscene_TransferGfx: + PHA + REP #$20 + LDA.l GanonsTowerOpenGfx : BEQ .original_crystal + PHX + LDX.w ItemStackPtr : STA.l ItemGFXStack,X + LDA.w #$81C0>>1 : STA.l ItemTargetStack,X + INX #2 : STX.w ItemStackPtr + PLX + SEP #$20 + PLA +RTL +.original_crystal + SEP #$20 + PLA + JML TransferItemReceiptToBuffer_using_GraphicsID +;-------------------------------------------------------------------------------- +AncillaDraw_GTCutsceneCrystal_OAMPrep: + LDA.l GanonsTowerOpenGfx : ORA.l GanonsTowerOpenGfx+1 : BEQ .vanilla + LDA.b #$0E : STA.b (OAMPtr),Y + INY + LDA.l GanonsTowerOpenPalette : AND.b #$67 : ASL : ORA.b #$30 + STA.b (OAMPtr),Y + RTL +.vanilla + LDA.b #$24 : STA.b (OAMPtr),Y + INY + LDA.b #$3C : STA.b (OAMPtr),Y +RTL ;-------------------------------------------------------------------------------- GTCutscene_CrystalMasks: db %00000000 ; 0 crystals diff --git a/hooks.asm b/hooks.asm index 2d40cd3..253b607 100755 --- a/hooks.asm +++ b/hooks.asm @@ -538,6 +538,8 @@ JML GTCutscene_ConditionalAnimateCrystals org $88CE93 GTCutscene_DrawSingleCrystal: JML GTCutscene_ConditionalDrawSingleCrystal +org $88CED1 +JSL AncillaDraw_GTCutsceneCrystal_OAMPrep : BRA + : NOP #3 : + ;-------------------------------------------------------------------------------- org $88CF19 ; <- 44F19 - ancilla_break_tower_seal.asm : 336 (TXA : AND.b #$07 : TAX) JSL GTCutscene_ActivateSparkle_SelectCrystal @@ -2660,7 +2662,7 @@ org $898AEE : JSL TransferItemReceiptToBuffer_using_GraphicsID org $898C85 : JSL TransferItemReceiptToBuffer_using_GraphicsID ; gt cutscene -org $899BBE : JSL TransferItemReceiptToBuffer_using_GraphicsID +org $899BBE : JSL GTCutscene_TransferGfx ;=================================================================================================== ; gratuitous NOPs removed for speed diff --git a/tables.asm b/tables.asm index 6842c23..e29bbfe 100644 --- a/tables.asm +++ b/tables.asm @@ -922,8 +922,13 @@ dw $0000 ; #$00 = Off (default) ; #$09 = Require All Dungeons No Agahnim ; #$0A = Require 100% Item Collection ; #$0B = Require 100% Item Collection and All Dungeons +GanonsTowerOpenGfx: ; 0x1801AA-0x1801AB +dw $0000 ; Gfx used for GT open animation, similar to StandingItemGraphicsOffsets +GanonsTowerOpenPalette: ; 0x1801AC +db $00 ; Palette for GanonsTowerOpenGfx +;VHPP CCC O ;-------------------------------------------------------------------------------- -; 0x18019A - 0x1801FF (unused) +; 0x1801AD - 0x1801FF (unused) ;================================================================================ org $B08200 ; PC 0x180200 - 0x18020B RedClockAmount: