Add prize pack rarities and item drop bounce properties

This commit is contained in:
scawful
2025-01-19 12:00:23 -05:00
parent 738c949f54
commit 3a4126d487
2 changed files with 107 additions and 458 deletions

View File

@@ -4,42 +4,17 @@
; music.txt, sfx.txt, registers.asm ; music.txt, sfx.txt, registers.asm
; Credit to spannerisms and MathOnNapkins ; Credit to spannerisms and MathOnNapkins
; =========================================================
; ---------------------------------------------------------
; USING THIS SYMBOLS MAP
; ---------------------------------------------------------
; Except for larger blocks of data, every address will be given at least one symbol
; Symbols are each given a unique name with focus on hierarchy by nature of usage
;
; Low bytes may be indicated with an "L" suffix ; Low bytes may be indicated with an "L" suffix
; High bytes are indicated with an "H" suffix ; High bytes are indicated with an "H" suffix
; High bytes that are unused may have a "U" suffix ; High bytes that are unused may have a "U" suffix
;
; Bitfields, full or partial, will name each property with a unique letter
; If multiple bits share a letter, they are part of the same property
; and form a larger number that is only part of the address
; All unused bits are marked with a period (.) and no mention of them is made
;
; Unused addresses will be named "UNUSED_AAAAAA"
; Unused addresses will be grouped together and include a comment:
; "FREE RAM: <size>" to make finding free space easier
; Larger blocks will say "BIG FREE RAM"
;
; For documentation on hardware registers, see «registers.asm»
; For documentation on save game data, see «symbols_sram.asm»
; For documentation on APU addresses, see «symbols_apu.asm»
; =========================================================
; ========================================================= ; =========================================================
; ---------------------------------------------------------
; DIRECT PAGE ; DIRECT PAGE
; ---------------------------------------------------------
; Reminder that direct page is always an address in bank 00. ; Reminder that direct page is always an address in bank 00.
; For ALTTP's mapping and functionality this will always be a mirror of bank 7E page 00 or page 1F. ; this will always be a mirror of bank 7E page 00 or page 1F.
; For the most part, ALTTP leaves the direct page register (D) at $0000. ; For the most part, ALTTP leaves the direct page register (D) at $0000.
; The polyhedral code that draws the triforce and crystals will change this register during IRQ. ; polyhedral code for 3d objects will change this register during IRQ.
; The symbols here mirror page 00 of bank 7E. ; The symbols here mirror page 00 of bank 7E.
; ---------------------------------------------------------
; ========================================================= ; =========================================================
; Any use of these addresses should be considered incredibly volatile. ; Any use of these addresses should be considered incredibly volatile.
@@ -7283,28 +7258,7 @@ SPR_7FFF00 = $7FFF00
; Use of unused SRAM is not recommended for general purpose memory ; Use of unused SRAM is not recommended for general purpose memory
; As it will be kept across game sessions ; As it will be kept across game sessions
; ========================================================= ; =========================================================
; The following ASCII art is included because MathOnNapkins likes it:
; ---------------------------------------------------------
;
; /\/\/\/ ||\\\\ || |||\\ /\ |||||||||||| /\
; /| || || // \\ //\\ || || || //\\
; /| ||\\ || // || // \\ || || || ///\\\
; /| ||// || // || //||||\\ || || || /\ /\
; /| || || // // // \\ || || || //\\ //\\
; /\/\/\/ ||//// ||//// |||// // \\ |||||||||||| ///\\\///\\\
;
; <^^> <^^> **** **** **** **** **** ****
; <<<##^^^^##>>> *** **** *** *** **** *** *** **** ***
; <<############>> ** ** ** ** ** **
; <<############>> ** ** ** ** ** **
; <<##########>> ** ** ** ** ** **
; <<########>> ** ** ** ** ** **
; <<######>> ** ** ** ** ** **
; <<##>> ** ** ** ** ** **
; <<>> **** **** ****
; <> ** ** **
;
; =========================================================
FILE1MAIN = $700000 FILE1MAIN = $700000
FILE2MAIN = $700500 FILE2MAIN = $700500
FILE3MAIN = $700A00 FILE3MAIN = $700A00
@@ -7834,415 +7788,6 @@ OWFLG9D = $7EF31D
OWFLG9E = $7EF31E OWFLG9E = $7EF31E
OWFLG9F = $7EF31F OWFLG9F = $7EF31F
; =========================================================
; Items
; =========================================================
; 0x00 - Nothing
; 0x01 - Bow
; 0x02 - Bow and arrows
; 0x03 - Silver bow
; 0x04 - Silver bow and arrows
; Picking the arrow and nonarrow versions is done by the HUD draw routines
BOW = $7EF340
; 0x00 - Nothing
; 0x01 - Blue boomerang
; 0x02 - Red boomerang
BOOMER = $7EF341
; 0x00 - Nothing
; 0x01 - Hookshot
HOOKSHOT = $7EF342
; Number of bombs
BOMBS = $7EF343
; 0x00 - Nothing
; 0x01 - Mushroom
; 0x02 - Powder
SHROOM = $7EF344
; 0x00 - Nothing
; 0x01 - Fire rod
FIREROD = $7EF345
; 0x00 - Nothing
; 0x01 - Ice rod
ICEROD = $7EF346
; 0x00 - Nothing
; 0x01 - Bombos medallion
BOMBOS = $7EF347
; 0x00 - Nothing
; 0x01 - Ether medallion
ETHER = $7EF348
; 0x00 - Nothing
; 0x01 - Quake medallion
QUAKE = $7EF349
; 0x00 - Nothing
; 0x01 - Lamp
LAMP = $7EF34A
; 0x00 - Nothing
; 0x01 - Magic hammer
HAMMER = $7EF34B
; 0x00 - Nothing
; 0x01 - Shovel
; 0x02 - Inactive flute
; 0x03 - Active flute
FLUTE = $7EF34C
; 0x00 - Nothing
; 0x01 - Bug catching net
BUGNET = $7EF34D
; 0x00 - Nothing
; 0x01 - Book of Mudora
BOOK = $7EF34E
; 0x00 - Nothing
; Other values indicate the index of the currently selected bottle
BOTSEL = $7EF34F
; 0x00 - Nothing
; 0x01 - Cane of Somaria
SOMARIA = $7EF350
; 0x00 - Nothing
; 0x01 - Cane of Byrna
BYRNA = $7EF351
; 0x00 - Nothing
; 0x01 - Magic cape
CAPE = $7EF352
; 0x00 - Nothing
; 0x01 - Letter (works like mirror)
; 0x02 - Mirror
; 0x03 - Deleted triforce item
MIRROR = $7EF353
; 0x00 - Lift 1 (nothing)
; 0x01 - Lift 2 (power glove)
; 0x02 - Lift 3 (titan's mitt)
GLOVES = $7EF354
; 0x00 - Nothing
; 0x01 - Pegasus boots
; bit 2 of $7E:F379 also needs to be set to actually dash
BOOTS = $7EF355
; 0x00 - Nothing
; 0x01 - Zora's flippers
FLIPPERS = $7EF356
; 0x00 - Nothing
; 0x01 - Moon pearl
PEARL = $7EF357
; Appears to be for nothing
UNUSED_7EF358 = $7EF358
; 0x00 - Nothing
; 0x01 - Fighter sword
; 0x02 - Master sword
; 0x03 - Tempered sword
; 0x04 - Golden sword
; 0xFF - Set when sword is handed in to smithy
SWORD = $7EF359
; 0x00 - Nothing
; 0x01 - Fighter shield
; 0x02 - Fire shield
; 0x03 - Mirror shield
SHIELD = $7EF35A
; 0x00 - Green jerkin
; 0x01 - Blue mail
; 0x02 - Red mail
ARMOR = $7EF35B
; 0x00 - Nothing
; 0x01 - Mushroom (unused)
; 0x02 - Empty bottle
; 0x03 - Red potion
; 0x04 - Green potion
; 0x05 - Blue potion
; 0x06 - Fairy
; 0x07 - Bee
; 0x08 - Good bee
BOTTLE1 = $7EF35C
BOTTLE2 = $7EF35D
BOTTLE3 = $7EF35E
BOTTLE4 = $7EF35F
; Number of rupees you have
; RUPEEDISP will be incremented or decremented until it reaches this value
RUPEES = $7EF360
; Rupee count displayed on the HUD
RUPEEDISP = $7EF362
; Bitfields for ownership of various dungeon items
; SET 2 SET 1
; xced aspm wihb tg..
; c - Hyrule Castle
; x - Sewers
; a - Agahnim's Tower
;
; e - Eastern Palace
; d - Desert Palace
; h - Tower of Hera
;
; p - Palace of Darkness
; s - Swamp Palace
; w - Skull Woods
; b - Thieves' Town
; i - Ice Palace
; m - Misery Mire
; t - Turtle Rock
; g - Ganon's Tower
COMPASS1 = $7EF364
COMPASS2 = $7EF365
BIGKEY1 = $7EF366
BIGKEY2 = $7EF367
DNGMAP1 = $7EF368
DNGMAP2 = $7EF369
; Number of rupees donated to fairies
WISHRUP = $7EF36A
; Number of heart pieces towards next container
; Intended to be a value from 0-3
HEARTPC = $7EF36B
; Maximum health; 1 heart container = 0x08 HP
MAXHP = $7EF36C
; Current health
; You die at 0x00
; You also die at ≥0xA8
CURHP = $7EF36D
; Magic power, capped at 128
MAGPOW = $7EF36E
; Current number of keys for whatever dungeon is loaded
KEYS = $7EF36F
; Number of capacity upgrades received
BOMBCAP = $7EF370
ARROWCAP = $7EF371
; Refills health
; Expects multiples of 8
HEALME = $7EF372
; Refills magic
ZAPME = $7EF373
; ... ..gbr
; r - Wisdom (red)
; b - Power (blue)
; g - Courage (green)
PENDANTS = $7EF374
; Refills bombs
BOMBME = $7EF375
; Refills arrows
SHOOTME = $7EF376
; Arrow count
ARROWS = $7EF377
; Unused
UNUSED_7EF378 = $7EF378
; Displays ability flags
; lrtu pbsh
; h - Pray (unused and mostly cut off by HUD borders)
; s - Swim
; b - Run
; u - unused but set by default
; p - Pull
; t - Talk
; r - Read
; 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
; .wbs tipm
; p - Palace of Darkness
; s - Swamp Palace
; w - Skull Woods
; b - Thieves' Town
; i - Ice Palace
; m - Misery Mire
; t - Turtle Rock
Crystals = $7EF37A
; 0x00 - Normal magic
; 0x01 - Half magic
; 0x02 - Quarter magic
; Quarter magic has no special HUD graphic, unlike half magic
; Also, not everything is necessarily quarter magic
MAGCON = $7EF37B
; Keys earned per dungeon
; Sewers and Castle are kept in sync
KEYSSEWER = $7EF37C
KEYSHYRULE = $7EF37D
KEYSEAST = $7EF37E
KEYSDESERT = $7EF37F
KEYSAGA = $7EF380
KEYSSWAMP = $7EF381
KEYSPOD = $7EF382
KEYSMIRE = $7EF383
KEYSWOODS = $7EF384
KEYSICE = $7EF385
KEYSHERA = $7EF386
KEYSTHIEF = $7EF387
KEYSTROCK = $7EF388
KEYSGANON = $7EF389
; Unused block of SRAM
UNUSED_7EF38A = $7EF38A
; Game state
; 0x00 - Very start; progress cannot be saved in this state
; 0x01 - Uncle reached
; 0x02 - Zelda rescued
; 0x03 - Agahnim defeated
GAMESTATE = $7EF3C5
; Bitfield of less important progression
; .fbh .zsu
; u - Uncle visited in secret passage; controls spawn (0: spawn | 1: gone)
; s - Priest visited in sanc after Zelda is kidnapped again
; z - Zelda brought to sanc
; h - Uncle has left Link's house; controls spawn (0: spawn | 1: gone)
; b - Book of Mudora obtained/mentioned; controls Aginah dialog
; f - Flipped by fortune tellers to decide which fortune set to give
PROGLITE = $7EF3C6
; Map icon to guide noob players
; 0x00 - Red X on castle | Save zelda
; 0x01 - Red X on Kakariko | Talk to villagers about elders
; 0x02 - Red X on Eastern | Talk to Sahasrahla
; 0x03 - Pendants and MS | Obtain the master sword
; 0x04 - Master sword on LW | Grab the master sword
; 0x05 - Skull on castle | Kill Agahnim
; 0x06 - Crystal on POD | Get the first crystal
; 0x07 - Crystals | Get all 7 crystals
; 0x08 - Skull on GT | Climb Ganon's Tower
MAPICON = $7EF3C7
; 0x00 - Link's house
; 0x01 - Sanctuary
; 0x02 - Prison
; 0x03 - Uncle
; 0x04 - Throne
; 0x05 - Old man cave
; 0x06 - Old man home
SPAWNPT = $7EF3C8
; Another bitfield for progress
; t.dp s.bh
; t - smiths are currently tempering sword
; d - swordsmith rescued
; p - purple chest has been opened
; s - stumpy has been stumped
; b - bottle purchased from vendor
; h - bottle received from hobo
PROGLITE2 = $7EF3C9
; .d.. ....
; d - World (0: Light World | 1: Dark World)
SAVEWORLD = $7EF3CA
; Not used
UNUSED_7EF3CB = $7EF3CB
; Current follower ID
FOLLOWER = $7EF3CC
; Cache of follower properties
FOLLOWCYL = $7EF3CD
FOLLOWCYH = $7EF3CE
FOLLOWCXL = $7EF3CF
FOLLOWCXH = $7EF3D0
; Copies INDOORS
FOLLOWERINOUT = $7EF3D1
; Copies LAYER
FOLLOWERCLAYER = $7EF3D2
; Indicates the follower is currently following
; 0x00 - Following
; 0x80 - Not following
FOLLOWERING = $7EF3D3
; Unused
UNUSED_7EF3D4 = $7EF3D4
UNUSED_7EF3D5 = $7EF3D5
UNUSED_7EF3D6 = $7EF3D6
UNUSED_7EF3D7 = $7EF3D7
UNUSED_7EF3D8 = $7EF3D8
; Player name
NAME1L = $7EF3D9
NAME1H = $7EF3DA
NAME2L = $7EF3DB
NAME2H = $7EF3DC
NAME3L = $7EF3DD
NAME3H = $7EF3DE
NAME4L = $7EF3DF
NAME4H = $7EF3E0
; Save file checksum; expected to be $55AA
SCHKSML = $7EF3E1
SCHKSMH = $7EF3E2
; Games played in each dungeon
GPSEWER = $7EF3E3
GPHYRULE = $7EF3E5
GPEAST = $7EF3E7
GPDESERT = $7EF3E9
GPAGA = $7EF3EB
GPSWAMP = $7EF3ED
GPPOD = $7EF3EF
GPMIRE = $7EF3F1
GPWOODS = $7EF3F3
GPICE = $7EF3F5
GPHERA = $7EF3F7
GPTHIEF = $7EF3F9
GPTROCK = $7EF3FB
GPGANON = $7EF3FD
; Games played for current segment
GPNOW = $7EF3FF
; Total games played
; No display on file select if 0xFFFF
GAMESPLAYED = $7EF401
; Big unused block
UNUSED_7EF403 = $7EF403
DEATHS_MAXED = $7EF405
; Inverse checksum for save file
SAVEICKSML = $7EF4FE
SAVEICKSMH = $7EF4FF
; ========================================================= ; =========================================================
; Music ; Music

View File

@@ -309,3 +309,107 @@ db $1A, $0A, $00, $00 ; 0x25 Dragon Ship
db $00, $00, $03, $02 ; 0x26 db $00, $00, $03, $02 ; 0x26
db $0E, $00, $03, $07 ; 0x27 db $0E, $00, $03, $07 ; 0x27
db $1A, $05, $05, $0B ; 0x28 Dragon Ship db $1A, $05, $05, $0B ; 0x28 Dragon Ship
PrizePackRarities:
{
db $01 ; pack 1 : 50%
db $01 ; pack 2 : 50%
db $01 ; pack 3 : 50%
db $00 ; pack 4 : 100%
db $01 ; pack 5 : 50%
db $01 ; pack 6 : 50%
db $01 ; pack 7 : 50%
db $00 ; pack 8 : 100% - doesn't exist
}
ItemDropBounceProps:
{
db $24 ; GREEN RUPEE
db $24 ; BLUE RUPEE
db $24 ; RED RUPEE
db $20 ; BOMB REFILL 1
db $20 ; BOMB REFILL 4
db $20 ; BOMB REFILL 8
db $24 ; SMALL MAGIC DECANTER
db $24 ; LARGE MAGIC DECANTER
db $24 ; ARROW REFILL 5
db $24 ; ARROW REFILL 10
db $00 ; FAIRY
db $24 ; SMALL KEY
db $20 ; BIG KEY
db $20 ; STOLEN SHIELD
}
PrizePackPrizes:
{
.pack_1
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D9 ; SPRITE D9 - green rupee
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D9 ; SPRITE D9 - green rupee
.pack_2
db $DA ; SPRITE DA - blue rupee
db $D9 ; SPRITE D9 - green rupee
db $DA ; SPRITE DA - blue rupee
db $DB ; SPRITE DB - red rupee
db $DA ; SPRITE DA - blue rupee
db $D9 ; SPRITE D9 - green rupee
db $DA ; SPRITE DA - blue rupee
db $DA ; SPRITE DA - blue rupee
.pack_3
db $E0 ; SPRITE E0 - full magic
db $DF ; SPRITE DF - small magic
db $DF ; SPRITE DF - small magic
db $DA ; SPRITE DA - blue rupee
db $E0 ; SPRITE E0 - full magic
db $DF ; SPRITE DF - small magic
db $D8 ; SPRITE D8 - heart
db $DF ; SPRITE DF - small magic
.pack_4
db $DC ; SPRITE DC - 1 bomb
db $DC ; SPRITE DC - 1 bomb
db $DC ; SPRITE DC - 1 bomb
db $DD ; SPRITE DD - 4 bombs
db $DC ; SPRITE DC - 1 bomb
db $DC ; SPRITE DC - 1 bomb
db $DE ; SPRITE DE - 8 bombs
db $DC ; SPRITE DC - 1 bomb
.pack_5
db $E1 ; SPRITE E1 - 5 arrows
db $D8 ; SPRITE D8 - heart
db $E1 ; SPRITE E1 - 5 arrows
db $E2 ; SPRITE E2 - 10 arrows
db $E1 ; SPRITE E1 - 5 arrows
db $D8 ; SPRITE D8 - heart
db $E1 ; SPRITE E1 - 5 arrows
db $E2 ; SPRITE E2 - 10 arrows
.pack_6
db $DF ; SPRITE DF - small magic
db $D9 ; SPRITE D9 - green rupee
db $D8 ; SPRITE D8 - heart
db $E1 ; SPRITE E1 - 5 arrows
db $DF ; SPRITE DF - small magic
db $DC ; SPRITE DC - 1 bomb
db $D9 ; SPRITE D9 - green rupee
db $D8 ; SPRITE D8 - heart
.pack_7
db $D8 ; SPRITE D8 - heart
db $E3 ; SPRITE E3 - fairy
db $E0 ; SPRITE E0 - full magic
db $DB ; SPRITE DB - red rupee
db $DE ; SPRITE DE - 8 bombs
db $D8 ; SPRITE D8 - heart
db $DB ; SPRITE DB - red rupee
db $E2 ; SPRITE E2 - 10 arrows
}