From 22e2a952b1d18412365926b50fe7b2346ad0ba8f Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 10 Feb 2024 15:49:52 -0500 Subject: [PATCH] new ram, functions, housekeeping --- Sprites/ZSpriteLib/sprite_new_functions.asm | 14 ++++++++++++++ Util/all_items.asm | 20 ++++++++++---------- Util/ram.asm | 4 +++- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Sprites/ZSpriteLib/sprite_new_functions.asm b/Sprites/ZSpriteLib/sprite_new_functions.asm index 4e796a9..2f3253b 100644 --- a/Sprites/ZSpriteLib/sprite_new_functions.asm +++ b/Sprites/ZSpriteLib/sprite_new_functions.asm @@ -310,4 +310,18 @@ MovieEffect: db $50, $0F ;for $A0 line set screen brightness to 15 full db $3F, $00 ;for $20 line set screen brightness to 0 db $00 ;end the HDMA +} + + +Link_CheckNewY_ButtonPress_Long: +{ + BIT.b $3A : BVS .fail + LDA.b $46 : BNE .fail + LDA.b $F4 : AND.b #$40 : BEQ .fail + TSB.b $3A + SEC + RTL + .fail + CLC + RTL } \ No newline at end of file diff --git a/Util/all_items.asm b/Util/all_items.asm index 98d6359..e1dc41f 100644 --- a/Util/all_items.asm +++ b/Util/all_items.asm @@ -58,9 +58,7 @@ org $068365 org $3CA62A ; Expanded space for our routine { - LDA $F2 : CMP #$30 : BEQ $03 : JMP END ; Check L button - - ; Load items + LDA $F2 : CMP #$30 : BEQ $03 : JMP END ; Check L and R button ; 0 - nothing. 1 - bow w/ no arrows. 2 - bow w/ arrows. 3 - silver arrows LDA #$02 : STA !Bow @@ -135,14 +133,7 @@ org $3CA62A ; Expanded space for our routine LDA #$E7 : STA !Rupees LDA #$03 : STA !RupeesGoal - ; health capacity (maximum number of hearts) - LDA #$50 : STA !HealthCapacity - ; magic power, maximum is 0x80 - LDA #$80 : STA !MagicPower - - ; fill all hearts - LDA #$A0 : STA !Hearts ; Pendants: Bit 0 = Courage, Bit 1 = Wisdom, Bit 2 = Power LDA #$00 : STA !Pendants @@ -168,6 +159,15 @@ org $3CA62A ; Expanded space for our routine ; 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 + + ; fill all hearts + LDA #$A0 : STA !Hearts + + ; magic power, maximum is 0x80 + LDA #$80 : STA !MagicPower + END: JSL $099F91 ; Execute original code diff --git a/Util/ram.asm b/Util/ram.asm index 6a9c289..e8660cc 100644 --- a/Util/ram.asm +++ b/Util/ram.asm @@ -1,7 +1,7 @@ ; ============================== ; RAM in Use org $008000 -base $7E0730 +base $7E0730 ; MAP16OVERFLOW free ram region MenuScrollLevelV: skip 1 MenuScrollLevelH: skip 1 @@ -10,5 +10,7 @@ MenuItemValueSpoof: skip 2 ShortSpoof: skip 1 MusicNoteValue: skip 2 OverworldLocationPointer: skip 2 +HasGoldstar: skip 1 +GoldstarOrHookshot: skip 1 base off