A Technical Look at Old Video Games

the code behind the game


Jan 11

It’s time for an explanation of how the infamous Old Man glitch in Gen I of Pokemon works!

In case you don’t know, the Old Man glitch works like this: You talk to the Old Man in Virdian City and ask him to show you how to catch a pokemon. You have a little cutscene of the Old Man catching a weedle. Then you fly to Cinnabar Island and surf up and down the eastern strip of the island. You will be able to encounter a rather surprising cast of pokemon, including MISSINGNO.

So why does this happen?

The short answer:

A serious programming oversight.

The long answer:

The game stores all the pokemon pointers in an 8-bit array. This means that the array can store a total of 256 different pokemon. However, in Gen I, there are only 151 pokemon! If you look at the image above, the green tiles indicate one of these 151 pokemon. The game was originally meant to have 190 pokemon however. As such, there are 39 spaces that are formatted to have MISSINGNO in them. These are represented by blue squares. Everything else is a glitch pokemon or an error and is a red square in the graphic.

Interesting side note: the 0th element of the array has no pokemon data. Looks like the programmers didn’t want to deal with 0 being the first number.

When the Old Man cutscene occurs, the game passes your character’s name into a register to save it. It just so happens that the register it uses to temporarily store your name is the same register that (normally) contains information on an area’s wild pokemon encounters. When the cutscene is over, your name is restored, but it is also kept within this register. This (normally) causes no problems because the game overwrites that register with new information every time a new area is encountered.

However, there is no wild pokemon data for towns, so that register isn’t overwritten. So when you fly to Cinnabar, your name is still in the register! There is a programming error though in that the eastern strip of land on Cinnabar, despite being water, is marked as grass! And there’s no pokemon data set for Cinnabar!

Normally this means that a previous area’s wild pokemon data will still be present. This actually is a nifty little trick if you’re trying to catch Safari Zone pokemon, but in this game, the pokemon loaded are based off of your character’s name!

The 3rd, 5th, and 7th slots determine the pokemon you will encounter. The game does not use a standard ASCII encoding, unfortunately. Instead, it starts with ‘A’ on 128, which is normally reserved for extended ASCII. Some of the interesting encounters are caused by having these as letters:

  • D - Mewtwo
  • Z - Bulbasaur
  • q - Charmander
  • r - Squirtle
  • PK - Rival Blue (Glitch Trainer)
  • MN - Pokemon Prof (Glitch Trainer)

I say interesting because it means you can get every starter if your name is set accordingly! Unfortunately, you cannot obtain Mew this way, since Mew’s index number in the game doesn’t match up with any of the characters you can input for a name. The 2nd, 4th, and 6th slots for your name determine the levels of the pokemon you encounter. Here are some examples:

  • A - Level 128
  • a - Level 160

Very interestingly, you can encounter glitch trainers too, including Professor Oak! That’s right, Professor Oak was originally going to be a trainer you could fight in the game, and his party is totally killer. Unfortunately, this particular glitch doesn’t load the proper team. You’ll have to use the Ditto Glitch to get the true experience of battling Professor Oak. Still, for the sake of completeness, here is his actual party:

  • Tauros, level 66
  • Exeggutor, level 67
  • Arcanine, level 68
  • Venusaur/Charizard/Blastoise, level 69
  • Gyarados, level 70

Final note: In Gen II, almost all the elements in the array of 256 were used for pokemon because of the addition of 100 new pokemon. This means in Gen II, there are 5 unused spaces. Also, three of the MISSINGNO spaces in Gen I actually hold data for the fossils and for the ghost.

For more information on the Old Man glitch, you can read here.

For the list of pokemon by index number, you can read here.


  1. matthasnopants reblogged this from tomenator
  2. nowherelinnea reblogged this from methodologically
  3. arquimidna reblogged this from methodologically
  4. tomenator reblogged this from the-colors-of-our-souls
  5. the-colors-of-our-souls reblogged this from methodologically
  6. more-wrong-than-a-ding-dong reblogged this from methodologically
  7. winggundamfenice reblogged this from methodologically
  8. wallflowertony reblogged this from bluecojiro
  9. thegothamheroesdeserve reblogged this from anreyla
  10. berserkersnuggletruck reblogged this from hexmaniacwingy
  11. thenostalgiacritic reblogged this from fromup0npoppyhill
  12. superallornothing reblogged this from anreyla
  13. sweett-refrain reblogged this from anreyla
  14. seraphimdante reblogged this from fromup0npoppyhill
  15. glowstickgoop reblogged this from fromup0npoppyhill
  16. anreyla reblogged this from hauntedkids420
  17. prussic-acid reblogged this from bluecojiro
  18. ribbonsandnightshade reblogged this from l-enfer-c-est-les-autres
  19. l-enfer-c-est-les-autres reblogged this from thisisbloodyridiculosity
  20. maplespice reblogged this from fromup0npoppyhill
  21. thisisbloodyridiculosity reblogged this from heresmyfiddlestick
  22. hexmaniacwingy reblogged this from ivegotthetriforce
  23. ivegotthetriforce reblogged this from bluecojiro