From 5cd78dcab5d6a9b41af99223cf9eb29302401817 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 30 Apr 2020 14:52:24 +1000 Subject: [PATCH] DMA: Fix an unlikely case where LL DMA gets stuck on Fixes Frogger. --- src/core/dma.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/dma.cpp b/src/core/dma.cpp index da4742267..4f520650f 100644 --- a/src/core/dma.cpp +++ b/src/core/dma.cpp @@ -307,16 +307,16 @@ bool DMA::TransferChannel(Channel channel) cs.base_address = current_address; m_system->StallCPU(used_ticks); - if (used_ticks >= m_max_slice_ticks) - { - // stall the transfer for a bit if we ran for too long - // Log_WarningPrintf("breaking dma chain at 0x%08X", current_address); - HaltTransfer(m_halt_ticks); - return false; - } - 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 + // Log_WarningPrintf("breaking dma chain at 0x%08X", current_address); + HaltTransfer(m_halt_ticks); + return false; + } + // linked list not yet complete return true; }