mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00:00
I was wrong on the CPEnd issue, which reveals CPBreakpoint > CPEnd is possible and that explains why some BPs could never be achieved before.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5705 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cab62472b8
commit
64299206d1
3 changed files with 20 additions and 11 deletions
|
@ -163,7 +163,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
// If we are in BP mode we only send 32B chunks to Video plugin for BP checking
|
||||
if (_fifo.bFF_BPEnable)
|
||||
{
|
||||
if (readPtr == _fifo.CPBreakpoint)
|
||||
if ((readPtr <= _fifo.CPBreakpoint) && (readPtr + 32 > _fifo.CPBreakpoint))
|
||||
{
|
||||
Common::AtomicStore(_fifo.bFF_Breakpoint, 1);
|
||||
if (_fifo.bFF_BPInt)
|
||||
|
@ -173,7 +173,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
}
|
||||
|
||||
distToSend = 32;
|
||||
if (readPtr + 32 >= _fifo.CPEnd)
|
||||
if (readPtr >= _fifo.CPEnd)
|
||||
readPtr = _fifo.CPBase;
|
||||
else
|
||||
readPtr += 32;
|
||||
|
@ -184,9 +184,9 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
distToSend = _fifo.CPReadWriteDistance;
|
||||
// send 1024B chunk max length to have better control over PeekMessages' period
|
||||
distToSend = distToSend > 1024 ? 1024 : distToSend;
|
||||
if (readPtr + distToSend >= _fifo.CPEnd)
|
||||
if (readPtr + distToSend >= _fifo.CPEnd + 32)
|
||||
{
|
||||
distToSend = _fifo.CPEnd - readPtr;
|
||||
distToSend = _fifo.CPEnd + 32 - readPtr;
|
||||
readPtr = _fifo.CPBase;
|
||||
}
|
||||
else
|
||||
|
@ -208,7 +208,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
|||
VideoFifo_CheckSwapRequest();
|
||||
}
|
||||
|
||||
if (!_fifo.CPReadIdle && _fifo.CPReadWriteDistance <= _fifo.CPLoWatermark)
|
||||
if (!_fifo.CPReadIdle && _fifo.CPReadWriteDistance < _fifo.CPLoWatermark)
|
||||
{
|
||||
Common::AtomicStore(_fifo.CPReadIdle, true);
|
||||
CommandProcessor::UpdateInterruptsFromVideoPlugin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue