Author Topic: "Gears" - The FF7 Documentaion Project  (Read 38274 times)

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« on: 2004-06-16 09:41:18 »
Well, you guys conviced me. I've decided to go ahead and document all the FF7 engine findings into one super document. I've decided to call it "Gears" as not only a name that inspires the inner workings of something, but also because it brings up the "Steampunk" genre that FF7 takes place in.

I finished the outline and will be populating the document with content that I can find from here and all around the Internet.

The byline was tricky to come up with as it's not just me. I decided to write "By Joshua Walker and the 'Qhimm team'"

I hope that's OK...

This will help us muchly. Not only will we have a centralized place for data collection, but will allow us to take the engine apart in small chunks that are easy to decipher.

Here is the outline/Table of contents. If you have anything you want to add, let me know. This will dictate the way the data is presented. Did I get all the terms right?

Code: [Select]

Table of Contents
Introduction
History
-PSX version overview
-PC version overview
Engine Basics
-Common Terms
-Parts of the Engine
-A Look at the Debug Room
The Kernel
-Kernel Overview
-Generic Program Flow
-The Threading System
-Data Caching
-File System Access
The Field Module
-Field Overview
-Event Scripting
-Triggers
-The 3D overlay
-The Actors
-The Ego
-Data Organization
-Textures (The TIM Files)
-Polygons (The PLY Files)
-Hierarchy (The HRC Files)
-Animation (The ANM files)
-Models (The RSD Files)
The Battle Module
-The Mathematics of Battle
-The Battle Scene
-Allys
-Enemies
-Magic Scripting
-Data Organization
-Textures (The TIM Files)
-Sprites (The SPT Files)
-Models (The RSD Files)
The Menu Module
-The Accessors
-Game Saves
The World Map
-Data Format
Appendix
-Item Listings
-Resource Lookup tables
-Source Code Forensics
BUGS
-PSX Version
-PC Version


IF YOU WANT TO HELP
I am using OpenOffice.org as my document writer of choice. The reason why is because it supports open formats for data exchange (XML) and has a pretty wicked PDF generator. I would recommend if you want to assist, download OpenOffice and send me changes in .sxw format. (OOo's native compressed XML format) OOo is free, runs on every popular OS, and is availible at http://www.openoffice.org

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Gears" - The FF7 Documentaion Project
« Reply #1 on: 2004-06-16 10:43:11 »
i would have some corrections, they all are meant for PC version

Code: [Select]

The Field Module
   -Data Organization
      -Textures ( The TEX files )
      -Model (The P Files)
      -Model Skeletal Hierarchy (The HRC Files)
      -Model bodypart-textures assignment (The RSD Files)

The Battle Module
   -Data Organization
      -Textures ( The TEX files )
      -Models ( The P files )
      -Skeleton files ( ??AA files )
      -Animation files ( ??DA files )

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #2 on: 2004-06-16 11:34:21 »
Thanks for your input, however we have a bit of a condundrum.

The datafiles in FF7 are actually dirived from Sony's original Psy-Q development libaries by Psygnosis. This system used common file formats that are native to the PSX. The PC formats are in turn dirived from those.

For example:

a TIM file is a "Texture In Memory". It's a native Psy-Q format that's really a raw copy of the PSX's video memory. The TIM file also holds CLUT and cache data. In the PSX version this was "compiled" into a BIN resourse and on the PC version, it was renamed to a TEX file and compiled into an LGP. However the files are internally the same thing. I think it would be best to "call a spade a spade" and use it's original development nomeclature. This is why I have "Common Terms" under "Engine Basics" at the very beginning. This wil sort out all the wierdness between the PSX and PC versions.

I should move the PSX version and PC version overviews into "Engine Basics" as well to help strighten everything out. For example the skeletons are really uncompiled HRC files, which is also a native Psy-Q format as well.

I know the PC version is more "open" than the PSX one, however there should be room to grow. One version of the program is no less than the other.

Do you have any ideas how we can properly orgenize the seperite systems without rewriting the doc twice? I think going by thier Psy-Q names are the best way to go. Looking at the source code directory listing, the /lib dir appears to be a Psy-Q wrapper of some sort that they used during the PC porting process.

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Gears" - The FF7 Documentaion Project
« Reply #3 on: 2004-06-16 12:31:06 »
but the PC and PSX things should be differenced because they are at least a little different, like its file structure.

Kislinskiy

  • Guest
"Gears" - The FF7 Documentaion Project
« Reply #4 on: 2004-06-16 13:03:18 »
I think some parts of the PSOneFFVII and PCFFVII are too different to throw them together. Look at the battle models for example. Every battle model on the PSOne is stored as a LZS compressed file containing all needed information. PC battle models need .p, .hrc, .rsd and .tex files that are stored in one huge LGP archive.

DeadLajik

  • Cool newbie
  • *
  • Posts: 53
  • Karma: 0
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #5 on: 2004-06-16 14:39:21 »
Are they really that different ? I only own the PSX version of FF7 (which I play on my PS2) but since they are the same game and their data structures are probably somewhat related, I think both should be discussed in the document.

Kislinskiy

  • Guest
"Gears" - The FF7 Documentaion Project
« Reply #6 on: 2004-06-16 14:47:43 »
Yes they are that different. Handle them in the same document? - Yes. Throw them together under the same topic like "battle models"? - No.

Battle models
|_PC
|--|_...
|_PSone
---|_...

That would be OK IMHO.

Threesixty

  • No life
  • *
  • Posts: 1172
  • Karma: 0
    • View Profile
    • http://www.geocities.com/threesixtyci/
"Gears" - The FF7 Documentaion Project
« Reply #7 on: 2004-06-16 15:27:10 »
When I hear Gears....I think of
Xenogears.

Darkdevil

  • Freak
  • *
  • Posts: 733
  • Karma: 0
    • View Profile
    • Http://darkdevil177.5u.com
"Gears" - The FF7 Documentaion Project
« Reply #8 on: 2004-06-16 15:46:47 »
Quote from: Threesixty
When I hear Gears....I think of
Xenogears.


Glad im not the only one...

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #9 on: 2004-06-16 17:59:14 »
Ok comprmise, when talking about the data members, we use the Psy-Q names, and then explain how the data is retreaved on each platform. I refuse to beleave that when it comes to brass tacks, the internal structs are different. After the data is converted into something "sane" we can furthur disect it. There will be diffrences. For example HRC files on the PC are text, while the PSX ones are compiled, but the data refrenced are the same thing.

here's a quick example off the top of my head.

Quote

The polygon format:
A PLY file contains the 3D pieces that make up models used the game.......

PC: These file are refrenced by a .p extention are are retreaved by......

PSX: These files are collected into a BIN archive or a compress LZS archhive. To retreave the model you want you simply....

When the file is retreaved, it's internal format is as follows...


How about that?

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
Hmmmmmm hmmmm
« Reply #10 on: 2004-06-17 03:40:11 »
The problem a lot of people are having is they aren't seeing it with the same perspective obviously.  Halkun is looking at what the ORIGNAL data was, not how it's currently stored.  By reversing this process finding out what the PSX or PC data formats are now is merely the process of tools to create the formats.

I know they are vastly different but they came from the same data.  That's what Halkun is working from.

For representing the end format perhaps showing how the end file was created from the original data (like what Halkun just said).
Also reversing this would be another cool thing (creating the original data from the file).

Cyb

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #11 on: 2004-06-17 10:50:12 »
I finished the "History" secton tonight. It's rough, but should be OK. I need some info on th european release dates.

Also I just dicoverd that the deveopers used CVS as version control for the PSX version..

I found in $ID tag in the PSX executable.

Quote

$Id: sys.c,v 1.115 1995/11/29 08:50:18 suzu Exp $



you can download my humble beginnings on gears here.
http://the-afterm.ath.cx/gears/

Send me any changes you might have.

Kislinskiy

  • Guest
"Gears" - The FF7 Documentaion Project
« Reply #12 on: 2004-06-17 11:54:56 »
European release date: 15. Nov. 1997.

Topher

  • Crazy poster
  • *
  • Posts: 111
  • Karma: 1
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #13 on: 2004-06-17 11:56:05 »
Halkun, you are my idol.

It's a shame I can't read the document (yet) *goes to download compatible software*

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #14 on: 2004-06-17 16:20:14 »
Halkum:
What format is the document in?  Might help for people wanting to PEER at it :o

Kislinskiy:
I killed my viewer SNIFF. I needed to rewrite it anyways but I can still mourn it's loss ;)

The program still works just none of the OGL code does for some reason, I think I messed up a pointer (le smirk).

It's a huge spagheti to say the least sp wittling out useless code and making it do something that makes sense is the next job ;)

Cyb

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #15 on: 2004-06-17 17:58:11 »
You use OpenOffice.org to read the files. They are the natiive OOo format.

If you wanna be really fancy, the file itself is a gzipped xml resourse, readable by any XML reader. It best to use OpenOffice.org

http://openoffice.org

Kislinskiy

  • Guest
"Gears" - The FF7 Documentaion Project
« Reply #16 on: 2004-06-17 18:06:15 »
You need OpenOffice to view the document. It is available at http://www.openoffice.org.
BTW I lost my complete source code. I had forgotten to back up my "Visual Studio Projects" folder..  :(

edit: Too slow.  :z

J*** H*******

  • Guest
"Gears" - The FF7 Documentaion Project
« Reply #17 on: 2004-06-17 19:10:22 »
Message

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #18 on: 2004-06-17 22:52:13 »
Habit ^_^

My PSX doc was written in StarOffice, I like the program, and on top of that it's the only word prossesor I own. You see, I don't have a viable windows computer anymore. I run Linux. Sadly, the RTF export isn't all that hot and I lose formatting badly. I'll be adding page numbers and chapter names in the headers. It also exports to DocBook really well. I also have the ability to make tables and sidebars and plaster large 300 DPI pictures in my document, (Which I will be doing heavily).

I feel like writing a book.

Topher

  • Crazy poster
  • *
  • Posts: 111
  • Karma: 1
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #19 on: 2004-06-18 00:47:09 »
After Googling yielded results pointing towards OpenOffice, I started to download it last night, but I got abysmal transfer rates, so I gave up. I'll try again later.

Update: Just downloaded OpenOffice at school, it's installing now, not long left.

Update #2: Just finished reading. Looking good so far!

DeadLajik

  • Cool newbie
  • *
  • Posts: 53
  • Karma: 0
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #20 on: 2004-06-18 23:25:17 »
I looked at the document in Open Office and it looks good! Keep up the good work.

I just wanted to make a positive comment to keep you motivated. Good work.

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #21 on: 2004-06-19 06:55:02 »
I need screenshots

If you guys could, I would adire some really dynamic screenshots of FF7 in action. I have some placeholders now, but the PC graphics look so much better in terms of bitmaps. I could use the following:

Pictures full pictures of the menu, worldmap, minigame, battle, and field.

I can't use pictures with  logos or other corruptions on the pictures. Also, I would really like the stock engine. No hi res Clouds or a Sephy/Arieth/Yuffie party please. (At least, not for now)

If you can, using Qhimm's save game converter, try and get some screenshots of PC vs PSX graphics. (Both pictures at almost the some point in time.) I think the PC version has a taller 3d battle view

Thanks

ADDUNDUM:

I've uploded a new version of "Gears", you can can dowload it at http://the-afterm.ath.cx/gears

Changes include an expanded Table of Contents (Outline), a spiffy cover sheet, Engine basics, and psudo-text for the entire document.

Have fun....

sfx1999

  • No life
  • *
  • Posts: 1143
  • Karma: 0
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #22 on: 2004-06-19 21:24:55 »
Hmm the cover sheet is messed up for me.

halkun

  • Global moderator
  • No life
  • *
  • Posts: 2111
  • Karma: 20
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
"Gears" - The FF7 Documentaion Project
« Reply #23 on: 2004-06-20 00:43:07 »
How is it messed up? Does the picture not show?  Is it screwing up the formatting? Is there a "broken link" like the image wasn't saved to the sdw file?

Thiere are also other images too. (The engine overiew) that's a openoffic drawing. Does that come up?


Also does anyone know where Terrence Fegenson went off to? I would adore to edit his battle mechanics FAQ, but need his permission to slightly edit his doc to better jive with mine, such as adding tables and some pictures.

sfx1999

  • No life
  • *
  • Posts: 1143
  • Karma: 0
    • View Profile
"Gears" - The FF7 Documentaion Project
« Reply #24 on: 2004-06-20 01:36:27 »
The author was split onto the second page, that's all.