FPGA Hack Becomes An Atari Game Genie

The Game Genie is a classic of the early 90s video game scene. It’s how you would have beaten the Ninja Turtles game, and it’s why the connector in your NES doesn’t work as it should. They never made a Game Genie for the Atari 2600, though, because by the time the Game Genie was released, the Atari was languishing on the bottom shelves of Toys R Us. Now though, we have FPGAs and development tools. We can build our own. That’s exactly what [Andy] did, and his Game Genie for the 2600 works as well as any commercial product you’d find for this beleaguered console.

To understand how to build a Game Genie for an Atari, you first have to understand how a Game Genie works. The hacks for a Game Genie work by replacing a single byte in the ROM of a game. If your lives are stored at memory location 0xDEAD for example, you would just change that byte from 3 (the default) to 255 (because that’s infinite, or something). Combine this with 6-letter and 8-letter codes that denote which byte to change and what to change it to, and you have a Game Genie.

This build began by setting up a DE0 Nano FPGA development board to connect to an Atari 2600 cartridge. Yes, there are voltage level differences, but this can be handled with a few pin assignments. Then, it’s just a matter of writing Verilog to pass all the data from one set of address and data pins to another set of address and data pins. The FPGA becomes a man-in-the-middle attack, if you will.

With the FPGA serving as a pass-through for the connections on the cartridge, it’s a simple matter to hard-code cheats into the device. For the example, [Andy] found the code for a game, figured out where the color of the fireballs were defined as red, and changed the color to blue. It worked, and all was right with the world. The work was then continued to create a user interface to enter three cheat codes, and finally wrapped up in a 3D printed enclosure. Sure, the Atari Game Genie works with ribbon cables, but it wouldn’t be that much more work to create a similar project with Lock-On™ technology. You can check out the entire build video below, or get the info over on Element14

Continue reading “FPGA Hack Becomes An Atari Game Genie”

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.

Continue reading “How The Game Genie Works”