Jump to content

Coin Case glitches: Difference between revisions

no edit summary
m (Text replacement - "http://forums.glitchcity.info/index.php/topic," to "https://forums.glitchcity.info/index.php?topic=")
No edit summary
Line 11:
 
==Arbitrary code execution exploits summary==
There are twoseveral commonly usedknown variations of Coin Case arbitrary code execution. These, includesuch bothas arbitrary code execution through using box names and through using stored PC items.
 
Having a 'fresh' low level Pokémon (also known as a "slide Pokémon") in slot 3 and a special Quagsire in slot 4, making a specific movement pattern (such as four steps right from walking out of Cherrygrove Poké Mart or Professor Elm's lab), listening to Bellsprout or Machop's cry, switching item pockets (necessary) and using the Coin Case will lead to arbitrary code execution.
 
===Stored items===
In order to execute box names as code (beginning from the second character of the first box name) the Quagsire should be holding a TM02 with Return as its first move.
The stored items exploit is the earliest exploit used, and requires specific items in the player's PC.
 
In order to execute stored PC items as code the Quagsire shouldmust instead be holding a HP Up and know Sleep Talk as the first move (if the code starts at stored item 2's quantity), or be holding a Protein with Sleep Talk as the first move (if the code starts at stored item 3's item).
If the player wants to start the execution at the first character of the first box name the Quagsire should be holding a TM01 instead, however TM02 can be obtained multiple times while TM01 cannot and this will likely not be compatible with codes that expect the TM02 setup.
 
===Box names===
In order to execute stored PC items as code the Quagsire should instead be holding a HP Up and know Sleep Talk as the first move (if the code starts at stored item 2's quantity), or be holding a Protein with Sleep Talk as the first move (if the code starts at stored item 3's item).
In order to execute box names as code (beginning from the second character of the first box name) the Quagsire shouldmust be holding a TM02 with Return as its first move.
 
If the player wants to start the execution at the first character of the first box name the Quagsire shouldmust be holding a TM01 instead, however TM02 can be obtained multiple times while TM01 cannot and this will likely not be compatible with codes that expect the TM02 setup.
 
===Redirection with wrong pocket TM/HM===
If the player uses arbitrary code execution to spawn a [[Wrong pocket TMs and HMs|wrong pocket TM/HM]] in the inventory, it can be used as an alternative to the Coin Case glitch, with the wrong pocket TM taking the place of the Coin Case. Advantages to this are that the player can use the item without having to use in a specific movement pattern, and codes are both often shorter/of aid to programmers because it is no longer necessary to fix the [[stack]].
 
 
[[TMHMDex/GS:208|TM17]] - Setup: Move the slide Pokémon to slot 1, and the specific Quagsire to slot 2.
 
As documented by Crystal_, the following box name Coin Case codes can be used to acquire TM17.
 
<pre>
1. Ap0'déy♀Pk
2. 'v't'véé'l2h
3. 'd'd2'v9.9't
4. é?2hhhhh
5. h'm♀♀
</pre>
 
[[TMHMDex/GS:216|TM25]] - Setup: Move the slide Pokémon to slot 2, and the specific Quagsire to slot 3.
 
===TM/HM pocket quantities as code===
In this method, the quantities of the TM/HM pocket are used as the code. The Quagsire must be holding a Lucky Egg with Attract as its first move. If the player does not have a Lucky Egg, they can find one on a wild Chansey or get one in item slot 1 with the following box name codes, designed for TM17 (these codes will not work with the regular Coin Case method):
 
<pre>
1. Ap09'vB55
2. éy♀'d
3+ (Leave unchanged)
</pre>
 
As both this structure only holds quantities in succession at D57E (the item IDs themselves aren't stored in this structure), it is efficient for programming because the player can write the original code in GBZ80, then represent it in hexadecimal byte form (for example, by writing it in BGB debugger), [https://www.convzone.com/hex-to-decimal/ then in decimal byte form], without having to comply with limits such as a limited number of writable box name characters. Normally, this would be impossible, but obtaining 255 of every TM/HM is possible with the following TM17 codes:
 
<pre>
1: Ap'vCé225
2: 'vj'vué125
3: 'v.é52p'v9
4: é42pé625
5: 'vué82'v 5 (there is a space after the 'v and before the 5)
6: é72'v:é92
7: 09♀5♀555
8: 555555x'd (regular x not multiply sign)
</pre>
 
After acquiring 255 of every TM/HM quantity, any value from 0-255 can be acquired by selling them at the Poké Mart. These quantities represent the code.
 
====Example====
 
These quantities (from TM01 through TM19) are the required TM quantities for an every wild Pokémon is Shiny code. In order to get them, toss (255-n) of the 255 stack quantity after first obtaining it; so for TM01 toss 222 (255-33), for TM02 toss 116, and so on.
 
<pre>
33 139 255 62 213 50 62 139 50 62 195 50 201 62 7 234 25 209 201
</pre>
 
In hexadecimal form this is:
 
<pre>
21 8B FF 3E D5 32 3E 8B 32 3E C3 32 C9 3E 07 EA 19 D1 C9
</pre>
 
In the original GBZ80 form:
 
<pre>
ld hl,ff8b
ld a,d5
ldd (hl),a
ld a,8b
ldd (hl),a
ld a,c3
ldd (hl),a
ret
ld a,07
ld (d119),a
ret
</pre>
 
===Mail Pokémon===
This is another possible method in which Mail is attached to a party Pokémon, and the message within is used as the code (instead of for instance, box names).{{clarify}}
 
===Troubleshooting===
Cookies help us deliver our services. By using our services, you agree to our use of cookies.