How The Game Genie Works

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]

39 thoughts on “How The Game Genie Works

  1. 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.

    1. 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!)

      1. 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.

      2. 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. 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.

  3. 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.

  4. 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 :(

    1. 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.

        1. 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.

          1. 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.

          2. 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.

        2. This is patently false on one point- battery back up was a common feature as early as year two of the famicom and nes consoles’ lifespans. SMB3 did in fact not have a battery, however- to resume progress in mid to late game levels one had to use the level warp “cheat” shortcuts and/or warp whistles.

  5. 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!

  6. 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.

      1. Fire a fireball, and everything susceptible to them (not buzzy beetles, etc) on screen will die, as if hit. Apparently there is another code ( NAPSIN ) which I just heard about and does something similar, but I am not sure they’re exactly the same. I honestly didn’t know the idea wasn’t original!

  7. 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 :)

    1. 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.

  8. I worked on the Game Genie – I did the hardware / reverse-engineering for the Game Genies on the Gameboy, GameGear and an unreleased (and very cool) Game Genie 2 for the SNES. That was one of the funnest jobs I’ve ever had :-)

Leave a Reply to engineerCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.