diff --git a/src/sound_sb_dsp.c b/src/sound_sb_dsp.c index 6aebef1..fb1532a 100644 --- a/src/sound_sb_dsp.c +++ b/src/sound_sb_dsp.c @@ -685,7 +685,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->wb_full) + if (dsp->sb_8_enable || dsp->sb_type >= SB16 ) + dsp->busy_count = (dsp->busy_count + 1) & 15; + else + dsp->busy_count = 0; + if (dsp->wb_full || (dsp->busy_count & 8)) { dsp->wb_full = dsp->wb_time; return 0xff; diff --git a/src/sound_sb_dsp.h b/src/sound_sb_dsp.h index 3c100e5..68f260a 100644 --- a/src/sound_sb_dsp.h +++ b/src/sound_sb_dsp.h @@ -58,6 +58,8 @@ typedef struct sb_dsp_t int asp_data_len; int wb_time, wb_full; + + int busy_count; int record_pos_read; int record_pos_write;