Cheat codes allow you to cheat at games. They might give you more lives, infinite health, enable special powers normally only activated when a special item is found, and etc. Two major formats are well-known: Game Genie and Pro-Action Reply (PAR). Many existing Game Genie and PAR codes can be found via Internet.
Snes9x supports both Game Genie and PAR by 'Cheat Entry' dialog. Also you can find your own cheat code with 'Cheat Finder' dialog. Cheats are saved in .cht files and are automatically loaded the next time a game with the same filename is loaded.
Technically, a cheat code consists of two elements; an address in SNES memory map where you want to overwrite, and a value which is overwritten on the address.
Beware of cheat codes designed for a ROM from a different region compared to the one you are playing or for a different version of the ROM; the source of the cheats should tell you which region and for which version of the game they were designed for. If you use a code designed for a different region or version of your game, the game might crash or do other weird things because the cheat address might be different between regions and versions.
Open 'Cheat Entry' dialog from 'Cheat' menu to enter Game Genie or PAR cheat codes. To add a cheat code, press 'New' button. A new empty entry appears in the list. Click '000000' in the address column and the string will be highlighted and editable. Input Game Genie or PAR code directly; it's translated to general style (an address and a value pair) automatically. Of course you can also input an address and a value in hex format instead of a cheat code. You may add your comment in the description column.
To enable each cheat code, click each check box and turn on. To enable/disable the entire cheat function itself, choose 'Apply Cheats' in 'Cheat' menu.
Tutorial: let's give infinite lives on R-TYPE 3 (J).
Load up the game and begin to play the first stage. You'll notice the game starts with 2 lives.
Pause the game and open 'Cheat Finder' dialog from 'Cheat' menu for the first time. Press 'Restore List' button just in case you've used the dialog before. Leave any controls at their default values. Press 'Store Current Values' button and close the dialog.
Play the game until you lose a life by just crashing into an enemy, then the game restarts and the life counter displays 1. Open 'Cheat Finder' dialog again.
Choose 'not equal' in 'Comparison' menu, click 'Stored Value' radio box, and press 'Search' button. The number of items in the list will reduce. The current values shown in the list are different from the previous values which were stored when you pressed 'Store Current Values' button. What we're looking for is the memory location where the game stores its life counter. Choose 'equal' in 'Comparison' menu, click 'This Value' radio box, type '1' in the text box, and press 'Search' button. The number of items in the list will reduce again. One of the items might be the life counter.
Again, crash into an enemy. The game restarts and the life counter displays 0. Open 'Cheat Finder' dialog. You'll find the value 0 in line 7E03B7. The previous value was 1 and the current value is 0. Is this address life counter? Select the line 7E03B7, press 'Watch' button, and close the dialog. Now you can see the value in the address 7E03B7 at the top left corner of the game screen.
Play the game again, and crash into an enemy while watching the value. Yes, this value should be the life counter. Now you want to get infinite lives. Open 'Cheat Finder' dialog again, select the line 7E03B7 and press 'Add to Cheat Entry...' button. Enter the value 5 (don't care for now) into 'Cheat Value' text box, your comment into 'Description' text box and press 'Add' button. Your new cheat code will be sent to 'Cheat Entry' dialog. Close 'Cheat Finder' dialog.
Open 'Cheat Entry' dialog and confirm your cheat codes are added. Make sure the cheat codes are turned on and close the dialog. Turn on 'Apply Cheats' in 'Cheat' menu.
Now you'll find that the number of lives is 5 and the value doesn't decrease even you crash into an enemy. Snes9x keeps the value constant, so even if you do lose a life and life counter goes down by one, less than 20ms later, Snes9x resets the counter back to the value you chose!