mirror of https://github.com/PCSX2/pcsx2.git
SPU2: Tighten AutoDMA IRQ timing.
Fixes games which monitor the MADR while transferring. Tom & Jerry War of the Whiskers was one game that suffered (Jumpy music)
This commit is contained in:
parent
4624d2d175
commit
e0394921e9
|
@ -181,14 +181,6 @@ void V_Core::StartADMAWrite(u16* pMem, u32 sz)
|
|||
#else
|
||||
AutoDMAReadBuffer(0);
|
||||
#endif
|
||||
|
||||
|
||||
if (!InputDataLeft)
|
||||
{
|
||||
DMAICounter = size * 4;
|
||||
LastClock = *cyclePtr;
|
||||
AutoDMACtrl |= ~3;
|
||||
}
|
||||
}
|
||||
AdmaInProgress = 1;
|
||||
}
|
||||
|
|
|
@ -110,8 +110,28 @@ StereoOut32 V_Core::ReadInput()
|
|||
if (InputDataTransferred)
|
||||
{
|
||||
u32 amount = std::min(InputDataTransferred, (u32)0x180);
|
||||
MADR += amount;
|
||||
|
||||
InputDataTransferred -= amount;
|
||||
MADR += amount;
|
||||
// Because some games watch the MADR to see when it reaches the end we need to end the DMA here
|
||||
// Tom & Jerry War of the Whiskers is one such game, the music will skip
|
||||
if (!InputDataTransferred && !InputDataLeft)
|
||||
{
|
||||
if (Index == 0)
|
||||
{
|
||||
if (!SPU2_dummy_callback)
|
||||
spu2DMA4Irq();
|
||||
else
|
||||
SPU2interruptDMA4();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!SPU2_dummy_callback)
|
||||
spu2DMA7Irq();
|
||||
else
|
||||
SPU2interruptDMA7();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayMode == 2 && Index == 0) //Bitstream bypass refills twice as quickly (GTA VC)
|
||||
|
@ -141,8 +161,6 @@ StereoOut32 V_Core::ReadInput()
|
|||
}
|
||||
|
||||
InputDataLeft = 0;
|
||||
DMAICounter = InputDataTransferred * 4;
|
||||
LastClock = *cyclePtr;
|
||||
}
|
||||
}
|
||||
else if ((AutoDMACtrl & (Index + 1)))
|
||||
|
|
Loading…
Reference in New Issue