.SBS and .SBR files in NBA Jam (Wii) by Toad King at 5:37 PM EDT on April 24, 2012
I've been looking around at this format and I've gotten enough of the .SBR file (the soundbank) figured out to extract streams from the .SBS file (the streams). The only problem is there are no headers on the streams other than eight bytes, but I cannot figure out what they stand for.
An XML file left lying around on the disk says that the streams are 32000 Hz, using a variable bitrate quality of 80, and the compression type is "xas_int".
Given it is EA game, it looks like xas stream indeed with the typical variating block method much like that used in EA's xma, as for variable bit rate setting, thats probably a preset value but in case of xas it has no meaning.
Yeah, I assume the variable bitrate quality was some deployment thing left on the disc. Do you know of any tools that might be able to convert the xas streams into something usable?
Well, towav can using the deadspace SNU header, it is common that other file holds the stream info, likely it resides in the SBR if SNS is the actual stream, can't tell since not have the other file to take look at.
towav wont probably decode if the stream info is incorrect.
in simple terms, all needed to do is find the stream info in other file and turn it to dead space like header and put in start of the stream and decode and sadly vgmstream has no xas adpcm support to date AFAIK and bit rate preset is only used with EALAYER3 encoding, may use both formats in EA games.
Well, I do not understand what the first 16 bytes in snu header mean (possibly deadspace specific) but the remaining 16 are the key ones before stream data in my experience.
byte 0 codec type 2 = no compression 4 = XAS ADPCM 5 = EALayer3 MPEG Layer 3 6 = EALayer3 variant 2 7 = EALayer3 variant 3 14= XAS Variant, no proper decoder. 15= Alternate EALayer3
byte 1 related to channel count. Seems to be set to (channel count - 1) * 4 so 0 = mono, 4 = stereo, 0xC = 4 channels and 0x14 = 5.1 (i.e. 6 channels) bytes 2-3 sample rate bytes 4-7 total samples bytes 8-11 total file size (bytes) bytes 12-16 total samples
but it does differ in this case after sample rate.
This information of the stream should usually be in the other file to alter accordingly by it.
Thanks for that, I've gotten the soundbanks pretty much completely understood now. It seems bytes 0x14 - 0x17 might be the number of samples like you said, but the high byte for it is always 0x40 for some reason. I also don't know if byte 0x08 should be set to 0x20, but that gets it working with ToWav at least.
Hey cristobital, I got your email. However, the audio banks in FIFA might be harder to crack. They seem to use a different codec for them. The codec ID byte is 0x19 (25), and Apollo's post doesn't have any codec listing for that. Actually examining the format and making a decoder is probably beyond my abilities.