Author Topic: Save games  (Read 4023 times)

DeadLajik

  • *
  • Posts: 53
    • View Profile
Save games
« on: 2003-09-27 19:16:03 »
Is there some documentation on how saved games are structured in Final Fantasy 7 and 8 (probably similar to 9 and 10). Does it use compression? Are they even the same?

I looked through the Griever source but there are magic numbers all over the place and It can be hard to follow.

Thanks,

DeadLajik.

Aaron

  • *
  • Posts: 2818
    • View Profile
    • http://aaron-kelley.net/
Save games
« Reply #1 on: 2003-09-27 20:04:50 »
I'm pretty sure FF8's save format uses compression.  I'm not sure about FF7.  I don't know about documentation... I'm sure its around, but Qhimm's source code is also something to look at :P He has an editor for FF7, too, (its called "Jenova") and the source code is available...  Have you looked at that?

Skillster/RedSarg99

  • *
  • Posts: 2286
  • Loving every Final Fantasy
    • View Profile
Save games
« Reply #2 on: 2003-09-27 20:11:43 »
are u talking about the psx version or pc version

DeadLajik

  • *
  • Posts: 53
    • View Profile
Save games
« Reply #3 on: 2003-09-28 13:54:48 »
Well technically I am talking about the PSX version. I do not own the PC version unfortunently. I was able to obtain some save games from the web for the PC, from DexDrive, and my own. They all have a similar structure sort of, but they ofcourse start at different offsets (which is what the Griever source code seems to suggest also).

I've started to read the source more and more and according to the source only one of the saved game files is compressed and this is "m_type = 0". This is the saved game that is approximently 8192 bytes.  All saved game files do have a checksum though which is calculated some way that i havn't determined yet.

All I have determined is that when a file is dragged and dropped into Griever its type is determined based on it's file size. Griever then computes the offset to start searching for the FF8 record.  Griever then seeks to this offset and reads 8k worth of data from the file into a C structure. Griever then manipulates this structure somehow (havn't got that far) and rewrites it to the file (i think).

Also, maybe this should go to Qhimm, but I think there is a mistake in the source file. In comparing my files to these records I've found the following lines:

Code: [Select]

struct FF8DESC {
USHORT checktag; // Tag - must be 0x0FF8
USHORT location; // Current location
UNKNOWN zz0[4];
         .....


I believe that the checktag variable should be 0xFF08.

Oh well, I'm still looking into the format for FF8 some more..

If it hasn't been done already I'd like to write some documentation based on the save game files for FF8 - FF10 and up.  The final fantasy 8 games are around 8k while FF10 save games are closer to 60k. I havn't looked at FF9, and I don't even own FF7.. because it is impossible to find at stores.

Thanks to all of you who have helped me, and thanks to Qhimm for providing source code for Griever.

Thanks,

DeadLajik

[/code]

Cyberman

  • *
  • Posts: 1572
    • View Profile
Save games
« Reply #4 on: 2003-10-06 15:59:29 »
Well actually I have quite a bit detailed about FF8 and some of FF9 FF7 was pretty much done by Qhimm there are only a few things that might need figuring out in it's save format I would need something to read my memcards to deal with FF10 (heh).

What do you need to know about FF8 save format? I have some of the 'unknown' bitfields figured out, I just got into getting the FF7 editor working and forgot to finish going through the game and getting the bit field information.

Cyb

DeadLajik

  • *
  • Posts: 53
    • View Profile
Save games
« Reply #5 on: 2003-10-10 23:47:43 »
Cyberman,

I'm specifically looking into one UNKNOWN bitfield.. This is the first one as specified by Griever:

Code: [Select]

struct FF8BLOCK {
UNKNOWN zz1[384];
         // etc etc...


Ok, obviously this structure contains the data structure of the very beginning bits of the save. On the PSX this is the description, and icon data. However, I know that FF8 uses only one frame of animation so the save game file starts at the 256 byte (or offset 0x100 from the 'S' in 'SC' at the beginning of the save).

Do you know what occurs between the beginning of the save and the beginning of what is referred to as the "checksum" ?

In other words I am curious if you know what the last 128 bytes of zz1 byte array would be? This would be zz1[255] to zz1[383].

Thanks,

DeadLajik