← Back to Projects

truepeacein.space

A screenshot of the password entry portion of truepeacein.space

If you’re of a certain age, you’ll remember the Justin Bailey code.

Metroid for the NES had no save states. If you wanted to pick up (roughly) where you left off, you had to enter a password. It turns out that if you enter

JUSTIN BAILEY ------ ------

as a password, you play as Samus without her power suit (spoiler alert), a ton of power-ups and weapons, and the path open to the final area of the game.

Kids at the time found this out either through other kids, or through magazines like Nintendo Power. For a long time, nobody knew who this Justin Bailey guy was. Was he a staff member? Someone whose dad worked at Nintendo of America?

Turns out, no. It was a total fluke. The password system in Metroid is a clever representation of the game’s internal state. In binary, the characters encode a set of numbers that represent all the values of the game’s major state (which energy tanks and missile tanks Samus has acquired, whether the mini-bosses have been killed, etc). The bit string also includes a checksum to detect incorrect passwords and the input to a simple rotation-based “encryption” mechanism.

Back in 2016, I read an article about this, and then found the Metroid Password Format Guide, which describes in great detail how the password algorithm works. I would have thought that someone would have written a password generator for Metroid, but I couldn’t find one. So I decided to build one myself. And so truepeacein.space was born. The name is a reference to the game’s end screen, which encourages you to “pray for a true peace in space!”

I wrote truepeacein.space in my spare time over the holidays in 2016. It consistently gets a couple hundred hits a month, which really attests to the longevity of the game.