Note: This guide assumes you're using the latest version of FCEUX emulator, or one of its side projects.
Even if you're not skilled at reverse engineering machine code, you'll still be able to benefit from the NES Hacker Wiki. The first thing you can do is make you own cheat codes for NES games.
I'm going to show you how to give yourself infinite lives in the game Contra. First, we'll do it, and then I'll explain everything in detail.
Your First Cheat
1.) First, launch FCEUX and load the Contra.NES ROM.
2.) Next, click on "Tools" in the menu and then select "Cheats".
3.) Click in the "Name" text box and type "P1 Infinite Lives".
4.) Click in the "Address" text box and type "0032".
5.) Click in the "Value" text box and type "09".
6.) Click "Add" and you'll see "* P1 Infinite Lives" added to the list.
7.) Close the Cheats dialog.
8.) In the menu, click NES, then Reset, or press CTRL+R on the keyboard to reset the game.
9.) Begin a new game.
You'll notice that you now start the game with 10 guys, and no matter how many times you die, you'll never lose a life!
Now, if you're going to get anywhere, you need to understand what you did. The NES is a small computer, and like any computer, it stores all of its data in memory. Thanks to the power of emulators, we can alter that memory in ways we never thought possible in the 1980s.
If you take a look at the Memory Addresses section of the Contra page, you'll see a familiar line:
0032 - P1 Lives
What this means is that the lives of player one are stored in memory location 0032. If the value in 0032 were 6, player one would have 6 lives, if it were 1, player one would have 1 life.
We can change those values thanks to the Cheats menu. The cheat that we added told FCEUX to put the value 9 in the memory address 0032, effectively giving player one 9 lives. Normally, when you die in Contra, the game decreases your lives by 1. However, cheats are designed to freeze the value in memory, effectively giving you infinite lives!
If you're picking up on this, you should already know how to get infinite lives for player two. If not, I'll help you out. First, take a look at the Memory Addresses section of the Contra page again. Notice that player two's lives are stored in memory address 0033.
0032 - P1 Lives 0033 - P2 Lives
Open up the cheats menu again. The Name of the cheat will be "P2 Infinite Lives", the Address is "0033", and the Value is "09". Click Add, close the dialog, and press CTRL+R to reset the game. Now, you'll see that both player one and two start with 10 lives and keep them forever!
You may be confused as to why you have 10 lives instead of 9; after all, we did put the number 9 in the memory, not 10, right? This is because, in Contra, lives start at zero instead of one. This is done so that the player you're using counts as one of your lives. Some games do this, some don't, you'll have to discover which ones do on your own.
So, now you know how to make simple cheats in games. Here are some memory addresses in other games to make cheats with:
- 6879 - Missiles in Metroid.
- 0034 - Player 1 lives in Life Force.
- 00C5 - Hit points in Dragon Warrior.
- 06F0 - Homing missiles in Blaster Master.
- 0391 - Little Mac's hit points in Mike Tyson's Punch-Out!!.
- 0151 - Angel feathers in Kid Icarus: Angel Land Story.
You can also look at the Games Category for all of the games that have memory addresses to make all sorts of great cheats for yourself!
Making Your Own Cheats
Want more? Take a look at the next guide Making Your Own Cheats.