On this page
  1. Life, magic, and levels
  2. Getting hit
  3. Sword beam and keys
  4. Related
  5. Mechanics
  6. References
  7. Sources

Zelda II: The Adventure of Link is Nintendo’s 1987 sequel to The Legend of Zelda. The atlas reads it through Trax’s commented disassembly of the US NES release, which the Fiends of the Elements made buildable. Built here with graphics from the US ROM, it matches that ROM in every routine cited. The one branch it assembles wrong is cited from the ROM itself1. Nothing here has been measured in an emulator yet.

#Life, magic, and levels

Link starts with four heart containers and four magic containers, and each container holds 32 units of its meter2. Experience buys three levels, which feed tables rather than formulas. The life level and a monster’s damage code pick the cost of a hit from an 8 × 8 table, and the Shield spell halves it3. The attack level picks a sword’s damage, from 2 at level 1 to 24 at level 84. The magic level picks each spell’s cost5.

#Getting hit

A hit sets an injured timer that counts every frame and an immunity timer that counts once every 21 frames. The immunity lasts 64 to 84 frames1. A monster’s body sends Link back with a sideways speed and a small hop6.

#Sword beam and keys

The sword beam fires only when the life meter is exactly full, a stricter rule than The Legend of Zelda’s7. Locked doors work as in the first game: the Magic Key opens them for free, and otherwise each costs a key8.

Mechanics

MechanicKindHow
Health upgradeWhole containersheart and magic containers, four of each to start, 32 meter units apiece
Damage formulaDefense tablean 8 × 8 table by the monster's damage code and Link's life level, halved by Shield
Invincibility framesSlow timera timer of 4 that ticks once every 21 frames, 64 to 84 frames in all
KnockbackLauncha body hit sets a sideways speed and a small hop
Magic meterSpell levelseach spell's cost falls with the magic level, from a table of eight levels
Sword beamExactly fullonly with the life meter exactly full
Keys and locked doorsOne countone key spent per locked door, none with the Magic Key, as in The Legend of Zelda
Every claim about this game, by concept (8)
Damage formulaA monster's damage code (0–7) and Link's life level (1–8) pick the life a hit takes from an 8 × 8 table, halved while the Shield spell is on. Code 0 takes 16 units at life level 1 and 4 at level 8; code 6 takes 224 and 80; code 7 takes 255 at every level.Code
A sword hit takes 2, 3, 4, 6, 9, 12, 18, or 24 hit points from a monster for attack levels 1 to 8, and the Thunder spell's entry is 50.Code
Health upgradeA new game starts with four heart containers and four magic containers. Picking up a container adds one, and a full meter holds 32 units per container less one, so four containers fill to 127.Code
Invincibility framesA hit sets Link's immunity timer to 4 and his injured timer to 32. The game counts the injured timer down every frame but the immunity timer only once every 21 frames, so the immunity lasts 64 to 84 frames, depending on where in the cycle the hit lands.Code
Keys and locked doorsZelda 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.Code
KnockbackA monster's body hit sets Link's horizontal speed from a table, $0D or $F3 (−13) by the comments for facing left or right, and his vertical speed to $FE (−2), a hop away.Code
Magic meterA spell's cost comes from an 8 × 8 table by spell and magic level, in meter units (32 per container). Shield costs 64 at magic level 1 and 32 from level 4; Life costs 140 at level 1 and 100 from level 5; Thunder costs 240 until level 7. Casting fails when the meter can't cover the cost.Code
Sword beamZelda 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.Code

References

  1. ^ abA hit sets Link's immunity timer to 4 and his injured timer to 32. The game counts the injured timer down every frame but the immunity timer only once every 21 frames, so the immunity lasts 64 to 84 frames, depending on where in the cycle the hit lands.CodeFiendsOfTheElements/z2disassembly · “Zelda II - The Adventure of Link (USA)”
    How we know
    5461    STA      $050C                     ; 0x1e35e $E34E 8D 0C 05                ; Timer for Link being in injured state
    ⋮
    5463    STA      $0518                     ; 0x1e363 $E353 8D 18 05                ; Timer for Link being immune (0 = vulnerable)
    
    src/prg7.asm lines 5460–5463 at c4c3a4c · upstream ↗
    5414    LDA      $0518                     ; 0x1e301 $E2F1 AD 18 05                ; Timer for Link immunity (0 = vulnerable)
    
    src/prg7.asm lines 5412–5416 at c4c3a4c · upstream ↗
    398    DEC      $0501,x                   ; 0x1c18c $C17C DE 01 05                ; decrease all 5xx timers (if > 0)
    
    src/prg7.asm lines 388–401 at c4c3a4c · upstream ↗

    In the cartridge (“Zelda II - The Adventure of Link (USA)”): bank 7 $C169-$C181, the timer loop; the source's `BPL :-` assembles to the wrong target, and the ROM's F5 branches back to $C177. We don't reproduce the bytes.

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  2. ^A new game starts with four heart containers and four magic containers. Picking up a container adds one, and a full meter holds 32 units per container less one, so four containers fill to 127.CodeFiendsOfTheElements/z2disassembly
    How we know
    17AFF - Number of Magic Containers to begin game … 17B00 - Number of Heart Containers to begin game
    src/prg5.asm#L7062-L7064 · upstream ↗
    6165    INC      $0775,x                   ; 0x1e7dd $E7CD FE 75 07                ; 0E = Magic Containers, 0F = Heart Containers
    
    src/prg7.asm lines 6158–6165 at c4c3a4c · upstream ↗
    1823    LDA      $0783,x                   ; 0x1cb28 $CB18 BD 83 07                ; Current number of Magic/Heart Containers
    
    src/prg7.asm lines 1815–1831 at c4c3a4c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  3. ^A monster's damage code (0–7) and Link's life level (1–8) pick the life a hit takes from an 8 × 8 table, halved while the Shield spell is on. Code 0 takes 16 units at life level 1 and 4 at level 8; code 6 takes 224 and 80; code 7 takes 255 at every level.CodeFiendsOfTheElements/z2disassembly
    How we know
    .byt $10,$0C,$0C,$0C,$08,$04,$04,$04; … ;Damage Code 0 … .byt $E0,$C0,$A0,$90,$80,$70,$60,$50; … ;Damage Code 6 … .byt $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF; … ;Damage Code 7
    src/prg7.asm#L5401-L5410 · upstream ↗
    5440    ADC      $0779                     ; 0x1e332 $E322 6D 79 07                ; Add Life Power (1-8)
    ⋮
    5445    LSR                                ; 0x1e33e $E32E 4A                      ; Divide by 2 (if Shield is cast)
    
    src/prg7.asm lines 5436–5451 at c4c3a4c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  4. ^A sword hit takes 2, 3, 4, 6, 9, 12, 18, or 24 hit points from a monster for attack levels 1 to 8, and the Thunder spell's entry is 50.CodeFiendsOfTheElements/z2disassembly
    How we know
    5954.byt    $02,$03,$04,$06,$09,$0C,$12,$18; 0x1e67d $E66D 02 03 04 06 09 0C 12 18 ;Attack Power for 8 Levels (8 bytes)
    
    src/prg7.asm lines 5953–5955 at c4c3a4c · upstream ↗
    6060    LDY      $0777                     ; 0x1e733 $E723 AC 77 07                ; Attack Power
    ⋮
    6068    SBC      LE66C,y                   ; 0x1e742 $E732 F9 6C E6                ; refer to table at $1E66C (+1)
    ⋮
    6070    BEQ      LE74C                     ; 0x1e747 $E737 F0 13                   ; if (HP == 0)
    
    src/prg7.asm lines 6060–6070 at c4c3a4c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  5. ^A spell's cost comes from an 8 × 8 table by spell and magic level, in meter units (32 per container). Shield costs 64 at magic level 1 and 32 from level 4; Life costs 140 at level 1 and 100 from level 5; Thunder costs 240 until level 7. Casting fails when the meter can't cover the cost.CodeFiendsOfTheElements/z2disassembly
    How we know
    Table_for_Magic_Needed_for_Spells: … 40 30 30 20 20 20 20 20 Shield … 8C 8C 78 78 64 64 64 64 Life … F0 F0 F0 F0 F0 F0 C8 80 Thunder
    src/prg0.asm#L2161-L2177 · upstream ↗
    2200    ADC      $0778                     ; 0xdf8 $8DE8 6D 78 07                  ; Add Magic Level to get magic usage (index)
    ⋮
    2205    BCC      L8E3B                     ; 0xe03 $8DF3 90 46                     ; if Carry Clear (not enough magic) goto $0E3B
    
    src/prg0.asm lines 2196–2205 at c4c3a4c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  6. ^A monster's body hit sets Link's horizontal speed from a table, $0D or $F3 (−13) by the comments for facing left or right, and his vertical speed to $FE (−2), a hop away.CodeFiendsOfTheElements/z2disassembly
    How we know
    0D = X Velocity when Link is hit - Facing left … F3 = X Velocity when Link is hit - Facing right … This applies to being hit by the enemy itself, but not its weapon
    src/prg7.asm#L5491-L5497 · upstream ↗
    5543    LDA      LE36C,y                   ; 0x1e3c3 $E3B3 B9 6C E3                ;
    5544    STA      $70                       ; 0x1e3c6 $E3B6 85 70                   ; Link's X Velocity
    
    src/prg7.asm lines 5525–5545 at c4c3a4c · upstream ↗
    5469    LDA      #$FE                      ; 0x1e371 $E361 A9 FE                   ; A = FE
    5470    STA      $057D                     ; 0x1e373 $E363 8D 7D 05                ; Link's Y Velocity when hit
    
    src/prg7.asm lines 5469–5470 at c4c3a4c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  7. ^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.CodeFiendsOfTheElements/z2disassembly · aldonunez/zelda1-disassembly · “Legend of Zelda, The (USA) (Rev 1)”
    How we know
    3825    LDA      $0784                     ; 0x185e $984E AD 84 07                 ; Current number of Heart Containers
    ⋮
    3833    CMP      $0774                     ; 0x1869 $9859 CD 74 07                 ; Current Life left in meter
    3834    BNE      L9878                     ; 0x186c $985C D0 1A                    ; if Life not Full, goto $1878
    
    src/prg0.asm lines 3824–3834 at c4c3a4c · upstream ↗
    4632    ; If full hearts <> (heart containers - 1), return.
    ⋮
    4645    ; If partial heart is less than half full, return.
    4646    LDA HeartPartial
    4647    CMP #$80
    4648    BCC L1F854_Exit
    
    src/Z_07.asm lines 4632–4648 at 50a1c86 · upstream ↗

    In the cartridge (“Legend of Zelda, The (USA) (Rev 1)”): bank 7 MakeSwordShot in Rev 1, from the slot check to the half-heart test. We don't reproduce the bytes.

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  8. ^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.CodeFiendsOfTheElements/z2disassembly · aldonunez/zelda1-disassembly · “Legend of Zelda, The (USA) (Rev 1)”
    How we know
    4031    LDA      $078C                     ; 0x1d9ea $D9DA AD 8C 07                ; Have Magic Key
    ⋮
    4033    LDA      $0793                     ; 0x1d9ef $D9DF AD 93 07                ; Current number of keys
    
    src/prg7.asm lines 4031–4035 at c4c3a4c · upstream ↗
    3981    ; If we don't have the magic key nor any normal keys, 
    3982    ; go block movement.
    3983    LDA InvMagicKey
    3984    BNE @TriggerDoor
    3985    LDA InvKeys
    3986    BEQ BlockAtWall
    ⋮
    3988    ; If we don't have the magic key, decrease the key count.
    3989    DEC InvKeys
    
    src/Z_05.asm lines 3981–3989 at 50a1c86 · upstream ↗

    In the cartridge (“Legend of Zelda, The (USA) (Rev 1)”): TouchDoorKey in Rev 1, which moved bank 5's room code (zelda/rev1). We don't reproduce the bytes.

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

Sources

Code