Odd Yamaha AICA by marscat85 at 9:23 AM EST on February 9, 2012
Hey all, I'm having a really hard time with this file. It looks to be Yamaha 4bit ADPCM at 88200hz. You can set it to 8Bit PCM at 44100hz as well and it sounds decent as well. I've been messing with it in genh > vgmstream test but everythings come back pretty weird.

Heres a sample:
Snip.bin

Does anyone think they might be able to help with this?

Thanks in advance!

edit: n/m about the channel thing, I was stupid and forgot to tell it to ignore looping. It's probably 2 channel at 44100 but really staticy.

edited 11:26 AM EST February 9, 2012
update by marscat85 at 7:21 PM EST on February 9, 2012
I did some more messing around, the best possible sound I was able to get was with genh is:

Interleaved DVI 4-Bit IMA ADPCM
Header Skip: 8
Interleave: 1
Channels: 1
Frequency: 88200

Is anyone able to help with this?
by SmartOne at 7:40 PM EST on February 9, 2012
What is the file from? Looks like an unusual frequency, at least among the games I've seen.
by hcs at 7:49 PM EST on February 9, 2012
Where did you get this from? It seems to me to be nibble interleaved IMA, though exactly what rounding model is I'm not certain. vgmstream has support for this from a particular PC game, but it isn't generally accessible otherwise. I'll look at adding support for this but I like to note what game it is from.

You can deinterleave the data with denibble (run like denibble in outL outR) and then try messing with GENH with the result. I tried with sox (after cutting off the header) and it seemed to mostly work, but it wandered quite a bit from AC so I figure someone is using the wrong IMA rounding model.

edited 7:52 PM EST February 9, 2012
OK by marscat85 at 7:52 PM EST on February 9, 2012
edit: yeah, your right, header of 16 bytes.

edited 8:57 PM EST February 9, 2012
by hcs at 8:48 PM EST on February 9, 2012
No, I'm pretty sure the header is 16 bytes (observe that the size/sample count at offset 4 + 16 points exactly at where the nonzero data ends), but it doesn't matter much.

I'm stumped so far, btw. I've tried the three models I know, and I'm getting no improvements. Also the audio just seems very weirdly structured. It may not be IMA at all, just something that looks a lot like it. I tried AICA but with no success.
hmm by marscat85 at 8:56 PM EST on February 9, 2012
odd, the chip the system uses is a YMZ280b

I found mame source here:
http://mamedev.org/source/src/emu/sound/ymz280b.c.html

but as I am not super versed in audio programming, I really can't make heads or tails of it. I figured since it's the same as a lot of sega chips it might be similar. Very odd. Thanks for the updated header size, at least I can remove the extraneous stuff. I'll keep messing around too, but I doubt I will find something. Though I will check here for a while in case you guys get one of your famous strokes of genius!

Thank you so much for getting me this far!
by hcs at 9:28 PM EST on February 9, 2012
Yeah that MAME code is what we've called AICA but which is really just Yamaha's standard ADPCM. It is possible that they don't actually use hardware to do the decoding, but they instead have some custom IMA-flavored mechanism.
Kinda figured it out by marscat85 at 9:03 AM EST on February 17, 2012
FYI, it looks like this is vox. Check out the very end of this about the reset code.

http://www.mp3-tech.org/programmer/docs/adpcm.pdf

However, it still has some quirks. The audio will play correctly but if you look at the waves, they are all out of whack making it impossible to do any real audio editing with it. Maybe the step table is different? I'm not smart enough to go much further.

Proceedure:
Remove 16 byte header. Nibble Deinterleave. Use one stream and vox decode. 44.1khz, 4 bit, mono spec per channel file output.

edited 9:05 AM EST February 17, 2012
by hcs at 5:43 PM EST on February 17, 2012
Ah, yeah, vox makes sense. vgmstream doesn't have any support for it just yet. I see what you mean about it wandering, that's weird.
[edit]
As expected, it uses a different rounding model. Here's a slow decoder for python 2.6: snipADP

Run like:
python snipADP.py snip.bin out.wav

You still didn't tell me what game this is from.

edited 7:00 PM EST February 17, 2012
thanks! by marscat85 at 7:46 PM EST on February 17, 2012
Thanks! It's funny you wrote that in python because this is actually used in viper hardware! My phone accidentally edited out the game name in my edit above. My friend PK and I were looking at the audio from ppp2. He figured out it was vox. But regardless thank you so much! You guys are awesome!
by hcs at 9:20 PM EST on February 17, 2012
Oh yeah, I knew I had seen the name somewhere, but when I looked back at the post I couldn't find it. Just in case you aren't aware, the decoder I provided doesn't have the accumulating DC offset that a normal Dialogic decoder would, so it should be sufficient for your needs.
by marscat85 at 1:57 AM EST on February 18, 2012
Thank you so much! It works perfectly!


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