How pnach files work
#21
The SLUS is written on the disc itself (sles, scas, etc) however you can put anything in gametitle, it really doesn't matter
Reply

Sponsored links

#22
(06-11-2009, 03:51 AM)Darkon Wrote: Hi, I'm having trouble getting a cheat in Grandia III US working. Here is my pnach configuration:
Code:
gametitle=Grandia III [SLUS 21334] (U) [5B657DAD]
comment=Infinite Health for all Chars
// Yuki
patch=1,EE,005B7776,word,0000270F

And this is the RAW code:
Code:
1AAF0B67 0000270F

For the life of me, I can't seem to find out what I did wrong. I'm able to get ingame and load my file but it shows Yuki and Alfina's MP as 0/0 MP, which is wrong. o_o;

Any help would be appreciated. Thanks.
Darkon, the 1AAF0B57 is not a raw code, assuming codes from codebreaker for versions before 7 is 'raw' is a common mistake, this code yet must be decrypted and will return something like 10xxxxxx 0000270F.

notice that 1 should not be used in a pnach file and SHOULD be changed to 0 (zero) and "short" for the operand type if explicitly used this way. If using extended the 1 MUST be kept to indicate the internal cheat engine it is "short".

The "common" codes 0, 1 and 2 means respectively "byte", "short" and "word" (sorry if it was formerly mentioned in this thread).

PS: for the code for Grandia
Code:
gametitle=Grandia III [SLUS 21334] (U) [5B657DAD]
comment=Infinite Health for all Chars
// Yuki
patch=1,EE,005B7776,word,0000270F
Although this code may work, it's wrong ... notice 270F is a "short" (two bytes) and using "word" (four bytes) there you will be actually placing zeros where they were not supposed to be.

PS2: The following can be skipped by anyone not interested in the memory configuration and hex editing.
To make things yet more confusing, that format does not reflect what is actually placed in memory. PC architecture uses what is called "little endian" where the less significtive bits comes first. Hex editing the same 270F would be sequenced as "0F 27" ... the same is valid for words too: 12345678 is sequenced as "78 56 34 12" and this is a common source of mistakes.
Imagination is where we are truly real
Reply
#23
To understand the importance of "byte", "short" and "word" imagine the following scenery:

you want to edit the character stats and they are bytes with a 99 (decimal) max, the code would be for the three firsts:
Code:
patch=1,EE,005B7776,byte,00000063
patch=1,EE,005B7777,byte,00000063
patch=1,EE,005B7778,byte,00000063

This works fine, now imagine the "byte" there is changed to "word"...
the first code will put 99 at 005B7776 and fill until 005B7779 with zeros...
Now another detail, byte fields can be put at any address in the memory, short can be put only in multiple of 2 boundary and word can be put only in multiples of 4 boundary ... this mean if you specifies an wrong address the assembler automatically gives an offset to it so it satisfy the boundaries rules...
Besides one could enjoy that characteristic to, for example, filling 4 consecutive byte length stats with 99 using word.
Code:
patch=1,EE,005B7776,word,63636363
Voilá this works... now... we try it again using another address

Code:
patch=1,EE,005B777B,word,63636363
- There is an error in that code, one which can crash the emulator or just does not work so correct as it should. I let to you to find the error.

So, changing the "byte" for "word" in the above code and address range lead to a complete mess. Notice when the code is actually a "word" the subsequent address will have an offset of 4, you can verify it easily looking the addresses for two consecutive (in memory) codes. The same for "short" except the offset is 2 in this case.

PS: Because the cheat engine uses a proprietary format, it may be possible the above rules being bypassed and whatever combination is actually feed byte to byte and so the boundaries rules becomes void. I don't know for sure, actually I never tested this possibility, still disrespecting the addresses rules is a not a thing I advise because can lead to difficult to track bugs.
Imagination is where we are truly real
Reply
#24
when i look in my patches folder i see theres over 20 different files.
i only play one game and its
dbz tenkaichi 3 ntsc english.
which file should i go for?
or am i missing somthing you said?
Reply
#25
The file name must be the same as the game's CRC you can see in the console.

PS: are you in the old 0.9.6 version?
If 0.9.7 the folder used is "cheats", you may need to create it and place the pnachs there.
Imagination is where we are truly real
Reply
#26
Quick question. Will multi-line comments work? Example:
comment=line 1
comment=line 2
comment=line 3
Reply
#27
I wanted to help clarify the folder locations for patches/cheats for those using beta 0.9.7

Most of the configuration settings (e.g. ini's, bios, memcards) are now stored in the user profile directory in windows:
Win Vista/7: c:\users\<username>\Documents\pcsx2
Win XP: c:\documents and settings\My Documents\pcsx2 <=== This is assumed i don't have XP anymore

However this is NOT (at least for me) where the cheats are pulled from... instead i needed to MAKE a new directory in:
"C:\Program Files (x86)\PCSX2 0.9.7\" (64 bit OS) C:\Program Files\PCSX2 0.9.7\ (32 bit OS)
called "Cheats" so that the folder structure is as follows:
C:\Program Files (x86)\PCSX2 0.9.7\Cheats (64 bit OS), C:\Program Files (x86)\PCSX2 0.9.7\Cheats (32 bit OS).

Here i placed my .pnach file and then bingo it works!

I'm assuming for true patches, we would need to create a "Patches" folder in the same place and choose "Enable Patches" in the file menu. Someone else will need to confirm this as i have nothing other than cheats to use. Likewise, i am not sure if the Capitalization matters... windows usually doesn't care but i made it capital as all the other folders in that directory are first letter capital...
Reply
#28
No, no, please. Do not incentive using that C:\Program files... help the newcomers to Win7 and Vista (albeit these last may have discovered it by now) to avoid those folders. For ANY game, not only PCSX2. And that is not a void claiming, almost all and every issue related to permissions, access denied, need to disable UAC, running as DA Administrator, messing folders and files access rights, files disappearing in hidden folders, and do on... starts from installing there. The reason... they are "specially protected folders" for Win7 and Vista, strange things happens there... creepy...

Edit to complement: Creating a folder, something like C:\Games helps to keep things organized, the name really does not matter and can be in another partition or disc even, the really important is avoiding specially protected folders for games (notice that includes the Documents folder too, but just as install folder, it's OK and actually desirable, to keep the particular files there, like the inis, the saves, etc).
Imagination is where we are truly real
Reply
#29
(08-03-2010, 08:30 PM)nosisab Ken Keleh Wrote: <Removed duplicate text...

Yea sorry, i'm just stating what i'm guessing 90% of the inexperienced people installing beta 0.9.7 would have done, since the installer just prompts them to use their Program Files folder Blush But as a security administrator, installing things here is not a concern because i actually understand why Microsoft actual did what they did with these "special" folders, and how to undo them on just those program folders that have issues. Taking ownership and then giving your account Full Control of the folder should have no issues. An you should not have to disable UAC nor run as administrator.

However rather then start a battle with some on my second post on the forum instead I will just offer this advices... can we add some documentation on where these folders should like and which are missing from the beta that need to be created... i know in the config guide it tells you to unzip to c:\pcsx2 but unfortunately the 0.9.7 is not just a zip the installer will prompt people and they will blindly just click away...
Reply
#30
I know, it's many are unaware of that yet and little by little it will be known for most. That problem is known for a time now, mainly in forums related with moddable games, like Oblivion, for example, since the Vista came around. But sadly not very known in many others place, what leads to suggestions of workarounds that may worsen things along the time and does not expose the real cause.

I meant just a little piece of advice, each one that learn the real cause of all those issues is one more to help avoiding them from start.

PS: It's worse yet because those folders are the default for installation... Shame on you MS Sad

I too don't want a battle, but just by having to do what yourself told: running as the administrator, taking ownership, giving user account full control... already show something is wrong and actually negates and indeed worsen by far the security that special protection is supposed to provide. Sorry but that's not the better way to administrate a system. One could argue it acceptable in a mono user machine but in any more professional environment it could mean "fired" for the administrator. PCSX2 does not connect to the Internet, the danger is a bit lesser so, but many others games do...

So, please understand the only purpose is increasing awareness about the issues caused by installing games in general in c:\Program Files, nothing else matter here.
Imagination is where we are truly real
Reply




Users browsing this thread: 1 Guest(s)