VAG table structure? by Nisto at 1:31 PM EST on December 12, 2013
Does anyone know the structure for a VAG table? I used PSXSND to convert a VAB file and I noticed it reports a "VAG table" offset, but I have not been able to find any information as to what such a "table" contains.. I checked the sources for vgmtrans and the PSYQ SDK so far. The reason I'm asking is because I'm suspecting that the same VAB file I passed to PSXSND is causing GenPSF to crash due to, perhaps, an erroneous VAG table (everything else in the VAB file looks good as far as I can tell..), so I'd like to verify if that's why..

edited 1:35 PM EST December 12, 2013
by MarkGrass at 10:53 AM EST on December 13, 2013
VAB data contains four tables - Program, Tone, VAG pointers (shifted) and VAG data (samples) - I can only assume that the VAG Table you mention is the shifted pointer list.

Program contains the amount of tones and miscellaneous variables related to how multiple samples are used to produce a single sound.

Tone contains the VAG ids and specific variables used for pitch, center, etc.

VAG pointers are located in a 512byte table, immediately after all Tone data has been defined. Furthermore, each value is shifted (>>3).

VAG data is obvious - raw ADPCM samples. The pointer to each is located in the VAG pointer table.

Would you mind to upload the VAB data that is causing issues? Also, what is PSXSND?

edited 10:55 AM EST December 13, 2013
by Nisto at 6:09 PM EST on December 13, 2013
Hey mark.

The so-called VAG table that PSXSND reports is at offset 0x1020 in this VAB file: https://dl.dropboxusercontent.com/u/48454461/aud/MAIN38.VAB
This is something I manually put together from the data of MAIN38.BGM/VB ("Option Screen") from RE3.

Thank you for the information on VAG pointers! I had no idea they were shifted.. By "each value" do you mean each byte? Or value as in the full pointer values (I'm assuming 4 bytes)?

PSXSND (aka "PsxSound") can be found here: http://hitmen.c02.at/html/psx_tools.html




EDIT: It looks like you were right about the "VAG table", those are pointers. And I found out they're two bytes, so never mind my asking.

Although I noticed there's a difference between the pointers in the RE2 and RE3 VABs: the pointers are relative in two different ways. For RE2 each pointer seems to be relative from VAG to VAG, but for RE3 they're all relative from the end of the table (i.e. the start of the first VAG).

If I'm interpreting the RE3 .BGM format correctly, the VAB version used in RE3 is actually lower than what was used in RE2 (5 vs 7).. The difference described above seems to be one thing that differs between the versions. If it's indeed correct, is it respected when converting? Or maybe GenPSF doesn't even process the VAG table (although it looks like it does..)?

Either way, it seems like GenPSF just doesn't return any sample rate at all for the first sample. Even now that I've verified that the VAG pointers and everything else is correct before trying to convert.

edited 8:50 AM EST December 14, 2013


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source