From e88b62261911f7013bab5160d99ceabae44b2ad1 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sun, 8 Nov 2020 23:13:20 +0100 Subject: multipcm: fix the 12bits mode decoding, the trigger bit is incorrect though [O. Galibert] --- src/devices/sound/multipcm.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/devices/sound/multipcm.cpp b/src/devices/sound/multipcm.cpp index be61f46838f..370d242ff3b 100644 --- a/src/devices/sound/multipcm.cpp +++ b/src/devices/sound/multipcm.cpp @@ -694,29 +694,27 @@ void multipcm_device::sound_stream_update(sound_stream &stream, std::vector> 8) | ((w1 & 0x00ff) << 8); + { // ..C. AB.. .... + s16 w0 = (read_byte(adr + 2) << 8) | (read_byte(adr + 1) & 0xf0); + csample = w0; break; } case 2: - { // .... bc.. ...a - u16 w0 = read_byte(adr + 2) << 8 | read_byte(adr + 3); - u16 w1 = read_byte(adr + 4) << 8 | read_byte(adr + 5); - csample = ((w0 & 0xff00) >> 4) | ((w1 & 0x000f) << 12); + { // .... ..ab .c.. + s16 w0 = read_byte(adr + 3) << 8 | ((read_byte(adr + 4) & 0xf) << 4); + csample = w0; break; } case 3: - { // .... .... ABC. - u16 w1 = read_byte(adr + 4) << 8 | read_byte(adr + 5); - csample = w1 & 0xfff0; + { // .... .... C.AB + s16 w0 = (read_byte(adr + 5) << 8) | (read_byte(adr + 4) & 0xf0); + csample = w0; break; } } -- cgit v1.2.3