Increase size of DSB2 FIFO buffer; fixes Sega Rally 2 music occasionally not switching or fading out

This commit is contained in:
Matthew Daniels 2021-10-26 22:47:24 +00:00
parent b18f6d1b54
commit 94d8a1b22d
2 changed files with 3 additions and 3 deletions

View file

@ -981,7 +981,7 @@ void CDSB2::SendCommand(UINT8 data)
* over the course of a frame at once.
*/
fifo[fifoIdxW++] = data;
fifoIdxW &= 127;
fifoIdxW &= 255;
//printf("Write FIFO: %02X\n", data);
// Have we caught up to the read pointer?
@ -1011,7 +1011,7 @@ void CDSB2::RunFrame(INT16 *audioL, INT16 *audioR)
{
cmdLatch = fifo[fifoIdxR]; // retrieve next command byte
fifoIdxR++;
fifoIdxR &= 127;
fifoIdxR &= 255;
M68KSetIRQ(1); // indicate pending command
//printf("68K INT fired\n");

View file

@ -299,7 +299,7 @@ private:
UINT8 *ram; // 68K RAM
// Command FIFO
UINT8 fifo[128];
UINT8 fifo[256];
int fifoIdxR; // read position
int fifoIdxW; // write position