> I suspect that [modifying data in memory] is how the Game Genie for the Nintendo Entertainment System worked.
Game Genie, Action Replay, and other similar devices worked on a different principle - the "codes" represented patches to the code in the game cartridge, not to data in memory. (The original Game Genie for the NES could patch up to three bytes.)
In practice, these patches often amounted to simple modifications like changing the constant value used to initialize a "lives" or "health" variable, or patching out code which caused the player to take damage or die.