How the Game Genie Works

gene

Those of us old enough to remember blowing into cartridges will probably remember the Game Genie – a device that plugs in to an NES, SNES, Sega Genesis, or Game Boy that gives the player extra lives, items, changes the difficulty, or otherwise modifies the gameplay. To someone who doesn’t yet know where the 1-up is in the first level of Super Mario Bros., the Game Genie seems magical. There is, of course, a rhyme and reason behind the Genie and [The Mighty Mike Master] put together a great walkthrough of how the Game Genie works.

There are two varieties of Game Genie codes – 6-character codes and 8-character codes. Both these types of codes translate into a 15-bit address in the game ROM (from 0x8000 to 0xFFFF for the 6502-based NES) and a data byte. For the 6-character codes, whenever the address referenced by the Game Genie code is accessed, a specific data byte is returned. Thus, infinite lives become a reality with just a 6-character code.

Some games, especially ones made in the late years of their respective systems, use memory mapping to increase the code and data provided on the cartridges. Since areas of data are constantly being taken in and out of the CPU’s address space, merely returning a set value whenever a specific address is accessed would be disastrous. For this bank-switching setup, the Game Genie uses an 8-bit code; it’s just like the 6-bit code, only with the addition of a ‘compare’ byte. Using an 8-bit code, the Game Genie returns a specific byte if the compare bytes are equal. Otherwise, the Genie lets hands off the original data to the CPU.

Of course, all this information could be gleaned from the original patent for the Game Genie. As for the circuitry inside the Game Genie, there’s really not much aside from an un-Googleable GAL (general array logic) and a tiny epoxied microcontroller. It’s an amazingly simple device for all the amazement it imbued in our young impressionable minds.

 

[via Reddit]

Comments

  1. Jordan says:

    There have been many modern iterations of this—the one I’m most familiar with is the Action Replay, by Datel. It did the same thing but for the Nintendo DS systems, and was my introduction to programming, actually. I loved it so much I still have it.

    • A Bryant says:

      The action replay by datel pre dates the Game genie as it was out on spectrum and C64
      Game genie was purchased by game shark (Datel).
      I still have my GB game genie but I also have the game sharks and memore backup device.(used the backup device to get all 150 pokemon but could never crack the code to get Mew!)

      • furrtek says:

        The major difference between the GB Game Genie and the Action Replay, is that the GG patches ROM, and the AR patches RAM, which I think is done with a tiny frame-based routine.

      • Mental2k says:

        Ah jeez I feel the need to comment. Pokemon was also my main use of my action replay on gb. Mew was doable for 151. I went back and played through it vanilla a couple of years ago, you can get mew without an ar using a glitch too!

  2. lloydjatkinson says:

    http://codefromthe70s.org/poke.aspx

    The PC version :) I’ve used it a few times to change stats in real time on games.

  3. sneakypoo says:

    I still have one of those codes burned into memory: ZAKGNIPA. It’s for MegaMan 3 and gives you super speed. I spent soo many hours on that game.

  4. Haku says:

    The Action Replay was always my favourite game cheater because you could make your own codes for almost anything. Had a lot of fun using the one on my Sega Game Gear.

  5. andarb says:

    Drove me nuts in the days before the Internet becoming ubiquitous, I once rented a Game Genie from the local rental place, but the codes were NOT included in the rental – they didn’t even have the book, probably lost by a previous renter.

  6. engineer says:

    Before I ever heard of a game genie I was using small MSDOS programs that would change the levels and stats of characters using HEX. I only later found out what overflow meant when I increased a stat so ridiculous it made other stats either ridiculously low or negative.

  7. twdarkflame says:

    The GB game genie at least had easter eggs. Up Down Left Right (or something) caused the message;
    “You have found the easy secret, now find the hard ones”

    I never did :(

  8. sonicdude10 says:

    I still have my Game Genie for my Sega Genesis. I still use it from time to time.

  9. Dale says:

    Anyone know how to repair a SMB3 cartridge that was beaten using game genie and “down” was not held while going through the final door?

    • vpoko says:

      I have no idea what you’re talking about, but opening the cartridge and momentarily removing the battery will reset it to its factory state since other than the battery-backed memory, it’s all ROM.

      • sneakypoo says:

        There is no battery in the SMB3 cartridge. Battery backup was very uncommon for the NES games.

        • vpoko says:

          Ahh, that’s true, there was no saving in the original SMB3. Then I have no idea what Dale meant by repair… I have no idea what kind of failure a Game Genie could possibly cause if one didn’t hold a button at a particular point in the game.

          • Dale says:

            http://www.gamegenie.com/cheats/gamegenie/nes/super_mario_bros_3.html

            If you use any of the next five codes to defeat Bowser, stand in
            front of the door and hold “Up”. as soon as the door opens, you will
            pass through into the chamber where the Princess is held. If you don’t
            do this, you may get caught in Bowser’s time trap and the game will
            pause forever!

            The second I beat the game using one of those codes, it locked up and went beeeeeeeeeep. Now when you turn it on it locks up at the title screen every time.

          • vpoko says:

            I’m not doubting you, I don’t understand how the cartridge could have any memory of what happened before the power was shut off. There’s no non-volatile memory in it and the NES’ RAM has to clear on reboot. It’s like a CD remembering what song you last listened to.

        • Coolty says:

          it WAS common actually. Zelda had one.

          • medix says:

            Ah yes. I remember this. I borrowed a copy from a friend that had a bad (or dead) backup, so I had to leave the game running so I could pick up where I left off.

  10. Thought so. I played with a friend’s PS1 Game Shark, and they had a tutorial on finding codes that explained it basically worked this way. It also happens to be how the “cheats” function in SNES9x works… I accidentally set something up that would duplicate the 6th item in my inventory for FF6, even after codes had been turned off. Atma Weapons for everybody!

  11. spike says:

    characters not bits, there is no way 6 (or 8) bits has enough information, 6 (or 8) characters on the other hand ….

  12. djnikochan says:

    Best Game Genie code I ever made was IPZIPY on SMB1. Works on most Mario/Duck-Hunt cartridges. Give it a try. Pick up a fire flower and you’ll notice something a little different if you throw a fireball in a screenfull of enemies.

  13. h3ll0_w0rld says:

    I remember getting 3 game genies and my friends top loader NES and using 3 times the cheats for games. I especially loved it for the cheats that took up 3 lines.

  14. Acid says:

    The Action Replay could do *so* much more though, it had a complete memory and register monitor, disassembler and whatnot. I learned most of my 6502 assembler from snooping around in games with it, and before someone convinced me of the benefits of a macro assembler I thought entering code in the monitor was the natural way of doing assembler on the C64 :)

    • Greenaum says:

      Multiface on the ZX Spectrum (and Amstrad, C64, Atari ST and whatever else) was similar. The later versions had an NMI button, 8K ROM that swapped with the system ROM, and 8K RAM to put your own routines in. So you could do that same sort of thing, search for values and change them etc.

      The 8K RAM meant you could load software in specifically tuned to different sorts of cheat-finding, and I’m pretty sure there was a disassembler for it.

      It’s other use was dumping memory / registers (like an emulator save-state) to storage devices other than the cassette tape. Handy cos there were a few third-party disk drives, and even the Sinclair Microdrives needed it if you wanted to have some actual games to load off them.

      It would have been fine for piracy, except most Spectrum users stuck with the supply your own cassette player option, and when cheap hifi systems with twin tape decks came out, piracy was everywhere anyway. The Spectrum had the distinction of using a fast baud rate on tape, 48K took 3 1/2 minutes to load. Compared to the American machines that, for some reason, implemented old mainframe modem protocols for cassette tape, and took half an hour for the same thing.

      10 times faster to load, and all done off a line on the ULA entirely bit-banged in software. I think that defines Sinclair, coming from cheap hobby electronics, and the American companies, from a land fat with dollars and thinking like cut-down mainframe designers.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,382 other followers