From 0e0ad58541aaa72c418adbadd20446a1fb790ee4 Mon Sep 17 00:00:00 2001 From: gameblabla Date: Sun, 22 Aug 2021 15:16:01 +0200 Subject: [PATCH] CDROM: Ignore sectors with channel number 255 This was inspired by the fix in Duckstation : https://github.com/stenzek/duckstation/commit/0710e3b6d384526ed939f742f8f657623bb354bb Some games have junk audio sectors with a channel number of 255. If these are not skipped, then they will play wrong file. This was tested on "Blue's Clues : Blue's Big Musical" and it fixed the missing audio there. Taxi 2 is also said to be affected by this. --- libpcsxcore/cdrom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 47d45cd0..00a10e12 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1117,9 +1117,14 @@ void cdrReadInterrupt() { cdr.Channel = cdr.Transfer[4 + 1]; } + /* Gameblabla + * Skips playing on channel 255. + * Fixes missing audio in Blue's Clues : Blue's Big Musical. (Should also fix Taxi 2) + * TODO : Check if this is the proper behaviour. + * */ if((cdr.Transfer[4 + 2] & 0x4) && (cdr.Transfer[4 + 1] == cdr.Channel) && - (cdr.Transfer[4 + 0] == cdr.File)) { + (cdr.Transfer[4 + 0] == cdr.File) && cdr.Channel != 255) { int ret = xa_decode_sector(&cdr.Xa, cdr.Transfer+4, cdr.FirstSector); if (!ret) { cdrAttenuate(cdr.Xa.pcm, cdr.Xa.nsamples, cdr.Xa.stereo); -- 2.39.5