Uploaded June 2017 | Updated September 2026, 3 weeks ago
An inside look at why the player's sprite turns into a flipped 'ABCD' block for a split second during the second half of the Escape Rope, Dig, or Teleport animation in Pokemon Red and Blue.
An inside look at why the player's sprite turns into a flipped 'ABCD' block for a split second during the second half of the Escape Rope, Dig, or Teleport animation in Pokemon Red and Blue.
![Pokemon Gold/Silver - Create your own custom trainer with coin case
From Bulbapedia: If the player has used Mystery Gift, he [Cal] is replaced with a Trainer with the same name and party of the last person the player used Mystery Gift with.
Coin case glitch: http://forums.glitchcity.info/index.php/topic,6716.0.html
Coin case setup as a memory editor: https://www.youtube.com/watch?v=ffZjCabeNr4
How to spell each hexadecimal number with the box name: http://pastebin.com/4ZDpQXGe (remember that the first four characters of the box name are the 2-byte address, and the last two characters are the byte to write on that address).
In order to be able to write to the SRAM (where the game stores the data of the variable trainer of the Trainer House), we need to enable it first and to open bank 0 in particular. Because of this, we need to add a few more lines to our code spelled out with items. Heres the full list: http://pastebin.com/vjBywmiL
Everything else is explained in the video. Pokemon Gold/Silver - Create your own custom trainer with coin case](https://i.ytimg.com/vi/Y9r9Gy3Shi8/mqdefault.jpg)







![Pokemon G/S - How to get any Pokemon (coin case arbitrary code execution)
This video is outdated and reproducing it is no longer advised. Watching this video instead is recommended: https://www.youtube.com/watch?v=PsIb3OZaYAs
It is a detailed tutorial of a far more versatile Coin Case arbitrary code execution approach that can be used for multiple purposes, and includes examples and troubleshooting.
Help wont be offered in the comments section of this video, other than to redirect to the video linked above. This is because 90% of your ambitions or troubles with the Coin Case glitch are covered or can be avoided by following the steps explained in that other video. This is, in fact, the reason why Ive made that video.
Old video description below
Coin Case glitch: http://forums.glitchcity.info/index.php/topic,6716.0.html
This trick is based on the Bug Catching Contest feature in Gold and Silver. By setting the contest status flag, we can trick the game into believing that the player is currently participating in the contest. The address of the species of the Pokemon caught in the contest can be edited during the trick so that the player receives whichever Pokemon he wants.
The species is read from the fifth party Pokemons current HP stat (the lowest byte). A Pokemons current HP is probably the easiest RAM address to manipulate even though its not exactly easy.
Heres the suggested ASM/Hex code and corresponding item list for this trick: http://pastebin.com/fCRime06. Note that the Quagsire must be holding Protein (as well as Sleep Talk as the first move). None of the required items is especially difficult to obtain, though you may need to start a new game if you have lost access to some of the TMs required. Note as well that the trick assumes the player beaten the rockets in Mahogany, as the contest status flag shares its RAM address with the rocket event flag, and the value being written into that address during the trick clears the latter.
The obtained Pokemon will retain the data of the Pokemon you last caught in the bug catching contest, including known moves (not future learned moves), DVs, stats and the like. If you level up your Pokemon or deposit it in the daycare, their stats will get back to normal. Note that if the growth rate doesnt match its possible that the Pokemon grows a rare number of levels after gaining experience in battle. If you had never participated in the contest before, all the data will be 0s (like myself in the video). You cant send this Pokemon into battle but you can still deposit it in the daycare to get a level 1 Pokemon back.
I you happen to have the coin case as a memory editor (https://www.youtube.com/watch?v=ffZjCabeNr4) setup working, you can use it for this trick as well. Otherwise the item list specifically suggested for this version is easier to make. Anyway, if you go with the memory editor setup, it requires two iterations for each Pokemon in the following order (note that in this case, the species byte is not read from the fifth Pokemon HP, so its not needed):
(Address) Byte:
(DCE7) Hexadecimal species identifier of wanted Pokemon
(D572) 04
No matter the method you use, you can perform the trick as many times as you want. While setting up the party and items can be more time consuming than doing the famous Celebi (egg) glitch to obtain any Pokemon, the advantage of doing it via coin case ACE this way is that after youve set everything up the first time you can repeat it as many times as you want in just a few minutes to obtain another Pokemon.
REQUIREMENTS
- A Quagsire holding Protein with Sleep Talk as the first move. Put it the fourth position of your party.
- An untrained, low level Pokemon. Put it the third position of your party. The Pidgeys or Rattatas in Route 29 are some of the best ones. Make sure that the Pokemons Special stat is not 8 and that its HP stat is not 16. Make sure the Pokemon is female as well to further increase the chances of succeding. A Pokemon that meets these three requirements will work around two thirds of the times. If it didnt work (the game froze, the level of the first party Pokemon did not change), catch another Pokemon and try again.
- In the fifth position, a Pokemon with an HP stat matching the species id of the Pokemon you want to get. For example, 151 HP if you want a Mew. This is not necessary if you use the coin case as a memory editor method.
- List of items in the PC: http://pastebin.com/fCRime06
STEPS:
- Arrange the Pokemon in your party and the items in your PC as explained before.
- Enter Prof. Elms Lab or Cherrygrove Mart.
- Leave the building and move exactly four steps to the right
- Open the Pokedex and open Machops page (so that you hear its cry). Bellsprout, Machoke and Omanyte should work too.
- Exit the Pokedex and open the bag.
- Switch the pockets in the bag at least once. Then use the Coin Case.
- [Specific for this trick] Exit the items menu and the start menu and wait for the beep. Selecting the QUIT option also works. Pokemon G/S - How to get any Pokemon (coin case arbitrary code execution)](https://i.ytimg.com/vi/a0ZZ3rIL0vA/mqdefault.jpg)
![Why the Kingdras and ?s in the Bad Clone / Celebi glitch
When we open a Pokemon box, the names of the Pokemon inside pass through the buffer at address D073. But the bad clones name is just a bunch of 0x00 without any terminator character, so when its name is later read from that buffer, the game will keep on reading bytes as if they were characters until a random 0x50 byte is found, acting as the terminator character.
Knowing this, there is a very little routine that actually makes the whole trick possible, and thats the routine at 0:1383 in Pokemon Crystal. When a char is interpreted, its first analyzed in case we are dealing with an identifier with an special function such as a new line, the POKÉ symbol, or just a 0x00. If its 0x00, the game is made to jump to 0:1383.
Function1383::
ld a, $e6
ld [hli], a
call PrintLetterDelay
jp NextChar
Function1383 writes 0xE6 -which is the ? character- into the address pointed to by register hl, and then we move on the next char. Register hl happens to point to one tile in the tilemap (C4A0 - C607). The first tile that gets written is the tile that corresponds to the first letter of the bad clones name (C599) but it will keep on corrupting the remaining tiles of the tilemap with ?, and eventually other ram addresses with 0xE6 as well. So, ironically what looks like some sort of error handling routine that converts unknown characters 0x00 into the ? symbol, is what makes the bad clone glitch possible.
So we now where the all the ? come from. But what about the Kingdras? The routine at 38:6DEF reads the pokedex number of the different Pokemon in the box from RAM address C800 + 3*PkmnPos. While C800 is also the start of the Overworld map it seems to store the species of the Pokemon in the box as well. Anywho, the species of FF/CANCEL necessarily has to be located between C800 and around C840 depending on the number of pokemon stored, and, for example, in one of my tests, I saw addresses up to C863 get corrupted. Thus, we have just had our Pokemon FF/CANCEL become a withdrawable E6/KINGDRA!
There is also a simple explanation to why the bad clone trick doesnt work unless you save and reset the game boy in front of the PC and perform the trick right away. There are a total of 4 string buffers, and the buffer at D073 is the first one, meaning that if any of the other 3 buffers has been used before, there will be a terminator character in it, stopping the corruption of 0xE6 bytes too early. Why the Kingdras and ?s in the Bad Clone / Celebi glitch](https://i.ytimg.com/vi/acUjiWcMAcc/mqdefault.jpg)
