Different VAB formats

Audio and Music (Sound Processing Unit) based area of development, including VAB, XA, etc
Post Reply
Griever
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Jun 08, 2020

Different VAB formats

Post by Griever » June 16th, 2020, 6:16 am

Hello!
I'm reversing some of Einhander's files format for translation purposes and one of sound formats looks almost identical to VAB. According to "File Format 47.pdf", it has exactly the same structure, except VAG offset table does not take 512 bytes, but visually looks like almost 0x15F0 bytes and all samples begin from this offset (0x2010). I also have problems with major tools to even extract samples properly from this VAB (even VAB Tool).
Last pair in offset table is sector offset and size word16 of another sample, which is not included in standard vab file, but just attached in the end.
So I was thinking if it's possible that this VAB file is just from another library version (Einhander was compiled with PSYQ 3.7)
Is anyone familiar with such kind of VAB file structure?

User avatar
Squaresoft74
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 310
Joined: Jan 07, 2016
PlayStation Model: SCPH-7502
Location: France
Contact:

Post by Squaresoft74 » June 16th, 2020, 11:06 am

Try using bin2seq.
You do not have the required permissions to view the files attached to this post.

Griever
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Jun 08, 2020

Post by Griever » June 17th, 2020, 5:21 am

Thank you, Squaresoft74!
That sort of helped: at least bin2seq has properly calculated VB start at 0x2000 and so first 6 VAGs were extracted properly.
That's also interesting why there is more than 0x1000 bytes between VH end and VB start in .VAB file, as File Format 47 does not mention this.
But what is more important, there is also 7th sample, which is attached in the end of VB and reference to this can be found in this empty space after VH. bin2seq also did not recognize it. In the game 7th sample just plays in the same time as 1st sample.
I attach VAB file just in case.
You do not have the required permissions to view the files attached to this post.

User avatar
Squaresoft74
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 310
Joined: Jan 07, 2016
PlayStation Model: SCPH-7502
Location: France
Contact:

Post by Squaresoft74 » June 17th, 2020, 4:39 pm

Here's your Vab file splitted to .vh/.vb, VabTool will now properly load them.
Taking a wild guess, i assume data (mostly 0x00) between the VH and VB ones in your raw VAB file are just some filler (with some pointers for the file system used by the game) so the files are stored in 0x800 multiple chunks.
You do not have the required permissions to view the files attached to this post.

Griever
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Jun 08, 2020

Post by Griever » June 18th, 2020, 4:32 am

Thank you very much! For me it was important to know that it's not some kind of standard scheme. I should debug a little deeper in Einhander code to check how this pseudo vab file is used.

Griever
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Jun 08, 2020

Post by Griever » June 20th, 2020, 5:49 am

Hello again, just to close the topic, this file was really another archive.
It has first 0x2000 bytes as VAB header in it's usual format + dummy bytes to the end of 0x2000 block. Last two word16 of block are size in sectors of VAB body and size in bytes of the last sector.
So executable code just copies VAB header to RAM, and then copies to SPU all sectors after 0x2000 until last specified sector is encountered. Then it just copies appointed number of bytes of last sector to SPU, so now SPU memory has all VAGs. And code then parses VAB header, which is left in RAM for different play sound tasks.

User avatar
Squaresoft74
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 310
Joined: Jan 07, 2016
PlayStation Model: SCPH-7502
Location: France
Contact:

Post by Squaresoft74 » June 21st, 2020, 10:57 am

Nice, good luck with your reversing/translation project. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest