From 244b62207404e81a2e178018d6f21e28a9677d6a Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Wed, 10 Feb 2021 08:41:16 -0800 Subject: [PATCH 1/3] Move stats that were not compass related out of the former compass counters. --- inventory.asm | 10 +++++----- stats.asm | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/inventory.asm b/inventory.asm index 269aec9..784bb6e 100644 --- a/inventory.asm +++ b/inventory.asm @@ -347,7 +347,7 @@ AddInventory: LDA $7EF353 : BNE + ; Check for Mirror REP #$20 - LDA $7EF434 : INC : STA $7EF434 ; Increment Pre Mirror Counter + LDA $7EF468 : INC : STA $7EF468 ; Increment Pre Mirror Counter SEP #$20 + REP #$20 @@ -656,7 +656,7 @@ RTS RTS .incrementMail - LDA $7EF436 : !ADD #$40 : STA $7EF436 + LDA $7EF46A : !ADD #$40 : STA $7EF46A RTS .incrementKeyLong @@ -665,9 +665,9 @@ RTL .incrementKey PHA : PHX - LDA $7EF436 : INC : AND #$3F : TAX - LDA $7EF436 : AND #$C0 : STA $7EF436 - TXA : ORA $7EF436 : STA $7EF436 + LDA $7EF46A : INC : AND #$3F : TAX + LDA $7EF46A : AND #$C0 : STA $7EF46A + TXA : ORA $7EF46A : STA $7EF46A PLX : PLA RTS diff --git a/stats.asm b/stats.asm index 9e2fc9c..c2150c1 100644 --- a/stats.asm +++ b/stats.asm @@ -47,15 +47,9 @@ ;-------------------------------------------------------------------------------- ; $7EF430w[2] - loop frame counter (high) ;-------------------------------------------------------------------------------- -; $7EF432 - locations before boots +; $7EF432w[2] - locations before boots ;-------------------------------------------------------------------------------- -; $7EF434 - locations before mirror -;-------------------------------------------------------------------------------- -; $7EF436 mmkkkkkk -; m - mail counter -; k - small keys -;-------------------------------------------------------------------------------- -; $7EF437-7EF439 - free space +; $7EF434-7EF439 - FORMER COMPASS COUNTERS. DO NOT REUSE. ;-------------------------------------------------------------------------------- ; $7EF43A - times mirrored outdoors ;-------------------------------------------------------------------------------- @@ -114,6 +108,12 @@ ;-------------------------------------------------------------------------------- ; $7EF466w[2] - mirror timestamp (high) ;-------------------------------------------------------------------------------- +; $7EF468w[2] - locations before mirror +;-------------------------------------------------------------------------------- +; $7EF46A mmkkkkkk +; m - mail counter +; k - small keys +;-------------------------------------------------------------------------------- ; $7EF4C0 - 7EF4CF - locations checked, indexed by 040C >> 1 ;-------------------------------------------------------------------------------- @@ -388,7 +388,7 @@ IndoorSubtileTransitionCounter: JMP StatTransitionCounter ;-------------------------------------------------------------------------------- !CHEST_COUNTER = "$7EF442" -!MAIL_COUNTER = "$7EF436" ; mmkkkkkk +!MAIL_COUNTER = "$7EF46A" ; mmkkkkkk !BOSS_KILLS = "$7F5037" !SWORD_KILLS_1 = "$7EF425" !SWORD_KILLS_2 = "$7EF426" From d3af10649c2bcc35e5b5271f990dbfae554f3276 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Wed, 10 Feb 2021 09:25:11 -0800 Subject: [PATCH 2/3] Dungeon completion flags, that indicate for which dungeons the prize was collected from. --- inventory.asm | 29 +++++++++++++++++++++++++++++ stats.asm | 3 +++ 2 files changed, 32 insertions(+) diff --git a/inventory.asm b/inventory.asm index 784bb6e..73802f6 100644 --- a/inventory.asm +++ b/inventory.asm @@ -415,6 +415,7 @@ AddInventory: BRL .done + CPY.b #$20 : BNE + ; Crystal JSR .incrementCrystal + JSR .setDungeonCompletion BRL .done + CPY.b #$21 : BNE + ; Bug Net JSR .incrementY @@ -457,6 +458,7 @@ AddInventory: + CPY.b #$37 : !BLT + ; Items $37 - $39 - Pendants CPY.b #$3A : !BGE + JSR .incrementPendant + JSR .setDungeonCompletion BRL .done + CPY.b #$3A : !BLT + ; Items $3A - $3B - Bow & Silver Arrows CPY.b #$3C : !BGE + @@ -715,6 +717,33 @@ RTL %BottomHalf($7EF426) + RTS + +.setDungeonCompletion + LDA $040C + CMP #$FF : BEQ + + LSR : AND #$0F : CMP #$08 : !BGE ++ + JSR .valueShift + ORA $7EF46B : STA $7EF46B + BRA + + ++ + !SUB #$08 + JSR .valueShift + BIT.b #$C0 : BEQ +++ : LDA.b #$C0 : +++ ; Make Hyrule Castle / Sewers Count for Both + ORA $7EF46C : STA $7EF46C + + +RTS + +.valueShift + PHX + TAX : LDA.b #$01 + - + CPX #$00 : BEQ + + ASL + DEX + BRA - + + + PLX +RTS ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- diff --git a/stats.asm b/stats.asm index c2150c1..0f266a6 100644 --- a/stats.asm +++ b/stats.asm @@ -114,6 +114,8 @@ ; m - mail counter ; k - small keys ;-------------------------------------------------------------------------------- +; $7EF46Bw[2] - Dungeon prizes collected by dungeon location. +;-------------------------------------------------------------------------------- ; $7EF4C0 - 7EF4CF - locations checked, indexed by 040C >> 1 ;-------------------------------------------------------------------------------- @@ -387,6 +389,7 @@ IndoorSubtileTransitionCounter: STZ $0642 JMP StatTransitionCounter ;-------------------------------------------------------------------------------- +!DUNGEON_PRIZE_COLLECTED = "$7EF46B" !CHEST_COUNTER = "$7EF442" !MAIL_COUNTER = "$7EF46A" ; mmkkkkkk !BOSS_KILLS = "$7F5037" From a83608366c5395ae47d7056077734555e6b6ad98 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Fri, 12 Feb 2021 07:48:09 -0800 Subject: [PATCH 3/3] document full usage of 7EF420-7EF4FF in stats.asm --- stats.asm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/stats.asm b/stats.asm index 0f266a6..e854827 100644 --- a/stats.asm +++ b/stats.asm @@ -116,8 +116,29 @@ ;-------------------------------------------------------------------------------- ; $7EF46Bw[2] - Dungeon prizes collected by dungeon location. ;-------------------------------------------------------------------------------- +; $7EF46D - 7EF49F - Free space +;-------------------------------------------------------------------------------- +; $7EF4A0 - 7EF4A7 - Service Request +;-------------------------------------------------------------------------------- +; $7EF4A8 - 7EF4AF - Free space +;-------------------------------------------------------------------------------- +; $7EF4B0 - 7EF4BF - Absorbed keys, indexed by 040C >> 1 +;-------------------------------------------------------------------------------- ; $7EF4C0 - 7EF4CF - locations checked, indexed by 040C >> 1 ;-------------------------------------------------------------------------------- +; $7EF4D0 - 7EF4DA - Multiworld controls +;-------------------------------------------------------------------------------- +; $7EF4DB - 7EF4DF - Free space +;-------------------------------------------------------------------------------- +; $7EF4E0 - 7EF4EF - Collected Keys, indexed by 040C >> 1 +;-------------------------------------------------------------------------------- +; $7EF4F0 - Fresh File Marker. +;-------------------------------------------------------------------------------- +; $7EF4F1 - 7EF4FD - Free space +;-------------------------------------------------------------------------------- +; 7EF4FEw[2] - Save Checksum +;-------------------------------------------------------------------------------- + ;-------------------------------------------------------------------------------- !LOCK_STATS = "$7EF443"