Implemented Sound Blaster DSP busy cycling when playing DMA audio. Fixes stalls in Wing Commander : Privateer when sound enabled.

This commit is contained in:
SarahW 2018-01-10 18:48:11 +00:00
commit be7bb04c6b
2 changed files with 7 additions and 1 deletions

View file

@ -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;

View file

@ -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;