| 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. | src/Z_07.asm L4632–4648 | Code |
When a mode needs the split, the NMI handler waits for the sprite 0 hit under the status bar and then sets the scroll for the room below; while the screen scrolls vertically between rooms it rewrites PPUADDR ($2006) mid-frame instead of PPUSCROLL. | src/Z_07.asm L447–452src/Z_05.asm L1263–1266src/Z_05.asm L1299–1320 | Code |
| The game keeps 7 DMC samples in three tables of address, length, and rate bytes, and a request byte picks the entry by its lowest set bit. | src/Z_00.asm L553–582 | Code |
The samples are sound effects; boss code requests $10 for the Aquamentus, Gleeok, and Ganon roar (entry 4, rate $0E), $20 for the Dodongo and Gohma roar (entry 5), and $02 for a boss hit (entry 1), and DeleteSlot requests $08, which the disassembly labels the "hurt" sound (entry 3). | src/Z_04.asm L4846–4847src/Z_04.asm L4900–4901src/Z_04.asm L8493–8494src/Z_02.asm L1770–1772 | Code |
The music driver has Super Mario Bros.' layout; a song entry sets a base into a note-length table, a length code's low 3 bits index it, notes index a table of big-endian 16-bit timer periods, and a square note starts with duty byte $82 and sweep byte $7F, the same register values Super Mario Bros. uses. | src/Z_00.asm L786–790src/Z_00.asm L1087–1092src/Z_00.asm L1112–1118src/Z_00.asm L1136–1140 | Code |
| The Legend of Zelda keeps three save files in battery-backed cartridge RAM; each holds an 8-byte name, a 40-byte item block, 384 bytes of world flags, and four single bytes (whether the slot is in use, one unlabeled byte, the death count, and the quest), with a 16-bit checksum that is the plain sum of those 436 bytes, and, kept apart and outside the sum, two marker bytes, $5A and $A5. | src/Variables.inc L301–323src/Z_02.asm L2319–2372src/Z_02.asm L2289–2295 | Code |
| The Legend of Zelda saves in two steps; it first writes the whole file to a second copy, file B, sums it, stores that sum, and marks B uncommitted, and on the next step it sums B again and, if the sums agree, clears file A's markers, copies B over A, writes A's markers and sum, and marks B committed. | src/Z_02.asm L2944–3046src/Z_02.asm L3048–3140src/Z_02.asm L1350–1360src/Variables.inc L325 | Code |
| When its title demo or its file select screen starts, The Legend of Zelda checks each of the three slots; a file B still marked uncommitted whose sum matches is copied over file A, finishing a save that was cut off, and a file A whose markers are not $5A and $A5 or whose sum doesn't match is formatted, its name set to spaces and every other byte to 0. | src/Z_02.asm L2252–2316src/Z_02.asm L2374–2410 | Code |
| 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. | src/Z_07.asm L6016–6018 | Code |
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. | src/Z_07.asm L5321–5384 | Code |
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. | src/Z_02.asm L1667–1672src/Z_01.asm L4681–4691 | Code |
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. | src/Z_01.asm L5574–5586src/Z_01.asm L5725–5735 | Code |
| Each level of ring halves the damage before it is subtracted, so the first ring takes half and the second a quarter. | src/Z_01.asm L5750–5757 | Code |
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. | src/Z_01.asm L5789–5805 | Code |
Whenever Link is hurt, the game zeroes WorldKillCount, HelpDropCount, and HelpDropValue, the counters behind the fairy and the 10th-kill drops. | src/Z_01.asm L5759–5764 | Code |
| 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. | src/Z_01.asm L5610–5617src/Z_01.asm L6589–6605 | Code |
DecrementInvincibilityTimer lowers an object's invincibility timer by 1 only on frames when FrameCounter is even, so a timer of lasts frames. | src/Z_07.asm L5782–5788 | Code |
While Link holds the clock, BeginUpdateWorld adds 16 to his invincibility timer every frame, and monsters' contact checks return no collision. | src/Z_07.asm L1876–1884 | Code |
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. | src/Z_01.asm L5600–5822 | Verified |
| 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. | src/Z_07.asm L2397–2420src/Z_07.asm L2450–2452 | Code |
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. | src/Z_07.asm L2600–2604 | Code |
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). | src/Z_01.asm L6528–6581src/Z_01.asm L6597–6599src/Z_01.asm L6612–6628src/Z_07.asm L5321–5340 | Code |
| Measured in Rev 1, each of the Tektite's first three hits shoves Link 32 px to the right in 8 frames. | src/Z_07.asm L2323–2470 | Verified |
| 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. | src/Z_01.asm L6503–6514src/Z_01.asm L6636–6691 | Code |
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. | src/Z_01.asm L6162–6163src/Z_01.asm L6111–6131src/Z_01.asm L5914–5919 | Code |
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. | src/Z_04.asm L11030–11044 | Code |
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. | src/Z_04.asm L11057–11068src/Z_04.asm L11137–11143 | Code |
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. | src/Z_01.asm L4318–4346src/Z_01.asm L4540–4545src/Z_01.asm L4651–4653 | Code |
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. | src/Z_04.asm L11051–11055src/Z_04.asm L11176–11182 | Code |
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. | src/Z_07.asm L5457–5488 | Code |
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. | src/Z_04.asm L11145–11149src/Z_01.asm L5996–5998 | Code |
| 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. | src/Z_01.asm L6000–6007src/Z_04.asm L11151–11173 | Code |
| 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. | src/Z_04.asm L11206–11215src/Z_01.asm L4416–4420 | Code |
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. | src/Z_04.asm L11070–11201 | Verified |
| A heart container adds one container and one full heart, up to 16 containers; a new file starts with three. | src/Z_01.asm L4585–4592 | Code |
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. | src/Z_07.asm L4629–4648src/Z_05.asm L6776–6794 | Code |
| 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. | src/Z_05.asm L3981–3992 | Code |
| Zelda II's sword beam fires only when the life meter is exactly full, containers × 32 − 1; The Legend of Zelda fired it with up to half a heart missing. | src/Z_07.asm L4632–4648 | Code |
| Zelda II keeps The Legend of Zelda's locked-door rule. The Magic Key opens a door for free; otherwise a key is spent, and with no keys the door stays shut. | src/Z_05.asm L3981–3989 | Code |