Jump to content

Generation I item codes: Difference between revisions

no edit summary
>Bbbbbbbbba
(Referring to the forum topic here (as this is the most incomplete page that actually needs the forum topic to complement).)
No edit summary
 
(8 intermediate revisions by 5 users not shown)
Line 3:
For a list of hex values for all Generation I Items and their corresponding assembly instructions, see [[the Big HEX List]].
 
TheMost of the following example setups are for the glitch item [[ItemDex/RB:093|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, such as [[ItemDex/RB:106|-gm]] or [[Arbitrary code execution#Via text boxes|text box 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.
 
See [httphttps://forums.glitchcity.info/index.php?topic=6638.0 the forum topic on 8F] for more examples of item codes. Item codes can also be generated from assembly code with the help of tools like [[GBz80 to Items]], or by manually referring to [[the Big HEX List]].
 
== Fix -gm bootstrap ==
==Non-key item duplication==
Due to limitations on space and the available character set, the [[ItemDex/RB:106#Initial luckytyphlosion bootstrap|initial bootstrap strategy for -gm]] designed by luckytyphlosion jumps to the ''second'' item in the item pack, which might make it inconvenient to make use of existing item codes and/or manipulate items. The below item code<ref name="lucky_guide">[https://pastebin.com/iGyyJstG Rough -gm guide (v0.1)] by luckytyphlosion</ref> is designed to fix this by modifying the initial bootstrap, inserting two "inc hl" instructions before "jp hl":
<code>
-gm
8F
Thunderstone x1
TM17 x2
X Accuracy x79
Protein x2
Antidote x62
HP Up x2
Water Stone x2
Burn Heal x34
Parlyz Heal x62
TM33 x2
X Speed x34
TM01 x[any qty]
 
After setting up the item list and using -gm once, the jump target of -gm will be changed to the third item in the item pack.
The item to duplicate x1
 
The code is designed to be spelled with distinct items that are easy to buy in the Celadon Department Store. As a result, there are a lot of dummy instructions that can be adjusted according to the player's situation.
X Accuracy x33 (Red/Blue) </code>OR <code>X Accuracy x32 (Yellow)
<b>ld hl, $D901</b>
ld [bc], a
<b>ld l, $4F</b>
<b>inc h</b> ; hl = $DA4F
ld [bc], a
dec bc
<b>ld a, $23</b> ; opcode for "inc hl"
ld [bc], a
<b>ld [hli], a</b>
ld [bc], a
inc c
<b>ld [hli], a</b>
rrca
<b>ld a, $E9</b> ; opcode for "jp hl"
ld [bc], a
ld b,e
<b>ld [hli], a</b>
<b>ret</b>
 
==Non-key item duplication==
Revive x201
8F
</code>
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.
Line 26 ⟶ 59:
==Obtain any item(Red/Blue, compressed)==
Note: This code does not work with the super-compressed 3 to 5 Pokemon setup.
<code>
 
8F
[Item to morph] x[any qty]
 
TM03 x141
[Item to morph] x[any qty]
Full Heal x201 OR Revive x201
 
TM03 x141
 
Full Heal x201 </code> OR <code> Revive x201
</code>
 
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.
Line 42 ⟶ 70:
 
==Obtain any item==
8F
<code>
[Item to morph] x[any qty]
 
Thunderstone x32 (Red/Blue) OR Thunderstone x31 (Yellow)
8F
TM11 x52 OR TM11 x53
 
[Item to morph] TM01 x[any qty]
 
Thunderstone x32 (Red/Blue) </code>OR <code>Thunderstone x31 (Yellow)
 
TM11 x52 </code>OR <code>TM11 x53
 
TM01 x[any qty]
</code>
 
 
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.
Line 61 ⟶ 81:
The following item list will work the same way a game-altering device does.
 
8F
<code>
Any item x Any qty
8F
X Accuracy x(b2)
Carbos 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.
Any item x Any qty
 
This code aims to write code like the Gameshark code "01(b1)(b2)(b3)".
X Accuracy x(b2)
 
For example, the code 010138CD, which allows to walk through walls, can be transcripted into the following:
Carbon x(b3)
 
X Accuracy x56
Max Revive x(b1)
Carbos x205
Max Revive x1
Poké Ball x201
 
==Get any Pokémon==
Poké Ball x201
The easiest way to get any Pokémon is to use the above "Gameshark-like code" to write the internal ID (see [[the Big HEX List]]) to $D059 (Red/Blue) or $D058 (Yellow). This triggers an encounter with the Pokémon, which can then be caught by a Master Ball (easily obtainable using the previous codes).
</code>
 
An alternative way is to directly give the Pokémon to the player (like how Eevee is legitimately obtained in the game). The advantage is that some glitch Pokémon that cannot be encountered using the "instant encounter" method (ID = 0 or >= 200) can still be acquired this way.
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.
 
8F
This code aims to write code like the Gameshark code "01(b1)(b2)(b3)".
Any item x Any qty
Repel x[SpeciesIndex]
X Speed x14
Ultra Ball x64
TM05 x72 (Red/Blue) OR TM05 x89 (Yellow)
Lemonade x201
 
Note: Pokémon obtained this way are registered in the Pokédex, so getting [[MissingNo.]] this way will duplicate the 6th item. It would be necessary to toss TM05 x128 before using the code again.
For example, the code 010138CD, which allows to walk through walls, can be transcripted into the following:
 
==Enter Hall of Fame==
A code to enter the Hall of Fame [https://archives.glitchcity.info/forums/board-115/thread-6638/page-4.html by Stackout].
 
8F
<code>
(any item) x (any)
X Accuracy x56
Awakening x 22
Carbos x100
X Accuracy x187
X Attack x 64
TM05 x214
Revive x201
 
ld c,$16
Carbon x205
ld h,$64
ld l,$bb
ld b,c
ld b,b
call $35d6
ret
 
<pre>0e 16 26 64 2e bb 41 40 cd d6 35 c9</pre>
Max Revive x1
 
== References ==
Poké Ball x201
<references />
</code>
[[Category:Arbitrary code execution]]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.