My Profile Photo

Sheogorath's Blog

Depending on the time of the day a friend, a colleague, a wise guy. The beauty of the world is its sense of humor to show humans their way by letting them search their own.

Cover image for this blog post

The form of MissingNo

Today I learned that the picture of MissingNo, the glitch Pokémon from editions Blue and Red, is coming from a buffer overflow in the picture rending code. It basically originates in the fact that the original picture buffer only expects a certain size of image, and its buffer size is set to that exact size. As part of optimizations for this algorithm a picture size can be indicated, which in case of MissingNo, is larger than the maximum display size, resulting in the buffer overwriting itself in the process, resulting in the typical stairs form of this Pokémon.

I came across this, after being ask that question and digging into a YouTube video explaining it. Afterwards spending a very entertaining evening learning more about the internals of the original Nintendo Game Boy games.