- I've fixed possibles random hangs in DC mode.
- I've fixed hangs in DC mode in (Simpsons, Monkey Island, Pokemon XD, etc) - I've implemented accurate manage of Pixel Engine Interrupts, now the GPU loop is stopped when a PE Interrupt needs to be managed and resume when Pixel Engine finish, I think now, the Fifo in DC mode is more accurate than SC mode. :) Time to close the big fifo Issue 3694 (snif), please if you have a possible fifo issue report this like a game issue. I was working with Skid_AU together, especially thanks for him. Test a lot all games, and compare the performance with the master maybe this accuracy has a cost (not a lot). I think now the fifo is very stable, overflow fixed, random hang fixed, if you have a game with a hang with this rev and not in master please report this.
This commit is contained in:
parent
b0f75f17ae
commit
c2e6fdf09f
|
@ -597,7 +597,7 @@ void SetCpStatusRegister()
|
||||||
|
|
||||||
m_CPStatusReg.Breakpoint = fifo.bFF_Breakpoint;
|
m_CPStatusReg.Breakpoint = fifo.bFF_Breakpoint;
|
||||||
m_CPStatusReg.ReadIdle = (fifo.CPReadPointer == fifo.CPWritePointer) || (fifo.CPReadPointer == fifo.CPBreakpoint) ;
|
m_CPStatusReg.ReadIdle = (fifo.CPReadPointer == fifo.CPWritePointer) || (fifo.CPReadPointer == fifo.CPBreakpoint) ;
|
||||||
m_CPStatusReg.CommandIdle = !fifo.CPReadWriteDistance;
|
m_CPStatusReg.CommandIdle = !fifo.CPReadWriteDistance || (IsOnThread() && PixelEngine::WaitingForPEInterrupt());
|
||||||
m_CPStatusReg.UnderflowLoWatermark = fifo.bFF_LoWatermark;
|
m_CPStatusReg.UnderflowLoWatermark = fifo.bFF_LoWatermark;
|
||||||
m_CPStatusReg.OverflowHiWatermark = fifo.bFF_HiWatermark;
|
m_CPStatusReg.OverflowHiWatermark = fifo.bFF_HiWatermark;
|
||||||
|
|
||||||
|
@ -620,6 +620,7 @@ void SetCpControlRegister()
|
||||||
|
|
||||||
if (!fifo.bFF_GPReadEnable && m_CPCtrlReg.GPReadEnable && !m_CPCtrlReg.BPEnable)
|
if (!fifo.bFF_GPReadEnable && m_CPCtrlReg.GPReadEnable && !m_CPCtrlReg.BPEnable)
|
||||||
{
|
{
|
||||||
|
ProcessFifoEvents();
|
||||||
PixelEngine::ResetSetFinish();
|
PixelEngine::ResetSetFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "Atomic.h"
|
#include "Atomic.h"
|
||||||
#include "OpcodeDecoding.h"
|
#include "OpcodeDecoding.h"
|
||||||
#include "CommandProcessor.h"
|
#include "CommandProcessor.h"
|
||||||
|
#include "PixelEngine.h"
|
||||||
#include "ChunkFile.h"
|
#include "ChunkFile.h"
|
||||||
#include "Fifo.h"
|
#include "Fifo.h"
|
||||||
#include "HW/Memmap.h"
|
#include "HW/Memmap.h"
|
||||||
|
@ -137,7 +138,7 @@ void RunGpuLoop()
|
||||||
|
|
||||||
CommandProcessor::SetCpStatus();
|
CommandProcessor::SetCpStatus();
|
||||||
// check if we are able to run this buffer
|
// check if we are able to run this buffer
|
||||||
while (!CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint())
|
while (GpuRunningState && !CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint() && !PixelEngine::WaitingForPEInterrupt())
|
||||||
{
|
{
|
||||||
if (!GpuRunningState) break;
|
if (!GpuRunningState) break;
|
||||||
|
|
||||||
|
|
|
@ -468,4 +468,9 @@ void ResetSetToken()
|
||||||
}
|
}
|
||||||
CommandProcessor::interruptTokenWaiting = false;
|
CommandProcessor::interruptTokenWaiting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WaitingForPEInterrupt()
|
||||||
|
{
|
||||||
|
return CommandProcessor::interruptFinishWaiting || CommandProcessor::interruptTokenWaiting || interruptSetFinish || interruptSetToken;
|
||||||
|
}
|
||||||
} // end of namespace PixelEngine
|
} // end of namespace PixelEngine
|
||||||
|
|
|
@ -80,7 +80,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||||
void SetFinish(void);
|
void SetFinish(void);
|
||||||
void ResetSetFinish(void);
|
void ResetSetFinish(void);
|
||||||
void ResetSetToken(void);
|
void ResetSetToken(void);
|
||||||
bool AllowIdleSkipping();
|
bool WaitingForPEInterrupt();
|
||||||
|
|
||||||
// Bounding box functionality. Paper Mario (both) are a couple of the few games that use it.
|
// Bounding box functionality. Paper Mario (both) are a couple of the few games that use it.
|
||||||
extern u16 bbox[4];
|
extern u16 bbox[4];
|
||||||
|
|
Loading…
Reference in New Issue