<< Previous Topic | Next Topic >>Back To Index  

Final Fantasy 9 Format

November 28 2007 at 5:53 PM
Mike 

 
Hi T_chan, development is going swimmignly. I have included handling to decode these frame types: v2, v3, FF7, Serial Experiments Lain, and I'm finishing up FF8.

I have begun to look into FF9 video, and can see it is organized its own special way. It seems to resemble FF8 a little bit, but has some strange properties that I don't yet understand.

I see one of the reasons you made PsxTulz was because you "wanted to see the Final Fantasy 9 & the Ridge Racer Type 4 intro movies" on your computer. While I'm confident I will eventually figure it out, but I thought that if you were a nice guy, you could save me from all that trouble

 
 Respond to this message   
AuthorReply
T_chan

Re: Final Fantasy 9 Format

November 28 2007, 7:53 PM 

Hello,

Yup... at the time, no movie player could read the FF9 format, so I started my own program...
PsxTulz was, as far as I know, the first one to decode de FF9 format... (Psmplay soon followed with the FF9 playback though)

I'll help you if you tell me the secret of the Lain files

FF9 format is very easy & stupid...
I'll give a huge hint, so you still have some challenge to discover the 'secret':

10 = 1


^_^

 
 
Mike

Re: Final Fantasy 9 Format

November 29 2007, 5:23 AM 

Sharing the secrets of S.E. Lain is not a problem. It is thoroughly explained in my STR_file_format.txt document.
http://code.google.com/p/jpsxdec/downloads/list

10 = 1 you say? Hmm, sounds cryptic, but I'll keep it in mind as I pick these movies apart.

 
 
T_Chan

Re: Final Fantasy 9 Format

November 29 2007, 6:51 PM 

Hmm... yes, maybe it was a little bit too cryptic

maybe this will help:

1 = 10
2 = 9
3 = 8
...
10 = 1

(don't search too far, it's not like Lain, it really really is very basic, but as far as I know, it's the only game that did this)

(if I remember correctly...)


    
This message has been edited by PsxTulz on Nov 29, 2007 6:55 PM


 
 
Mike

Re: Final Fantasy 9 Format

December 5 2007, 5:38 AM 

Thank you T_chan! That helped clear up why the video seemed so strange. I haven't been able to test it yet, but I think the video is all figured out.

Now I wonder how the audio is stored...

 
 
T_chan

Re: Final Fantasy 9 Format

December 7 2007, 11:28 AM 

You see now why I didn't give the solution right "out of the box", it's easy enough to be fun to discover

Audio is pretty standard for a FF I think... PsxTulz always had a glitch in the audio decoding of the FF9, but I think it was due to a bug in my code, and not because of a special audio format...

 
 
Mike

Re: Final Fantasy 9 Format

February 4 2008, 11:53 PM 

Well T_chan, I thought I had FF9 decoding working perfectly, but the audio sounded funny. Sure enough, I was doing it wrong.

I don't know what else to do now except start hacking into the FF9 game. I was really really hoping you could clarify the FF9 audio format for me.
m(._.)m

I checked PsxTulz and PsxMC and found the sample rate is 48000 Hz (I had assumed it was 44100 Hz, like FF8).

I've broken down the FF9 audio sector to this:
- 4 bytes; 0x00080160
- 2 bytes; chunk number (0 to numchunks - 1)
- 2 bytes; number of chunks (always 10?)
- 4 bytes; frame number (starts at 1)
- 116 bytes; unknown
- 4 bytes; Sometimes "AKAO", sometimes 0x00000000
- 4 bytes; Sometimes frame number - 1, sometimes 0x00000000
- 72 bytes; unknown
- 1840 bytes; audio data
Total: 2048

I need to get 3200 audio samples from the 1840 bytes of ADPCM data.

I understand FF8 uses 16 byte sound groups, each generating 28 samples of audio.

FF8 Sound Group (16 bytes):
- 1 byte; sound parameter
- 1 byte; unused?
- 14 bytes: ADPCM sound data, 4 bits-per-sample (total 28 samples)

If FF9 used the same format, it would generate 3220 samples of audio: that's 20 samples more than necessary. Should those be ignored? Or is this approach totally wrong? I just don't know :/

 
 
T_chan

Re: Final Fantasy 9 Format

February 18 2008, 12:32 PM 

How does your FF9-audio stream sound like ?
Do you hear most of the audio stream with a small glitch at regular interval ?
If yes, PsxTulz had the same problem. I should re-examine the file format to see where the bug is... once the conversion to WinXP is done... (The audio code of PsxTulz still isn't converted)

From what I can see in the old code, I tried something similar to what you suggest:
The last time I messed with the FF9-decoding, a few years back, I tried to change the 115*28 samples to 114*28 samples, but that didn't solve the problem. Maybe discarding the last 20bytes could indeed be a solution.


 
 
Mike

Re: Final Fantasy 9 Format

March 6 2008, 5:39 PM 

Good news T_chan, the mystery is solved.

FF9 Audio Sector Header
- 4 bytes; 0x00080160
- 2 bytes; chunk number (0 to numchunks - 1)
- 2 bytes; number of chunks (always 10)
- 4 bytes; frame number (starts at 1)
- 116 bytes; unknown
- 4 bytes; has audio: "AKAO" (big-endian) no audio: 0x00000000
- 4 bytes; has audio: frame number - 1 no audio: 0x00000000
- 20 bytes; unknown
- 4 bytes; has audio: 0x0000116a no audio: 0x00000000
- 4 bytes; number of bytes of audio data: 0, 1824, or 1840 <-- !!
- 44 bytes; unknown
- 1840 bytes; audio data and/or extra bytes
Total: 2048

1824 / 16 = 114
1840 / 16 = 115


 
 
T_chan

Re: Final Fantasy 9 Format

March 11 2008, 9:20 PM 

Cool, thanks for the info !

I'll try it out next time I work on the FF9-format.

How did you find it ? By debugging, or through trial/error/just trying to figure out the file format ?


 
 
Current Topic - Final Fantasy 9 Format  Respond to this message   
  << Previous Topic | Next Topic >>Back To Index  
Create your own forum at Network54
 Copyright © 1999-2009 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Time is in GMT+1 (Paris, Brussels, Amsterdam, ...)