Author Topic: FF7 PSX Battle Scenes  (Read 4950 times)

Cyberman

  • *
  • Posts: 1572
    • View Profile
FF7 PSX Battle Scenes
« on: 2003-04-05 17:35:37 »
For those who are curious:

PSX battle scene data is located in "\BATTLE\SCENE.BIN"

Appears to be 33 8K blocks of data (compressed?) This coresponds the the 33
battle scenes in FF7 for the PC.
each block begins with 16 32 bit integers.

typedef struct
{   Reference[16];
}
BTL_BLK_HDR;
The first integer is always
0x00000010
This is because 0x0040 is the begining of data.
Each reference is multiplied by 4 to reach it's offset within the block.
Unused references are set to -1 or 0xFFFFFFFF. Unused parts of each section data are filled with 0xFF as well.
The data follows the 16 references of the header.
Each data chunk appears to begin with
1F 8D 08 00-00 00 00 00-02 03 ED
The data in each section is unknown.. but does change some.

That's all I've been able to decipher.  If anyone recognizes the begining sequence of the data for each section of the block let me know!


Cyb

The SaiNt

  • *
  • Posts: 1300
    • View Profile
FF7 PSX Battle Scenes
« Reply #1 on: 2003-04-08 07:09:43 »
The good news is
I've gotten a lot further than you in the deciphering of scene.bin.
I got quite far sometime last year.
FFVII PSX & FFVII PC use an identical scene.bin by the way.

The bad news is
I lost a lot of my documentation files sometime last year as well during a HDD crash.
I've managed to recover some of my old files but I just couldn't recover some of them.
One of the files I couldn't recover was tge documentation files on the scene.bin file.
What I can tell you though from memory is that the scene.bin does what it describes, the battle scenes.
If you try running FFVII PC in debug mode, you'll notice that in the log file that FFVII tells you the battle scene no. it loaded. It corresponds exactly to the ones in the scene.bin file.
You can try swapping sections within the file and it will work since they are of the same size.
Each section actually defines the type of backgroud you'll be fighting in, (grasslands, ancient's town, etc).
I can't quite remember if the camera angles were controlled by the section as well.

BTW, IIRC, the first 10 scenes are debug scenes.
You fight a bunch of yellow triangles in different possitions (5 in a row, 5 spread out, etc).

That much I can tell you at the moment.
If I do manage to remember anything or find my documentation file, I'll tell you.

Cyberman

  • *
  • Posts: 1572
    • View Profile
FF7 PSX Battle Scenes
« Reply #2 on: 2003-04-08 21:09:16 »
Oh cool I've also beat on some more stuff lately.. namely World stuff too.

I've also seen a tendancy on the PSX version.. the first UINT32 is the length of the file minus the 4 bytes used for the length of the file.
This applies to
LZS
BCX
BSX
DAT
MIM
BSZ
and
TXZ files.
Perhaps it's a bit redundant to put the length of the file.. in the file itself? I've no clue why they did that.  It is handy though to read them now that I think about it :)

MAP
BOT
these contains blocks of 0xB800 in size and have the identical header section as the SCENE.BIN file.  What's in this is anybodies GUESS right now I've have no clue.

The EV files appear to be elevation map information.  This is because it seems to have entities of WORD size and start and end in rows (noticable by the information contained in it.) However I think there are two elevation data chunks per line.  What's in them? heck if I know.

that's my guess so far.. however it could be offset information or something completely different.. really hard to know.

Cyb[/code]

The SaiNt

  • *
  • Posts: 1300
    • View Profile
FF7 PSX Battle Scenes
« Reply #3 on: 2003-04-10 15:13:04 »
Haha, again I'm far ahead of you there.

Try searching & reading up all my old posts in the tech related forum.
Helps avoid repeated work.
I'm pretty sure I've made some posts on my documentations here.
They're either here or in the remake forum.
I know there should be something on the EV, BOT & MAP files.

I have very little free time at the moment to work on the file formats and anything FFVII mainly cause I have truckloads of Uni work.
Feel free to tell me if you've come up with anything new.

*hides the rest of his discoveries & documentation until someone mentions something related*

Cyberman

  • *
  • Posts: 1572
    • View Profile
FF7 PSX Battle Scenes
« Reply #4 on: 2003-04-10 22:22:22 »
Perhaps they are in the 'Remake' forum?
MAP
and BOT are only mentioned in my post here.

I did find some EV information at least (heh) and that TIZ are LZS compressed TIM's.

DAT are SCRIPT data. (this is true because I have looked into them and seen the encoding is very similar to that of the save states for text).
BSX <- same as MIM and DAT files
BCX <- these have character names.
unknown format
MIM <- unknown

SnailRush seems to have the encoding information on the files in FIELD on the PSX

Anyhow I have more information at least.

SCENE.BIN's data is for fixed scripted boss scenes right?
Where are the normal battle scenes then?
TXZ files are probably the textures for the maps..

More stuff to play with I guess.

cyb

The SaiNt

  • *
  • Posts: 1300
    • View Profile
FF7 PSX Battle Scenes
« Reply #5 on: 2003-04-11 03:53:09 »
No, every single combination of battles in defined in scene.bin I think.

Search properly.
Open up every topic in tech related if necessary. :P

Ev files - http://forums.qhimm.com/viewtopic.php?t=680
(Not much point since the pics aren't available anymore) :P

MAP files
http://forums.qhimm.com/viewtopic.php?t=702&highlight=

Early Scene.bin work
http://forums.qhimm.com/viewtopic.php?t=475&highlight=

There's a whole lot more documentation on a lot of stuff in the tech related forum.
Try searching for posts by me, fice, Alhexx, mirex, etc.
I've got a class to go to now, so I don't have time to list all the other important topics.

Cyberman

  • *
  • Posts: 1572
    • View Profile
FF7 PSX Battle Scenes
« Reply #6 on: 2003-04-12 03:21:37 »
Quote

Posted: 2003-04-10 21:53    Post subject:

No, every single combination of battles in defined in scene.bin I think.

Search properly.
Open up every topic in tech related if necessary.


LOL hehehe
I almost did that if you must know :)

Unfortunately I already found the ones you listed, although I must have missed some of the map details.  the EV files are Chocobo colors though (boggle) kind of strange they being parallel and in the world file.  Anyhow I found lots of bits of stuff.  Right now I'm beating on:
Model information format
BCX  <- the field file THESE ARE THE CHARACTER MODELS compress with LZS
World Map information
yep the 0xB800 with 16 references at the begining of each block.  are each section LZS compressed because too me it looks like it is.
FF 80 00 51 00 00 01 09 23 F7 1E 1E 00 would decode to
80 00 51 00 00 01 09 23 1E 1E 00
Although it likely means diddly squat in reality.  The vertex numbers were they FP or fractious in nature? :)

BOT <- GOK
Most of the information in the posts seemed to be missing key points but that's OK it gives me a clue what I'm looking at or for.

Field
DAT files are done (ish) they are LZS compressed with the first UINT32 being the length of file.  Taking clues from Fice's Cosmo util I can get a fair amount of data from the file.  I noticed there is information of exit information as well.
MIM - still not friendly darn it! they appear to be LZS compressed data though (go figure) :)
BSX - I think these are 'drum roll' none party characters and there animations for each location.  Only thing I could think of.

Cyb

Cyberman

  • *
  • Posts: 1572
    • View Profile
New Information
« Reply #7 on: 2003-04-14 23:58:13 »
MIM is the background image information and PSX is the sprite information.  That is interesting, also the palettes are broken up into 1 per 128x128 block however it's hard to determine WHAT is part of that block, I'm working on it.  Each block thing consists of 64 16 x 16 blocks.

BSX contains the SPRITE information for the field files (surprise).
The leaves the DAT file also containing not just the script but all the file details for the BSX and MIM files.
The MIM files have NO information regarding the background image size.  So it's the DAT files that likely have this.

Cyb