data/claims/zelda.yamlThe Legend of Zelda (aldonunez's disassembly and the Rev 1 ROM)
Game: The Legend of Zelda.
Wikidata lists Nintendo and Nintendo Entertainment Analysis & Development as the developers of The Legend of Zelda and Nintendo as its publisher; it dates the game 21 February 1986, with no place or platform, and its NES release in North America 22 August 1987. zelda/release
Q12395, P178 developer, P123 publisher, and P577 publication date qualified by P291 place and P400 platform — read through the Query Service on 2026-10-20; the 1986 date carries no qualifiers, and Europe has 15 November 1987+1986-02-21T00:00:00Z … +1987-11-15T00:00:00Z … +1987-08-22T00:00:00ZCited by: Invincibility frames, The Legend of Zelda
The PRG0 source of aldonunez's disassembly differs from Rev 1 in the music engine, in bank 5's continue screen and room code, which Rev 1 moves, in bank 7's calls into that code, and in the header checksum; the combat code in banks 1 and 7 and the drop code in bank 4 are byte-identical. zelda/rev1
0x76A6-0x7760 — bank 1 BeginShove, run from RAM at $7E26, one of the routines identical in bothzelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_07.asm#L6016-L6018; Unknown block
.BYTE $5A, $45, $4C, $44, $41, $D7, $C8, $00
.BYTE $00, $38, $04, $01, $04, $01, $BEChecked by claude-agent, 2026-10-20 — assembled src/*.asm with ca65 and ld65 (cc65 built from source), with the binary data the build script extracts taken from Rev 1, and compared the 128 KB PRG to Rev 1's: 3,646 bytes differ in 35 runs, all in bank 0's sound code, bank 5 from $834A to $B464, bank 6's text buffers, 13 bytes in bank 7 that are each the low byte of an address in bank 5, and the checksum after "ZELDA" at $FFF0-$FFF1 (Rev 1 reads $E0 $76); no byte of bank 1, 2, 3, or 4 differsEvery claim in this set that cites bank 1, 2, 4, or 7 code was checked against Rev 1's bytes at the same offsets. The data extracted from Rev 1 shifts where Rev 1 moved it, so some bank 6 runs are an artifact of the build.
Cited by: The Legend of Zelda
An object's type indexes UpdateObject_JumpTable, whose routines name the monsters: Lynel $01, Moblin $03–$04, Goriya $05–$06, Octorok $07–$0A, Darknut $0B–$0C, Tektite $0D–$0E, Leever $0F–$10, Vire $12, Zol $13, Gel $14–$15, Pols Voice $16, Like Like $17, Keese $1B–$1D, Ghini $21–$22, Wizzrobe $23–$24, Wallmaster $27, Rope $28, Stalfos $2A, Gibdo $30, and Ganon $3E. zelda/object-types
src/Z_07.asm#L5321-L5384 .ADDR DoNothing
.ADDR UpdateLynel
.ADDR UpdateLynel
.ADDR UpdateMoblin
.ADDR UpdateMoblin
…
.ADDR UpdateOctorock
.ADDR UpdateOctorock
.ADDR UpdateOctorock
.ADDR UpdateOctorock
…
.ADDR UpdateGel
…Legend of Zelda, The (USA) (Rev 1) · 0x1FBC4-0x1FC97 — bank 7 $FBB4, the jump tableChecked by claude-agent, 2026-10-20 — counted the table's .ADDR lines from type $00The page names monster types by these routines. The routines' names are the disassembler's, from the game's monsters.
Cited by: The Legend of Zelda
Link's health is HeartValues, whose high nibble is the heart containers less one and whose low nibble is the full hearts, plus a partial heart in HeartPartial from $00 to $FF; a new file starts at $22 and $FF, three containers and three hearts. zelda/hearts-format
About: The Legend of Zelda Damage formula
Value: 3 hearts
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_02.asm#L1667-L1672 ; Initialize file B hearts value to 3 heart containers and 2 hearts.
LDY #$18
LDA #$22
STA ($C0), Y
INY ; Initialize file B heart partial to full.
LDA #$FFzelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L4681-L4691CompareHeartsToContainers:
LDA HeartValues
…
AND #$0F
…
LSR
…
CMP $00Legend of Zelda, The (USA) (Rev 1) · 0x9F00-0x9FD4 — bank 2 $9EF0, UpdateModeERegister, which writes the new fileChecked by claude-agent, 2026-10-20 — read the new-file initialization and CompareHeartsToContainersTwo full hearts and a full partial heart show as three hearts, so the comment's "2 hearts" counts the low nibble only.
Cited by: Health upgrade, The Legend of Zelda
A monster's contact damage comes from ObjTypeToDamagePoints, one byte per object type, whose low nibble is whole hearts and whose high nibble is sixteenths of a heart; of its 93 entries, 30 are half a heart, 24 one heart, 18 two hearts, and 3 four hearts. zelda/contact-damage
About: The Legend of Zelda Damage formula
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L5574-L5586ObjTypeToDamagePoints:
.BYTE $60, $02, $01, $80, $80, $01, $80, $80
.BYTE $80, $80, $80, $01, $02, $80, $80, $01zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L5725-L5735 ; Unpack the damage points for the monster's type.
; The low nibble is the high byte.
; (Damage points byte AND $F0) is the low byte.
LDY ObjType, X
LDA ObjTypeToDamagePoints, Y
PHA
AND #$0F
STA $0D
PLA
AND #$F0
STA $0ELegend of Zelda, The (USA) (Rev 1) · 0x72CA-0x7326 — bank 1, the table, run from RAM at $7A4AChecked by claude, 2026-10-25 — read HarmLink's unpacking (L5725-L5735: the low nibble to [0D], the damage's high byte, and the byte AND $F0 to [0E], its low byte) and tallied the 93 table bytesThe four-heart entries are type $3E (UpdateGanon) and two monster shots, $59 and $5A. The Octoroks, $07–$0A, take half a heart. Seventeen entries are 0, among them the Bubbles ($2B–$2D) and the whirlwind ($2E).
Cited by: The Legend of Zelda
Each level of ring halves the damage before it is subtracted, so the first ring takes half and the second a quarter. zelda/ring
About: The Legend of Zelda Damage formula
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L5750-L5757 ; For every level of ring (1 or 2), divide the 16-bit damage amount in [0E:0D] by 2.
LDY InvRing
BEQ @ResetHelp
:
LSR $0D
ROR $0E
DEY
BNE :-Legend of Zelda, The (USA) (Rev 1) · 0x7327-0x7441 — bank 1 CheckLinkCollision through Link_BeHarmed, run from RAM at $7AA7Checked by claude-agent, 2026-10-20 — read Link_BeHarmedCited by: The Legend of Zelda
When the partial heart can't cover the damage, the game takes a full heart and refills the partial heart to $FF rather than $100, so each such borrow costs Link an extra 1/256 of a heart. zelda/borrow
About: The Legend of Zelda Damage formula
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L5789-L5805@BorrowHeart:
; This isn't a simple case of borrowing. For example, supposing:
; full heart=4 partial heart=$70
; The straightforward way to subtract $80 would yield $3F0.
; But the method here yields $3EF, because partial heart is
; considered full when = $FF instead of $100.
…
DEC HeartValues
LDA #$FF
STA HeartPartialLegend of Zelda, The (USA) (Rev 1) · 0x7327-0x7441 — bank 1, as in ringChecked by claude-agent, 2026-10-20 — read @BorrowHeart and the subtraction it loops back toLink dies when a hit needs a borrow and no full heart is left, so three hearts take six half-heart hits either way.
Cited by: The Legend of Zelda
Whenever Link is hurt, the game zeroes WorldKillCount, HelpDropCount, and HelpDropValue, the counters behind the fairy and the 10th-kill drops. zelda/hurt-resets-drops
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L5759-L5764@ResetHelp:
; Reset values used in special item drops.
LDA #$00
STA WorldKillCount
STA HelpDropCount
STA HelpDropValueLegend of Zelda, The (USA) (Rev 1) · 0x7327-0x7441 — bank 1, as in ringChecked by claude-agent, 2026-10-20 — read Link_BeHarmedCited by: Item drop table, The Legend of Zelda
A monster that touches Link while his invincibility timer is above 0 does nothing; a hit sets the timer to 24 and his shove distance to 32 px. zelda/link-invincibility
About: The Legend of Zelda Invincibility frames
Value: 24
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L5610-L5617 ; If Link is invincible, or we have the magic clock,
; or Link is stunned, or the monster is stunned;
; then return no collision.
LDA ObjInvincibilityTimer
ORA InvClock
ORA ObjStunTimer
ORA ObjStunTimer, X
BNE L73A9_Exitzelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L6589-L6605 ; If Link is invincible, return without shoving.
LDA ObjInvincibilityTimer
BNE @Exit
…
; Mark Link invincible $18 frames, and should move $20 pixels.
LDA #$18
STA ObjInvincibilityTimer
LDA #$20
STA ObjShoveDistanceLegend of Zelda, The (USA) (Rev 1) · 0x76A6-0x7760 — bank 1 BeginShove, run from RAM at $7E26Checked by claude-agent, 2026-10-20 — read CheckLinkCollision's guard and BeginShove's Link branchThe comment counts the timer in frames, but the timer drops only on every other frame (timer-rate), so $18 lasts 48 frames.
Cited by: Invincibility frames, Knockback, The Legend of Zelda
DecrementInvincibilityTimer lowers an object's invincibility timer by 1 only on frames when FrameCounter is even, so a timer of lasts frames. zelda/timer-rate
About: The Legend of Zelda Invincibility frames
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_07.asm#L5782-L5788DecrementInvincibilityTimer:
LDA ObjInvincibilityTimer, X
BEQ @Exit ; If the timer is already zero, then return.
LDA FrameCounter ; Every two frames, decrease the timer.
LSR
BCS @Exit
DEC ObjInvincibilityTimer, XLegend of Zelda, The (USA) (Rev 1) · 0x1FEA8-0x1FEB5 — bank 7 $FE98Checked by claude-agent, 2026-10-20 — read the routine and its calls from UpdatePlayer and the object loopCited by: Invincibility frames, The Legend of Zelda
While Link holds the clock, BeginUpdateWorld adds 16 to his invincibility timer every frame, and monsters' contact checks return no collision. zelda/clock
About: The Legend of Zelda Invincibility frames
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_07.asm#L1876-L1884BeginUpdateWorld:
; If we have the clock, then
; force the player's invincibility.
LDA InvClock
BEQ @NotInvincible
LDA ObjInvincibilityTimer
CLC
ADC #$10
STA ObjInvincibilityTimerLegend of Zelda, The (USA) (Rev 1) · 0x1EC8A-0x1EC97 — bank 7 $EC7A, these lines only; BeginUpdateWorld differs in Rev 1 further onChecked by claude-agent, 2026-10-20 — read BeginUpdateWorld's first lines and CheckLinkCollision's guard (link-invincibility)Cited by: Invincibility frames, The Legend of Zelda
Measured in Rev 1, a Tektite held against Link hurts him every 47 or 48 frames, taking half a heart each time; from three hearts, five hits leave $20 and $7D, 3/256 of a heart under a half heart. zelda/hit-measured
About: The Legend of Zelda Invincibility frames
Value
{
"probe": {
"gaps": [
47,
48,
48,
48
],
"hearts": [
"22/7F",
"21/FE",
"21/7E",
"20/FD",
"20/7D"
]
}
}0x7327-0x7441 — bank 1, the contact check and damage the probe exerciseszelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L5600-L5822 — CheckLinkCollision through Link_BeHarmedLDA HeartPartial
CMP $0E
BCC @BorrowHeart
SEC
SBC $0E
STA HeartPartial
…
DEC HeartValues
LDA #$FF
STA HeartPartialChecked by claude-agent, 2026-10-25 — Read CheckLinkCollision through Link_BeHarmed (Z_01.asm L5600-5822) at the pinned commit: the damage comes off HeartPartial, and a borrow takes a full heart and refills the partial to $FF rather than $100; the hit gaps and the hearts after five hits are the probe's measurement in Rev 1.Probe: probes/zelda-metroid/zelda.mjsThe gap is 47 or 48 frames because the timer counts down on even frames only, so a hit's parity decides whether its first decrement comes 1 or 2 frames later. The timer reaches 0 before the monsters' contact checks run, so the next hit lands on that frame.
Cited by: Invincibility frames, The Legend of Zelda
A shoved object moves 4 px a frame, 1 px of shove distance at a time, and the shove ends early when the object reaches the room's edge or, aligned to the grid, an unwalkable tile. zelda/shove-move
About: The Legend of Zelda Knockback
Value: 4 px/frame
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_07.asm#L2397-L2420ShoveMoveMin:
; Try to move 4 pixels. [03] is the counter.
LDA #$04
STA $03
…
JSR GetCollidingTileMoving
CMP ObjectFirstUnwalkableTile
BCS ResetShoveInfo
…
; Regardless of the grid offset, if the object runs into the
; bounds of the room, then stop shoving.zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_07.asm#L2450-L2452 ; We're OK to change the position. So, decrease the distance
; that's left to move.
DEC ObjShoveDistance, XLegend of Zelda, The (USA) (Rev 1) · 0x1EEC8-0x1EFDF — bank 7 Obj_Shove and ShoveMoveMin, $EEB8Checked by claude-agent, 2026-10-20 — read ShoveMoveMin's pixel loop to the end of Obj_ShoveCited by: Knockback, The Legend of Zelda
Walker_Move moves a walking object by its shove whenever one is set, in place of its walking, so Link can't steer during a shove. zelda/shove-replaces-walking
About: The Legend of Zelda Knockback
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_07.asm#L2600-L2604Walker_Move:
; If the object is being shoved, then go shove it.
LDA ObjShoveDir, X
BEQ @ChooseObjDirOrInputDir
JMP Obj_ShoveLegend of Zelda, The (USA) (Rev 1) · 0x1EFE0-0x1EFE6 — bank 7 $EFD0Checked by claude-agent, 2026-10-20 — read Walker_Move and UpdatePlayer's call of it after Link_HandleInputCited by: Knockback, The Legend of Zelda
When a monster hits Link, the shove points away from the monster along one axis: the horizontal one when Link is between grid squares and faces left or right, the vertical one when he is between squares facing up or down. The monster then turns around, unless bit 7 of its object attributes is set (a flag the disassembly's comments name "reverse after hit Link") or it is a Vire (object type $12). zelda/shove-away
About: The Legend of Zelda Knockback
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L6528-L6581 LDA #$08
STA $08
LDA ObjY, X
STA $04
LDA a:ObjY, Y
STA $05
…
CPY #$00
BNE :+
LDA ObjGridOffset
BEQ :+
LDA ObjDir
…zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L6597-L6599 LDA $08
ORA #$80
STA ObjShoveDirzelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L6612-L6628 ; If the monster's object attribute "reverse after hit Link" is set,
; then return.
LDA ObjAttr, X
AND #$80
BNE @Exit
…
LDA ObjType, X
CMP #$12
BEQ @Exit
…
LDA ObjDir, X
JSR GetOppositeDir
…zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_07.asm#L5321-L5340 — the 19th entry, type $12, is UpdateVireUpdateObject_JumpTable:
.ADDR DoNothing
…
.ADDR UpdateVireLegend of Zelda, The (USA) (Rev 1) · 0x76A6-0x7760 — bank 1 BeginShoveChecked by claude, 2026-10-25 — read BeginShove 6528-6628: [08] starts at 8 (up) with the Y coordinates, and becomes 2 (left) with the X coordinates when Link's grid offset is nonzero and ObjDir & 3 is nonzero; LSR turns it to 4 (down) or 1 (right) when the monster's coordinate is lower than Link's. The type $12 is UpdateVire in the object jump table (5322 is entry 0).With Link on a grid square, the axis comes from [0B], which the disassembly's comment (L6553-L6555) says isn't always set when a monster hits him. The flag's name is the annotator's: the code at L6616-L6618 skips the turn when it is set, and at L6641-L6651 marks a monster's own shove with it.
Cited by: Knockback, The Legend of Zelda
Measured in Rev 1, each of the Tektite's first three hits shoves Link 32 px to the right in 8 frames. zelda/shove-measured
About: The Legend of Zelda Knockback
Value
{
"probe": {
"shove": [
32,
32,
32
],
"shoveFrames": [
8,
8,
8
]
}
}0x1EEC8-0x1EFDF — bank 7 Obj_Shove and ShoveMoveMin, which move Link in the probezelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_07.asm#L2323-L2470 — Obj_Shove and ShoveMoveMinShoveMoveMin:
…
LDA #$04
STA $03
…
DEC ObjShoveDistance, X
…
LDA ObjGridOffset, X
CLC
ADC $02
STA ObjGridOffset, XChecked by claude-agent, 2026-10-25 — Read Obj_Shove and ShoveMoveMin (Z_07.asm L2323-2470) at the pinned commit: the first call only clears the high bit of the shove direction, then each call tries 4 pixels, one at a time, stopping at an unwalkable tile; the 32 px in 8 frames for the first three hits is the probe's measurement in Rev 1.Probe: probes/zelda-metroid/zelda.mjsLink starts to move on the second frame after the hit; Obj_Shove's first call only clears the shove's "first time" bit.
Cited by: Knockback, The Legend of Zelda
A weapon that hurts a monster sets the monster's invincibility timer to 16, which lasts 32 frames, and shoves it 64 px in the weapon's direction, unless the monster is already invincible or immune to the weapon's damage type. zelda/monster-invincibility
About: The Legend of Zelda Invincibility frames
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L6503-L6514BeginShove:
; If a weapon attacks a monster, and the weapon's damage
; type matches the monster's invincibility mask;
; then return without shoving.zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L6636-L6691 ; Set the shove direction to the weapon's direction,
…
; If the monster is invincible, then return without shoving.
LDA ObjInvincibilityTimer, X
BNE @Exit2
…
; Mark the monster invincible $10 frames, and should move $40 pixels.
LDA #$40
STA ObjShoveDistance, X
LDA #$10
STA ObjInvincibilityTimer, XLegend of Zelda, The (USA) (Rev 1) · 0x76A6-0x7760 — bank 1 BeginShoveChecked by claude-agent, 2026-10-20 — read BeginShove's monster branch; DecrementInvincibilityTimer runs for every monster slot (timer-rate)A Gohma registers the hit only on its open eye.
Cited by: Invincibility frames, Knockback, The Legend of Zelda
The wooden, white, and magical swords take $10, $20, and $40 from a monster's hit points; fire takes $10, a bomb $40, and the boomerang none, only stunning. zelda/weapon-damage
About: The Legend of Zelda Damage formula
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L6162-L6163SwordDamagePoints:
.BYTE $10, $20, $40zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L6111-L6131 ; Set up parameters for a fire.
…
LDA #$10
STA $07 ; [07] holds $10 damage points
…
; Else set up parameters for a bomb.
…
LDA #$40
STA $07 ; [07] holds $40 damage pointszelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L5914-L5919 ; Still the boomerang.
; Reset [07] damage points, and set the monster's stun timer to $10 ($A0 frames).
LDA #$00
STA $07
LDA #$10
STA ObjStunTimer, XLegend of Zelda, The (USA) (Rev 1) · 0x755C-0x76A5 — bank 1 CheckMonsterBombOrFireCollision through CheckMonsterSwordCollisionChecked by claude, 2026-10-25 — read the weapon collision routines and DealDamage; the boomerang branch stores 0 in [07] and $10 in the stun timer before the shared HandleMonsterWeaponCollisionCited by: The Legend of Zelda
SetUpDroppedItem sorts a dead monster's type into one of four drop groups by three type lists, with every unlisted type in the fourth; seven types, among them the Gels, the Keese, and the Like Like, drop nothing. zelda/drop-groups
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_04.asm#L11030-L11044; Types of objects that do not drop items.
;
NoDropMonsterTypes:
.BYTE $5D, $14, $15, $1B, $1C, $1D, $17
DropItemMonsterTypes0:
.BYTE $07, $08, $0E, $04, $0F, $23
DropItemMonsterTypes1:
.BYTE $21, $22, $0D, $10, $13, $28, $2A, $27
.BYTE $16
…Legend of Zelda, The (USA) (Rev 1) · 0x1302B-0x13107 — bank 4 $B01B, the lists, tables, and SetUpDroppedItemChecked by claude-agent, 2026-10-20 — read SetUpDroppedItem's three searches and the fall-through to row 3$5D is UpdateDeadDummy; the others are UpdateGel ($14, $15), UpdateKeese ($1B–$1D), and UpdateLikeLike ($17). In slot 1, a Stalfos or Gibdo drops nothing, because it may be carrying the room's item.
Cited by: Item drop table, The Legend of Zelda
DropItemTable holds ten items for each group, and the kill cycle picks the column; group A's row is heart, rupee, heart, rupee, fairy, rupee, heart, heart, rupee, rupee. zelda/drop-table
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_04.asm#L11057-L11068; ID's for items dropped by monsters.
; WorldKillCycle addresses the column.
;
; Monsters are arranged in groups that determine the row.
; There are four rows.
;
DropItemTable:
.BYTE $22, $18, $22, $18, $23, $18, $22, $22
.BYTE $18, $18, $0F, $18, $22, $18, $0F, $22
.BYTE $21, $18, $18, $18, $22, $00, $18, $21
.BYTE $18, $22, $00, $18, $00, $22, $22, $22
.BYTE $23, $18, $22, $23, $22, $22, $22, $18zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_04.asm#L11137-L11143 LDY $01
LDA DropItemSetBaseOffsets, Y
CLC
ADC WorldKillCycle
TAY
LDA DropItemTable, Y
STA $00 ; [00] Dropped item IDLegend of Zelda, The (USA) (Rev 1) · 0x1302B-0x13107 — bank 4, as in drop-groupsChecked by claude-agent, 2026-10-20 — read the table, decoding item IDs by item-ids, and the lookup at DropItemSetBaseOffsets $00/$0A/$14/$1EB: 5 rupees, rupee, heart, rupee, 5 rupees, heart, clock, rupee, rupee, rupee. C: heart, bombs, rupee, clock, rupee, heart, bombs, rupee, bombs, heart. D: heart, heart, fairy, rupee, heart, fairy, heart, heart, heart, rupee.
Cited by: Item drop table, The Legend of Zelda
In TakeItem, item $18 is a rupee, $0F five rupees, $22 a heart, $23 a fairy, $21 the clock, and $00 four bombs; a heart restores 1 heart and a fairy 3. zelda/item-ids
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L4318-L4346ItemIdToSlot:
.BYTE $01, $00, $00, $00, $06, $05, $04, $04
.BYTE $02, $02, $03, $0D, $09, $0C, $1B, $1C
.BYTE $08, $0A, $0B, $0B, $0E, $0F, $10, $11
.BYTE $16, $17, $18, $1A, $1F, $1D, $1E, $07
.BYTE $07, $15, $19, $14
…
ItemIdToDescriptor:
.BYTE $14, $21, $22, $23, $01, $01, $21, $22
.BYTE $21, $22, $01, $01, $01, $01, $01, $15
.BYTE $01, $01, $21, $22, $01, $01, $01, $01
.BYTE $11, $11, $10, $01, $01, $01, $01, $11
…zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L4540-L4545 CPY #$18 ; Heart container item slot
BEQ @TakeHeartContainer
CPY #$1C ; 5 Rupees item slot
BEQ Take5Rupees
CPY #$16 ; Rupee item slot
BEQ @TakeRupeezelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L4651-L4653TakeHeartsNoSound:
LDA $0A ; Move item value in [0A] to [01].
STA $01 ; [01] holds the number of hearts to add minus 1.Legend of Zelda, The (USA) (Rev 1) · 0x6BF0-0x6D36 — bank 1 TakeItem through the heart routines, run from RAM at $7370Checked by claude-agent, 2026-10-20 — followed each ID through ItemIdToSlot and ItemIdToDescriptor into TakeItem's slot checks; slot $15 is InvClock and slot 1 InvBombs (Variables.inc); the heart's value 0 and the fairy's value 2 add 1 and 3 hearts in TakeHeartsNoSoundA heart or fairy that finds every container full fills the partial heart instead.
Cited by: The Legend of Zelda
Outside the special cases, a drop happens only when the dead monster's slot's byte of Random is below its group's rate: $50, $98, $68, and $68, or 80, 152, 104, and 104 in 256. zelda/drop-rates
About: The Legend of Zelda Item drop table
Value
[ 80, 152, 104, 104 ]
src/Z_04.asm#L11051-L11055; Top drop an item, a random value must be less than the
; element for the monster group.
;
DropItemRates:
.BYTE $50, $98, $68, $68zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_04.asm#L11176-L11182@RandomlyCancel:
; If the random value >= drop item rate for the monster's group,
; then go destroy the monster.
LDY $01
LDA Random, X
CMP DropItemRates, Y
BCS @DestroyMonsterLegend of Zelda, The (USA) (Rev 1) · 0x1302B-0x13107 — bank 4, as in drop-groupsChecked by claude-agent, 2026-10-20 — read @RandomlyCancel and the rates tableCited by: Item drop table, The Legend of Zelda
Each kill advances WorldKillCycle from 0 to 9 and back to 0 before the drop is chosen, except kills of types $5D, $14, and $1C, which the comments call a Child Gel and a Red Keese. zelda/kill-cycle
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_07.asm#L5457-L5488 ; Certain objects don't advance the world kill cycle.
CMP #$5D
BEQ @DropItem
CMP #$14 ; Child Gel
BEQ @DropItem
CMP #$1C ; Red Keese
BEQ @DropItem
; Advance the world kill cycle (0 to 9).
LDA WorldKillCycle
CLC
ADC #$01
…Legend of Zelda, The (USA) (Rev 1) · 0x1FCA5-0x1FCE9 — bank 7 UpdateMetaObjectEnd, $FC95Checked by claude-agent, 2026-10-20 — read UpdateMetaObjectEnd from the death sparkle's end to SetUpDroppedItemBecause the cycle advances first, the first kill after power-on reads column 1.
Cited by: Item drop table, The Legend of Zelda
When WorldKillCount, the kills since Link was last hurt, equals 16 and the monster can drop items, the drop is a fairy, whatever its random byte. zelda/fairy-16th
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_04.asm#L11145-L11149 ; If the global kill count = $10, set the dropped item to a fairy.
LDA #$23
LDY WorldKillCount
CPY #$10
BEQ @SetHelpItemzelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L5996-L5998HandleMonsterDied:
; Handle the monster dying.
INC WorldKillCountLegend of Zelda, The (USA) (Rev 1) · 0x1302B-0x13107 — bank 4, as in drop-groupsChecked by claude-agent, 2026-10-20 — read the fairy test, which runs after the no-drop list, and HandleMonsterDied's countThe test is for equality, so a 16th kill of a type that drops nothing gives no fairy, and the 17th kill doesn't make up for it.
Cited by: Item drop table, The Legend of Zelda
The 10th kill since Link was last hurt brings a guaranteed drop of 5 rupees, or of bombs when that 10th kill was by bomb, and the count starts again from 0. zelda/help-10th
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L6000-L6007 ; Increase the help drop counter, if not at max ($A).
LDA HelpDropCount
CMP #$0A
BCS @SetDyingMetastate
INC HelpDropCount
; If the help drop counter has reached the max, and damage type = bomb (8);
; then set [51] HelpDropValue in order to drop a bomb next time.zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_04.asm#L11151-L11173 ; If help drop counter < $A, then use the dropped item ID as is.
; But there is a random chance that the item drop will be canceled.
…
; Otherwise, the item will be guaranteed to be made.
; [51] HelpDropValue determines which kind:
; - 0: 5 rupees
; - other: bomb
…
STA HelpDropCount
STA HelpDropValueLegend of Zelda, The (USA) (Rev 1) · 0x1302B-0x13107 — bank 4, as in drop-groupsChecked by claude-agent, 2026-10-20 — read HandleMonsterDied's counter and SetUpDroppedItem's guaranteed branchWhen the 10th kill is of a type that drops nothing, the counter stays at 10 and the next drop-capable kill gets the guaranteed item. The fairy test comes first, so a 16th kill that is also a 10th gives the fairy.
Cited by: Item drop table, The Legend of Zelda
A dropped item lasts 255 decrements of its lifetime, one every other frame, about 510 frames, and Link can't take it until the 16th decrement, about 32 frames. zelda/drop-lifetime
About: The Legend of Zelda Item drop table
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_04.asm#L11206-L11215UpdateItem:
; Every other frame, decrement the item lifetime.
LDA FrameCounter
LSR
BCC :+
DEC Item_ObjItemLifetime, X
:
; If lifetime reached 0, go destroy the object.
LDA Item_ObjItemLifetime, X
BEQ DestroyMonster_Bank4zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_01.asm#L4416-L4420 ;
; [03A8][X] is used to count down the life of the item.
LDA Item_ObjItemLifetime, X
CMP #$F0
BCS L6C28_ExitLegend of Zelda, The (USA) (Rev 1) · 0x1310C-0x13124 — bank 4 UpdateItem, $B0FCChecked by claude-agent, 2026-10-20 — read UpdateItem and TryTakeItem; SetUpDroppedItem starts the lifetime at $FFCited by: The Legend of Zelda
Called in Rev 1 for every group, kill-cycle column, and value of the random byte, SetUpDroppedItem drops in 800, 1,520, 1,040, and 1,040 of 2,560 cases for groups A to D, each the item its column names; it gives a fairy at a kill count of 16, and 5 rupees or bombs at a help count of 10. zelda/drop-measured
About: The Legend of Zelda Item drop table
Value
{
"probe": {
"groups": {
"A": 800,
"B": 1520,
"C": 1040,
"D": 1040
}
}
}0x1302B-0x13107 — bank 4, the routine and tables the probe callszelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_04.asm#L11070-L11201 — SetUpDroppedItemLDA DropItemSetBaseOffsets, Y
…
ADC WorldKillCycle
…
LDA DropItemTable, Y
…
LDY WorldKillCount
CPY #$10
…
LDA HelpDropCount
CMP #$0A
…
…Checked by claude-agent, 2026-10-25 — Read SetUpDroppedItem (Z_04.asm L11070-11201) at the pinned commit: the monster's group and the kill cycle pick the item, a 16th kill or 10th help count forces a fairy or 5 rupees or bombs, and otherwise a random byte at or above the group's rate cancels the drop; the counts are the probe's calls of that code in Rev 1.Probe: probes/zelda-metroid/zelda.mjsEach count is the rate times 10 columns, so the chance per kill is the rate over 256 for a uniformly random byte.
Cited by: Item drop table, The Legend of Zelda
A heart container adds one container and one full heart, up to 16 containers; a new file starts with three. zelda/heart-container
About: The Legend of Zelda Health upgrade
Value: 16
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_01.asm#L4585-L4592@TakeHeartContainer:
; For heart containers, cap at $10.
; Add a heart container and a heart.
LDA Items, Y
CMP #$F0
BCS L6C28_Exit ; If we already have max hearts, return.
ADC #$11
JMP SetItemValue ; Go set the item value and return.Legend of Zelda, The (USA) (Rev 1) · 0x6BF0-0x6D36 — bank 1, as in item-idsChecked by claude-agent, 2026-10-20 — read @TakeHeartContainer; item $1A goes to slot $18, HeartValues (item-ids, hearts-format)The high nibble counts containers less one, so $F0 is 16 containers.
Cited by: Health upgrade, The Legend of Zelda
The Speed Demos Archive Knowledge Base states that 10 kills without being hit force a 5-rupee drop, or a bomb when the 10th is killed by bomb, and that 16 kills in a row force a fairy, only when the 16th enemy can drop items. zelda/secondary-drops
About: The Legend of Zelda Item drop table
WikiThe Legend of Zelda ·Enemy dropsKill 10 enemies without getting hit and you’ll get a forced, guaranteed 5 rupee drop … Kill the 10th enemy with a bomb instead, and instead of a 5 rupee you’ll get a forced, guaranteed bomb drop! Kill 16 enemies in a row and you get a fairy drop forced, but only if the 16th enemy is capable of dropping an itemIt agrees with the code (help-10th, fairy-16th). Its counter "starts at 0, and goes up by 1 every time you kill (most) enemies", which is WorldKillCycle at $052A (kill-cycle).
Cited by: The Legend of Zelda
MakeSwordShot fires a sword beam only when the low nibble of HeartValues (full hearts) equals its high nibble, as it does when Link's hearts are full, and the partial heart is at least $80 of $FF, so with up to half a heart missing; unless ForceSwordShot ($0529) is set. zelda/sword-shot
About: The Legend of Zelda Sword beam
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_07.asm#L4629-L4648 LDA ForceSwordShot
BNE @SetUp
; If full hearts <> (heart containers - 1), return.
LDA HeartValues
PHA
AND #$0F
STA $00
PLA
LSR
LSR
LSR
…zelda1-disassembly: A complete disassembly of The Legend of Zelda · src/Z_05.asm#L6776-L6794 — refilling hearts stops when the nibbles match, with HeartPartial at $FF@CompleteHeart:
…
LDA #$00 ; Set HeartPartial to zero for the next heart.
STA HeartPartial
JSR CompareHeartsToContainers
BNE @IncHearts ; If hearts <> heart containers, go increase hearts.
…
DEC HeartPartial
…
STA World_IsFillingHearts
…
@IncHearts:
…Legend of Zelda, The (USA) (Rev 1) · 0x1F86A-0x1F88C — bank 7 MakeSwordShot in Rev 1, from the slot check to the half-heart testChecked by claude, 2026-10-25 — read MakeSwordShot 4616-4648 (the high nibble shifted down is compared with the low nibble, then HeartPartial with $80) and World_FillHearts 6763-6795, which stops filling when CompareHeartsToContainers finds them equal and sets HeartPartial to $FF; found the bytes in Rev 1A flag at $0529 (ForceSwordShot) skips the test, but the disassembly finds no code that sets it (L4626-L4630). The routine reads no sword level.
Cited by: Sword beam
Touching a locked door with the magic key opens it for free; otherwise it costs a key, and with no keys the door blocks Link. zelda/door-key
About: The Legend of Zelda Keys and locked doors
Codezelda1-disassembly: A complete disassembly of The Legend of Zelda ·src/Z_05.asm#L3981-L3992 LDA InvMagicKey
BNE @TriggerDoor
LDA InvKeys
BEQ BlockAtWall
…
DEC InvKeys
@TriggerDoor:Legend of Zelda, The (USA) (Rev 1) · 0x15285-0x152A2 — TouchDoorKey in Rev 1, which moved bank 5's room code (rev1)Checked by claude, 2026-10-25 — read TouchDoorKey 3981-3992: a nonzero InvMagicKey branches to @TriggerDoor past the DEC; otherwise zero InvKeys goes to BlockAtWall, and any other count is decremented before the door triggers; found the bytes in Rev 1 by patternCited by: Keys and locked doors