How Game Genie and GameShark codes work
They look like the same idea: type in a string of letters and numbers, get infinite lives. Underneath they work in opposite ways, and that difference explains almost every odd behaviour people run into.
A Game Genie lies to the console about what is written on the cartridge. A GameShark reaches into the console's memory while the game is running and changes what it finds there. One edits the game. The other edits the playthrough.
Game Genie: rewriting the cartridge
The original Game Genie was a plastic adapter you pushed the cartridge into before putting the whole stack into the console. It sat between the two, watching every read the Game Boy made from the game.
When the console asked for the byte at one specific address, the Game Genie answered with a different byte than the cartridge actually held. That is the entire trick. The cartridge is never modified. The console is simply told something untrue at one address.
A Game Boy code has nine characters, usually written in three groups:
00A-17B-C49
Packed into that are three things: the replacement value, the address to replace it at, and a compare value. The compare byte is the clever part. Because cartridges swap different banks of ROM into the same address range, the same address can hold different data at different moments. The compare byte tells the adapter to only substitute the value if what it found there matches what was expected. That keeps the code from firing in the wrong bank.
You will also see six character codes. Those have no compare value and substitute unconditionally, which is fine for small games with no bank switching and unreliable for larger ones.
What that means in practice
- The change is permanent for that session. If a code alters the instruction that subtracts a life, lives are never subtracted, because the subtracting code is no longer there.
- Codes are tied to one exact game. A code is an address plus expected contents. Another release, another region, or a revision moves the data, so the compare byte stops matching and the code does nothing at all.
- They can be safe in a way live edits are not. Because the code changes the program before it runs, the game never sees an inconsistent state.
GameShark: editing memory as you play
A GameShark works from the other direction. It leaves the cartridge alone and instead writes a chosen value into the console's working memory, repeatedly, while you play.
A Game Boy code is eight hexadecimal digits:
01FF16D0
That splits into three parts: a type or bank byte, the value to write, and the address to write it to. The address is stored with its two halves swapped, a detail that trips up anyone converting codes by hand.
The device writes that value once every frame, sixty times a second. So if your health sits at a known address, a GameShark code keeps stamping it back to full faster than the game can take it away.
Why timing matters
Where in the frame that write happens changes the result. On real hardware it lands during the vertical blank, before the game does its work for the frame. That ordering matters: the game then runs the whole frame seeing the value you forced, rather than calculating with its own value and having yours applied afterwards. An emulator that applies pokes at the wrong point in the frame will appear to have working cheats that somehow do not take effect. EmuKing applies them at the start of the frame for this reason.
GameShark codes can corrupt saves. Writing a value the game never expected can leave it in a state its own code cannot handle, and that state may be written into your save file. Before experimenting, use Export .sav to keep a backup, or park the game in a save state you can return to.
Which to use
| Game Genie | GameShark | |
|---|---|---|
| Changes | The game's code and data | Live memory while playing |
| Applies | Whenever that address is read | Every frame |
| Format | Nine characters, in groups | Eight hexadecimal digits |
| Good for | Rules: infinite lives, no timer | Values: money, items, stats |
| Risk of a corrupt save | Lower | Higher |
As a rule of thumb, Game Genie codes suit changes to how the game behaves, and GameShark codes suit setting a number to something you want. If a cheat exists in both formats and you plan to keep playing that save, the Game Genie version is usually the safer choice.
Using codes in EmuKing
Press Cheats on either emulator page. You can type your own codes, and both formats are recognised automatically from their shape, so there is nothing to select. Multi part codes joined with a plus sign are accepted as a single cheat.
There is also a large built in database you can search. Codes you turn on are remembered per game on your own device, and a badge on screen lists which cheats are currently active so you are never guessing.
If a code does nothing, the usual reason is that it was written for a different release of the same game. Codes are specific to an exact build, so a European copy and a North American copy often need different codes.
Read next
Save files and save states, including how to back up progress before trying codes out.