On this page
  1. Related
  2. Games
  3. References
  4. Sources

A locked door opens by spending a key. The Legend of Zelda keeps one count, and its magic key opens every locked door for free1. Zelda II keeps the same rule2. A Link to the Past gives each dungeon its own count3.

Games

GameYearHowNote
The Legend of Zelda1986One countone key per locked door, or none with the magic key
Zelda II: The Adventure of Link1987One countone key spent per locked door, none with the Magic Key, as in The Legend of Zelda
The Legend of Zelda: A Link to the Past1991Per dungeoneach dungeon keeps its own small-key count
Every claim about this mechanic, by game (3)

References

  1. ^ abTouching a locked door with the magic key opens it for free; otherwise it costs a key, and with no keys the door blocks Link.Codealdonunez/zelda1-disassembly · “Legend of Zelda, The (USA) (Rev 1)”
    How we know
    3983    LDA InvMagicKey
    3984    BNE @TriggerDoor
    3985    LDA InvKeys
    3986    BEQ BlockAtWall
    ⋮
    3989    DEC InvKeys
    ⋮
    3991@TriggerDoor:
    
    src/Z_05.asm lines 3981–3992 at 50a1c86 · upstream ↗

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

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

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

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

    In the claim ledger

  2. ^ abZelda 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

  3. ^ abEach 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.Codespannerisms/usdasmrevised
    How we know
    394|02825A| LSR A
    395|02825B| TAX
    ⋮
    397|02825C| LDA.l $7EF37C,X
    
    bank_02.asm lines 388–398 at bcdd96e · upstream ↗
    6643|02A1D4| LSR A
    6644|02A1D5| TAX
    ⋮
    6646|02A1D6| LDA.l $7EF36F
    6647|02A1DA| STA.l $7EF37C,X
    
    bank_02.asm lines 6638–6648 at bcdd96e · upstream ↗
    666|0283E4| LDA.b #$FF
    667|0283E6| STA.l $7EF36F
    
    bank_02.asm lines 666–667 at bcdd96e · upstream ↗
    4154BitMasks:
    4155|0098C0| dw $8000 ; Sewers
    4156|0098C2| dw $4000 ; Hyrule Castle
    
    bank_00.asm lines 4154–4156 at bcdd96e · upstream ↗
    17099RebuildHUD_Keys:
    17100|0DFA68| STA.l $7EF36F
    
    bank_0D.asm lines 17099–17100 at bcdd96e · upstream ↗

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

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

Sources

Code