Added the wait/sync back in the video thread on XFB swaps. Fixes issue 3391.
Changed the VI interrupts to occur on writes instead of reads. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6304 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5ebc9c97db
commit
7410056536
|
@ -281,8 +281,6 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
|||
// RETRACE STUFF ...
|
||||
case VI_PRERETRACE_HI:
|
||||
_uReturnValue = m_InterruptRegister[0].Hi;
|
||||
m_InterruptRegister[0].IR_INT = 0;
|
||||
UpdateInterrupts();
|
||||
return;
|
||||
case VI_PRERETRACE_LO:
|
||||
_uReturnValue = m_InterruptRegister[0].Lo;
|
||||
|
@ -290,8 +288,6 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
|||
|
||||
case VI_POSTRETRACE_HI:
|
||||
_uReturnValue = m_InterruptRegister[1].Hi;
|
||||
m_InterruptRegister[1].IR_INT = 0;
|
||||
UpdateInterrupts();
|
||||
return;
|
||||
case VI_POSTRETRACE_LO:
|
||||
_uReturnValue = m_InterruptRegister[1].Lo;
|
||||
|
@ -299,8 +295,6 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
|||
|
||||
case VI_DISPLAY_INTERRUPT_2_HI:
|
||||
_uReturnValue = m_InterruptRegister[2].Hi;
|
||||
m_InterruptRegister[2].IR_INT = 0;
|
||||
UpdateInterrupts();
|
||||
return;
|
||||
case VI_DISPLAY_INTERRUPT_2_LO:
|
||||
_uReturnValue = m_InterruptRegister[2].Lo;
|
||||
|
@ -308,8 +302,6 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
|||
|
||||
case VI_DISPLAY_INTERRUPT_3_HI:
|
||||
_uReturnValue = m_InterruptRegister[3].Hi;
|
||||
m_InterruptRegister[3].IR_INT = 0;
|
||||
UpdateInterrupts();
|
||||
return;
|
||||
case VI_DISPLAY_INTERRUPT_3_LO:
|
||||
_uReturnValue = m_InterruptRegister[3].Lo;
|
||||
|
@ -537,6 +529,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
|||
// RETRACE STUFF ...
|
||||
case VI_PRERETRACE_HI:
|
||||
m_InterruptRegister[0].Hi = _iValue;
|
||||
UpdateInterrupts();
|
||||
break;
|
||||
case VI_PRERETRACE_LO:
|
||||
m_InterruptRegister[0].Lo = _iValue;
|
||||
|
@ -544,6 +537,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
|||
|
||||
case VI_POSTRETRACE_HI:
|
||||
m_InterruptRegister[1].Hi = _iValue;
|
||||
UpdateInterrupts();
|
||||
break;
|
||||
case VI_POSTRETRACE_LO:
|
||||
m_InterruptRegister[1].Lo = _iValue;
|
||||
|
@ -551,6 +545,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
|||
|
||||
case VI_DISPLAY_INTERRUPT_2_HI:
|
||||
m_InterruptRegister[2].Hi = _iValue;
|
||||
UpdateInterrupts();
|
||||
break;
|
||||
case VI_DISPLAY_INTERRUPT_2_LO:
|
||||
m_InterruptRegister[2].Lo = _iValue;
|
||||
|
@ -558,6 +553,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
|||
|
||||
case VI_DISPLAY_INTERRUPT_3_HI:
|
||||
m_InterruptRegister[3].Hi = _iValue;
|
||||
UpdateInterrupts();
|
||||
break;
|
||||
case VI_DISPLAY_INTERRUPT_3_LO:
|
||||
m_InterruptRegister[3].Lo = _iValue;
|
||||
|
|
|
@ -335,7 +335,13 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
|||
{
|
||||
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
if (!g_VideoInitialize.bOnThread)
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
{
|
||||
while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown)
|
||||
//Common::SleepCurrentThread(1);
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
VideoFifo_CheckSwapRequest();
|
||||
s_beginFieldArgs.xfbAddr = xfbAddr;
|
||||
s_beginFieldArgs.field = field;
|
||||
|
|
|
@ -357,7 +357,13 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
|||
{
|
||||
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
if (!g_VideoInitialize.bOnThread)
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
{
|
||||
while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown)
|
||||
//Common::SleepCurrentThread(1);
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
VideoFifo_CheckSwapRequest();
|
||||
s_beginFieldArgs.xfbAddr = xfbAddr;
|
||||
s_beginFieldArgs.field = field;
|
||||
|
|
|
@ -387,7 +387,13 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
|||
{
|
||||
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
if (!g_VideoInitialize.bOnThread)
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
{
|
||||
while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown)
|
||||
//Common::SleepCurrentThread(1);
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
VideoFifo_CheckSwapRequest();
|
||||
s_beginFieldArgs.xfbAddr = xfbAddr;
|
||||
s_beginFieldArgs.field = field;
|
||||
|
|
Loading…
Reference in New Issue