From 36bf7e83a80098820c15df2d8cc7cad61caf4f2d Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 19 Jan 2025 12:17:56 -0500 Subject: [PATCH] Update SRAM item names --- Core/sram.asm | 63 +++++------ Items/bottle_net.asm | 6 +- Menu/menu.asm | 2 +- Oracle_main.asm | 1 + Sprites/Enemies/anti_kirby.asm | 2 +- Sprites/Enemies/booki.asm | 2 +- Sprites/Enemies/helmet_chuchu.asm | 2 +- Sprites/Enemies/thunder_ghost.asm | 2 +- Sprites/NPCs/eon_owl.asm | 2 +- Sprites/NPCs/maple.asm | 6 +- Util/item_cheat.asm | 169 ++++++++---------------------- 11 files changed, 90 insertions(+), 167 deletions(-) diff --git a/Core/sram.asm b/Core/sram.asm index d32755f..c8f690a 100644 --- a/Core/sram.asm +++ b/Core/sram.asm @@ -100,33 +100,33 @@ Dreams = $7EF410 ; 0x03 - Silver bow ; 0x04 - Silver bow and arrows ; Picking the arrow and nonarrow versions is done by the HUD draw routines -BOW = $7EF340 +Bow = $7EF340 ; 0x00 - Nothing ; 0x01 - Blue boomerang ; 0x02 - Red boomerang -BOOMER = $7EF341 +Boomerang = $7EF341 ; 0x00 - Nothing ; 0x01 - Hookshot ; 0x02 - Goldstar (L/R) -HOOKSHOT = $7EF342 +Hookshot = $7EF342 ; Number of bombs -BOMBS = $7EF343 +Bombs = $7EF343 ; 0x00 - Nothing ; 0x01 - Mushroom ; 0x02 - Powder -SHROOM = $7EF344 +MagicPowder = $7EF344 ; 0x00 - Nothing ; 0x01 - Fire rod -FIREROD = $7EF345 +FireRod = $7EF345 ; 0x00 - Nothing ; 0x01 - Ice rod -ICEROD = $7EF346 +IceRod = $7EF346 ; 0x00 - Nothing ; 0x01 - Zora Mask @@ -142,17 +142,17 @@ DekuMask = $7EF349 ; 0x00 - Nothing ; 0x01 - Lamp -LAMP = $7EF34A +Lamp = $7EF34A ; 0x00 - Nothing ; 0x01 - Magic hammer -HAMMER = $7EF34B +Hammer = $7EF34B ; 0x00 - Nothing ; 0x01 - Shovel ; 0x02 - Inactive flute ; 0x03 - Active flute -FLUTE = $7EF34C +Flute = $7EF34C ; 0x00 - Nothing ; 0x01 - Roc's Feather @@ -160,7 +160,7 @@ RocsFeather = $7EF34D ; 0x00 - Nothing ; 0x01 - Book of Mudora -BOOK = $7EF34E +Book = $7EF34E ; 0x00 - Nothing ; Other values indicate the index of the currently selected bottle @@ -168,39 +168,39 @@ BottleIndex = $7EF34F ; 0x00 - Nothing ; 0x01 - Cane of Somaria -SOMARIA = $7EF350 +Somaria = $7EF350 ; 0x00 - Nothing ; 0x01 - Cane of Byrna -BYRNA = $7EF351 +Byrna = $7EF351 ; 0x00 - Nothing -; 0x01 - Magic cape -CAPE = $7EF352 +; 0x01 - Stone Mask +StoneMask = $7EF352 ; 0x00 - Nothing ; 0x01 - Letter (works like mirror) ; 0x02 - Mirror ; 0x03 - Deleted triforce item -MIRROR = $7EF353 +Mirror = $7EF353 ; 0x00 - Lift 1 (nothing) ; 0x01 - Lift 2 (power glove) ; 0x02 - Lift 3 (titan's mitt) -GLOVES = $7EF354 +Gloves = $7EF354 ; 0x00 - Nothing ; 0x01 - Pegasus boots ; bit 2 of $7E:F379 also needs to be set to actually dash -BOOTS = $7EF355 +Boots = $7EF355 ; 0x00 - Nothing ; 0x01 - Zora's flippers -FLIPPERS = $7EF356 +Flippers = $7EF356 ; 0x00 - Nothing ; 0x01 - Moon pearl -PEARL = $7EF357 +Pearl = $7EF357 ; 0x00 - Nothing ; 0x01 - Wolf Mask @@ -212,18 +212,18 @@ WolfMask = $7EF358 ; 0x03 - Tempered sword ; 0x04 - Golden sword ; 0xFF - Set when sword is handed in to smithy -SWORD = $7EF359 +Sword = $7EF359 ; 0x00 - Nothing ; 0x01 - Fighter shield ; 0x02 - Fire shield ; 0x03 - Mirror shield -SHIELD = $7EF35A +Shield = $7EF35A ; 0x00 - Green mail ; 0x01 - Blue mail ; 0x02 - Red mail -ARMOR = $7EF35B +Armor = $7EF35B ; 0x00 - Nothing ; 0x01 - Mushroom (unused) @@ -243,7 +243,8 @@ Bottle4 = $7EF35F ; Number of rupees you have ; RUPEEDISP will be incremented or decremented until it reaches this value -RUPEES = $7EF360 +Rupees = $7EF360 +RupeesGoal = $7EF361 ; Rupee count displayed on the HUD RUPEEDISP = $7EF362 @@ -292,7 +293,7 @@ MAXHP = $7EF36C CURHP = $7EF36D ; Magic power, capped at 128 -MAGPOW = $7EF36E +MagicPower = $7EF36E ; Current number of keys for whatever dungeon is loaded KEYS = $7EF36F @@ -303,7 +304,7 @@ ARROWCAP = $7EF371 ; Refills health ; Expects multiples of 8 -HEALME = $7EF372 +HeartRefill = $7EF372 ; Refills magic ZAPME = $7EF373 @@ -312,7 +313,7 @@ ZAPME = $7EF373 ; r - Wisdom (red) ; b - Power (blue) ; g - Courage (green) -PENDANTS = $7EF374 +Pendants = $7EF374 ; Refills bombs BOMBME = $7EF375 @@ -321,7 +322,7 @@ BOMBME = $7EF375 SHOOTME = $7EF376 ; Arrow count -ARROWS = $7EF377 +Arrows = $7EF377 ; Unused UNUSED_7EF378 = $7EF378 @@ -338,7 +339,7 @@ UNUSED_7EF378 = $7EF378 ; l - Lift ; This only controls the display of "LIFT.1" ; If this bit is unset but LIFT is set then the proper lift text is displayed -ABILITY = $7EF379 +Ability = $7EF379 ; Dungeon ID Legend ; Mushroom Grotto ID 0x0C (Palace of Darkness) @@ -364,7 +365,7 @@ Crystals = $7EF37A ; 0x02 - Quarter magic ; Quarter magic has no special HUD graphic, unlike half magic ; Also, not everything is necessarily quarter magic -MAGCON = $7EF37B +MagicUsage = $7EF37B ; Keys earned per dungeon ; Sewers and Castle are kept in sync @@ -422,7 +423,7 @@ MAPICON = $7EF3C7 ; 0x04 - Throne ; 0x05 - Old man cave ; 0x06 - Old man home -SPAWNPT = $7EF3C8 +SpawnPoint = $7EF3C8 ; Another bitfield for progress ; t.dp s.bh diff --git a/Items/bottle_net.asm b/Items/bottle_net.asm index d4c98d0..9f6f9dd 100644 --- a/Items/bottle_net.asm +++ b/Items/bottle_net.asm @@ -14,8 +14,8 @@ org $07A15B LinkItem_NewBottle: { ; Check if we have a bottle or not - LDA $7EF34F : DEC A : TAX - LDA $7EF35C, X : BEQ .exit + LDA.l BottleIndex : DEC A : TAX + LDA.l Bottle1, X : BEQ .exit ; Check if the bottle is empty CMP.b #$03 : BCC .empty_bottle @@ -103,7 +103,7 @@ LinkItem_Bottles: LDA.b $3A : AND.b #$BF : STA.b $3A ; Check if we have a bottle or not - LDA.l $7EF34F : DEC A : TAX + LDA.l BottleIndex : DEC A : TAX LDA.l $7EF35C, X : BEQ NetExit ; (RTS) CMP.b #$03 : BCC .LinkItem_UselessBottle diff --git a/Menu/menu.asm b/Menu/menu.asm index 553d04e..ff45a42 100644 --- a/Menu/menu.asm +++ b/Menu/menu.asm @@ -344,7 +344,7 @@ Menu_CheckBottle: LDA.w $0202 : CMP.b #$18 : BNE .not_any LDA.b #$0004 .prepare_bottle - STA.l $7EF34F + STA.l BottleIndex .not_any RTS } diff --git a/Oracle_main.asm b/Oracle_main.asm index c04da4c..5d71181 100644 --- a/Oracle_main.asm +++ b/Oracle_main.asm @@ -35,6 +35,7 @@ incsrc "Core/ram.asm" namespace Oracle { + incsrc "Core/sram.asm" incsrc "Core/symbols.asm" incsrc "Core/message.asm" diff --git a/Sprites/Enemies/anti_kirby.asm b/Sprites/Enemies/anti_kirby.asm index 4d54374..9ce6b72 100644 --- a/Sprites/Enemies/anti_kirby.asm +++ b/Sprites/Enemies/anti_kirby.asm @@ -49,7 +49,7 @@ Sprite_AntiKirby_Prep: STZ.w SprDefl, X STZ.w SprTileDie, X STZ.w SprMiscB, X - LDA.l SWORD : DEC : TAY + LDA.l Sword : DEC : TAY LDA .bump_damage, Y : STA.w SprBump, X LDA .health, Y : STA.w SprHealth, X LDA .prize_pack, Y : STA.w SprPrize, X diff --git a/Sprites/Enemies/booki.asm b/Sprites/Enemies/booki.asm index ac83f02..231ade5 100644 --- a/Sprites/Enemies/booki.asm +++ b/Sprites/Enemies/booki.asm @@ -47,7 +47,7 @@ Sprite_Booki_Long: Sprite_Booki_Prep: { PHB : PHK : PLB - LDA.l SWORD : DEC A : TAY + LDA.l Sword : DEC A : TAY LDA.w .health, Y : STA.w SprHealth, X STZ.w SprMiscB, X PLB diff --git a/Sprites/Enemies/helmet_chuchu.asm b/Sprites/Enemies/helmet_chuchu.asm index c4b1905..9fc46be 100644 --- a/Sprites/Enemies/helmet_chuchu.asm +++ b/Sprites/Enemies/helmet_chuchu.asm @@ -51,7 +51,7 @@ Sprite_HelmetChuchu_Long: Sprite_HelmetChuchu_Prep: { PHB : PHK : PLB - LDA.l SWORD : DEC A : TAY + LDA.l Sword : DEC A : TAY LDA.w .health, Y : STA.w SprHealth, X JSL GetRandomInt : AND.b #$02 : STA.w SprAction, X STZ.w SprMiscB, X diff --git a/Sprites/Enemies/thunder_ghost.asm b/Sprites/Enemies/thunder_ghost.asm index f8b2c3e..24df469 100644 --- a/Sprites/Enemies/thunder_ghost.asm +++ b/Sprites/Enemies/thunder_ghost.asm @@ -50,7 +50,7 @@ Sprite_ThunderGhost_Long: Sprite_ThunderGhost_Prep: { PHB : PHK : PLB - LDA.l SWORD : DEC A : TAY + LDA.l Sword : DEC A : TAY LDA.w .health, Y : STA.w SprHealth, X LDA.b #$08 : STA.w SprTimerB, X LDA.b #$08 : STA.w SprTimerA, X diff --git a/Sprites/NPCs/eon_owl.asm b/Sprites/NPCs/eon_owl.asm index d8234f5..643458a 100644 --- a/Sprites/NPCs/eon_owl.asm +++ b/Sprites/NPCs/eon_owl.asm @@ -71,7 +71,7 @@ Sprite_EonOwl_Prep: .NotGaebora LDA.w AreaIndex : CMP.b #$50 : BNE .not_intro ; If Map 0x50, don't spawn after getting sword - LDA.l SWORD : CMP.b #$01 : BCC .continue + LDA.l Sword : CMP.b #$01 : BCC .continue STZ.w SprState, X .continue .not_intro diff --git a/Sprites/NPCs/maple.asm b/Sprites/NPCs/maple.asm index c3cadb8..bc331f5 100644 --- a/Sprites/NPCs/maple.asm +++ b/Sprites/NPCs/maple.asm @@ -76,9 +76,9 @@ MapleHandler: Maple_CheckForPendant: { ; Check for pendant - LDA.l PENDANTS : AND.b #$04 : BNE .courage - LDA.l PENDANTS : AND.b #$02 : BNE .power - LDA.l PENDANTS : AND.b #$01 : BNE .wisdom + LDA.l Pendants : AND.b #$04 : BNE .courage + LDA.l Pendants : AND.b #$02 : BNE .power + LDA.l Pendants : AND.b #$01 : BNE .wisdom JMP .none .courage LDA.l Dreams : AND.b #$04 : BNE .power diff --git a/Util/item_cheat.asm b/Util/item_cheat.asm index 953a2ee..c1559c4 100644 --- a/Util/item_cheat.asm +++ b/Util/item_cheat.asm @@ -8,55 +8,10 @@ ; -wiiqwertyuiop for his Zelda Disassembly ;=========================================================== -lorom - -!Bow = $7EF340 -!Boomerang = $7EF341 -!Hookshot = $7EF342 -!Bombs = $7EF343 -!MagicPowder = $7EF344 -!FireRod = $7EF345 -!IceRod = $7EF346 -!BunnyMask = $7EF348 -!DekuMask = $7EF349 -!ZoraMask = $7EF347 -!Lamp = $7EF34A -!MagicHammer = $7EF34B -!Flute = $7EF34C -!JumpFeather = $7EF34D -!BookOfMudora = $7EF34E -!Bottles = $7EF34F -!CaneOfSomaria = $7EF350 -!CaneOfByrna = $7EF351 -!MagicCape = $7EF352 -!Mirror = $7EF353 -!TitansMitt = $7EF354 -!PegasusBoots = $7EF355 -!Flippers = $7EF356 -!MoonPearl = $7EF357 -!WolfMask = $7EF358 -!Sword = $7EF359 -!Shield = $7EF35A -!Mail = $7EF35B -!Bottle1 = $7EF35C -!Bottle2 = $7EF35D -!Bottle3 = $7EF35E -!Bottle4 = $7EF35F -!Rupees = $7EF360 -!RupeesGoal = $7EF361 -!HealthCapacity = $7EF36C -!MagicPower = $7EF36E -!Hearts = $7EF372 -!Pendants = $7EF374 -!Arrows = $7EF377 -!AbilityFlags = $7EF379 -!Crystals = $7EF37A -!MagicUsage = $7EF37B - !BetaRelease = $00 -org $068365 - JSL $3CA62A ; Overwrite JSL executed every frame +; Overwrite JSL executed every frame +org $068365 : JSL $3CA62A Follower_Main = $099F91 @@ -70,107 +25,73 @@ org $3CA62A ; Expanded space for our routine if !BetaRelease == 0 ; How many bombs you have. Can exceed 0x50, up to 0xff. - LDA #$50 : STA !Bombs + LDA #$50 : STA Bombs - ; 0 - nothing. 1 - Mushroom. 2 - Magic Powder - LDA #$02 : STA !MagicPowder - STA !TitansMitt + LDA #$02 : STA MagicPowder + STA Gloves - ; 0 - nothing. 1 - Fire Rod - LDA #$01 : STA !FireRod - STA !IceRod + LDA #$01 : STA FireRod + STA IceRod - LDA #$01 : STA !BunnyMask + LDA #$01 : STA BunnyHood - LDA #$01 : STA !DekuMask - LDA #$01 : STA !ZoraMask - LDA #$01 : STA !WolfMask - LDA #$01 : STA !MagicCape + LDA #$01 : STA DekuMask + LDA #$01 : STA ZoraMask + LDA #$01 : STA WolfMask + LDA #$01 : STA StoneMask - ; 0 - nothing. 1 - shovel. 2 - flute, no bird. 3 - flue, bird activated - LDA #$01 : STA !BookOfMudora - LDA #$01 : STA !CaneOfSomaria - LDA #$01 : STA !PegasusBoots - STA !Flippers - STA !WolfMask + LDA #$01 : STA Book + LDA #$01 : STA Somaria + LDA #$01 : STA Boots + STA Flippers + STA WolfMask - ; 0 - nothing. 1 - Fighter Sword. 2 - Master Sword. 3 - Tempered Sword. 4 - Golden Sword - LDA #$04 : STA !Sword + LDA #$04 : STA Sword - ; 0 - nothing. 1 - Fighter Shield. 2 - Fire Shield. 3 - Mirror Shield - LDA #$03 : STA !Shield + LDA #$03 : STA Shield - ; 0 - nothing. 1 - Green Mail. 2 - Blue Mail. 3 - Red Mail - LDA #$02 : STA !Mail + LDA #$02 : STA Armor - ; 0-No bottle. - ; 1-Mushroom (no use). 2-Empty bottle. - ; 3-Red Potion. 4-Green Potion. - ; 5-Blue Potion. 6-Fairy. - ; 7-Bee. 8-Good Bee - LDA #$01 : STA !Bottles ; has bottles - LDA #$03 : STA !Bottle1 - LDA #$05 : STA !Bottle2 - LDA #$04 : STA !Bottle3 - LDA #$06 : STA !Bottle4 + LDA #$01 : STA BottleIndex ; has bottles + LDA #$03 : STA Bottle1 + LDA #$05 : STA Bottle2 + LDA #$04 : STA Bottle3 + LDA #$06 : STA Bottle4 ; How many arrows you have. Can exceed 0x70. - LDA #$32 : STA !Arrows + LDA #$32 : STA Arrows ; 2 bytes for rupees (goal, for counting up) - LDA #$E7 : STA !Rupees - LDA #$03 : STA !RupeesGoal + LDA #$E7 : STA Rupees + LDA #$03 : STA RupeesGoal + LDA #$07 : STA Pendants + LDA #$6E : STA Ability + LDA #$00 : STA Crystals + LDA #$01 : STA Hookshot + LDA #$02 : STA MagicUsage - ; Pendants: Bit 0 = Courage, Bit 1 = Wisdom, Bit 2 = Power - LDA #$07 : STA !Pendants - - ; Ability Flags: Bit 0: ----. - ; Bit 1: Swim. - ; Bit 2: Run / Dash. - ; Bit 3: Pull. Bit 4: ----. - ; Bit 5: Talk. - ; Bit 6: Read. Bit 7: ---- - LDA #$6E : STA !AbilityFlags - - ; Crystals: - ; Bit 0 = Misery Mire - ; Bit 1 = Dark Palace - ; Bit 2 = Ice Palace - ; Bit 3 = Turtle Rock - ; Bit 4 = Swamp Palace - ; Bit 5 = Gargoyle's Domain - ; Bit 6 = Skull Woods - LDA #$00 : STA !Crystals - - ; 0 - nothing. 1 - hookshot - LDA #$01 : STA !Hookshot - - ; Magic usage: 0: normal consumption. 1: 1/2 consumption. 2: 1/4 consumption - LDA #$02 : STA !MagicUsage - - ; health capacity (maximum number of hearts) - LDA #$A0 : STA !HealthCapacity + LDA #$A0 : STA MAXHP endif - LDA #$04 : STA !Flute - LDA #$01 : STA !JumpFeather + LDA #$04 : STA Flute + LDA #$01 : STA RocsFeather ; 0 - nothing. 1 - bow w/ no arrows. 2 - bow w/ arrows. 3 - silver arrows - LDA #$03 : STA !Bow + LDA #$03 : STA Bow ; 0 - nothing. 1 - blue boomerang. 2 - red boomerang - LDA #$02 : STA !Boomerang - STA !Mirror - STA !CaneOfByrna + LDA #$02 : STA Boomerang + STA Mirror + STA Byrna ; 0 - nothing. 1 - Lamp - LDA #$01 : STA !Lamp - ; STA !MagicHammer - STA !MoonPearl + LDA #$01 : STA Lamp + ; STA MagicHammer + STA Pearl ; fill all hearts - LDA #$A0 : STA !Hearts + LDA #$A0 : STA HeartRefill ; magic power, maximum is 0x80 - LDA #$80 : STA !MagicPower + LDA #$80 : STA MagicPower ; Skip story events, test goron mines LDX.b #$36