User(s) browsing this thread: 3 Guest(s)

Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How pnach files work
Author Message
Pontifice Offline
Junior Member
*

Posts: 30
Joined: Dec 2008
Location:
Reputation: 0
Post: #1
How pnach files work
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
Code:
gametitle= Game name  [SLXS XXXX] (R)
comment=
// comment line
zerogs=00000400
patch=1,EE,003E531E,word,00004370
.....

Patch description:
Code:
patch=1,EE,003E531E,word,00004370

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.
Notes:
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
Code:
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
Code:
RAW code
D056BADC 0000F7FB
1025C7E8 0000424B

patch=1,EE,D056BADC,extended,0000F7FB
patch=1,EE,1025C7E8,extended,0000424B
NOTES:
Master codes are almost never needed
There is a bug with codes like
Code:
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).
(This post was last modified: 03-27-2009 06:00 PM by Pontifice.)
03-14-2009 01:49 AM
Find all posts by this user Quote this message in a reply

Sponsored links

Akaruz Offline
Member
**

Posts: 69
Joined: Feb 2009
Location:
Reputation: 0
Post: #2
RE: How pnach files work
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 ?

CPU - [PHENOM 9950 BE 3.0 GHZ | GFX - [Evga 260GTX]
OS - [Vista 64 Business] | RAM - [4GB Gskill 1066Mhz]
03-14-2009 02:20 AM
Find all posts by this user Quote this message in a reply
Pontifice Offline
Junior Member
*

Posts: 30
Joined: Dec 2008
Location:
Reputation: 0
Post: #3
RE: How pnach files work
(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
03-14-2009 02:23 AM
Find all posts by this user Quote this message in a reply
Bositman Online
Angel of Death
********

Posts: 13.481
Joined: Aug 2005
Location: Athens,Greece
Reputation: 247
Post: #4
RE: How pnach files work
Nice post Pontifice, I'll go ahead and add it in the useful links on the FAQ

[Image: newsig.jpg]
03-14-2009 03:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
x86 Offline
Junior Member
*

Posts: 40
Joined: Mar 2009
Location:
Reputation: 0
Post: #5
RE: How pnach files work
This is something I was curious about as well. Thanks.

Intel C2D E8400 4.5Ghz|EVGA nForce 680i|BFG Tech 8800GTX 675Mhz\2160Mhz|4GB Team Group PC2-9600 1200Mhz|Creative X-Fi|Vista 64 Bit
03-14-2009 04:34 AM
Find all posts by this user Quote this message in a reply
kevstah2004 Offline
Junior Member
*

Posts: 33
Joined: Mar 2009
Location:
Reputation: 0
Post: #6
RE: How pnach files work
With extended does that mean we can do joker codes like?

//Disable Vsync L3 R3
patch=0,EE,D1CAA102,extended,0000FFFD
patch=0,EE,0023d610,word,03E00008
patch=0,EE,D1CAA102,extended,0000FFFB
patch=0,EE,0023d610,word,27BDFFE0
03-19-2009 11:09 AM
Find all posts by this user Quote this message in a reply
Pontifice Offline
Junior Member
*

Posts: 30
Joined: Dec 2008
Location:
Reputation: 0
Post: #7
RE: How pnach files work
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
patch=0,EE,D1CAA102,extended,0000FFFD
patch=0,EE,0023d610,extended,03E00008
patch=0,EE,D1CAA102,extended,0000FFFB
patch=0,EE,0023d610,extended,27BDFFE0

You can mixed normal codes with extended but with different cheats.
(This post was last modified: 03-23-2009 09:30 PM by Pontifice.)
03-23-2009 09:26 PM
Find all posts by this user Quote this message in a reply
kevstah2004 Offline
Junior Member
*

Posts: 33
Joined: Mar 2009
Location:
Reputation: 0
Post: #8
RE: How pnach files work
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.

PC Specs
OS: Windows XP Professional SP2 32bit
CPU: Intel Pentium 4 2.00GHz
Memory: 768MB DDR2
GPU: SiS 650
SPU: Philips PSC605
03-25-2009 12:00 AM
Find all posts by this user Quote this message in a reply
Pontifice Offline
Junior Member
*

Posts: 30
Joined: Dec 2008
Location:
Reputation: 0
Post: #9
RE: How pnach files work
Try this one instead i didn't restore the "2" and the code was wrong
//Disable Vsync L3 R3
patch=0,EE,D1CAA102,extended,0000FFFD
patch=0,EE,2023d610,extended,03E00008
patch=0,EE,D1CAA102,extended,0000FFFB
patch=0,EE,2023d610,extended,27BDFFE0
03-25-2009 08:31 PM
Find all posts by this user Quote this message in a reply
kevstah2004 Offline
Junior Member
*

Posts: 33
Joined: Mar 2009
Location:
Reputation: 0
Post: #10
RE: How pnach files work
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.

PC Specs
OS: Windows XP Professional SP2 32bit
CPU: Intel Pentium 4 2.00GHz
Memory: 768MB DDR2
GPU: SiS 650
SPU: Philips PSC605
(This post was last modified: 03-26-2009 04:18 AM by kevstah2004.)
03-26-2009 03:28 AM
Find all posts by this user Quote this message in a reply
Post Reply 





Current time: 12-22-2014, 01:16 PM