Author Topic: FF7 Savemap  (Read 21103 times)

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.
FF7 Savemap
« Reply #25 on: 2006-02-25 13:04:50 »
If you get 2 DWords which describe Object coordinates on the world map, you have to decode them first:
First DWord:
Code: [Select]
[1F 1E 1D 1C 1B 1A 19 18:17 16 15 14 13 12 11 10:0F 0E 0D 0C 0B 0A 09 08:07 06 05 04 03 02 01 00]
|     DIRECTION/0x10    |  OBJECT'S ID |               X COORDINATE OF THE OBJECT               |
Second DWord:
Code: [Select]
[1F 1E 1D 1C 1B 1A 19 18:17 16 15 14 13 12 11 10:0F 0E 0D 0C 0B 0A 09 08:07 06 05 04 03 02 01 00]
|        Z COORDINATE OF THE OBJECT       |              Y COORDINATE OF THE OBJECT             |
Coordinates:
0 <= X < 0x48000  -  cannot be negative or greater than 0x47FFF
0 <= Y < 0x38000
Z - is signed

Direction is multiplied by 0x10 after reading from save-game, but that's not affecting anything so we can think of it as a byte value.

Object's ID:
Determines what kind of object are we dealing with. Few IDs I've seen:
Code: [Select]
0x00 - Party
0x03 - Highwind
0x05 - Tiny Bronco
0x06 - Buggy
0x0D - Submarine
0x13 - Chocobo
0x1D - Weapon


Example:
We have these RAW bytes from SaveGame (offset 0xF5C):
Code: [Select]
ED AE 03 40 30 1E B2 03
Our DWords are:
Code: [Select]
1st: 0x4003AEED
2nd: 0x03B21E30

Unpacking:
Code: [Select]
X = 1st & 0x7FFFF
Y = 2nd & 0x3FFFF
Z = 2nd >> 0x12 (shift arithmetic right)
ID = (1st >> 0x13)&0x1F
DIR = (1st >> 0x14)&0x0FF0

Results:
Code: [Select]
X = 0x03AEED
Y = 0x021E30
Z = 0x00EC
ID = 0x00 (Party)
DIR = 0x0400


This will hopefully throw some light on this part of SaveGame. Good luck with discoveries.

dziugo

FeuFeu

  • *
  • Posts: 54
    • View Profile
FF7 Savemap
« Reply #26 on: 2006-02-25 18:05:38 »
Wow, just... wow :D This is really great, dziugo.
(I wish I had enough time to learn Assembler and familiarize myself with the disassembled code -_- )

As for discoveries, there's nothing really interesting so far. The directory where I stored everything related to the savemap was deleted and I had to code again the checksum and the binary diff tools. That and the fact my new job starts the following Wednesday, free time will quickly disappear...

Anyway, the new bits discovered are the following :

Offset 0x0C86
Mask 0x04 applied when you first reach the bottom of the first reactor and there's a camera effect to show the place.

Offset 0x0BA4 (Plot Progression Variable)
Unlike the other items, Restore must be gotten in order to continue the story. Therefore, the PPV is incremented (0E -> 0F) to indicate the Materia has been picked up.


I have to take a look at another savegame where I've seen the word 'Female' (26 45 4D 41 4C 45, in 'FF Text' format) stored. It's apparently related to the only Chocobo I have, and it seems nothing like this has been reported in the savemap.

Sephiroth 1311

  • *
  • Posts: 27
    • View Profile
    • http://www.sadnescity.it
FF7 Savemap
« Reply #27 on: 2006-02-27 06:09:58 »
Quote from: FeuFeu
I have to take a look at another savegame where I've seen the word 'Female' (26 45 4D 41 4C 45, in 'FF Text' format) stored. It's apparently related to the only Chocobo I have, and it seems nothing like this has been reported in the savemap.

Oh, yes, I'm quite interested in this.  :D
I think it should be referred to the sex of the Chocobos... I've checked another save and there is the word "male" on it, not Female...

Besides, I don't find this word anywhere in the game's files, nor I found infos 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.
FF7 Savemap
« Reply #28 on: 2006-02-27 07:13:49 »
It's pretty much decoded. See wiki.

dziugo

Sephiroth 1311

  • *
  • Posts: 27
    • View Profile
    • http://www.sadnescity.it
FF7 Savemap
« Reply #29 on: 2006-03-02 21:11:36 »
Quote from: dziugo
It's pretty much decoded. See wiki.

dziugo

Mh, I had already checked it without success... but I can't still find infos about this "damn sex" (lol). :o
Could you please tell me more or linking the right section of the wiki? ;)
Thanks in advance.

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.
FF7 Savemap
« Reply #30 on: 2006-03-02 21:32:24 »
Quote from: Sephiroth 1311
Could you please tell me more or linking the right section of the wiki?
From wiki:
Code: [Select]
Table 3: Chocobo Record
  Offset: 0xE
  Length: 1 byte
  Description:  1: female
dziugo

FeuFeu

  • *
  • Posts: 54
    • View Profile
FF7 Savemap
« Reply #31 on: 2006-03-03 11:20:32 »
Yeah, there's this one byte.
But what I (and Sephiroth 1311 as well) noticed is a FFText field containing the sex word "male/female". I find it strange to find it stored twice and in different formats. I haven't had time to work on it since the last time, but I'll try to this weekend.

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.
FF7 Savemap
« Reply #32 on: 2006-03-03 13:52:02 »
Oh... <goes to do some debugging work> It looks like a string which is used to describe the sex of the chocobo which is currently on the screen (if that info is actually displayed). Yeah... I'm pretty sure it's always updated before reading from it.

dziugo

FeuFeu

  • *
  • Posts: 54
    • View Profile
FF7 Savemap
« Reply #33 on: 2006-03-03 21:02:28 »
Quote from: dziugo
It looks like a string which is used to describe the sex of the chocobo which is currently on the screen (if that info is actually displayed).


That was exactly the guess I had. And this information is indeed displayed on several screens (when you feed a Chocobo, select which one to use on the world map, etc).