mirror of https://github.com/PCSX2/pcsx2.git
SPU2: Move ADMA clear to ADMA disable.
Fix bug with errantly setting data size if there isn't any.
This commit is contained in:
parent
09a49cfaa0
commit
bdac7672b7
|
@ -108,7 +108,7 @@ void V_Core::AutoDMAReadBuffer(int mode) //mode: 0= split stereo; 1 = do not spl
|
|||
|
||||
int size = std::min(InputDataLeft, (u32)0x200);
|
||||
if (!leftbuffer)
|
||||
size = 0x100;
|
||||
size = std::min(size, 0x100);
|
||||
LogAutoDMA(Index ? ADMA7LogFile : ADMA4LogFile);
|
||||
//ConLog("Refilling ADMA buffer at %x OutPos %x with %x\n", spos, OutPos, size);
|
||||
// HACKFIX!! DMAPtr can be invalid after a savestate load, so the savestate just forces it
|
||||
|
|
|
@ -116,12 +116,6 @@ StereoOut32 V_Core::ReadInput()
|
|||
retval = StereoOut32(
|
||||
(s32)(*GetMemPtr(0x2000 + (Index << 10) + ReadIndex)),
|
||||
(s32)(*GetMemPtr(0x2200 + (Index << 10) + ReadIndex)));
|
||||
|
||||
// Not accurate behaviour but shouldn't hurt for now, need to run some tests
|
||||
// to see why Prince of Persia Warrior Within buzzes when going in to the map
|
||||
// since it starts an ADMA of music, then kills ADMA, so it loops on a few ms of data.
|
||||
GetMemPtr(0x2000 + (Index << 10) + ReadIndex)[0] = 0;
|
||||
GetMemPtr(0x2200 + (Index << 10) + ReadIndex)[0] = 0;
|
||||
}
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
|
|
|
@ -1559,6 +1559,16 @@ static void RegWrite_Core(u16 value)
|
|||
thiscore.InputDataLeft = 0;
|
||||
thiscore.DMAICounter = 0;
|
||||
thiscore.InputDataTransferred = 0;
|
||||
|
||||
// Not accurate behaviour but shouldn't hurt for now, need to run some tests
|
||||
// to see why Prince of Persia Warrior Within buzzes when going in to the map
|
||||
// since it starts an ADMA of music, then kills ADMA and input DMA
|
||||
// without disabling ADMA read mode or clearing the buffer.
|
||||
for (int i = 0; i < 0x200; i++)
|
||||
{
|
||||
GetMemPtr(0x2000 + (thiscore.Index << 10))[i] = 0;
|
||||
GetMemPtr(0x2200 + (thiscore.Index << 10))[i] = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue