The above video goes away if you are a member and logged in, so log in now!
Hexediting game saves –
Alright, I bought Winhex recently. I have Scarface for PS2 and wanted to increase my money that is on my game save.
I FTP'd into my Memory Card, pulled of the game save.
I said to myself "I want to find where the hell the strings for editing the amount of money are." I then thought, the easiest way to find this out, is to have two different game saves and compare them.
I fire the game back up, spend $5,000 for a supplier in the game. My money drops from $45,229 down to $40,229. I also happen to buy 700grams from one of the weird characters in the game.
I go to the bank, save the game, turn off the game. I then FTP back into my Memory card to pull off the new save. I open them up in WinHex and run the comparison on them.
I think to myself, "cool!", this is easy. Well, here was the output of that....
1,863 differences found !
Search result for differences
1. c:\old\BASLUS-21111-S1: 65,025 bytes
2. c:\new\BASLUS-21111-S1: 65,025 bytes
B: 16 1D
C: 10 15
D: 1B 22
E: 18 15
34: 8C 8B
1C2: 62 61
1C3: 6C 69
1C4: 6E 61
1C5: 65 6B
1C6: 69 63
1C7: 6C 64
1C8: 63 69
1C9: 6C 6F
1CF: 0D 04
1D3: 61 68
1D4: 69 62
[truncated to be nice]
1,863 difference(s) found.
Going a little more insane, I say to myself, "why not just trying searching for the dollar amount changes, then editing that once you find it?"
So, I type in 40229 in the new file(game save) and 45229 in the old file(game save). To my delight I find both in each save. They are not in the same exact location, but a line or two apart. So what the hell, I modify the 40229 and change it to 99999, save it, transfer it back to the Memory Card, load up Scarface, and what do you know....
I feel like a fool. Any advise, direction, suggestions or comments?
Anything is helpful, even if it is just a "I have no clue, but do not give up man !!"
I found out what I was looking for, hexediting is the hardcore route, which I do not mind, but would not accomplish for quite a while.
for binary compares, you can use (like you did) fc.exe. however a better way to visually see constant differences are with tools like ultracompare and beyond compare (both are available as trial period shareware). as far as the corrupt file, that just means that it's storing a checksum value somewhere (sometimes more than one spot). so do a simple thing to find a checksum value: save (in two different slots) one right after another. there will be some minor changes such as time, etc, but you should be able to spot the checksum values. figuring out the checksum method is a different thing. for ffxii, they use a simple crc32 approach (try this first) but you can make just about any algorithm for creating a checksum. hopefully they didn't make things too custom.
if any of this is way above your head, then you need to read about these things and learn them, otherwise, just stick it out and play the game
Checksum32 and CRC32 are the two most common checksums used in saves although I have seen routines based on XOR
Since the dollar values in the save file are probably stored as base 16 rather than base 10 values you might try seraching for 00006d25 (40229) in the new file and 0000b0ad (45229) in the old file. Make sure that they are approximately offset by the same amount from the beginning of the two files, or appear in relatively the same area in the two files. Use the value FFFFFFFF (4294967295).
Too bad i got here too late, any way, what thereal_zap said is true. PS2 games do a hash in the data block and store that in general 1/2/4 bytes some where, for every change you made a new hash is done and stored, the info could be XOR, ADD, SUB.
There is a specific tool for that, Checksum repair:
I was the one that translated that tool back then, but never knew how to find where the checksum was stored by my self, in Japan there is a game magazine named "game rabo"(gamelab) that publish howto do that and how to hack the save files of the new games at the time. Looking at the magazine it was damn easy to do, just change the bytes use the tool to fix the checksum and upload to MC.
The tool was made to work with saves from EMS Memory Adapter (PSU files), there was a version of the hardware made in Japan that release the adapter with this software, it was exactly the same hardware but the name of the adapter was "Memory Juggler". Maybe the tool might work with other save format, don't know.
If any one that can read japanese and translate this copy that i've made from the magazine, editing saves could be more easy to us. I've upload the file here:
PS: More info about this:
Last edited by katananja; 05-23-2008 at 08:26 PM.