Claim set · data/claims/alttp.yaml

The Legend of Zelda: A Link to the Past (kan's US disassembly)

Game: The Legend of Zelda: A Link to the Past.

A monster's bump damage class (0–9) and Link's mail (green, blue, or red) pick the damage of a touch from a 10 × 3 table, in eighths of a heart. Class 3 takes 8, 4, or 2; class 9 takes 64, 48, or 24; class 1 takes 4 whatever the mail. alttp/bump-damage

About: The Legend of Zelda: A Link to the Past Damage formula

Value
{
 "class0": [
  2,
  1,
  1
 ],
 "class1": [
  4,
  4,
  4
 ],
 "class2": [
  0,
  0,
  0
 ],
 "class3": [
  8,
  4,
  2
 ],
 "class4": [
  8,
  8,
  8
 ],
 "class5": [
  16,
  8,
  4
 ],
 "class6": [
  32,
  16,
  8
 ],
 "class7": [
  32,
  24,
  16
 ],
 "class8": [
  24,
  16,
  8
 ],
 "class9": [
  64,
  48,
  24
 ]
}
Codeusdasm: A Link to the Past US Disassembly · bank_06.asm#L22729-L22740LDA.w $0CD2,X … AND.b #$0F … ASL A … ADC.b $00 … ADC.l $7EF35B … LDA.w BumpDamageGroups,Y … STA.w $0373usdasm: A Link to the Past US Disassembly · bank_06.asm#L22775-L22785BumpDamageGroups: |06F427| db $02, $01, $01 ; 0x00 |06F42A| db $04, $04, $04 ; 0x01 … |06F430| db $08, $04, $02 ; 0x03 … |06F442| db $40, $30, $18 ; 0x09Checked by claude-agent, 2026-10-21 — read AttemptDamageToLinkPlusRecoil: the class nibble times 3 plus the mail byte $7EF35B indexes BumpDamageGroups, and the result goes to the pending damage $0373

A heart is 8 units (heart-container). LinkControlHandler subtracts the pending damage from the life byte $7EF36D (bank_07.asm L158-L166).

Cited by: The Legend of Zelda: A Link to the Past

A monster's touch does nothing while Link's blink timer is above 0. A hit sets it to 58, and Link's sprite routine counts it down once a frame, so the protection lasts 58 frames. alttp/hurt-iframes

About: The Legend of Zelda: A Link to the Past Invincibility frames

Value: 58 frames

Codeusdasm: A Link to the Past US Disassembly · bank_06.asm#L22715-L22718#AttemptDamageToLinkPlusRecoil: |06F3DB| LDA.w $031F |06F3DE| ORA.w $037B |06F3E1| BNE .no_damageusdasm: A Link to the Past US Disassembly · bank_07.asm#L146-L150|0780B4| LDA.w $031F |0780B7| BNE .have_iframes … |0780B9| LDA.b #$3A |0780BB| STA.w $031Fusdasm: A Link to the Past US Disassembly · bank_0D.asm#L4530-L4537|0DAA46| LDA.b $11 |0DAA48| BNE .check_stair_visibility … |0DAA4A| LDA.w $031F |0DAA4D| BEQ .check_stair_visibility … |0DAA4F| DEC A |0DAA50| STA.w $031FChecked by claude-agent, 2026-10-21 — read the guard in AttemptDamageToLinkPlusRecoil, the store in LinkControlHandler, and the decrement in Link's OAM routine, which runs only while submodule $11 is 0

The same routine then hides Link on even values of 4 and above (L4539-L4543), the blink.

Cited by: The Legend of Zelda: A Link to the Past

A monster's touch sets Link's speed to 24 on the longer axis of the line from the monster to Link, the other axis in proportion, with a hop of vertical speed 12. It also sets a timer to 19 and Link's recoil flag. While the flag is set, his state handler runs the recoil state instead of the code that reads the buttons, and that state counts the timer down each frame, holding it at 1 until Link lands, so the recoil lasts at least 19 frames. alttp/recoil

About: The Legend of Zelda: A Link to the Past Knockback

Value
{
 "speed": 24,
 "hop": 12,
 "frames": 19
}
Codeusdasm: A Link to the Past US Disassembly · bank_06.asm#L22720-L22727|06F3E3| LDA.b #$13 |06F3E5| STA.b $46 … |06F3E7| LDA.b #$18 |06F3E9| JSR ApplyRecoilToLink … |06F3EC| LDA.b #$01 |06F3EE| STA.b $4Dusdasm: A Link to the Past US Disassembly · bank_06.asm#L23385-L23399ApplyRecoilToLink: |06F688| PHA … JSR ProjectSpriteSpeedTowardsLink … STA.b $27 … STA.b $28 … |06F695| LSR A |06F696| STA.b $29usdasm: A Link to the Past US Disassembly · bank_06.asm#L20385-L20492ProjectSpriteSpeedTowardsLink: … JSR GetYDisplacementFromLink … JSR GetXDisplacementFromLink … .x_is_bigger … .next |06E9CC| LDA.b $0B |06E9CE| CLC |06E9CF| ADC.b $0C |06E9D1| CMP.b $0D … |06E9DB| DEX |06E9DC| BNE .nextusdasm: A Link to the Past US Disassembly · bank_07.asm#L239-L323|07812C| LDA.b $4D |07812E| BEQ .not_recoiling … |078199| LDA.b #$02 ; LINKSTATE 02 |07819B| STA.b $5D |07819D| BRL LinkState_Recoilusdasm: A Link to the Past US Disassembly · bank_07.asm#L1450-L1478HandleRecoilAndTimer: … |07871A| DEC.b $46 |07871C| LDA.b $46 |07871E| BEQ .delay … .delay |078723| INC A |078724| STA.b $46 |078726| LDA.b $24 … .no_height |07872E| LDA.b $29 |078730| BPL .airborneChecked by claude-agent, 2026-10-21 — read AttemptDamageToLinkPlusRecoil; ApplyRecoilToLink, which stores the projection in Link's speeds $27/$28 and half of 24 in his Z speed $29; ProjectSpriteSpeedTowardsLink, which gives the larger displacement axis the full speed and the other a share by a stepped division, signed by the displacement; LinkState_Default's branch on $4D; and LinkState_Recoil's timer handling

The vector is the one sprites use to move toward Link, so applied to Link it carries him away from the monster. How the recoil state moves him each frame (HandleLinkRecoilVelocity) wasn't read, so whether the speed holds isn't shown.

Cited by: The Legend of Zelda: A Link to the Past

Each Piece of Heart adds 1 to a count kept modulo 4; the piece that brings it back to 0 grants item $26, a heart container. alttp/heart-pieces

About: The Legend of Zelda: A Link to the Past Health upgrade

Value: 4

Codeusdasm: A Link to the Past US Disassembly · bank_05.asm#L20390-L20402|05F08A| LDA.l $7EF36B |05F08E| INC A |05F08F| AND.b #$03 |05F091| STA.l $7EF36B |05F095| BNE .not_full_set … |05F09C| LDY.b #$26 ; ITEMGET 26Checked by claude-agent, 2026-10-21 — read the Piece of Heart sprite's contact branch

Cited by: Health upgrade, The Legend of Zelda: A Link to the Past

A heart container adds 8 to Link's life capacity, one heart, up to $A0, 20 hearts. The one from four pieces refills his life to the new capacity; the one a boss leaves adds a single heart of life. alttp/heart-container

About: The Legend of Zelda: A Link to the Past Health upgrade

Value
{
 "perContainer": 8,
 "max": 160
}
Codeusdasm: A Link to the Past US Disassembly · bank_08.asm#L13496-L13544|08C45A| CMP.b #$26 ; ITEMGET 26 |08C45C| BEQ .refill_hp … |08C462| CMP.b #$3E ; ITEMGET 3E … |08C46D| CMP.b #$A0 … |08C472| ADC.b #$08 |08C474| STA.l $7EF36C … |08C47D| ADC.b #$08 |08C47F| STA.l $7EF372 … .refill_hp … |08C49B| SBC.b $00 |08C49D| STA.b $00 … |08C4A4| ADC.b $00 |08C4A6| STA.l $7EF372usdasm: A Link to the Past US Disassembly · bank_08.asm#L13233-L13297|08C2DD| dw $FFFF ; FIGHTER SWORD … |08C329| dw $0158 ; HEART CONTAINER FROM 4/4 - MESSAGE 0158 … |08C359| dw $FFFF ; BOSS HC |08C35B| dw $0159 ; SANC HCChecked by claude-agent, 2026-10-21 — read the item receipt's heart branch: $3E adds 8 to capacity $7EF36C and 8 to the refill counter $7EF372; $26 and $3F add 8 to capacity and capacity minus current life to the refill. The message table, two bytes per item from $08C2DD, names $26, $3E, and $3F

Item $3F, the Sanctuary's container, refills like the one from four pieces.

Cited by: Health upgrade, The Legend of Zelda: A Link to the Past

A Link to the Past fires the sword beam only with the Master Sword or better and less than half a heart missing; The Legend of Zelda fired it with up to half a heart missing and any sword. alttp/sword-beam

About: The Legend of Zelda: A Link to the Past Sword beam

Codeusdasm: A Link to the Past US Disassembly · bank_07.asm#L5895-L5908|079C70| LDA.l $7EF36C |079C74| SEC |079C75| SBC.b #$04 |079C77| CMP.l $7EF36D |079C7B| BCS .no_make_beam … |079C86| LDA.l $7EF359 |079C8A| CMP.b #$02 |079C8C| BCC .no_make_beamzelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_07.asm#L4632-L4648; If full hearts <> (heart containers - 1), return. … ; If partial heart is less than half full, return. LDA HeartPartial CMP #$80 BCC L1F854_ExitLegend of Zelda, The (USA) (Rev 1) · 0x1F86A-0x1F88C — bank 7 MakeSwordShot in Rev 1Checked by claude-agent, 2026-10-21 — read HandleSwordSFXAndBeam (capacity − 4 must be below current life; sword $7EF359 at least 2) and Zelda 1's MakeSwordShot, which checks hearts but not the sword

The check between (L5901-L5904) also turns away a sword byte of $FF. Only one beam flies at a time (L5912-L5920).

Cited by: Sword beam, The Legend of Zelda: A Link to the Past

Each magic item's cost comes from a table with three columns, and one byte, $7EF37B, picks the column for every item. The rods cost 16, 8, or 4; the medallions 32, 16, or 8; the powder 8, 4, or 2; the lamp 4, 2, or 2. alttp/magic-costs

About: The Legend of Zelda: A Link to the Past Magic meter

Value
{
 "rod": [
  16,
  8,
  4
 ],
 "medallion": [
  32,
  16,
  8
 ],
 "powder": [
  8,
  4,
  2
 ],
 "lamp": [
  4,
  2,
  2
 ],
 "byrna": [
  16,
  8,
  4
 ]
}
Codeusdasm: A Link to the Past US Disassembly · bank_07.asm#L9964-L9975ItemMagicCost: … |07B087| db $10, $08, $04 ; rod |07B08A| db $20, $10, $08 ; medallion |07B08D| db $08, $04, $02 ; powder … |07B099| db $04, $02, $02 ; lampusdasm: A Link to the Past US Disassembly · bank_07.asm#L9990-L10007CheckMagicCost: … |07B0AD| LDA.w ItemMagicCost.offset,X |07B0B0| CLC |07B0B1| ADC.l $7EF37B … |07B0B6| LDA.w ItemMagicCost.cost,X … |07B0BB| LDA.l $7EF36EChecked by claude-agent, 2026-10-21 — read CheckMagicCost: the item's offset plus the consumption level $7EF37B indexes the cost table, which is subtracted from the magic byte $7EF36E

The labels rod, medallion, powder, lamp, and byrna are the disassembly's.

Cited by: Magic meter, The Legend of Zelda: A Link to the Past

A defeated monster's prize pack (1–7) gives a drop half the time, and pack 4 always. Each pack keeps its own counter that steps through 8 prizes in order; pack 1's row is heart, heart, heart, heart, green rupee, heart, heart, green rupee. alttp/prize-packs

About: The Legend of Zelda: A Link to the Past Item drop table

Value
{
 "packs": 7,
 "cycle": 8,
 "rarityMask": [
  1,
  1,
  1,
  0,
  1,
  1,
  1
 ]
}
Codeusdasm: A Link to the Past US Disassembly · bank_06.asm#L24107-L24162|06F9B2| JSL GetRandomNumber |06F9B6| PLY |06F9B7| AND.w PrizePackRarities,Y |06F9BA| BNE .you_dont_get_a_drop … |06F9C0| ORA.w $0FC7,Y … |06F9C4| LDA.w $0FC7,Y |06F9C7| INC A |06F9C8| AND.b #$07 |06F9CA| STA.w $0FC7,Y … |06F9CE| LDA.w PrizePackPrizes,Yusdasm: A Link to the Past US Disassembly · bank_06.asm#L24275-L24283|06FA5C| db $01 ; pack 1 : 50% … |06FA5F| db $00 ; pack 4 : 100%usdasm: A Link to the Past US Disassembly · bank_06.asm#L24305-L24315.pack_1 |06FA72| db $D8 ; SPRITE D8 - heart … |06FA76| db $D9 ; SPRITE D9 - green rupeeChecked by claude-agent, 2026-10-21 — read the drop branch after .no_forced_drop: the pack nibble less 1, a random byte ANDed with the pack's mask, then pack × 8 ORed with that pack's counter $0FC7,Y, which steps modulo 8

A luck setting ($0CF9) overrides the chance until 10 kills (L24115-L24130), and some monsters force a key or rupee drop (L24085-L24103); neither was followed further.

Cited by: Item drop table, The Legend of Zelda: A Link to the Past, The Legend of Zelda: Oracle of Seasons and Oracle of Ages

Each dungeon keeps its own small-key count. Loading a dungeon copies its count from a per-dungeon array into the current count, SaveDungeonKeys copies it back, and the overworld sets the current count to $FF. The Sewers and Hyrule Castle share one slot. alttp/dungeon-keys

About: The Legend of Zelda: A Link to the Past Keys and locked doors

Codeusdasm: A Link to the Past US Disassembly · bank_02.asm#L388-L398CMP.b #$02 ; DUNGEON 02 … LDA.b #$00 ; DUNGEON 00 … |02825A| LSR A |02825B| TAX |02825C| LDA.l $7EF37C,Xusdasm: A Link to the Past US Disassembly · bank_02.asm#L6638-L6648|02A1D4| LSR A |02A1D5| TAX |02A1D6| LDA.l $7EF36F |02A1DA| STA.l $7EF37C,Xusdasm: A Link to the Past US Disassembly · bank_02.asm#L666-L667|0283E4| LDA.b #$FF |0283E6| STA.l $7EF36Fusdasm: A Link to the Past US Disassembly · bank_00.asm#L4154-L4156BitMasks: |0098C0| dw $8000 ; Sewers |0098C2| dw $4000 ; Hyrule Castleusdasm: A Link to the Past US Disassembly · bank_0D.asm#L17099-L17100RebuildHUD_Keys: |0DFA68| STA.l $7EF36FChecked by claude-agent, 2026-10-21 — read the dungeon load and save paths in bank 2 and the overworld load; dungeon IDs step by 2, so LSR gives the slot, and dungeon 2 is mapped to 0

The load is in Module06_UnderworldLoad, which passes the count to RebuildHUD_Keys to store; the save in SaveDungeonKeys, and the $FF in Module08_OverworldLoad. The per-dungeon tables list the Sewers as dungeon 0 and Hyrule Castle as dungeon 2, two bytes apart.

Cited by: Keys and locked doors, The Legend of Zelda: A Link to the Past