Sega Master System / Mark III / Game Gear
Sega8bit & SMS Power! 2013 Event - 10th August 11 weeks and 4 hours from now
The Game Genie is a cheat cartridge made for the Game Gear. It sits between the cartridge and the system and offers the user the ability to apply ROM patches.
See also the Pro Action Replay.
The device has three modes:
The device makes use of an obfuscated code format, with either two or three groups of three digits.
The first two digits give the value to be written. This is not obfuscated.
The next four digits are the address (in the Z80 memory map) to replace with the given value. To decode it:
In C code (assuming the Game Genie code has been parsed to a 36-bit integer variable
Do the inverse to encode.
The final three digits are optional, and are often missing from home-made codes. They represent a "cloak" value and a "reference" value. The "cloak" apparently changes the device's behaviour to make it avoid detection by software, but seems always to have the same value (8) in known codes. The "reference" value is a number which specifies the original value at the specified offset. This allows a reference to a mapped page to be used without the device changing the value when another page is mapped to the same slot - but only if the other page has a different value at that offset.
In C code (again assuming the Game Genie code has been parsed to a 36-bit integer variable
Do the inverse to encode.
The device presumably checks the current address lines with the ones specified in the internally stored codes and, when they match, checks the value stored in ROM at that address and patches it if appropriate.
When the code entry button is pressed, it presumably presents its internal ROM after triggering a jump to the right address, which then resets the console's state and displays the code entry screen.
All codes were originally produced by the manufacturer, who probably did it by dumping and disassembling ROMs. It has no "training mode" (it would be hard to make such a thing for ROM hacks).
The Game Genie has two glop-top ICs, one is a ROM containing the Z80 program and the other is an ASIC that implements the cheat functionality. The front pushbutton breaks out of game execution to run the Game Genie software, and the back pushbutton enables or disables codes (and the green status LED) once codes have been entered.
Jumper JP1 is normally shorted to +5V to enable display of the Galoob logo on the Game Genie title screen. If the wire link is cut, the Galoob logo is absent.