Game Genie Codes
Let this be a place for sharing codes for Game Genie/ Game Shark / Action Replay and save state hacks for Game Boy games. Tell your harrowing tales of code creation! Request a code! Maybe somebody will answer...
Sometimes I just have more fun hacking these old games than I do playing them. At the time the following code was made, which is coming up on a decade ago now, it was surprising to see that such a popular game as Pokemon did not seem to have a published Game Genie code to always catch Pokemon. The reason was obvious enough. ANyone can use the MissingNo glitch to get infinite Master Balls or use a Game Genie code to do the same.
Yes. For the first 18 years since the game was released (US) that was enough for most cheaters. Well, not for me! I was disappointed to see that nobody had developed a proper code to always catch Pokemon. When you look at some of the more nonsensical Game Genie codes out there you will soon realize that sometimes it is more about the process than the result.
So, Fates be damned! I set out to take control of my destiny and in doing so gained a deeper appreciation for the Nintendo gods of yore who developed these amazing games with limited resources. After hours of stepping through weird ass gbZ80 assembly code execution to try to make heads or tails of what was happening in this game, I crafted a code to NOOP a failed catch attempt and essentially roll the dice as many times as it takes until the catch is successful. The results can be a bit humorous with animation of the Pokemon struggling to escape the ball for a long time and even appearing to escape before finally getting caught.
I don't even remember which debugger was used for this, but without further ado, here is a Game Genie code for a game released in in Japan 30 years ago that gave birth to a franchise that is still going strong.
Pokemon Blue (and maybe Red): Always catch Pokemon with any type of Pokeball
008-02A-4C1
Feb 09 · 3 months ago · 👍 nerd, drcouzelis
6 Comments ↓
🐝 drcouzelis · Feb 11 at 17:48:
That's great! 😄 I used my Game Genie back in the 90s to collect all 151 Pokémon in my copy of Pokémon Red. I had no idea there were glitches. 😅
🐝 drcouzelis · Feb 11 at 17:59:
My friend made a Game Genie code for me recently.
Donkey Kong Land for Game Boy is supposed to have an animation that plays when ducking, but due to what is most likely a simple bug in the main game loop it rarely plays!
A Game Genie code to enable the animation is here:
914-D5F-F7C
1B4-D6F-91E
🐰 NovaSquirrel · Feb 11 at 18:28:
I made a Game Genie code for Avenging Spirit to make the energy meter go down at a slower rate: FF5-A3C
I already knew how to program Game Boy games and the Mesen debugger is extremely good so this was actually pretty easy; I used the memory search to find the energy meter and then set a breakpoint for it getting written to.
🛞 MaAkThRsYoOySrHtKaAm [OP] · Feb 12 at 05:42:
@drcouzelis That's cool. That's an intersting code to develop. Does it pretty much just patch the bug and make the animation happen when it is intended to?
@NovaSquirrel That's a great code. You were able to find the address that applies the rate and reduce it? I would consider that to be a little more advanced that, say, just keeping the meter full. Having a good debugger makes such a huge difference. I spent way too long poring over hexadecimal in the diff between save states to narrow it down to the offset I was after.
When you are overriding a functional aspect of the game in some way it's more more difficult than finding a known value like number of lives or something. After watching a vid, mesen looks like a very good debugger. The last one I think I used was mednafen. It was good enough to let me teleport Link around in the first LoZ game on nes. Thanks for sharing.
🐰 NovaSquirrel · Feb 12 at 06:03:
If I remember right, setting a breakpoint on the energy amount getting written to led me to some code that ANDed a frame counter with $3F and decreased the meter if the result was zero. So I just changed it to $FF.
It is definitely a lot trickier if you want to dig into behavior that isn't tied to something like a palette entry changing, or a position or other number with an obvious visible effect changing. For Pokémon in particular, I'd probably try to see if one of the commented disassemblies those games have would be any help.
🐝 drcouzelis · Feb 12 at 17:30:
@MaAkThRsYoOySrHtKaAm
It was super strange! So, there is an address in memory for a "random number", and that address is read many times in the code. It's used to randomly show the rhinoceros panting, to have the ostrich look around, and to make DK and Diddy randomly look around while ducking.
There is a randomization routine that will update the number, but it is ONLY executed on the title screen. Which means those animations will play but only if you happen to press Start on a number that would cause the animations to run.
The Game Genie code inserts a call to the randomization procedure every game loop.