The New MAME Cheat Engine Manual/FAQ 0.5 Paul Priest (mailto:tourniquet@mameworld.net) Last Modified: 19/09/2001 Please turn on word-wrap if you haven't already done so. Contents 1. FAQ (Frequently Asked Questions) 1.1. Cheat Engine? 1.2. What do I need? 1.3. How do I use it? 1.4. How do I bind a cheat to a key? 1.5. Game errors when I press "F3" to reset. 1.6. How do I disable/enable all cheats? 1.7. My High-Scores don't save anymore! 1.8. How do I make PacMan/Ms. PacMan speed up? 1.9. How do I enable the "Over-Clocking" menu? 1.10. "wwfwfest cheat" 1.11. "Cheat for wwfwfest please" 1.12. Where do I get xyz that Haze posted cheats for? 1.13. "What do I do with these cheats"/"How do I insert them in the CHEAT.DAT" etc. 1.14. Nebula/Kawaks/"Final Burn Alpha"? 2. How to use the Cheat Engine 2.1. "Enable/Disable a Cheat" 2.2. "Add/Edit a Cheat" 2.3. "Start a New Cheat Search"/"Continue Search" 2.4. "View Last Results" 2.5. "Restore Previous Results" 2.6. "Configure Watchpoints" 2.7. "Options" 3. How do I search for Cheats 3.1. General tips 3.2. How do do specific searches. 3.2.1. Lives/Credits/Bombs/Level etc. 3.2.2. Energy/Invincibility/Small Timers etc. 3.2.3. Large Timers/Speed etc. 3.2.4. Powerup's 3.2.5. Character Selection/Bubble Colour/Multiple Choice etc. 3.2.6. Quiz Games. 3.2.7. Mahjong 3.2.8. ROM Cheats 4. Cheat File Format 5. Future? 6. History 7. Thanks 1. FAQ (Frequently Asked Questions) 1.1. Cheat Engine? The cheat engine has been through an exhaustive rewrite recently due to it being broke in the MAME 0.37 beta cycle. It was written by Ian Patterson and tested by Pugsy, Steph and (to a lesser extent) I and others who frequent Pugsy's board. 1.2. What do I need? You need a MAME (Obviously) port >= 0.53 (12/08/2001) The current cheat.dat is for MAME base version 0.54 N.B. Version 0.37b16 will work in most cases but I will not be covering this. You need the latest CHEAT.DAT This is available from Pugsy's page at http://cheat.retrogames.com/ The currently released database is in line with MAME 0.54 Quite often a more up-to-date WIP is available from a link in any of Pugsy's posts on his messageboard. Please do not link to it directly or make any official announcements until it has been officially released. 1.3. How do I use it? Place the CHEAT.DAT (unzipped) in the same directory as your MAME executable. Enable cheats in MAME: MAME.EXE (Win32 + official port) Edit your "mame.ini" and change the line that reads "cheats 0" to "cheats 1" DMAME.EXE (DOS port) Do the same as above but in "mame.cfg". Change "cheats off" to "cheats on" MAME32.EXE (Win32 port + GUI) Click on "Options->Default Options..." then click on the pane marked "Miscellaneous". Enable the tick box next to "Enable game cheats" When in a game hit "Tab" to bring up the menu. Use the cursors to navigate to "Cheat" and press "Enter". Select "Enable/Disable a Cheat" and press "Enter" Again. Choose the cheat of your choice from the wide range on offer. If a cheat has a "+" at the start of it's name press "Shift-Enter" to display important notes about the cheat. If the cheat says "On"/"Off" Use the cursors to enable it. If the cheat says "Set" press "Enter" to enable it. Some cheats will prompt you for a value e.g. Score or Level. 1.4. How do I bind a cheat to a key? Some cheats are most useful if bound to a key. Go to "Add/Edit a Cheat", select a cheat by pressing "Enter" and navigate to "Activation Key". Hit "Enter" and press the key of your choice. 1.5. Game errors when I press "F3" to reset. 1.6. How do I disable/enable all cheats? Some games test the RAM when you reset. If you are cheating then this RAM will fail. Currently you must hit "F6" to toggle cheats. This may change again in the future. 1.7. My High-Scores don't save anymore! Enabling the cheat engine in MAME will prevent games that have their scores saved using the "HISCORE.DAT" from saving. This is so that your hard-earned scores are not overwritten ;) 1.8. How do I make PacMan/Ms. PacMan speed up? 1.9. How do I enable the "Over-Clocking" menu? Enable the cheat engine, see 1.3. Over-clocking is on the same menu as "Volume"/"Brightness"/"Gamma" 1.10. "wwfwfest cheat" Be more polite! A please and thankyou won't go un-noticed. 1.11. "Cheat for wwfwfest please" That's better. You can find them in Pugsy's WIP cheat file or further down the board. 1.12. Where do I get xyz that Haze posted cheats for? Haze is a MAMEDEV. Wait for (hopefully) the next MAME release. If the game is a CPS-2 (MvC or MSHvSF) game visit http://cps2shock.retrogames.com/ 1.13. "What do I do with these cheats"/"How do I insert them in the CHEAT.DAT" etc. Use a text editor. Notepad from NT/Win2k will suffice but I recommend Textpad/UltraEdit. Notepad from W95/W98 will not suffice as it can't open large files. Cut the cheats by selecting and hit Ctrl-C or whatever in your browser. Paste the cheats into CHEAT.DAT (Which you have opened in your text-editor). Save as "Plain Text"/"PC ANSI" Make sure that your friendly text-editor hasn't saved it as "CHEAT.DAT.txt" or something equally helpful. If it has then rename it. 1.14. Nebula/Kawaks/"Final Burn Alpha"? These two emulators are CPS-2/Neogeo emulators that also have (primitive) cheat engines. The addresses need to be byte-swapped to be compatible with Nebula/Kawaks. Only Cheat types 000 and 500 seem suitable for conversion. Pugsy has a converter available at http://cheat.retrogames.com/ "Final Burn Alpha" addresses are the same as for MAME. 2. How to use the Cheat Engine 2.1. "Enable/Disable a Cheat" "Enter" - "Set" a cheat or turn a cheat "On" "Left"/"Right" Cursors - Toggle a cheat "On"/"Off". Choose a value if prompted. "Shift-Enter" - Display more information if a cheat has a "+" next to it's name "W" - Places a watch on the addresses 2.2. "Add/Edit a Cheat" "A" adds a blank cheat. "W" watches a cheat. "D" Deletes a cheat. "S" Saves a cheat to the end of your CHEAT.DAT. Select a cheat with "Enter". Here you can modify it. Cursors change values. Press "Enter" on an address to enter a new address. "A" Adds a cheat to the current cheat (Multipart cheats). "D" Deletes the part you are over. "W" Watches again. 2.3. "Start a New Cheat Search"/"Continue Search" The interesting bits. "CPU" Obviously, the CPU. If in doubt use "0". CPU1 is usually for sound if there is one. A "Lives" search starts/masks only values that are either equal to or one less than the value you choose. Pressing "Shift-Return" matches only the exact value. A "Timer" search is used for absolute relative searches where you can specify how much it has changed by. (e.g +/-1234) An "Energy" search is only relative (On one byte) i.e. (E)qual, (L)ess, (G)reater, (L)ess than or (E)qual to, (G)reater than or (E)qual to, (N)ot (E)qual and (F)uzzy Equal. Fuzzy Equal simply matches the value or the value+1. A "Status" search checks for changes on a bit by bit basis. A "Slow but Sure" does the same but on whole bytes. 2.4. "View Last Results" Displays all of the matching results along with the original value and current value. "A" Adds to the cheat list with the ORIGINAL value and type 000. "D" Deletes it from the searched list, only use this if you are sure it's not a valid location. "W" Watches the byte. 2.5. "Restore Previous Results" Goes back to before the last "Continue Search". Very useful! 2.6. "Configure Watchpoints" You have 20 watchpoints and each can watch up to 16 bytes. You may not see all of these though if it's a vertical game or if you view as Decimal/Binary. "A" Adds it to the Cheat list with the current value and type 000. "D" Deletes the current watchpoint "Shift-D" Deletes ALL watchpoints You can label and move the watchpoints, I don't bother as you can't save this information. 2.7. "Options" 2.7.1. "Select Memory Areas" Toggle individual memory areas. See "Default Search Speed" option for more general control. 2.7.2. "Default Search Speed" "Fast" RAM + some banks "Medium" RAM + BANKx "Slow" All memory areas except ROM, NOP, and custom handlers without mapped memory "Very Slow" All memory areas except ROM and NOP "AllMemory" Search the entire address space (for Z80 based games with bad drivers) 2.7.3. "Reload Database" Reloads all of your Cheat databases from disk. You will lose any cheats not saved. You will have to re-enable any cheats that were previously enabled. It's probably only me that uses this ;) 3. How do I search for Cheats Here I will give a few examples, some vague and some more specific on how to find the most common types of cheats. If anyone has any additions/changes please mail me. 3.1. General tips Searches are relative to last search except for "Slow but Sure" which is relative to the initial search. Don't forget to find cheats for both the display and also the internal counters if they are not dependant on each other. Be careful with Sprite cheats. They can cause lots of problems. Naming of cheats - See Pugsy's file for suitable names for most situations. Use type 001 where possible. They are least likely to cause problems. Use intuition. If a flag changes 00/01 or 00/FF then it's more likely to be suitable than other values. Use watches to narrow it down further. If in doubt, make it into a cheat and try it (Test thoroughly if you take this method, Save all the addresses in case something goes wrong). Watch out for bit cheats. Be careful not to break other things. If you are going to make a cheat for infinite something-or-other then choose the value as the maximum that can be displayed without the display corrupting or other problems occuring. 3.2. How do do specific searches. 3.2.1. Lives/Credits/Bombs/Level etc. Where you have a counter that you pretty much know the value of is the easiest type. The "lives" cheat type is obviously the best place to start here. What's less obvious is after starting with a "lives" search it is better to then continue using the "timer" cheat as the "lives" cheat will match the value and the value-1. You will converge on a correct cheat(s) quicker. 3.2.2. Energy/Invincibility/Small Timers etc. If you don't know the absolute value but do know it's value relative to the previous cheats then the "Energy" search is most appropriate. Change directions occasionally (By dying, more energy or whatever) to eliminate internal counters. For small timers (e.g The move time in pbobble) "Shift-P" to advance one frame can be handy. Watch out for multi-byte values. If you find a cheat like this check the bytes before/after for a more/less significant value. Timers 'usually' decrease. Occasionally they increase though (Even if the display decreases). Same for invincibility, assuming that the game gives you invincibility after dying etc. 3.2.3. Large Timers/Speed etc. Deal with the same as Lives/Credits etc. It may be better to start with a "Timer" cheat though. 3.2.4. Powerup's I'm afraid "Status" search is your best bet even if it is tedious. Don't forget to make good use of "E" as well as "NE" to save work. Try to do a search just before you collect/earn the power-up and then another immediately after receiving it. You may need to do sprite cheats. 3.2.5. Character Selection/Bubble Colour/Multiple Choice etc. Start with a "Slow but Sure". Go to other characters selecting "NE" each time and return to the first character and do an "E" again. N.B. Capcom games tend to use the same value on the character select screen as in the games. Most other games have a mapping between the character select and in-game. It may be safer to use type 000 with the in-game value than the character select screen with 001. E.g. for wwfwfest you can't select Hawk/Animal from the character select screen as the code was never completed. Instead they have to be selected using the addresses used during a match. 3.2.6. Quiz Games. Usually easy, the computer knows the correct answer and compares it against the given one. After choosing an answer do a select on the correct answer and make a watch cheat for that address. Don't forget to label which values are associated with which choice of answer. 3.2.7. Mahjong I still can't figure out the suites or the values. You are on your own ;) 3.2.8. ROM Cheats The debugger is your friend. Compile with DEBUG=1 and enable debug in mame.ini. Hit `/~ to enter the debugger. F1 lists the commands. Tab cycles through the panels. Each has a different help. You can only write to RAM in the debugger hence the ROM cheats. 4. Cheat File Format (From Pugsy's CHEAT.DAT) All fields are separated by a colon (:) -Name of the game (short name) [zip file or directory] -No of the CPU usually 0, only different in multiple CPU games -Address in Hexadecimal (where to poke) -Data to put at this address in hexadecimal (what to poke) -Special (see below) usually 000 -000 : the byte is poked every time and the cheat remains in active list. -001 : the byte is poked once and the cheat is removed from active list. -002 : the byte is poked every one second and the cheat remains in active list. -003 : the byte is poked every two seconds and the cheat remains in active list. -004 : the byte is poked every five seconds and the cheat remains in active list. -005 : the byte is poked one second after the original value has changed and the cheat remains in active list. -006 : the byte is poked two seconds after the original value has changed and the cheat remains in active list. -007 : the byte is poked five seconds after the original value has changed and the cheat remains in active list. -008 : the byte is poked unless the original value in being decremented by 1 each frame and the cheat remains in active list. -009 : the byte is poked unless the original value in being decremented by 2 each frame and the cheat remains in active list. -010 : the byte is poked unless the original value in being decremented by 3 each frame and the cheat remains in active list. -011 : the byte is poked unless the original value in being decremented by 4 each frame and the cheat remains in active list. -020 : the bits are set every time and the cheat remains in active list. -021 : the bits are set once and the cheat is removed from active list. -022 : the bits are set every second and the cheat remains in active list. -023 : the bits are set every two seconds and the cheat remains in active list. -024 : the bits are set every five seconds and the cheat remains in active list. -040 : the bits are reset every time and the cheat remains in active list. -041 : the bits are reset once and the cheat is removed from active list. -042 : the bits are reset every second and the cheat remains in active list. -043 : the bits are reset every two seconds and the cheat remains in active list. -044 : the bits are reset every five seconds and the cheat remains in active list. -060 : the user selects a decimal value from 0 to byte (display : 0 to byte) - the value is poked once when it changes and the cheat is removed from the active list. -061 : the user selects a decimal value from 0 to byte (display : 1 to byte+1) - the value is poked once when it changes and the cheat is removed from the active list. -062 : the user selects a decimal value from 1 to byte (display : 1 to byte) - the value is poked once when it changes and the cheat is removed from the active list. -063 : the user selects a BCD value from 0 to byte (display : 0 to byte) - the value is poked once when it changes and the cheat is removed from the active list. -064 : the user selects a BCD value from 0 to byte (display : 1 to byte+1) - the value is poked once when it changes and the cheat is removed from the active list. -065 : the user selects a BCD value from 1 to byte (display : 1 to byte) - the value is poked once when it changes and the cheat is removed from the active list. -070 : the user selects a decimal value from 0 to byte (display : 0 to byte) - the value is poked once and the cheat is removed from the active list. -071 : the user selects a decimal value from 0 to byte (display : 1 to byte+1) - the value is poked once and the cheat is removed from the active list. -072 : the user selects a decimal value from 1 to byte (display : 1 to byte) - the value is poked once and the cheat is removed from the active list. -073 : the user selects a BCD value from 0 to byte (display : 0 to byte) - the value is poked once and the cheat is removed from the active list. -074 : the user selects a BCD value from 0 to byte (display : 1 to byte+1) - the value is poked once and the cheat is removed from the active list. -075 : the user selects a BCD value from 1 to byte (display : 1 to byte) - the value is poked once and the cheat is removed from the active list. -100 : constantly pokes the value to the selected CPU's ROM region, adjusting for endian issues. -101 : pokes the value to the selected CPU's ROM region, adjusting for endian issues, and the cheat is removed from the active list. -102 : constantly pokes the value to the selected CPU's ROM region. -103 : pokes the value to the selected CPU's ROM region and the cheat is removed from the active list. -110 : pokes the value to the memory mapped to the memory handler, adjusting for endian issues. -111 : pokes the value to the memory mapped to the memory handler, adjusting for endian issues, and the cheat is removed from the active list. -112 : pokes the value to the memory mapped to the memory handler -113 : pokes the value to the memory mapped to the memory handler, and the cheat is removed from the active list. -120 : pokes the value to the eeprom buffer, and the cheat is removed -121 : sets the bits in the eeprom buffer, and the cheat is removed -122 : clears the bits in the eeprom buffer, and the cheat is removed -500 to 622: These cheat types are identical to types 000 to 122 except they are used in linked cheats (i.e. of 1/8 type). The first cheat in the link list will be the normal type (eg type 000) and the remaining cheats (eg 2/8...8/8) will be of this type (eg type 500). The '' part with the first cheat should normally be shown as the cheat engine treats it all as one! -998 : this is used as a watch cheat, ideal for showing answers in quiz games . -999 : this is used for comments only, cannot be enabled/selected by the user. Normally surrounded by square brackets. -Description of the cheat (normally 29 characters max) -Extra Description line for above (1024 characters max) Notes: BCD stands for "Binary Coded Decimal". Simply, 0x09 incremented by one is equal to 0x10 instead of 0x0F. Just using the decimal numbers from hex to make it easier to read. Multipart cheats take the name of the first part of the cheat. Hence you can append (2/2) etc. to subsequent parts without worry of it showing up in the menu. 5. Future Ian plans to rewrite and extend the cheat type list by using a 32(I think) bit based format. This should make the engine simpler and more reliable whilst making it more flexible. The only downside is that it will be more complicated to manually edit the cheats in a text-editor. 6. History Version 0.5 : 19/09/01 : Added EEPROM Cheat types + Kawaks/Nebula info Version 0.4 : 16/09/01 : First final CHEAT.DAT for ~1 year. Updated to reflect this Version 0.1->0.3 : Private releases 7. Thanks Pugsy, Stephh, Ian Patterson. Anyone else who helps me from time to time. Haze, Mish, Raz etc. And of course my beautiful (& understanding) women ;)