Skip to content
シーはディー四を取る edited this page Mar 14, 2022 · 8 revisions

Significance

non_equip_register is the game code's identifier for Link's non-configurable equipment (wallet, quiver and bomb bag upgrades and possibly other fields yet to be discovered).

Syntax

  • zs $filepath -U -- Prints the current value from the file data.
  • zs $filepath -U (uint32_t) -- Interprets the extra string parameter as an unsigned hexadecimal and stores the resulting integer to the relevant bits, if said integer falls within the range of values representable by a zero-extended word in MIPS (0x00000000 <= x <= 0xFFFFFFFF).

Example Inputs

command comments
-U (no parameter) Read-only; print current setting.
-U 0x100000 Can carry 20 Deku Nuts but no Deku Sticks
-U 0x020000 Can carry 10 Deku Sticks but no Deku Nuts
-U 0x000009 Up to 20 bombs, 30 arrows but no sticks or nuts
-U 0x120009 found in debug "LINK" save file in ROM
-U 0x000003 Have the Biggest Quiver (50 arrows) only.
-U 0X000018 Have the Biggest Bomb Bag (30 bombs) only.
-U 0000 Child's Wallet (99 rupees)
-U 0x1000 Adult's Wallet (200 rupees)
-U 00002000 Giant's Wallet (500 rupees)
-U 0x12201B consistently seen in every completed save file
-U 0x360000 40 Deku Nuts, 30 sticks (max OOT upgrades, not in MM)
-U 0x7E0000 Infinite nuts, 40 sticks (unreliable across versions)

Notes

In the preceding game, The Legend of Zelda: Ocarina of Time, it was possible to configure Link's equipment (the sword, shield, tunic and boots), but there were also non-configurable equipment upgrades like the wallet size and quiver. For the time being, it is presumed that this non_equip_register label refers to upgrades that can't be manually equipped (i.e., permanent upgrades) and may have been inherited from the SRAM game data format of the prior Zelda game.

By crashing the ROM to access the debugger screens, it was possible to reverse-engineer the following bit-field encoding of non_equip_register, in little endian:

/* XXXX XXXX Xhhh gggf ffee dddc ccbb baaa */
typedef struct {
    unsigned aaa:  3; /* quiver upgrades; see test results */
    unsigned bbb:  3; /* bomb bag upgrades; see test results */

    unsigned ccc:  3; /* [unused] OOT gauntlets/Goron's Bracelet */
    unsigned ddd:  3; /* [unused] OOT breathing scale upgrades */

    unsigned wallet_upgrade:  2; /* 00 child, 01 adult, 10 giant */
    unsigned fff:  3; /* [unused] OOT Deku Seed/bullet bag size */
    unsigned ggg:  3; /* Deku Stick capacity from OOT; see tests */
    unsigned hhh:  3; /* Deku Nut capacity from OOT; see tests */

    unsigned unused:  9; /* never interpreted in debug screens */
} non_equip_register_encoding; /* finished game:  0x0012201B */
/* 000000000 001 001 000 10 000 000 011 011 == 0x0012201B */
/* 0000 0000 0001 0010 0010 0000 0001 1011 */

Rom Crash Equipment Screen

Tested bit strings for aaa:

  • 000 empty
  • 001 Quiver
  • 010 Big Quiver
  • 011 Biggest Quiver
  • 100 undefined (version-dependent)
  • 101 undefined (version-dependent)
  • 110 undefined (version-dependent)
  • 111 undefined (version-dependent)

Tested bit strings for bbb:

  • 000 empty
  • 001 Bomb Bag
  • 010 Big Bomb Bag
  • 011 Biggest Bomb Bag
  • 100 ボス部屋のカギ
  • 101 ボス部屋のカギ
  • 110 ボス部屋のカギ
  • 111 ボス部屋のカギ

Tested bit strings for ggg:

  • 000 cannot use or pick up sticks if Item Subscreen already shows as discovered/learned
  • 001 maximum capacity 10 sticks (auto-set when first stick picked up and not found in Item screen)
  • 010 maximum capacity 20 sticks
  • 011 maximum capacity 30 sticks
  • 100 cannot store, buy or pick up sticks
  • 101 Appears to be same effect as with 0b010 (20 sticks)
  • 110 Appears to be same effect as with 0b011
  • 111 maximum capacity 40 sticks

Tested bit strings for hhh:

  • 000 cannot use or pick up nuts if Item Subscreen already shows as discovered/learned
  • 001 maximum capacity 20 nuts (auto-set when first nut picked up and not found in Item screen)
  • 010 maximum capacity 30 nuts
  • 011 maximum capacity 40 nuts
  • 100 cannot store, buy or pick up nuts
  • 101 Apparently no limit on Deku Nuts, no wraparound or overflow clamping
  • 110 cannot store, buy or pick up nuts (same effect as 0b100)
  • 111 Appears to be same effect as 0b101

Relevant Bits

file[0x00B8:0x00BB]22..0

Derived Cheat Codes

Have the largest quiver, biggest bomb bag and the Giant's Wallet.

GameShark ROM Version
JAP (1.0)
JAP (1.1)
JAP (GC)
USA (preview)
811EF72A 201B USA
USA (GC)
EUR (1.0)
EUR (1.1)
EUR (GC)
EUR (debug)
Clone this wiki locally