
Writing a Program in Pokemon Blue - jackhammer2022
http://forums.glitchcity.info/index.php/topic,6638.0.html
======
Ellipsis753
This is insanely cool. Someone on the thread linked to this Youtube video:
[https://www.youtube.com/watch?v=D3EvpRHL_vk](https://www.youtube.com/watch?v=D3EvpRHL_vk)
. He uses the glitch to program an entire game into ram and then runs his own
breakout clone style game through this code execution glitch.

------
drakaal
I predict this could be more popular than Node.JS

Already has a good install base. Hardware is proprietary, but it is cheap.
There are emulators/VMs to run on more commodity hardware. The demographic is
young so it will have time to mature before enterprise adoption. It will be
awesome.

------
kanzure
Here's a similar exploit for Gold/Silver:
[http://forums.glitchcity.info/index.php/topic,6716.0.html](http://forums.glitchcity.info/index.php/topic,6716.0.html)

edit; If you are interested in finding other glitches, there's commented
source code over here:

Red/Blue:
[https://github.com/iimarckus/pokered](https://github.com/iimarckus/pokered)

Crystal:
[https://github.com/kanzure/pokecrystal](https://github.com/kanzure/pokecrystal)
(Gold/Silver doesn't compile yet)

~~~
hacker789
The explanation (and subsequent discussion) in your first link is wonderful.

I love that there are nerds tucked away in random corners of the internet,
making themselves happy by working on obscure, challenging problems like
these.

------
comex
These sorts of "exploits" have also been used in Pokemon and other games for
extremely fast tool-assisted speedruns:

[http://www.youtube.com/watch?v=3UnB1fomvAw](http://www.youtube.com/watch?v=3UnB1fomvAw)
(Pokemon Yellow)

[http://www.youtube.com/watch?v=VDx6gzvLqWs](http://www.youtube.com/watch?v=VDx6gzvLqWs)
(Super Mario World)

[http://www.youtube.com/watch?v=7CvJqzYpWms](http://www.youtube.com/watch?v=7CvJqzYpWms)
(EarthBound)

~~~
chilldream
I love these.

[https://www.youtube.com/watch?v=ALFvB-
UWaxg](https://www.youtube.com/watch?v=ALFvB-UWaxg) (Chrono Trigger in less
than 4 minutes)

------
lewisflude
Is this machine assisted or could I do this on a regular Game Boy? Regardless,
this is very interesting. That music brings back childhood memories of
insomnia.

~~~
adrianmalacoda
There are various bugs in the game that can be exploited to achieve this,
without the need of an emulator or cheating device. The creator of the thread
demonstrates how to obtain the special "item" in the game that makes it
possible in a YouTube video [0] and has a video demonstration of actually
running a program here [1]

[0]
[http://www.youtube.com/watch?v=WD_GVaQwn8o](http://www.youtube.com/watch?v=WD_GVaQwn8o)

[1]
[http://www.youtube.com/watch?v=D3EvpRHL_vk](http://www.youtube.com/watch?v=D3EvpRHL_vk)

------
pbrook
This is one of the most elaborate hacks I've ever heard of. Programming via
adding items to your inventory in Pokemon. Incredible.

~~~
unimpressive
This is easily in my top five, but the hack that had me buzzing all night with
its cleverness when I read about it is Nils Schneider's method of extracting
the ipod bootloader:

[http://www.newscientist.com/article/dn7085](http://www.newscientist.com/article/dn7085)

------
pearjuice
Reading that thread felt like being on the play ground as a kid and some noisy
classmate "who's dad worked at Nintendo" explains how to get a 152th Pokemon.
I was pretty amazed that at the end it wasn't a made-up lie or joke but that
those trivial steps (5 steps to the left, go there and there) actually led to
something.

------
failrate
I want a pokemon-type game with robots, where this isn't a cool trick, but a
critical part of the game.

~~~
derefr
Something like Core War, but with more RPG (or possibly MOBA) elements?

~~~
failrate
Yes, similar. Also, the collectibility aspect is key to knowledge acquisition.
Or, you could also go the Jade Cocoon route, which used genetic combination.

------
chilldream
It's neat how many glitches people have found in these particular games. A
couple other Pokemon "arbitrary code" hacks (in the Yellow version):

[http://www.youtube.com/watch?v=3UnB1fomvAw](http://www.youtube.com/watch?v=3UnB1fomvAw)
(Pi day celebration)

[http://aurellem.org/vba-clojure/html/total-
control.html](http://aurellem.org/vba-clojure/html/total-control.html) (proof-
of-concept for a clojure-to-pokemon-to-assembly compiler)

A "normal" playthrough in which the author shows off various glitches (most
without any kind of cheat device): [http://lparchive.org/Pokemon-
Blue/Update%2001/](http://lparchive.org/Pokemon-Blue/Update%2001/)

------
jds375
This was my favorite part of playing around with old Pokemon games. It's
actually unfortunate you can't do them in the newer games

~~~
liuyanghejerry
I think it's mostly because old games written in ASM, while newer ones in
C/C++.

~~~
ekimekim
More importantly, new hardware has proper memory protection, so instead of
cool tricks you just get segfaults...

------
liuyanghejerry
For people who are interested in Pokemon hack, checkout
[http://www.pokecommunity.com/forumdisplay.php?f=156](http://www.pokecommunity.com/forumdisplay.php?f=156)

------
em3rgent0rdr
awesome! Fun example to teach arbitrary code exploitation!

