Generation I item codes

From Glitch City Wiki
Revision as of 18:28, 13 March 2019 by >Bbbbbbbbba (Separated from the arbitrary code execution page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Item codes are assembly instructions encoded in an item list (either the item pack or the player's PC). They are used as payloads of arbitrary code execution exploits, and are usually the most convenient for that purpose, because the contents of an item list are easy to manipulate (e.g. by switching and tossing items).

For a list of hex values for all Generation I Items and their corresponding assembly instructions, see the Big HEX List.

The following example setups are for the glitch item 8F. The most popular bootstrap strategies for 8F jumps to the third item in the item pack ($D322 in English R/B, $D321 in English Yellow), leaving the first two item slots for 8F itself and possibly any item (that is not part of the code) to be manipulated. Most setups work for all other methods of ACE, as long as they jump to the third item in the item pack during bootstrap.

Some of the item codes further assume that the jump is made by a "jp (hl)" instruction, which means that hl also contains the address of the third item. That means those item codes will not work with the "super-compressed" setups that jump to the code with "jp $xxyy" (or any other jump instruction), unless further steps are taken to set hl to the desired value.

Non-key item duplication

8F

The item to duplicate x1

X Accuracy x33 (Red/Blue) OR X Accuracy x32 (Yellow)

Revive x201

To obtain the 201 Revive stack, have Revive x73 in the sixth item pack slot, then encounter / capture MissingNo or 'M. It will be a stack of 201 Revives.

Upon using 8F, the quantity of item #2 will be decreased by one. If there was only one item, it will be a stack of zero items. Tossing one of these rolls the quantity back to 255.

Obtain any item(Red/Blue, compressed)

Note: This code does not work with the super-compressed 3 to 5 Pokemon setup.

8F

[Item to morph] x[any qty]

TM03 x141

Full Heal x201 OR Revive x201

To obtain the TM03 x141 and Full Heal x201 stacks, have TM03 x13 or Full Heal x73 in the sixth item pack slot, then encounter/capture MISSINGNO. or 'M. Alternatively, the "Non-Key item duplication" code above can be run, and tossing TM03 x115 or Full Heal x55 will give the correct quantity.

Upon using 8F, the item in your second item pack slot will morph to the item with the next or previous index number, depending on whether Full Heals or Revives are used. Refer to the ItemDex to see which items will result.

Obtain any item

8F

[Item to morph] x[any qty]

Thunderstone x32 (Red/Blue) OR Thunderstone x31 (Yellow)

TM11 x52 OR TM11 x53

TM01 x[any qty]


Upon using 8F, the item in your second item pack slot will morph to the item with the next or previous index number, depending on whether TM11 x52 or x53 was used. Refer to the ItemDex to see which items will result.


Gameshark-like code

The following item list will work the same way a game-altering device does.

8F

Any item x Any qty

X Accuracy x(b2)

Carbon x(b3)

Max Revive x(b1)

Poké Ball x201

To obtain the 201 Poké Balls stack, have Poké Balls x73 in the sixth item pack slot, then encounter / capture MissingNo or 'M. It will be a stack of 201 Poké Balls. It is also possible to use the Non-key items duplication code.

This code aims to write code like the Gameshark code "01(b1)(b2)(b3)".

For example, the code 010138CD, which allows to walk through walls, can be transcripted into the following:

X Accuracy x56

Carbon x205

Max Revive x1

Poké Ball x201