Okay, as an immediate follow up, I want to talk about the cheat files. A good place to get the cheats is:
http://www.gamegenie.com/cheats/gameshark/n64/index.htmlFind the game you want. Say, Wave Race. Notice that there are codes for two versions. That's why cheat files match the name of the rom instead of the game ID code. Game IDs are the same for all versions of a game, while the rom name will tell you which version you are playing. Say the name is "Wave Race 64 (U) (V1.1) [!].z64" - this tells us we need the cheats for v1.1.
Version 1.1
801C2A67 00FF Fly Code
801C2C24 FFFF Automatic Retire
801C2C43 00FF Lap Counter Stays On-Screen
800DA9D3 00xx Course Modifier
801C2A67 00xx Speed Modifier Player 1
801C2A6F 0000 Infinite Misses Player 1
801C2BFE 00FF Infinite Time In Stunt Mode
801C293F 0000 Always Have 1st Place
811C2AD6 0000 Lap Timer Below 0'00'10
801C2A67 0005 Maximum Power
801C2C23 00FF Infinite Time Out Of Course
801CB343 0063 99 Points
801C293B 0003 Have No Laps To Race & Always Have 1st Place
801C2C5B 0003
801C2A67 0005
D01CE659 0010 Right Shoulder Turbo Boost
801C2A67 0020
Okay, cut and paste that into a text file and save as "Wave Race 64 (U) (V1.1) [!].gsc" - notice how it exactly matches the rom but for the extension. Now we need to make a couple changes for the rules:
1 - Put a '#' or ';' at the start of the line for a comment. There can be whitespace before them.
2 - Codes are of the format "CCXXYYYY ZZZZ {description}" where the description is optional.
3 - Cheats MUST start with a code with a description. Multiple codes without description may follow.
4 - A '#' or ';' character starting the description field makes it a comment instead of a description.
5 - Blank lines are fine - they are skipped.
6 - Any amount of whitespace is allowed anywhere, but the entire line must be less than 512 characters.
So given those rules, the above cheats is altered like this:
# Version 1.1
801C2A67 00FF Fly Code
801C2C24 FFFF Automatic Retire
801C2C43 00FF Lap Counter Stays On-Screen
800DA9D3 00xx Course Modifier
801C2A67 00xx Speed Modifier Player 1
801C2A6F 0000 Infinite Misses Player 1
801C2BFE 00FF Infinite Time In Stunt Mode
801C293F 0000 Always Have 1st Place
811C2AD6 0000 Lap Timer Below 0'00'10
801C2A67 0005 Maximum Power
801C2C23 00FF Infinite Time Out Of Course
801CB343 0063 99 Points
801C293B 0003 Have No Laps To Race & Always Have 1st Place
801C2C5B 0003
801C2A67 0005 Right Shoulder Turbo Boost
D01CE659 0010
801C2A67 0020
Notice how we put a '#' on the first line to make it a comment. Notice how we moved the description for "Right Shoulder Turbo Boost" to the first code in the block. Remember cheats MUST START with a description.
Currently supported codes are:
80 - this sets a single byte from the second field. The address is the XXYYYY part of the code, and points to ram. The byte is set in the ZZZZ part of the code, and is usually shown as 00ZZ since it must be a byte, not a word.
81 - this sets a word from the second field. It is just like 80, but for a word instead of a byte.
A0 - this is like 80, but sets uncached ram, while 80 sets cached ram.
A1 - this is like 81, but sets uncached ram, while 81 sets cached ram.
D0 - this fetches a byte from ram, compares it to the byte in the 00ZZ field, then does the next GS code if the bytes are equal (or you can think of it as skipping the next GS code if they are not equal).
D1 - this fetches a word from ram, compares it to the word in the ZZZZ field, then does the next GS code if the words are equal (or you can think of it as skipping the next GS code if they are not equal).
D2 - same as D0, but with the condition reversed. It does the next GS code if they are not equal.
D3 - same as D1, but with the condition reversed. It does the next GS code if they are not equal.
F0 - set a byte in the boot segment once at boot time.
F1 - set a word in the boot segment once at boot time.
CC/DD/EE - these all deactivate the expansion ram (if you have it). The GameShark uses three different methods, but at the moment, I just use one for all three.
There is a limitation on 81/A1/D1/D3 - the words should be on an even address. I'm not sure if odd addresses are allowed since that's not mentioned in anything I could find, but a LOT of Mario 64 cheats use odd addresses. I'll fix that in an update.
There are a number of other codes I've seen that aren't explained (again, mostly in the Mario 64 cheat list), like 20/50/58/83/A3/A4/A8/B4/E0. 50 is explained in one place, but the Mario use of it doesn't match the explanation - ditto for 20. Mario 64 doesn't run with from the cheat engine in any case... I'm looking into it.
Now notice a couple line like this:
801C2A67 00xx Speed Modifier Player 1
Notice the 00xx in the ZZZZ field. This is how variable values for different things are done in cheats. If any characters in the ZZZZ field are not valid hexadecimal digits (0 to 9 or A to F), I make that digit variable. So "00xx" or "00??" are both variable bytes (two hex digits). "xxxx" or "?? ??" (with no space - the space is there to make this not a smilie) would be variable hex words. When on the selection screen, each C-Pad button changes a different digit in the variable. Navigate to such a cheat and look at the help lines at the bottom of the screen to see which button changes which character. Note that variable cheat codes MUST BE THE ONLY CHEAT CODE FOR THE CHEAT! I don't have the select screen set up for handling variable codes in multiple code cheats. Multiple cheat code lists are all on or all off, period.