Skip to content


cxd4 edited this page Apr 17, 2018 · 5 revisions


item_register is the game code's identifier for Link's item and mask inventory mappings.


  • zs $filepath -I (char[]) -- Prints the current inventory table for the "Masks" sub-screen, if the case-insensitive string starts with the letter 'M', or for the "Items" sub-screen otherwise.
  • zs $filepath -I (char[]) (unsigned int) (unsigned int) (uint8_t) -- Interprets the final extra string parameter as an unsigned hexadecimal integer and stores the result to the relevant bits (as dictated by the two preceding unsigned int coordinate parameters, which correspondingly refer to entry row and column in sub-screen), if said integer falls within the range of values representable by a zero-extended byte in MIPS (0x00 <= x <= 0xFF).

Example Inputs

command effect
-I items 0 0 0x00 installs the Ocarina of Time to the top-left
-I Items 1 2 0x08 installs Deku Nuts to (row, col) = (1, 2)
-I blah 1 1 0X07 installs Bombchu to (row, col) = (1, 1)
-I m(asks) 0 5 32 installs the Deku Mask to top-right of Masks


Yet another structure partially similar to that of the SRAM in The Legend of Zelda: Ocarina of Time, the item_register vector is just a table of byte identifiers representing which mask or other item can be selected from which field in the respective sub-screen.

It is perfectly plausible to switch items around from their normal positions: An item like Bombchu can be mapped to a position within the Masks sub-screen, and a mask like the Bunny Hood could be mapped in place of any item on the Items sub-screen. There are only two potential concerns:

  • Certain fixed positions within the Items sub-screen are designated an "ammunition" counter of stock for that cell, which can cause the game to show Link as having 0, 1 or even multiple copies of that item. Effectively, the item objects will all behave the same.
  • Sometimes the game needs to compare a specific byte in the inventory vector for an exact item ID in order to accurately respond to actions done during the game.

Besides the obvious incompatibility of most of these object ID numbers with that which should correspond with the preceding Zelda game, there is also a conflict between some object identifiers (particularly any of the masks) used to refer to the intended item or mask, based on whether the "modern" or "beta" system of enumerating said objects is used. All USA and PAL releases of the game (including the debug ROM) use the modern method, but the old Japanese releases (not counting the GC version release) use what will be referred to here as the old, "beta" method.

Official Name (in English, if available) Beta Modern
Ocarina of Time 00 00
Hero's Bow 01 01
Fire Arrow 02 02
Ice Arrow 03 03
Light Arrow 04 04
妖精のオカリナ 05 05
Bomb 06 06
Bombchu 07 07
Deku Stick 08 08
Deku Nut 09 09
Magic Beans 0A 0A
ロングフック 0B 0B
Powder Keg 0C 0C
Pictograph Box 0D 0D
Lens of Truth 0E 0E
Hookshot 0F 0F
Great Fairy's Sword 10 10
妖精のパチンコ 11 11
Empty Bottle 12 12
Red Potion 13 13
Green Potion 14 14
Blue Potion 15 15
Fairy 16 16
Deku Princess 17 17
Milk 18 18
Milk (1/2) 19 19
Fish 1A 1A
Bug 1B 1B
Blue Fire 1C 1C
Poe 1D 1D
Big Poe 1E 1E
Spring Water 1F 1F
Hot Spring Water 20 20
Zora Egg 21 21
Gold Dust 22 22
Magical Mushroom 23 23
(duplicate of 29h) 24
(duplicate of 29h) 25
Sea Horse 26 24
Chateau Romani 27 25
ハイラルどじょう 28 26
オババのドリンク 29 27
(more reserved bottle duplicates of 29h) ... N/A
Moon's Tear 30 28
Land Title Deed 31 29
Swamp Title Deed 32 2A
Mountain Title Deed 33 2B
Ocean Title Deed 34 2C
密猟者のコギリ 35
折れたゴロン刀 36
処方せん 37
メダマガエル 38
特製本生目楽 39
Room Key 3A 2D
Special Delivery to Mama 3B 2E
... (duplicate reserved quest items) ... N/A
Letter to Kafei 44 2F
Pendant of Memories 45 30
... (duplicate reserved quest items) ... N/A
月の石 (map, possibly the last duplicate) 4D 31
Deku Mask 4E 32
Goron Mask 4F 33
Zora Mask 50 34
Fierce Deity Mask 51 35
Mask of Truth 52 36
Kafei's Mask 53 37
All-Night Mask 54 38
Bunny Hood 55 39
Keaton Mask 56 3A
Garo's Mask 57 3B
Romani's Mask 58 3C
Circus Leader's Mask 59 3D
Postman's Hat 5A 3E
Couple's Mask 5B 3F
Great Fairy's Mask 5C 40
Gibdo Mask 5D 41
Don Gero's Mask 5E 42
Kamaro's Mask 5F 43
Captain's Hat 60 44
Stone Mask 61 45
Bremen Mask 62 46
Blast Mask 63 47
Mask of Scents 64 48
Giant's Mask 65 49
... ... ...
no assignment FF FF

It probably is no coincidence that the "items" half of this list corresponds well to the linear positioning of where the game maps those objects into the Items sub-screen.

As can be inferred from the beta object gaps of duplicate, consecutive item objects, the developers probably had just copy-pasted the same instance of a given object over and over to pre-allocate space in the fixed vector for future ideas on items to implement, change or rearrange.

For example, many of the (later removed) bottled items all refer to "Granny's Drink", so it's quite plausible that this placeholder value was repeatedly copied and pasted to fixate space in the SRAM and later edited and replaced with new bottled items introduced with the latter N64 Zelda game as new game design ideas came along.

There appears to be a similar class of objects for the "quest items" as well. All of the unused or reserved items in this space are assigned the text which refers to the "Moon Stone", written in Japanese. One of the quest item slots is given the text "Moon's Tear", instead of "stone", and the icon for the Moon's Tear is a little smaller than the one for the Moon Stone. (This simply implies that the copy-pasta was all done before the item's name, role and likely the acquisition through game play were all changed.) There is also one item, not removed in the USA or PAL releases of the game, which also has this copy-pasta'd "Moon Stone" label in Japanese, but the object and picture itself refers simply to a generic world map texture.

The above table is complete for all in-range inputs to the inventory sub-screen mappings. Other sub-screen and quest status objects (e.g., Link's sword and shield, dungeon map and fairies, rupee wallet icons...) can incorrectly be mapped to the item vector bytes as well by using values beyond those listed in the table above. In doing so, this is probably a memory leak in several of the game's tables, as the actual ID numbers for referencing equipment upgrades and other quest status features are zero-based and much smaller than the identifiers given in the following table. (Although, said IDs are nonetheless legal, of course, so they are at least relevant to a single consolidated texture array of icons for each object so that some sort of picture will be drawn in the Masks and Items sub-screens.)

Official Name (in English, if available) Beta Modern
... (continued from the previous table)
風のメダル 66 4A
炎のメダル 67 4B
氷のメダル 68 4C
ゴロン太鼓 69 N/A
ゾーラのギター 6A N/A
ナッツのラッパ 6B N/A
Kokiri Sword 6C 4D
Razor Sword 6D 4E
Gilded Sword 6E 4F
折れた巨人のナイフ 6F 50
Hero's Shield 70 51
Mirror Shield 71 52
ミラーシールド 72 N/A
Quiver (holds 30) 73 53
Quiver (holds 40) 74 54
Quiver (holds 50) 75 55
Bomb Bag (holds 20) 76 56
Bomb Bag (holds 30) 77 57
Bomb Bag (holds 40) 78 58
ボス部屋のカギ (99 rupees) 79 59
ボス部屋のカギ (200 rupees) 7A 5A
ボス部屋のカギ (500 rupees) 7B 5B
ボス部屋のカギ (fishing rod) 7C 5C
Odolwa's Remains 7D 5D
Goht's Remains 7E 5C
Gyorg's Remains 7F 5F
Twinmold's Remains 80 60
Sonata of Awakening 81 61
Goron Lullaby 82 62
New Wave Bossa Nova 83 63
Elegy of Emptiness 84 64
Oath to Order 85 65
闇のノクターン 86 66
Song of Time 87 67
Song of Healing 88 68
Epona's Song 89 69
Song of Soaring 8A 6A
Song of Storms 8B 6B
太陽の歌 8C 6C
Bombers' Notebook 8D 6D
黄金のスタルチュラ 8E 6E
Piece of Heart 8F 6F
ハートのかけら 90 70
太陽の歌 91 71
時の歌 92 72
Lullaby Intro 93 73
Big Key 94 74
Compass 95 75
Dungeon Map 96 76
Stray Fairies 97 77
ボス部屋のカギ 98 78
ボス部屋のカギ 99 79
ボス部屋のカギ 9A 7A

Relevant Bits

file[0x0070:0x009F] # 70h:87h items; 88h:9Fh masks

Derived Cheat Codes

GameShark ROM Version
JAP (1.0)
JAP (1.1)
USA (preview)
EUR (1.0)
EUR (1.1)
EUR (debug)
You can’t perform that action at this time.