From 0bce51af4efb7a42e42c2b8a2522ad4d83cfde48 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 12 Jul 2021 15:41:59 -0500 Subject: [PATCH 1/6] 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/6] 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/6] 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 } From 8e12033105b5b3db4eeb59b1cd612220c6d55f93 Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Fri, 23 Jul 2021 00:07:51 -0700 Subject: [PATCH 4/6] Fix counters for damage taken and magic used --- stats.asm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stats.asm b/stats.asm index d793f20..846355d 100644 --- a/stats.asm +++ b/stats.asm @@ -122,7 +122,13 @@ ;-------------------------------------------------------------------------------- ; $7EF4A0 - 7EF4A7 - Service Request ;-------------------------------------------------------------------------------- -; $7EF4A8 - 7EF4AF - Free space +; $7EF4A8 - 7EF4A9 - Free space +;-------------------------------------------------------------------------------- +; $7EF4AAw[2] - damage taken +;-------------------------------------------------------------------------------- +; $7EF4ACw[2] - magic used +;-------------------------------------------------------------------------------- +; $7EF4AE - 7EF4AF - Free space ;-------------------------------------------------------------------------------- ; $7EF4B0 - 7EF4BF - Absorbed keys, indexed by 040C >> 1 ;-------------------------------------------------------------------------------- @@ -368,8 +374,8 @@ IncrementBigChestCounter: PLA RTL ;-------------------------------------------------------------------------------- -!DAMAGE_COUNTER = $7EF46A -!MAGIC_COUNTER = $7EF46C +!DAMAGE_COUNTER = $7EF4AA +!MAGIC_COUNTER = $7EF4AC IncrementDamageTakenCounter_Eight: STA.l $7EF36D PHA : PHP From 9861c76d230461a3d4d07229d5cfc671edfc82e6 Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 23 Jul 2021 09:13:35 -0700 Subject: [PATCH 5/6] Minor refactor to keep dr hooks in DR --- drhooks.asm | 11 +++++++++++ hooks.asm | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drhooks.asm b/drhooks.asm index 2824771..86ae1ff 100644 --- a/drhooks.asm +++ b/drhooks.asm @@ -179,6 +179,17 @@ JSL BlindsAtticHint : NOP #2 org $1cfd69 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 : + + +org $02C3F2 ; <- Bank02.asm:10521 Unused call +Underworld_DoorDown_Call: +org $02C3F3 +dw $8AD9 ; address of Bank02.asm:2085 + ; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire ; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes ; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds diff --git a/hooks.asm b/hooks.asm index a180750..414336c 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1672,16 +1672,6 @@ 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 ;-------------------------------------------------------------------------------- ;================================================================================ From 15337a1382adf4fae6c1243d502ebed3421a367c Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 23 Jul 2021 09:14:43 -0700 Subject: [PATCH 6/6] Collection Rate moved to arbline marco --- stats/creditsnew.asm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/stats/creditsnew.asm b/stats/creditsnew.asm index c3e8268..56d27fc 100644 --- a/stats/creditsnew.asm +++ b/stats/creditsnew.asm @@ -11,6 +11,20 @@ db 2 db 55 db " " ; $238020 +CollectionRateHi: +db 2, 55 +db $5F, $6B, $68, $68, $61, $5F, $70, $65, $6B, $6A, $9F, $6E, $5D, $70, $61 ; "Collection Rate" +db $9F, $9F, $9F, $9F, $9F, $9F, $9F, $9F, $9F, $A2 ; " /" +print "Collection Rate High Start: ", pc +db $55, $54, $59 ; 216 + +CollectionRateLo: +db 2, 55 +db $85, $91, $8E, $8E, $87, $85, $96, $8B, $91, $90, $9F, $94, $83, $96, $87 ; "Collection Rate" +db $9F, $9F, $9F, $9F, $9F, $9F, $9F, $9F, $9F, $C2 ; " /" +print "Collection Rate Low Start: ", pc +db $7B, $7A, $7F ; 216 + ;=================================================================================================== CreditsLineTable: @@ -689,8 +703,8 @@ endif %emptyline() %emptyline() -print "Collection Rate Credit Start: ", pc -%bigcreditsleft("COLLECTION RATE /216") +%addarbline(CollectionRateHi) +%addarbline(CollectionRateLo) %blankline()