Dolphin, the GameCube and Wii emulator - Forums

Full Version: SFX ripping/decoding/dumping features?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(01-22-2015, 07:59 AM)jimbo1qaz Wrote: [ -> ]I think that not many people have any given game, so you might be better off sending them privately to whoever.
Don't know if it's legal, but who cares?
I don't suggest posting it publicly on the forum, it may not be allowed.

Can you send them to me? There's a 0.000000000(infinity)1% chance I can find out how it works.

I sent you a PM.
Check your inbox!

Qaazavaca Qaanic

How much money are you willing to pay me to reverse it?

(•) $0.00
( ) $0.00
( ) $0.00
( ) Custom donation [$0.00_________]

...just kidding.

I think it's some sort of adpcm-like thing. I tried opening it in audacity as raw data, and got something which sounded like a siren, and voice clips, except with MASSIVE amounts of noise. Didn't matter which endian-ness I chose, I still got very noisy audio. If it was PCM audio, wrong endian-ness or offset would result in total static. I tried opening known good BRSTMs with Audacity and got similar results.

In the process of going to, at some point, hack a standalone ADPCM decoder out of vgmtrans source code. Then I can try to figure out the file format, and decode the relevant regions automatically. Maybe the metadata, sound locations, etc. are not stored there? Not sure.

I suspect data2 may be a sample set for sequenced (MIDI-like) music, and also a sound effect bank. I think data3 contains mostly SFX.
I recognize what the siren-like sound you heard was. It's the sound when your ship's lasers recharge to full to unleash a large blast (X-wing fires all four cannons at once.)

Utilizing a bug with Dolphin and emulating Rogue Squadron 2, I was able to rip that sound without that layer of static. I ripped several other clean sounds as well, but that rip will never suffice... we need all the sounds from this Holy Grail of Star Wars games. By the way, your hunch about data2 having a sample set for sequenced music was correct. It does indeed contain the sound effect bank too. After listening to it for long enough, I identified TIE Fighter lasers, the A-wing/Y-Wing/TIE engine sounds and several others.

If it helps, I can also provide you with two files that seem to list the sound effect locations.

I think I speak for everyone involved when I say we appreciate your help in reverse-engineering these 14-year-old proprietary formats, jimbo1qaz. I don't know squat about reverse engineering, but if there's anything I can do to help, please inform me.
Protip: if it's GC/Wii, it's 4-bit ADPCM (with blocks of 14 samples/8 bytes). Almost no exception. You just need to find the coefficients and the initial yn1/yn2 + potentially the loop points and loop yn1/yn2.
(01-26-2015, 12:09 PM)delroth Wrote: [ -> ]Protip: if it's GC/Wii, it's 4-bit ADPCM (with blocks of 14 samples/8 bytes). Almost no exception. You just need to find the coefficients and the initial yn1/yn2 + potentially the loop points and loop yn1/yn2.

Ya had me at 4-bit ADPCM, but lost me at blocks.
I feel dumb now.

Qaazavaca Qaanic

Trying to port over the vgmstream code to python because I can't write a wrapper around their ADPCM code.
I think that somewhere out there, someone knows the GC ADPCM algorithm by heart (really) and can reverse-engineer the coefficients just by listening to the audio (just kidding).

And here I am, struggling to even understand what you mean by 14 samples per 8 bytes... (where did the 2 missing samples go?)

vgmstream gave me the impression that it was a continuous byte stream, each 1/2 bytes corresponding to one 16-bit output sample (haven't figured it out completely).

also, is dsp (hcs, brstm) the same as dtk audio?
(01-26-2015, 12:34 PM)iteachvader Wrote: [ -> ]
(01-26-2015, 12:09 PM)delroth Wrote: [ -> ]Protip: if it's GC/Wii, it's 4-bit ADPCM (with blocks of 14 samples/8 bytes). Almost no exception. You just need to find the coefficients and the initial yn1/yn2 + potentially the loop points and loop yn1/yn2.

Ya had me at 4-bit ADPCM, but lost me at blocks.
I feel dumb now.


Here is a link on “blocks” http://en.wikipedia.org/wiki/Blocks_(C_language_extension). I hope that this answers your question.

Qaazavaca Qaanic

not sure if trolling or just ignorant.

An ADPCM block is a bunch of data which has to be processed as a group. I don't know how to process the blocks of data. It has nothing to do WHATSOEVER with a programming language extension. Programming languages do not have special features for processing ADPCM. Even if there was a code library to do so, it would be called a ADPCM de/compressor, not a block.
https://github.com/dolphin-emu/dolphin/blob/9f86d3efcf1f687f5cfbe69b081aeeedb0cb9bb9/Source/Core/Core/DSP/DSPAccelerator.cpp might help.
The algorithm restarts every 8 bytes, and the first byte initializes the state; the other 7 bytes contain 14 samples.
(01-27-2015, 06:52 AM)jimbo1qaz Wrote: [ -> ]not sure if trolling or just ignorant.

An ADPCM block is a bunch of data which has to be processed as a group. I don't know how to process the blocks of data. It has nothing to do WHATSOEVER with a programming language extension. Programming languages do not have special features for processing ADPCM. Even if there was a code library to do so, it would be called a ADPCM de/compressor, not a block.

Sorry, I was answering for iteachvader. I didn’t mean to disrupt things for you. Please accept my apologies.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15