..:: PCSX2 Forums ::..

Full Version: How pnach files work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Edit by Blyss Sarania: An updated version of this guide can be found here.

Pnach files are used to:
1.- Store game names
2.- Store game comments
3.- Store Zerogs configuration for that game
4.- Store games patches
4.- Store games cheats
5.- Other things (that "should" not be used)

You could find them in directory /patches/.
They have a name like XXXXXXXX.pnach where XXXXXXXX is the crc.

The pnach file's structure is something like
gametitle= Game name  [SLXS XXXX] (R)
// comment line

Patch description:

patch    -> it is a patch (:P)
1        -> it is active (1 on - 0 off)
EE       -> affects EE memory ( the other option is IOP don't mess with that)
003E531E -> it is the address affected by the patch
word     -> it is the data's size that will be written starting in the address position (it could be byte,short,word)
00004370 -> it is the data that will be written. NOTE: if the data's size (byte,short,word) is smaller than data written here it will get truncated.
all adresses need to start by 0 or 2 (it is the same, 0xxxxxxx and 2xxxxxxx points to the same data)

Raw cheats coul be translated to patches, but only ones starting by 0,1,2. Like this
003FE82C 00000002    patch=1,EE,003FE82C,byte,00000002
103FE830 00000202    patch=1,EE,003FE82C,short,00000202
203FE834 02020202    patch=1,EE,003FE82C,word,02020202
This codes could be translated because the codes that start by 0,1,2 only writes to memory, the rest do more things and can't be translated directly, if you do, you are doing it wrong, maybe it doesn't broke anything but probably it would do

Not so long ago it was added support to raw cheats in the pnach files.

It was nerver written how to use it, so here it is
RAW code
D056BADC 0000F7FB
1025C7E8 0000424B

Master codes are almost never needed
There is a bug with codes like
Dxxxxxxx 0010yyyy
Dxxxxxxx 0020yyyy
Dxxxxxxx 0030yyyy
Exxxxxxx 1yyyyyyy
Exxxxxxx 2yyyyyyy
Exxxxxxx 3yyyyyyy

At the moment have been implemented almost any code type but ones starting by 8,9,B,F (that don't have sense in pcsx2 or are very hard to program).
its a pity the Exxxxx codes are bugged , since a "few" raw from codebreaker do have the Exxxx ones :/ or you mean just those 6 examples are bugged ?
(03-14-2009, 02:20 AM)Akaruz Wrote: [ -> ]its a pity the Exxxxx codes are bugged , since a "few" raw from codebreaker do have the Exxxx ones :/ or you mean just those 6 examples are bugged ?
only that ones

Dxxxxxxx 0000yyyy
Exxxxxxx 0000yyyy
are ok.

the others have been fixed, but for now the fix is not even in SVN
Nice post Pontifice, I'll go ahead and add it in the useful links on the FAQ
This is something I was curious about as well. Thanks.
With extended does that mean we can do joker codes like?

//Disable Vsync L3 R3
Yes, it should work, but all with extended, if you uses a extended used it in all the code you translate, like:

//Disable Vsync L3 R3

You can mixed normal codes with extended but with different cheats.
Do you need to turn analog on? when using L3 or R3 "Use analog mode whenever possible" in LilyPad does pcsx2 automatically start your controller in analog mode or do you have to press the analog button? as I tried the above and it didn't work.
Try this one instead i didn't restore the "2" and the code was wrong
//Disable Vsync L3 R3
It worked :-) but it slowed the game down to about 2-4fps does this have anything to do with the frame limiter?
I know the code works cos i've used it on my real ps2 with codebreaker and it makes the game run about 4-6 times quicker with scanlines rushing past the screen as well as stopping the videos from playing.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14