ADPCM

From NeoGeo Development Wiki
Revision as of 16:05, 13 November 2016 by Furrtek (talk | contribs) (Created page with "'''A'''daptive '''D'''ifferential '''P'''ulse '''C'''ode '''M'''odulation is a lossy audio compression algorithm. It is essentially PCM with dynamic quantizing step adaptation...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Adaptive Differential Pulse Code Modulation is a lossy audio compression algorithm. It is essentially PCM with dynamic quantizing step adaptation. See [Wikipedia article] for more general informations.

The NeoGeo's YM2610 uses this format for samples stored in the V ROMs. Each sample is coded in 4 bits and approximately reconstituted as 12 bits during playback.

Note that the Yamaha ADPCM format is different from the common IMA and Microsoft ADPCM formats. See ADPCM codecs for encoding and decoding tools.

Format

To do.

Drifting

Decoded ADPCM audio slowly drifting upwards and hitting a chunk of garbage data.

Since the algorithm is based on the difference between samples, it is prone to drifting if buggy codecs or bad data are used.

Clean data should always produce a zero-centered signal when decoded.

If a cartridge has contact issues for example, the YM2610 will read corrupt data and the decoder will make the output value randomly "jump" everywhere, resulting in a horrendous screeching sound even if only one data line is disconnected.

Many V ROMs contain garbage data at more-or-less regular intervals. Consequently, if the dump is decoded from start to end, the decoder will take the garbage data into account and the decoded audio output will either drift slowly or become brutally offset. This isn't an issue when the game is running because the YM2610 resets the decoder each time a sample is played (also, the sound driver shouldn't be playing garbage data).