From 91c3dd601386d9ede58e3e04faaeb1ea9a436a7e Mon Sep 17 00:00:00 2001 From: krelbel Date: Thu, 31 Aug 2023 01:05:56 -0700 Subject: [PATCH 1/3] Add "Alt Power Star" item This change adds item ID 0x69 (currently unused) which duplicates the data of the existing 0x6B "Goal Item (Multi/Power Star)" and changes the palette of the existing power star item to 0x02 (silver). This is intended to allow differentiating progression items (gold stars) from non-progression items (silver stars) for other worlds. New hash: 7c9599a6ff33563b33178ab8e5a1dac8 Example image: https://i.imgur.com/B2LUdFS.png --- newitems.asm | 41 +++++++++++++++++++++-------------------- tables.asm | 6 ++++-- utilities.asm | 8 ++++---- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/newitems.asm b/newitems.asm index 9bee8f4c..7badca30 100755 --- a/newitems.asm +++ b/newitems.asm @@ -29,9 +29,10 @@ ; #$63 - RNG Pool Item (Multi) ; #$64 - Progressive Bow ; #$65 - Progressive Bow -; #$6A - Goal Item (Single/Triforce) -; #$6B - Goal Item (Multi/Power Star) -; #$6C - Goal Item (Multi/Triforce Piece) +; #$69 - Alt Power Star +; #$6A - Goal Item (Triforce) +; #$6B - Power Star +; #$6C - Goal Item (Triforce Piece) ; #$6D - Server Request F0 (Hearts / Powder / Mushroom / Bonkable) ; #$6E - Server Request F1 (NPC) ; #$6F - Server Request F2 (Tablets / Pedestal) @@ -621,8 +622,8 @@ AddReceivedItemExpanded: db -4, -4, -4, -4 ; Progressive Sword, Shield, Armor & Gloves db -4, -4 ; RNG Single & Multi db -4, -4 ; Progressive Bow x2 - db -4, -4, -4, -4 ; Unused - db -4, -4, -4 ; Goal Item Single, Multi & Alt Multi + db -4, -4, -4 ; Unused + db -4, -4, -4, -4 ; Alt Power Star, Triforce, Power Star, Triforce Piece db -4, -4, -4 ; Unused db -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4 ; Free Map db -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4 ; Free Compass @@ -661,8 +662,8 @@ AddReceivedItemExpanded: db 0, 0, 0, 0 ; Progressive Sword, Shield, Armor & Gloves db 0, 0 ; RNG Single & Multi db 0, 0 ; Progressive Bow x2 - db 0, 0, 0, 0 ; Unused - db 0, 0, 0 ; Goal Item Single, Multi & Alt Multi + db 0, 0, 0 ; Unused + db 0, 0, 0, 0 ; Alt Power Star, Triforce, Power Star, Triforce Piece db 0, 0, 0 ; Unused db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; Free Map db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; Free Compass @@ -703,8 +704,8 @@ AddReceivedItemExpanded: db $FF, $FF, $04, $0D ; Progressive Sword, Shield, Armor & Gloves db $FF, $FF ; RNG Single & Multi db $FF, $FF ; Progressive Bow x2 - db $FF, $FF, $FF, $FF ; Unused - db $49, $4A, $49 ; Goal Item Single, Multi & Alt Multi + db $FF, $FF, $FF ; Unused + db $4A, $49, $4A, $49; Alt Power Star, Triforce, Power Star, Triforce Piece db $FF, $FF, $FF ; Unused db $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21 ; Free Map db $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16 ; Free Compass @@ -749,8 +750,8 @@ AddReceivedItemExpanded: db $02, $02, $02, $02 ; Progressive Sword, Shield, Armor & Gloves db $02, $02 ; RNG Single & Multi db $02, $02 ; Progressive Bow x2 - db $02, $02, $02, $02 ; Unused - db $02, $02, $02 ; Goal Item Single, Multi & Alt Multi + db $02, $02, $02 ; Unused + db $02, $02, $02, $02 ; Alt Power Star, Triforce, Power Star, Triforce Piece db $02, $02, $02 ; Unused db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02 ; Free Map db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02 ; Free Compass @@ -791,8 +792,8 @@ AddReceivedItemExpanded: db $FF, $FF, $FF, $FF ; Progressive Sword, Shield, Armor & Gloves db $FF, $FF ; RNG Single & Multi db 0, 0 ; Progressive Bow - db 0, 0, 0, 0 ; Unused - db 4, 4, 4 ; Goal Item Single, Multi & Alt Multi + db 0, 0, 0 ; Unused + db 4, 4, 4, 4 ; Alt Power Star, Triforce, Power Star, Triforce Piece db 0, 0, 0 ; Unused db 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ; Free Map db 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; Free Compass @@ -833,8 +834,8 @@ AddReceivedItemExpanded: dw $F359, $F35A, $F35B, $F354 ; Progressive Sword, Shield, Armor & Gloves dw $F36A, $F36A ; RNG Single & Multi dw $F340, $F340 ; Progressive Bow x2 - dw $F36A, $F36A, $F36A, $F36A ; Unused - dw $F36A, $F36A, $F36A ; Goal Item Single, Multi & Alt Multi + dw $F36A, $F36A, $F36A ; Unused + dw $F36A, $F36A, $F36A, $F36A ; Alt Power Star, Triforce, Power Star, Triforce Piece dw $F36A, $F36A, $F36A ; Unused dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Map dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Compass @@ -877,8 +878,8 @@ AddReceivedItemExpanded: db $FF, $FF, $FF, $FF ; Progressive Sword, Shield, Armor & Gloves db $FF, $FF ; RNG Single & Multi db $FF, $FF ; Progressive Bow - db $FF, $FF, $FF, $FF ; Unused - db $FF, $FF, $FF ; Goal Item Single, Multi & Alt Multi + db $FF, $FF, $FF ; Unused + db $FF, $FF, $FF, $FF ; Alt Power Star, Triforce, Power Star, Triforce Piece db $FF, $FF, $FF ; Unused db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; Free Map db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; Free Compass @@ -963,9 +964,9 @@ Link_ReceiveItemAlternatesExpanded: db -1, -1, -1, -1 ; Progressive Sword, Shield, Armor & Gloves db -1, -1 ; RNG Single & Multi db -1, -1 ; Progressive Bow - db -1, -1, -1, -1 ; Unused - db -1, -1 ; Goal Item Single, Multi & Alt Multi - db -1, -1, -1, -1 ; Unused + db -1, -1, -1 ; Unused + db -1, -1, -1, -1 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db -1, -1, -1 ; Unused db -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ; Free Map db -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ; Free Compass db -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ; Free Big Key diff --git a/tables.asm b/tables.asm index e03de986..5525acbc 100644 --- a/tables.asm +++ b/tables.asm @@ -1326,8 +1326,10 @@ db $04 ;64:Progressive Bow ;65:Progressive Bow -;6A:Goal Item (Single/Triforce) -;6B:Goal Item (Multi/Power Star) +;69:Alt Power Star +;6A:Goal Item (Triforce) +;6B:Power Star +;6C:Goal Item (Triforce Piece) ;6D:Server Request Item ;6E:Server Request Item (Dungeon Drop) diff --git a/utilities.asm b/utilities.asm index ae3ce088..6928861d 100644 --- a/utilities.asm +++ b/utilities.asm @@ -152,8 +152,8 @@ RTL db $FD, $0D ; Progressive Armor & Gloves db $FA, $FB ; RNG Single & Multi db $F8, $F8 ; Progressive Bow x2 - db $FF, $FF, $FF, $FF ; Unused - db $49, $4A, $49 ; Goal Item Single, Multi & Alt Multi + db $FF, $FF, $FF ; Unused + db $4A, $49, $4A, $49 ; Alt Power Star, Triforce, Power Star, Triforce Piece db $39, $39, $39 ; Server Request F0, F1, F2 ;7x @@ -296,8 +296,8 @@ RTL db $FD, $FE, $FF, $FC ; Progressive Sword, Shield, Armor & Gloves db $FA, $FB ; RNG Single & Multi db $F8, $F8 ; Progressive Bow - db $00, $00, $00, $00 ; Unused - db $08, $08, $08 ; Goal Item Single, Multi & Alt Multi + db $00, $00, $00 ; Unused + db $08, $08, $02, $08 ; Alt Power Star, Triforce, Power Star, Triforce Piece db $04, $04, $04 ; Server Request F0, F1, F2 db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Free Map From b787b83ea2c5e9743f369d57417fa36e2f5d3a9e Mon Sep 17 00:00:00 2001 From: krelbel Date: Sat, 2 Sep 2023 19:51:47 -0700 Subject: [PATCH 2/3] Fix silver power star item get animation Fix a bug in the previous commit where the silver power star item in newitems.asm:.properties still used the gold power star palette, causing the "item get" animation to incorrectly show a gold power star upon picking up a silver power star. Also updated comments for consistency with gold/silver power star terminology. Tested with a 2-player lttp/hollowknight multiworld verifying standing items look correct in and out of shops and picking up items animates correctly for both gold and silver power stars. The previous commit listed an outdated screenshot (with the colors reversed); the updated screenshot showing this feature is: https://i.imgur.com/iMPxzgw.png New ROM hash after this change: 8719f420b587adac8d3750792d46e5bd --- newitems.asm | 32 +++++++++++++++++--------------- tables.asm | 4 ++-- utilities.asm | 4 ++-- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/newitems.asm b/newitems.asm index 7badca30..555479cc 100755 --- a/newitems.asm +++ b/newitems.asm @@ -29,10 +29,10 @@ ; #$63 - RNG Pool Item (Multi) ; #$64 - Progressive Bow ; #$65 - Progressive Bow -; #$69 - Alt Power Star -; #$6A - Goal Item (Triforce) -; #$6B - Power Star -; #$6C - Goal Item (Triforce Piece) +; #$69 - Gold Power Star +; #$6A - Triforce +; #$6B - Silver Power Star +; #$6C - Triforce Piece ; #$6D - Server Request F0 (Hearts / Powder / Mushroom / Bonkable) ; #$6E - Server Request F1 (NPC) ; #$6F - Server Request F2 (Tablets / Pedestal) @@ -327,12 +327,14 @@ AddReceivedItemExpandedGetItem: BRL .done + CMP.b #$65 : BNE + ; Progressive Bow BRL .done - + CMP.b #$6A : BNE + ; Goal Collectable (Single/Triforce) + + CMP.b #$69 : BNE + ; Gold Power Star + BRA .multi_collect + + CMP.b #$6A : BNE + ; Triforce JSL.l ActivateGoal BRL .done - + CMP.b #$6B : BNE + ; Goal Collectable (Multi/Power Star) + + CMP.b #$6B : BNE + ; Silver Power Star BRA .multi_collect - + CMP.b #$6C : BNE + ; Goal Collectable (Multi/Power Star) Alternate Graphic + + CMP.b #$6C : BNE + ; Triforce Piece .multi_collect REP #$20 LDA GoalItemRequirement : BEQ ++ @@ -623,7 +625,7 @@ AddReceivedItemExpanded: db -4, -4 ; RNG Single & Multi db -4, -4 ; Progressive Bow x2 db -4, -4, -4 ; Unused - db -4, -4, -4, -4 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db -4, -4, -4, -4 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db -4, -4, -4 ; Unused db -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4 ; Free Map db -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4 ; Free Compass @@ -663,7 +665,7 @@ AddReceivedItemExpanded: db 0, 0 ; RNG Single & Multi db 0, 0 ; Progressive Bow x2 db 0, 0, 0 ; Unused - db 0, 0, 0, 0 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db 0, 0, 0, 0 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db 0, 0, 0 ; Unused db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; Free Map db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; Free Compass @@ -705,7 +707,7 @@ AddReceivedItemExpanded: db $FF, $FF ; RNG Single & Multi db $FF, $FF ; Progressive Bow x2 db $FF, $FF, $FF ; Unused - db $4A, $49, $4A, $49; Alt Power Star, Triforce, Power Star, Triforce Piece + db $4A, $49, $4A, $49; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db $FF, $FF, $FF ; Unused db $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21, $21 ; Free Map db $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16, $16 ; Free Compass @@ -751,7 +753,7 @@ AddReceivedItemExpanded: db $02, $02 ; RNG Single & Multi db $02, $02 ; Progressive Bow x2 db $02, $02, $02 ; Unused - db $02, $02, $02, $02 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db $02, $02, $02, $02 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db $02, $02, $02 ; Unused db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02 ; Free Map db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02 ; Free Compass @@ -793,7 +795,7 @@ AddReceivedItemExpanded: db $FF, $FF ; RNG Single & Multi db 0, 0 ; Progressive Bow db 0, 0, 0 ; Unused - db 4, 4, 4, 4 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db 4, 4, 1, 4 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db 0, 0, 0 ; Unused db 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ; Free Map db 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ; Free Compass @@ -835,7 +837,7 @@ AddReceivedItemExpanded: dw $F36A, $F36A ; RNG Single & Multi dw $F340, $F340 ; Progressive Bow x2 dw $F36A, $F36A, $F36A ; Unused - dw $F36A, $F36A, $F36A, $F36A ; Alt Power Star, Triforce, Power Star, Triforce Piece + dw $F36A, $F36A, $F36A, $F36A ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece dw $F36A, $F36A, $F36A ; Unused dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Map dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Compass @@ -879,7 +881,7 @@ AddReceivedItemExpanded: db $FF, $FF ; RNG Single & Multi db $FF, $FF ; Progressive Bow db $FF, $FF, $FF ; Unused - db $FF, $FF, $FF, $FF ; Alt Power Star, Triforce, Power Star, Triforce Piece + db $FF, $FF, $FF, $FF ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db $FF, $FF, $FF ; Unused db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; Free Map db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; Free Compass @@ -965,7 +967,7 @@ Link_ReceiveItemAlternatesExpanded: db -1, -1 ; RNG Single & Multi db -1, -1 ; Progressive Bow db -1, -1, -1 ; Unused - db -1, -1, -1, -1 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db -1, -1, -1, -1 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db -1, -1, -1 ; Unused db -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ; Free Map db -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 ; Free Compass diff --git a/tables.asm b/tables.asm index 5525acbc..66439e55 100644 --- a/tables.asm +++ b/tables.asm @@ -1326,9 +1326,9 @@ db $04 ;64:Progressive Bow ;65:Progressive Bow -;69:Alt Power Star +;69:Gold Power Star ;6A:Goal Item (Triforce) -;6B:Power Star +;6B:Silver Power Star ;6C:Goal Item (Triforce Piece) ;6D:Server Request Item diff --git a/utilities.asm b/utilities.asm index 6928861d..b54531b9 100644 --- a/utilities.asm +++ b/utilities.asm @@ -153,7 +153,7 @@ RTL db $FA, $FB ; RNG Single & Multi db $F8, $F8 ; Progressive Bow x2 db $FF, $FF, $FF ; Unused - db $4A, $49, $4A, $49 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db $4A, $49, $4A, $49 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db $39, $39, $39 ; Server Request F0, F1, F2 ;7x @@ -297,7 +297,7 @@ RTL db $FA, $FB ; RNG Single & Multi db $F8, $F8 ; Progressive Bow db $00, $00, $00 ; Unused - db $08, $08, $02, $08 ; Alt Power Star, Triforce, Power Star, Triforce Piece + db $08, $08, $02, $08 ; Gold Power Star, Triforce, Silver Power Star, Triforce Piece db $04, $04, $04 ; Server Request F0, F1, F2 db $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 ; Free Map From ebe9ea98b9d215a6dbd0d36ef5e0f960ec276019 Mon Sep 17 00:00:00 2001 From: Kappatechy Date: Sun, 25 Feb 2024 17:19:09 -0700 Subject: [PATCH 3/3] Compress code for collection of Power Stars Adding handling for a new item to the ASM was causing that code it to overflow its banks. The code has been tweaked to fit into its allotted space, while still performing the same function. --- newitems.asm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/newitems.asm b/newitems.asm index 555479cc..0c87a596 100755 --- a/newitems.asm +++ b/newitems.asm @@ -327,13 +327,11 @@ AddReceivedItemExpandedGetItem: BRL .done + CMP.b #$65 : BNE + ; Progressive Bow BRL .done - + CMP.b #$69 : BNE + ; Gold Power Star - BRA .multi_collect + + CMP.b #$69 : BEQ .multi_collect ; Gold Power Star + CMP.b #$6A : BNE + ; Triforce JSL.l ActivateGoal BRL .done - + CMP.b #$6B : BNE + ; Silver Power Star - BRA .multi_collect + + CMP.b #$6B : BEQ .multi_collect ; Silver Power Star + CMP.b #$6C : BNE + ; Triforce Piece .multi_collect REP #$20