Boogie SuperStar *.sns - EA_ADPCM?

Codecs, formats, encoding/decoding of game audio, video and music
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

Hello there! I just encountered some sns files that cannot be played with any tool I have at hand. GAP doesn't recognize the format and sx.exe doesn't work either. Can anybody take a look here? http://www71.zippyshare.com/v/NoArXYq7/file.html
Thanks!
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

EA XAS ADPCM. 4 channels

You can decode these with my tool (xas_decode), but it needs at least channel# and frequency.

So if you add 8 bytes in the beginning:

04 0C 80 E8 00 00 00 00

It will work. (80e8 = 33000, 4 = XAS, C = 4ch)
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

AHA! Thanks! I actually have another header that is supported by towav:
03000002 8AEB0200 20000000 00000000 040CAC44 40A0FB00 00000000 00000000
ch @ 0x11 byte
freq @ 0x12 short
stream_size @ 0x14 long
towav automatically decodes the files as two stereo layers which is correct in this case because music and vocals are split.
One question: How are the channels related to the byte value at 0x11? 0x04 = 2ch, 0xc = 4ch - what's mono? 0x2? What about 6 ch/three layers?
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AnonBaiter »

If I`m not mistaken, mono = 0x01, 6ch = 0x06.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

AlphaTwentyThree wrote:AHA! Thanks! I actually have another header that is supported by towav

Oh, this header is much longer!

There are no layers in XAS. Just channels. The formula is this:

(channel - 1) * 4

So mono will be 0
stereo = 4
4ch = 0C
6ch = 14
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

I fiddled around a bit and found out:
01/02/03 = 1 ch
04/05/06/07 = 2 ch
0c/0d/0e/0f = 4 ch
14/15/16/17 = 6 ch
1c/1d/1e/1f = 8 ch
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

There are also files with 3 and 5 channels. I've seen this in Moh for example
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

I suspected layers because towav always decodes in stereo pairs. I don't know if there are games that use XAS surround at all.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

Oh, then I guess those files aren't supported by towav...
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

AlphaTwentyThree wrote:I suspected layers because towav always decodes in stereo pairs. I don't know if there are games that use XAS surround at all.


Dead Space, Medal of Honor series... a lot of EA titles use 5.1 channel sound
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

You're right, I forgot about Dead Space actually ;)
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

I'm interested in writing a script that lets me split the channels or channel pairs of EA XAS files. I've looked at the structure and as it seems there's a 0x4c interleave for each channel. However there are 0x8, 0x10 or 0x18 additional bytes ever so often (depending on the file) but I cannot see a pattern when these additional bytes repeat. Can you elaborate this so I can write a QuickBMS script?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

There are no interleaved blocks here. If you like to split 2 channels from 4, you have to parse all blocks and split each chunk and constuct the new stream.

This can be done, but i don't think it will be easy.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

Do I maybe have a wrong understanding of "interleave"? I thought interleave means that blocks for each channel alternate...
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

Ok, you can call it interleave, but as you noticed, this is not "clean" interleave, but the channels interleave within the blocks.

There are many different formats containing XAS audio, but most usual will look like this:

int32 block_size
int32 number_of_samples

Then you have continuous blocks of 0x4c bytes for each channel.

Also there may be loop flags, these are additional 4 or 8 bytes. I don't remember the exact flags meaning, send me examples if you need those.

There's also "header-B" stream type, mostly used in new games. This will have an additional header and footer.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by AlphaTwentyThree »

Ok, I'll see what I can do, maybe I can get it to work. It would be quite nice to have 2 stereo files instead of a 4ch file when it's actually a layered stream. Else, you can delete a stereo pair when the second layer is empty, like in some cases with Boogie SuperStar.
MaZTeR
Posts: 61
Joined: Sun Jun 05, 2016 1:30 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by MaZTeR »

Hello.

I was looking for Xas_decode audio decoder for Dead Space 1 and perhaps 2 and 3, because I'm currently ripping the necromorph audio files for youtube with the use of RickVisceral's .DAT and .STR opener, a BNK opener and finally ealayer3 :)

I noticed that for some reason Visceral Games had removed some of the files in Dead Space 2 and are only in Dead Space. I tried using ealayer3 on the DS1 exa files but it says that I got a read error. I researched further and found that you can use Xas_decoder on Dead Space and it is the only tool that works on that game. However, the site I found the file from won't let me register so I eventually found this site.

Does anyone have the tool for me to use before this thread dies like the other few you can find on google by searching something like "dead space audio ripping tool"?

Thank you :)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by id-daemon »

here
MaZTeR
Posts: 61
Joined: Sun Jun 05, 2016 1:30 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by MaZTeR »

id-daemon wrote:here

Thank you so much you are a life saver!

Anyways, I also got the towav.exe .SNU extractor for Dead Space, but it doesn't work on Dead Space 2 and possibly neither for Dead Space 3. Is there any way one can make it work with those games' .SNU files?
MaZTeR
Posts: 61
Joined: Sun Jun 05, 2016 1:30 pm

Re: Boogie SuperStar *.sns - EA_ADPCM?

Post by MaZTeR »

id-daemon wrote:here

I tried opening it first without an exa file and it said I do not have permission. I ran it as an administrator and it still said I do not have permission to open it. What's up with that?

Edit: well, I figured out the permission problem but it doesn't open the Dead Space 1 exa files. It quickly flashes the CMD window, possibly giving the "cannot read the file" error and closes. Any ideas?
Last edited by MaZTeR on Sun Jun 05, 2016 2:14 pm, edited 1 time in total.