How Game Genie & GameShark Codes Worked: Memory Manipulation in the 8-bit and 16-bit Eras

Published on September 7, 2026 | By RetroVault Archivist

Game Genie plugged into a Sega Genesis

Bending the Rules of the Hardware

Long before downloadable content and microtransactions, cheating was a physical, hardware-level endeavor. The Game Genie (released in 1990) and the GameShark (mid-1990s) were "passthrough" devices that sat between the game cartridge and the console. But how did entering a string of random letters like GXTGPO suddenly give Mario infinite lives?

The answer lies in how these devices intercepted and manipulated machine code in real-time.

The Game Genie: ROM Interception (Patching on the Fly)

The Game Genie functioned by intercepting data requests from the console’s CPU to the game cartridge's Read-Only Memory (ROM). It didn't alter the game's actual code; it lied to the console.

When you entered a Game Genie code, you were essentially inputting a memory address and a data value. The code was an encrypted hexadecimal string. Here is the exact process:

  1. The console's CPU asks the cartridge: "What is the instruction at memory address 0x8000?" (For example, an instruction that decreases the life counter).
  2. The Game Genie hardware intercepts this read request.
  3. If the address matches a stored cheat code, the Game Genie blocks the cartridge from responding and instead replies with its own modified value (e.g., an instruction that says "do nothing" or "increase life counter").

Because it patched ROM data, Game Genie codes were excellent for altering fundamental game rules—like jump height, gravity, or preventing the life counter from decrementing.

The GameShark & Action Replay: RAM Manipulation

As consoles evolved into the 32-bit era (PS1, N64), CD-ROMs became the standard. You couldn't easily intercept a CD read in the same way. The GameShark and Action Replay took a different approach: RAM (Random Access Memory) freezing.

Instead of intercepting ROM reads, these devices aggressively and continuously overwrote values in the console's RAM. If you had 50 bullets, that number "50" was stored at a specific address in RAM. A GameShark code simply told the device: "Every single frame, rewrite memory address 0x80123456 to the value 99."

Anatomy of a Hex Code

Let's look at a raw GameShark code format for the Nintendo 64: 80123456 0063

The Death of the Cheat Device

With the advent of digital downloads, encrypted memory, and online multiplayer where cheating ruins the ecosystem, the golden age of hardware cheat devices ended. However, their spirit lives on in modern emulation, where RAM search tools and hex editors allow archivers to continue discovering secrets buried deep within the silicon.