GPU: Let the GPU drive DMA transfers for large time slices

Fixes FMV breakage... again.
This commit is contained in:
Connor McLaughlin
2020-03-26 00:13:20 +10:00
parent d4ae0f13fe
commit 54abd37daa
4 changed files with 45 additions and 36 deletions

View File

@ -166,10 +166,10 @@ u32 Timers::ReadRegister(u32 offset)
{
case 0x00:
{
if (timer_index < 2)
if (timer_index < 2 && cs.external_counting_enabled)
{
// timers 0/1 depend on the GPU
if (cs.external_counting_enabled)
if (timer_index == 0 || m_gpu->IsRasterScanlinePending())
m_gpu->Synchronize();
}
@ -180,10 +180,10 @@ u32 Timers::ReadRegister(u32 offset)
case 0x04:
{
if (timer_index < 2)
if (timer_index < 2 && cs.external_counting_enabled)
{
// timers 0/1 depend on the GPU
if (cs.external_counting_enabled)
if (timer_index == 0 || m_gpu->IsRasterScanlinePending())
m_gpu->Synchronize();
}
@ -211,8 +211,13 @@ void Timers::WriteRegister(u32 offset, u32 value)
CounterState& cs = m_states[timer_index];
if (timer_index < 2)
m_gpu->Synchronize();
if (timer_index < 2 && cs.external_counting_enabled)
{
// timers 0/1 depend on the GPU
if (timer_index == 0 || m_gpu->IsRasterScanlinePending())
m_gpu->Synchronize();
}
m_sysclk_event->InvokeEarly();
switch (port_offset)