mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
8310a672b0
When the current address is xxxxxxxf, after doing the standard ADPCM decoding and incrementing the current address as usual to get the next address, the DSP will update the predscale register by reading 2 bytes from memory, and add two to get the next address. This means xxxxxx10 cannot be a current address, as the DSP goes from 0f to 12 directly. A more serious issue with the old code is that if the start address is 16-byte aligned, some samples will always be skipped, even when that should not be the case. An easy way to test whether this behaviour is correct is to check the current address register and the predscale after each read. Old code: ... ACCA=00000002, predscale=<value> ACCA=00000003, predscale=<value> ... ACCA=0000000f, predscale=<value> ACCA=00000010, predscale=<another value> ACCA=00000013, predscale=<another value> ACCA=00000014, predscale=<another value> ... New code (and console): ... ACCA=00000002, predscale=<value> ACCA=00000003, predscale=<value> ... ACCA=0000000f, predscale=<value> ACCA=00000012, predscale=<another value> ACCA=00000013, predscale=<another value> ...