jump to navigation

Playing ADPCM sounds on Amiga… November 5, 2006

Posted by winden in coding, demoscene.

So yesterday I finally started to code an ADPCM sound player, since upon scrounging google I didn’t really manage to find any public 680×0 sources to do the playing like for example can be done with players like “the player 6.1” are not turned up when searched for, so maybe there are really free-to-use players… but anyways, armed with a tutorial from jurassic pack 14 by scicco/scarab about how to drive the Amiga to make a buffered sound loop, I dove into the hardware hacking and a few hours later I had a 16bit uncrompressed wav sounding as a 8bit realtime dithered wave on the Amy.

Fun started when I started trying to covert the standards-provided reference sourcecode for IMA-ADPCM into a 680×0 routine… and today after a few more hours it’s starting to sound somewhat like the original but with pops and clcks (which the original roxette song didn’t have ;)… so I think I may be nearing the first version with proper sound :)

What I’ve also detected is that ADPCM decoding will be difficult to optimise regarding cpu pairing and the like… so after I have it working maybe I’ll have to spend some time making my own compressed format which could be decoded with less serial dependencies.

Off to code some more…


1. flynn - November 5, 2006

I haven’t really looked at the code the TBL guys use to replay music but I suspect the decoder is probably interleaved with other stuff, maybe using the FPU for something else at the same time. About the output quality, how about using the 14bit trick?

2. Zener - November 7, 2006

Animo, tu puedes conseguirlo!!! Amiga scene never dies!!!only sleeps!

3. z5 - November 10, 2006

go go go Winden :o)

4. Crumb - November 15, 2006

mmm esto se pone interesante… :-)

5. Kalms - December 19, 2006

Decoding ADPCM (or similar) is reasonably quick. Our implementation takes perhaps 10 scanlines on 060 for decoding a 22kHz mono stream to 14bit output. We are not doing anything particularly fancy — just remember to do any chipwrites as longword packets.

Since decoding takes just 10 scanlines, there is little point in me optimizing it further or trying to do some kind of FPU work in parallel. That effort is better spent in other areas.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: