Implemented Sound Blaster DSP busy cycling when playing DMA audio. Fixes stalls in Wing Commander : Privateer when sound enabled.
This commit is contained in:
parent
3c431794f0
commit
be7bb04c6b
2 changed files with 7 additions and 1 deletions
|
|
@ -685,7 +685,11 @@ uint8_t sb_read(uint16_t a, void *priv)
|
||||||
// pclog("SB read %02X\n",sbreaddat);
|
// pclog("SB read %02X\n",sbreaddat);
|
||||||
return dsp->sbreaddat;
|
return dsp->sbreaddat;
|
||||||
case 0xC: /*Write data ready*/
|
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;
|
dsp->wb_full = dsp->wb_time;
|
||||||
return 0xff;
|
return 0xff;
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ typedef struct sb_dsp_t
|
||||||
|
|
||||||
int wb_time, wb_full;
|
int wb_time, wb_full;
|
||||||
|
|
||||||
|
int busy_count;
|
||||||
|
|
||||||
int record_pos_read;
|
int record_pos_read;
|
||||||
int record_pos_write;
|
int record_pos_write;
|
||||||
int16_t record_buffer[0xFFFF];
|
int16_t record_buffer[0xFFFF];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue