Game cheats

From PCSX2 Wiki
Jump to: navigation, search

Patching system is one of the most splendid features of PCSX2. Some patches will help you make the broken game playable by messing with its code skipping some of its parts. You'll have to discover and download these patches from the Internet. Still there are other patches help you cheat on games while playing. So even if your skill is not enough to beat the game fairly you won't be frustrated like on the real PS2. All you have to do is to find or better yet create your own cheat for the game. Here goes a small tutorial that can help you understand a bit how does these cheats work and how to create your own cheat.

PCSX2 uses so-called CRC for each game. This CRC is a special control sum of all bytes in the main game executable. It helps to distinguish not only the different games but even the different regions and the different editions of one game. This is a precaution not to apply the patch created for one game version on another making the game unplayable/crashing. The CRC is a 8 chars long hexadecimal number. You can find the number for your game in PCSX2 console when the game is starting (or on the console caption in some PCSX2 versions, it looks like "Game running [CRC=xxxxxxxx]").

  • I found out that you can find the CRC number in the sstates directory where you keep your save states. Each save state of a game is saved with the CRC number of that certain game.(edit-dhillel)

All the patches are stored in the patches folder by default. Your installation of PCSX2 may already have many patches in it. These are the default ones to improve some games behavior (they skip videos or some sections in otherwise hanging games). When you create your patch it will be placed here as well and will have the name <GameCRC>.pnach (for example a patch for Drakan 2 PAL has name 04f9d87f.pnach).

This tutorial will cover the game Resident Evil Code: Veronica X. This is not a simple game to play and it's quite simple to cheat plus you may need some cheats playing it. The game starts in a prison with only a knife for a weapon. Our first priority will be to make Claire immortal so her condition will steadily be in green. There is a byte or a word (2 bytes) somewhere in the game memory that is responsible for storing the Claire's condition. Let's assume this is a byte first. We will need to vary this value to catch it so Claire has to take some damage and find a green herb to be able to restore it. It's quite easy to take any amount of damage in this game so it won't be a problem. When you get to the safer place (it may prove harder) press ESC and choose Patch Finder... from the Misc submenu of main GUI menu. The pictured dialog will pop up. The dialog allows us to search through EE RAM and IOP RAM. Assuming the main work is done by EE processor let's start to search for our condition byte in EE RAM. Every byte has 8 bits and it is the smallest data unit so we will select 8bits size. Let's assume also that the condition cannot be less than zero (unsigned) although it will not make much difference if we would assume otherwise.

Cheat of patch finder

Currently this dialog holds no data; this is its starting state. As the Claire health must not be equal zero now (or else she would die) let's select Not Equal, compared to Specific Value and place a zero in the edit box. Let's hit Search after that. The program will find some 13 million values not equal to zero. That's good for a start. Let's hit Close button now and return to game by Run-Execute.

We'll need to walk around a bit (make a few steps) and press ESC again getting to the patch finder by Misc-Patch finder menu. We can see that the page is still holding our previous search so now we will search in those 13,5 million bytes left (we need to find only one!). There are no changes in Claire condition from the last time so set the options as Equal and Old Value (we're leaving only those bytes not changed from the previous search). Press Search button again. Now the number of result bytes is decreased by many thousands maybe a million if you're lucky enough (see Intermediate stage picture).

Intermediate stage

You will have to repeat this process by entering back in game playing a small its portion (entering the new area, changing or firing weapons, etc...) and coming back to this menu until the number of bytes left will be almost unchangeable (it will stay around 2-3 million). So now we have eliminated all those useless bytes can prevent us from finding the only needed one. Go ingame and use your green herb to help Claire to recover her health and then jump back into Patch Finder. We have improved our health condition so we will change the option from Equal to Not Equal and hit Search again. Note that we cannot use Greater here because strangely enough patch finder will still treat unsigned bytes as singed ones when comparing. It's now only 3-5 values left here (out of initial 13 million!). Looking at them we can notice that the byte at 004326fc have a value of 150 (decimal) (or in some cases the finder will show -106 which is still 150 because our byte must not have a sign this is a fault of patch finder to proper understand our instructions. If you don't understand why -106 is 150 (256-106=150) try out this tutorial, read the Twos Complement paragraph). So the byte at 004326fc has been increased from say 100 to 150. This makes sense as a health with maximum value of 150. Let's assume we have found the needed byte. Select it in the result pane and press Add button. The Add cheat small dialog will pop up. Set the new value field to 150 and press OK.

Let's enable now our new found cheat to see if it will work. Leave the patch finder dialog and start Patch Browser... from the same Misc menu instead. You will see the only line in the tables which must be our patch (see the picture Patch Browser dialog). Select it and press Enable/Disable button to enable the patch (notice its state has changed).

Patch Browser dialog

To write the patch to a file in the mentioned patches folder (i.e. save the patch to disk) press pnach Writer button, comment the result anyhow (or leave it as it is) and push Save. We have now saved our patch/cheat to disk so it will always load and work whenever you play the game.

This patch does not permit the game to change the value at 004326fc (presumably the health) so the value will always be 150 (96 hex). Let's finally go back in game and try to take some more damage only to find out that Claire cannot take any damage now. We have made it!

The next step can be to find the ammo storage and make it unlimited. It's easier because you can work now with a definite number (searching for bytes with 15 (number of bullets) and then search for 14 in the result after fired one bullet). However notice that this game will not store the ammo on one address but it rather can be stored anywhere within your item list box (your bag?). If you find the ammo value and set it to 100 the game will set quantity of any item you place in that slot to 100. It's not a big problem though as the ammo issue is now solved.

This game is quite easy to cheat but there are games that never store the values in certain stable places the placing may change the next time you load the game or even during the game progress so you'd need to find the current value position, change it (increasing the first-aids number for example) and play further on.

This concludes the tutorial. Have fun and good luck cheating!