Author Topic: Generating FF7 save data checksum  (Read 6201 times)

burekfust

  • Guest
Generating FF7 save data checksum
« on: 2007-07-05 04:08:12 »
So I've been wanting to make a save file editor for FFVII (Playstation version)
and I needed to know something and I figured this was the place to ask.
(Since you guys are pretty much the experts on this game)

I found this wonderful page here... http://wiki.qhimm.com/FF7/Savemap
which is great, by the way, and I started digging into my save file.
The problem for me comes with generating the checksum at the top.
I tried generating the different standard checksums for my save block,
which goes to 4339/10F3 (the last byte), I believe...
but my results don't match the one in the data.

I don't know much about checksums and I was hoping you guys might help me with generating one.
Like, for example, what algorithm does the game use?
And am I generating the right blocks of data?

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Generating FF7 save data checksum
« Reply #1 on: 2007-07-05 11:49:26 »

burekfust

  • Guest
Re: Generating FF7 save data checksum
« Reply #2 on: 2007-07-05 17:44:37 »
Hi! I see that you have a checksum calculator there.
Unfortunately I don't know the language. (Me is stupid :-()
I was hoping that I could be given some plain English specifics.
Thanks a lot!

ice_cold513

  • *
  • Posts: 494
    • View Profile
Re: Generating FF7 save data checksum
« Reply #3 on: 2007-07-05 19:16:24 »
Dziugo

Thank you, never know i might need this some day.

burekfust

  • Guest
Re: Generating FF7 save data checksum
« Reply #4 on: 2007-07-07 03:02:06 »
Well, I don't know how that code works, so I'll try something myself...
Maybe I'll change 99% of my save data bytes to zeros and then use a gameshark cheat to bypass the checksum error and then once my save is loaded I'll save the game again and see how it generates the checksum based on the bytes that aren't zeros.
But I have a feeling that that won't give me an easy answer either.
There's probably unobvious math in there, besides addition, that I'll have to figure out.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Generating FF7 save data checksum
« Reply #5 on: 2007-07-07 07:59:52 »
Which (programming) language do you understand, then?

burekfust

  • Guest
Re: Generating FF7 save data checksum
« Reply #6 on: 2007-07-07 08:09:52 »
Well, what language I'll use isn't important since I'm not asking for code.
I'm just wondering how the game calculates the checksum.
Like, it adds up all the bytes, adds 100, divides it by 32, yada yada etc....

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Generating FF7 save data checksum
« Reply #7 on: 2007-07-07 09:39:37 »
More like shifts(<<), ands(&), xors(^), yada yada etc...

burekfust

  • Guest
Re: Generating FF7 save data checksum
« Reply #8 on: 2007-07-07 09:57:40 »
I see that I have to figure everything out myself.
I'll just let myself out.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Generating FF7 save data checksum
« Reply #9 on: 2007-07-09 23:25:29 »
I see that I have to figure everything out myself.
I'll just let myself out.
This is why the language is important because the CRC calculator is based on C or C++ I think, actually I recommend you look up CRC calculations to find out about it.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: Generating FF7 save data checksum
« Reply #10 on: 2007-07-10 07:33:44 »
I asked for the language, because it's usually easier to understand an algorithm analysing the code written in language you know + you won't have to convert it from pseudo-code later (I highly doubt, that you want to calculate the checksum on a piece of paper).