mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 19:44:57 +00:00
Added an exception check when the game is close to overflowing. Fixes the fifo overflow that occurs in Battalion Wars 2.
Changed the CPEnd loop check to an exact match.
This commit is contained in:
parent
3d448e49c6
commit
ca3e5ce5e1
1 changed files with 6 additions and 3 deletions
|
@ -330,7 +330,7 @@ void GatherPipeBursted()
|
|||
}
|
||||
|
||||
// update the fifo pointer
|
||||
if (fifo.CPWritePointer >= fifo.CPEnd)
|
||||
if (fifo.CPWritePointer == fifo.CPEnd)
|
||||
fifo.CPWritePointer = fifo.CPBase;
|
||||
else
|
||||
fifo.CPWritePointer += GATHER_PIPE_SIZE;
|
||||
|
@ -342,6 +342,10 @@ void GatherPipeBursted()
|
|||
ProcessorInterface::Fifo_CPUEnd = fifo.CPEnd;
|
||||
}
|
||||
|
||||
// If the game is running close to overflowing, make the exception checking more frequent.
|
||||
if (fifo.bFF_HiWatermark)
|
||||
CoreTiming::ForceExceptionCheck(0);
|
||||
|
||||
Common::AtomicAdd(fifo.CPReadWriteDistance, GATHER_PIPE_SIZE);
|
||||
|
||||
RunGpu();
|
||||
|
@ -470,8 +474,7 @@ void ProcessFifoAllDistance()
|
|||
{
|
||||
if (IsOnThread())
|
||||
{
|
||||
while (!interruptWaiting && fifo.bFF_GPReadEnable &&
|
||||
fifo.CPReadWriteDistance && !AtBreakpoint())
|
||||
while (!interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint())
|
||||
Common::YieldCPU();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue