From 8ce9832c168e5c5b675599247fe9a605c473d6d9 Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 5 Apr 2018 20:54:50 +0100 Subject: [PATCH] Tweaked SB DSP write data ready timing. Fixes SB16 detection on Windows 98. --- src/sound_sb_dsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound_sb_dsp.c b/src/sound_sb_dsp.c index fb4c153..0300c24 100644 --- a/src/sound_sb_dsp.c +++ b/src/sound_sb_dsp.c @@ -734,11 +734,11 @@ uint8_t sb_read(uint16_t a, void *priv) // pclog("SB read %02X\n",sbreaddat); return dsp->sbreaddat; case 0xC: /*Write data ready*/ - if (dsp->sb_8_enable || dsp->sb_type >= SB16 ) - dsp->busy_count = (dsp->busy_count + 1) & 15; + if (dsp->sb_8_enable || dsp->sb_type >= SB16) + dsp->busy_count = (dsp->busy_count + 1) & 3; else dsp->busy_count = 0; - if (dsp->wb_full || (dsp->busy_count & 8)) + if (dsp->wb_full || (dsp->busy_count & 2)) { dsp->wb_full = dsp->wb_time; return 0xff;