Author Topic: Sound format in FF7 PSX  (Read 3128 times)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Sound format in FF7 PSX
« on: 2006-06-14 17:23:14 »
Ok, here's a quick lesson for hackers..

The PSX has a native Adaptive Differential Pulse Code Modulation (ADPCM) decoder. This is "kinda" like a PCM (WAV) sound but as opposed to storing the exact waveform, it looks at where the waveform is "going" and renders based on the most likely outcome.

Looking at the files in the /SOUND directory I have found that in INSTR.ALL and INSTR2.ALL contains raw ADPCM samples for the the midi intruments.

Actually I found this out by doing a "cat INSTR.ALL > /dev/desp" in linux and hearing various tones (through the adaptive static, my dsp device is PCM only) It was when I heard the "WA-HOO" from the chocobo race did I know I was onto something.

Anyways It seems that .DAT files are the indexes. Square opted not to use the VAB/VAG format in order to speed up access. (VAB files are a compressed ADPCM sample, VAG files are a bunch of VABs togeather)

The EFFECTS.ALL was more static than any real sound, but alot of the sounds effects are static-ish anyway.

Anyway, just to give you guys a lead.....


sfx1999

  • *
  • Posts: 1142
    • View Profile
Re: Sound format in FF7 PSX
« Reply #1 on: 2006-06-15 15:02:53 »
I found a link with some information on ADPCM and some code:

http://www-mobile.ecs.soton.ac.uk/speech_codecs/standards/adpcm.html

Zande

  • *
  • Posts: 55
  • 友情は武器よりも強し
    • View Profile
Re: Sound format in FF7 PSX
« Reply #2 on: 2006-06-16 08:32:02 »
Quote
Looking at the files in the /SOUND directory I have found that in INSTR.ALL and INSTR2.ALL contains raw ADPCM samples for the the midi intruments.

Actually I found this out by doing a "cat INSTR.ALL > /dev/desp" in linux and hearing various tones (through the adaptive static, my dsp device is PCM only) It was when I heard the "WA-HOO" from the chocobo race did I know I was onto something.

Anyways It seems that .DAT files are the indexes. Square opted not to use the VAB/VAG format in order to speed up access. (VAB files are a compressed ADPCM sample, VAG files are a bunch of VABs togeather)

They are stored in the same format I'm pretty sure (only header differences), sony's four-bit adpcm compression algorithm (which is what the sound processing unit works with). Don't know where my cds are so I can't check. And there's no such thing as raw adpcm really. :P