Pokemon G/S - Turn Coin Case into a memory editor (arbitrary code execution)

Channel:
Subscribers:
12,600
Published on ● Video Link: https://www.youtube.com/watch?v=ffZjCabeNr4



Game:
Glitch (2011)
Category:
Tutorial
Duration: 6:20
10,891 views
138


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 won't 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 I've made that video.


----- Old video description below -----

Coin Case glitch: http://forums.glitchcity.info/index.php/topic,6716.0.html

The code can most likely be optimized but it's the best I could come up with. The thing about this is that it's too generic and aims to cover all possible addresses, allowing to edit the content of any and all of them. Spelling out the code itself with the box names seemed impossible and I gave up after wandering around for some time. The instructions available allow you to do a lot of stuff with register a, and even pop it into d or h, but it looked impossible to make a program that allows to write in any specified memory address. Perhaps a possible better way to do this would be by combining the PC items and the box names to write the code and doing some jumping around. Or even use actual parts of the code to modify future bytes of the code in order to spell out instructions that are unavailable with the character set.

Anyway, it's not that this required lots of extremely obscure items. They are all easily obtainable, it's just that you'll need to have advanced very far in the adventure, particularly, to get HM06 (Toxic) and Pass. Apart from that, there are some generic items that you'll need more than one instance of. It's not too difficult to accomplish this, however. You'd just deposit the item 99 times and when you have deposited all the items, you withdraw said item until you have the amount you need. It means you'll have to buy more than necessary though. All in all, what I most like about this is that the code is always the same regardless of the address you want to edit, meaning that once all the items have been deposited in the PC, it'll just take about a minute to set it up to hack another memory address.

Speaking of editing the memory addresses, the way this is achieved is by naming Box 9 in different ways. Box 9 because pointing to its name's address requires the least amount of items. The name's first four characters will determine the address to hack (2 bytes), while the last two will determine the value to be written on it (1 byte). Unfortunately, we need two characters to spell out each byte because not all 255 possible values are associated to a character. This means that additional code is required, and consequently, additional items. Because of this, one way to optimize the whole thing could be to take the three bytes from addresses where we can manipulate all the 255 possible values, such as a Pokemon's happiness or EVs, or the player's steps counter. The last one probably looks like the easiest, but without a memory viewer to follow it, it's another story.

The way I've done it, the game takes the two characters of the name and adds its hexadecimal values, which allows to cover all possible 255 numbers. I've made a list that shows how to spell each of them: See http://pastebin.com/4ZDpQXGe. They are not the only possible combinations, but just stick to those.

For the item list, http://pastebin.com/in4MS7zW, or just watch it in the video (last part). To get Berry Juice, give Berry to a Shuckle and walk around for a bit. It will eventually become Berry Juice. Stardust is held by 23% of wild Staryu (Staryu can be found fishing on Cherrygrove city with a Good Rod for example) . Getting 3 Ether may not be easy, but as long as you have one, you can consider cloning. Alternatively, you may deposit only one Ether instead of three, and deposit [Any Item] [Any Amount] between Ether and PokeBall x94.

P.S.: The Quagsire must hold Protein, not HP Up.







Tags:
Crystal_
arbitrary code execution
pannenkoek
pokemon beta
missingno
pokemon yellow glitch
8f glitch
mew glitch
coin case glitch
pokemon assembly
pokemon crystal
pokemon pyrite
arbitrary code
pokemon glitches
pokemon red glitch
pokemon hacks
gameboy
chickasaurusgl
celebi glitch
pokemon mechanics
credits warp
pokemon secrets
pokemon glitch
pokemon speedrun
glitch pokemon
glitch city
pokemon gameboy
pokemon hack
pokemon corruptions
thezzazzglitch



Other Statistics

Glitch Statistics For Crystal_

At present, Crystal_ has 274,502 views spread across 5 videos for Glitch, and less than an hour worth of Glitch videos were uploaded to his channel. This is 2.91% of the total watchable video on Crystal_'s YouTube channel.