Qhimm.com Forums
Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: Topher on 2003-06-09 23:40:48
-
Can anyone tell me what region (and what method) I have to calculate the checksum with? I've had a look at the source for Griever, but with my suckiness, couldn't figure it out (and it looks like it's in assembly, anyway). Any help would be greatly appreciated.
-
Ok self denegrating request aside...
It's not a checksum
It's a CRC or Cyclic Redundancy Check
Yes it's in assembly the code generates an internal table first then calculates the CRC value.
I'm not sure why you need someone to show you how it works, perhaps you should look up how CRC's work in general with Google,
Description of the alogrythm (http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?cyclic+redundancy+check), Source Code for performing one in C (http://ams.cern.ch/AMS/Dataformats/node26.html).[/list:u]
Spend some time looking at how it works, and it will come to you what the seed is (0xFFFF in this case) and the polynomial is etc. :)
Code is fun!
Cyb
-
Thanks, Cyberman. I figured it was probably a CRC (that's what FF7 uses) not a checksum. Anyway, I'll see what I can do.
-
Did anyone mess with ff9 saves? Which crc method does it use? It seems it checks almost all the data slot (for 1st slot it will be 0x2000 - 0x33fe). I tried with crc16 with all the polymonials but it does not seem to work. I'm not good at this kind of stuff, and I don't understand it very well, but it's worth trying. But now I'm in dead end, any help?
(sorry for my baaad english, and oh Hi again after a year or so not beeing here)
-
Can anyone verify this ?
I have tried running the CRC-16 (CCITT) algorithm over my save. I was unclear about the starting location and the number of bytes to check. I checked the assembly source and came up with the starting location is the beginning of the GF block in the save. This is the block that starts out with Quetzcotl's name in Shift-JIS format.
Then I didn't know many bytes were checked. According to the assembly source again this seems to be 4944 bytes (1350 base 16/hex). However running the CRC code over this block of data failed to produce the same checksum. I am running the CRC on each word (16 bit, 2 bytes) at a time.
Any tips, or does anyone know what I'm doing wrong ?
-
Did anyone mess with ff9 saves? Which crc method does it use? It seems it checks almost all the data slot (for 1st slot it will be 0x2000 - 0x33fe). I tried with crc16 with all the polymonials but it does not seem to work. I'm not good at this kind of stuff, and I don't understand it very well, but it's worth trying. But now I'm in dead end, any help?
(sorry for my baaad english, and oh Hi again after a year or so not beeing here)
I've messed with them some Click the Image (http://members.socket.net/~cyberman/) on my site to see where I am with that. I haven't bothered with the CRC's because I was more interested in what data they contained. Reality is not much data. CRC's vary depending on what data they are applied to. For FF9 it seems only a small bit of the data is actually checked (if any I haven't tried killing the saves that might be interesting). I would like to run the game code in a debugger so I'm modifying PCSX for my fun (think adding a gnudebug compatible interface into the interpretor). This can permit one to find all sorts of useful information (for me a lot of FF7 data fits this bill). Hopefully I'll be successful (heh hopefully).
Anyhow I have some of the FF9 format figured out such as names the party information (somewhate there), attributes and toys. I haven't quite figured out peoples skills/magic learned information. It's a bit weird since they are different for each person. There are universal skills though that everyone can learn (fortunately) and they are all located in the same spot in the persons save information. Once I get all the information figured out I guess the next is to acertain what is CRC checked, the easiest way to do that is to run it in a debugger (PCSX in interpretor mode with the debugger option activated in other words).
Cyb