summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoConfig.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-09-18 23:40:06 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-09-24 20:48:29 +0200
commit8310a672b01763c5c783f6afb638bcd23b07005d (patch)
tree3195b4c6ca1303526167a80a57b3360d3fe5d76d /Source/Core/VideoCommon/VideoConfig.cpp
parent003dba5275c12a883104be2e670aeedfeb92f526 (diff)
DSP: Fix the predscale update logic
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> ...
Diffstat (limited to 'Source/Core/VideoCommon/VideoConfig.cpp')
0 files changed, 0 insertions, 0 deletions