Author Topic: PSX model formats?  (Read 11943 times)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« on: 2004-12-14 09:48:05 »
Holy Moly I just finished my final Thesis. My goodess did that suck!

Anyone have a coherant document on the FF7 PSX file format for the battle models?

How about the battle settings?

Does anyone have a cohearant document on the Fieldscript or the Battle script systems?

If I posted the (Free, legal and GPLed) code to be able to read PSX movies diretcly off the PSX disk, can someone put it into a cohearant explanation.

Just wondering.

-halkun

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
PSX model formats?
« Reply #1 on: 2004-12-14 10:12:10 »
I still have the FF7PC script work from a while back, and I'm assuming that format is pretty much identical between PC and PSX (the PC script interpreter looks directly ported). While the work is not complete, I suppose I could put together a document on it... heck, I even structured the script-reader's code itself so it could also produce op-code documentation, all I've got to do is fill in the numerous blanks in the op-code mapping...

Terence mapped out the battle script for PC (I think) a while back as well, even reverse-engineering the scripts themselves to high-level code. His doc on this should be floating around somewhere.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #2 on: 2004-12-14 10:16:15 »
I can wait till the opcode matrix is complete. I didn't know if you dropped everything and simply started chasing skirts in Japan.

Heaven knows I would.

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
PSX model formats?
« Reply #3 on: 2004-12-14 10:20:07 »
*looks very innocent but sexually exhausted*

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #4 on: 2004-12-14 10:27:05 »
Yea, lucky you. Four years I was there and didn't have a single girlfriend the entire time.

Send one to me, or if you have an email address, pitch one over ^_^

Noy excuse me, I have to wollow in my own self-pity now.

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
PSX model formats?
« Reply #5 on: 2004-12-14 11:51:02 »
:D

i had one brief description of ff7 psx battle models ... i got it from Cyberman; You can ask him for it or ...

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
PSX model formats?
« Reply #6 on: 2004-12-14 12:27:12 »
Well this is fan-fucking-tastic, I opened up my extremely well-documented disassembly of FF7.exe and the program suddenly reasoned "Ooops it seems I crashed while trying to read this file. I'd better corrupt it completely so I'll never try again."

Sigh, gotta go home and look for backups now...

Kislinskiy

  • Guest
PSX model formats?
« Reply #7 on: 2004-12-14 18:41:59 »
Damn!  :( I wrote a very detailed PSone FFVII battle model file format specification incl. LZS decompression, figures and so on and as likely as not it was the most complete one out there if no one have make further progress on the animations. Again, I met my fate and forgot to back it up before I formatted my HDD due to reinstallation of my OS...

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #8 on: 2004-12-15 01:13:45 »
Wow, sorry I asked.... O_o

It's almost like I should watch my copies of Gears. (Three backups on two drives and a floppy in three formats)

You guys make it sound like my hard drive platters are going to shoot out of my case now because I have the forbidden knowlage.

Micky

  • *
  • Posts: 300
    • View Profile
Re: PSX model formats?
« Reply #9 on: 2004-12-15 09:16:07 »
Quote from: halkun
How about the battle settings?

Description and example code: http://forums.qhimm.com/viewtopic.php?t=3152&highlight=battle+backgrounds
Quote
If I posted the (Free, legal and GPLed) code to be able to read PSX movies diretcly off the PSX disk, can someone put it into a cohearant explanation.

I didn't find code that actually works and is open source recently. If you have one we can have a look. I know the general direction from your psx doc and from ffmpeg, but I don't know how it fits together.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #10 on: 2004-12-15 09:59:35 »
I have ffmpg too. I was hoping the mdec.c was helpful.

My PSX doc, in respect to the MDEC is broken. I was going by some Japanese translated doc that I put into english. I bearly had an idea of how it worked.

When you start in with DCT and Q values, you begin to lose me.

Micky

  • *
  • Posts: 300
    • View Profile
PSX model formats?
« Reply #11 on: 2004-12-15 12:06:10 »
I tried one of the recent versions of ffmpeg with streams I dumped from my psx discs. While some of the code matches the data it doesn't actually decode anything.
The problem is, while the mdec data required for the hardware is fixed the file format and further compression depend on the libraries the game used. For example ffmpeg runs some huffman decompression before delivering the data to the mdec decoder.
If your version of ffmpeg works with the streams from ff7 tell me which version number it is and I'll have a look for myself.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #12 on: 2004-12-15 12:16:06 »
I just grabbed from the current CVS, never tried it because I can't mount FF7 on my computer ;_;

Cyberman

  • *
  • Posts: 1572
    • View Profile
PSX model formats?
« Reply #13 on: 2004-12-15 15:20:36 »
I still have my data from abusing FF7 see, I always make redundant backups. (Coughs) I got that habit from work and my computer dying (because of @#$@#% win98 and Protel 99SE).   I suggest if you have 2 computers network them and use the other computers hard disk for storage. It's slow clunky but I guarentee you aren't likely to loose anything, namely it seems MS's networking software is better than there OS for anything prior to Win2K.  Win2K is a real pain to share partions with but it is much more stable. However it still dies and looses data. So I use an old machine to store important data.

Ahem, now if you want it I can send it to you.

Mirex- I thought Halkun was waiting for you to send it to him?

The confusion continues. ;)

Cyb

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
PSX model formats?
« Reply #14 on: 2004-12-16 09:01:51 »
Quote
Mirex- I thought Halkun was waiting for you to send it to him?
Oh well then bad news - i cant do it now Im off from my cpu `till next monday .. thats why i suggested asking you for it.

--searching--
huh did not find it ... Cyberman do you know where is the forum where we discussed ff7 psx models ? I cannot find it ...

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
PSX model formats?
« Reply #15 on: 2004-12-16 16:23:22 »
Quote from: halkun
I can wait till the opcode matrix is complete.

Well just to let you know, it could take a while. Most of the opcodes are very specific for the game system, so mapping the opcodes pretty much involves having to figure out most parts of the field module.

Quote

My script viewer can decode all known scripts though, it just doesn't have the information to properly decode the parameters for each opcode. Mapping out the plot progression variable for example would be quite doable even in this early stage.

Cyberman

  • *
  • Posts: 1572
    • View Profile
PSX model formats?
« Reply #16 on: 2004-12-16 16:55:19 »
Quote from: mirex
Quote
Mirex- I thought Halkun was waiting for you to send it to him?
Oh well then bad news - i cant do it now Im off from my cpu `till next monday .. thats why i suggested asking you for it.

--searching--
huh did not find it ... Cyberman do you know where is the forum where we discussed ff7 psx models ? I cannot find it ...


This thread I believe Mirex but it's a VERY long thread. Quite a bit of discusion too. :)
L Spiro was going well with decoding the animation portion but things got quiet. :)
With rudimentary animatiion decoding the entire model is viewable at least.


Qhimm: Cool I've been wanting to add a SCRIPT viewer (a good one not one that dumps of bunch of information).  I suppose I can add one when I get around to writting up a syntax for syned so it will highlight everything properly :D

Cyb

Micky

  • *
  • Posts: 300
    • View Profile
PSX model formats?
« Reply #17 on: 2004-12-17 12:24:12 »
I just tried to find a definite documentation of the PSX field background format, especially how to calculate the offset to the tile data. Did anyone compile all the posts into a definite document? There seems to be quite a lot, but most seems to be specific to the PC version.
(Has anyone thought about starting a WIKI for this?)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #18 on: 2004-12-17 17:30:46 »
I have found tech wikis to lack. That's why I'm putting the effort into collecting it all togeather into gears. It will be cohearent one day.

Cyberman

  • *
  • Posts: 1572
    • View Profile
PSX model formats?
« Reply #19 on: 2004-12-17 22:28:13 »
Quote from: Micky
I just tried to find a definite documentation of the PSX field background format, especially how to calculate the offset to the tile data. Did anyone compile all the posts into a definite document? There seems to be quite a lot, but most seems to be specific to the PC version.
(Has anyone thought about starting a WIKI for this?)

A few people have successfully decoded the FF7 for the PSX background format, they are in the MIM files by the way. One is snailrush but he wasn't too forthcoming with the information I suppose if I had a coherent question to ask him I would. However I stoped working on it because it wasn't as interesting as the 3d model stuff, and I sort of stumbled through decoding that.  I am going to add battle backgrounds sometime too.  However I would like to get the textures working with FF7.  The format consists of palletes and pixel blocks, I've never been able to find the reference information of how they are assembled together.  I've just been able to view the RAW data in color.

From what someone said the FF7 field format people models are very similar to the battle models, the primary difference is the textures are in one file instead of the field files.  

Hmmm maybe we should get all the information together and pick through it now that I think about it.

Cyb

Micky

  • *
  • Posts: 300
    • View Profile
PSX model formats?
« Reply #20 on: 2004-12-18 15:31:50 »
Quote from: Cyberman
A few people have successfully decoded the FF7 for the PSX background format, they are in the MIM files by the way. One is snailrush but he wasn't too forthcoming with the information I suppose if I had a coherent question to ask him I would.

I've got a somewhat working converter to tga, but I need to give it the address of the tile data manually. Loading the data from the MIM is not a problem, and the tile data is just a series of quads. Maybe I should just release what I have so far...

Cyberman

  • *
  • Posts: 1572
    • View Profile
PSX model formats?
« Reply #21 on: 2004-12-26 21:05:38 »
Halkun I sent you a description of the data format for the PSX version of the battle models.
It's lacking the ani mation information since that is in a bit of a flux.  No TIM information is included as well.  I might need to add more to the description of the UV coordinates, though I think that in context what I said makes perfect sense (you'll understand what I mean if you read it).
Have fun!

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX model formats?
« Reply #22 on: 2004-12-26 21:38:58 »
I'm updating Gears right now with Field Module data, I'll be adding more to kernel.bin and inserting your PSX data.

After that I need a few things...

1) Verify the field format
2) I need some to stop back and tell me of the sections are as orginazed as they can be. I may need to move the sections around.
3) Am I missing a section that's in the Table of Contents? How about Vice versa
4) Can someone verify the savemap? I think I have some offsets wrong. Keep im mind that I don't have the save header included with the save map as they are different between the PSX and PC versions. The actual savemap data is the same though.

Cyberman

  • *
  • Posts: 1572
    • View Profile
PSX model formats?
« Reply #23 on: 2004-12-27 04:07:37 »
Well the other thing is you need someone to proof read sections so they make sense in english.  :)

Otherwise I am going to attempt to fix my background decoding code, the primary difference between the PSX and PC is/was in the field format the background image data location.  For the PC it's in one nifty archive.  For the PSX it's split between the DAT file and the MIM file.  The MIM file contains the 16x16 block data and palette information.  So I believe all I need to do is read the PC's ordering a bit to find the section with the block information and I can decode the backgrounds. So I need to really beat up the DAT file to grab the background information (sigh).

Cyb - it's always something.

PSX model formats?
« Reply #24 on: 2004-12-27 21:32:08 »
Quote
Well the other thing is you need someone to proof read sections so they make sense in english.

I can do that. In most cases, though, you can still figure out what halkun means pretty quickly. I don't know if fixing it up is really necessary.