DMA: Fix an unlikely case where LL DMA gets stuck on

Fixes Frogger.
This commit is contained in:
Connor McLaughlin 2020-04-30 14:52:24 +10:00
parent dac114fa4e
commit 5cd78dcab5
1 changed files with 8 additions and 8 deletions

View File

@ -307,7 +307,9 @@ bool DMA::TransferChannel(Channel channel)
cs.base_address = current_address; cs.base_address = current_address;
m_system->StallCPU(used_ticks); m_system->StallCPU(used_ticks);
if (used_ticks >= m_max_slice_ticks) if ((current_address & UINT32_C(0x800000)) == 0)
{
if (used_ticks >= m_max_slice_ticks && cs.request)
{ {
// stall the transfer for a bit if we ran for too long // stall the transfer for a bit if we ran for too long
// Log_WarningPrintf("breaking dma chain at 0x%08X", current_address); // Log_WarningPrintf("breaking dma chain at 0x%08X", current_address);
@ -315,8 +317,6 @@ bool DMA::TransferChannel(Channel channel)
return false; return false;
} }
if ((current_address & UINT32_C(0x800000)) == 0)
{
// linked list not yet complete // linked list not yet complete
return true; return true;
} }