From c81efb11429d474ba5ee2dfd10adfb2ee543329d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 26 Mar 2020 00:13:03 +1000 Subject: [PATCH] DMA: Enable block splitting for linked list mode --- src/core/dma.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/dma.cpp b/src/core/dma.cpp index 756fa4861..bbdeb36f2 100644 --- a/src/core/dma.cpp +++ b/src/core/dma.cpp @@ -317,7 +317,7 @@ void DMA::TransferChannel(Channel channel, TickCount ticks_late) Log_DebugPrintf("DMA%u: Copying linked list starting at 0x%08X to device", static_cast(channel), current_address); - for (;;) + while (cs.request) { u32 header; m_bus->DispatchAccess(current_address & ADDRESS_MASK, header); @@ -344,6 +344,12 @@ void DMA::TransferChannel(Channel channel, TickCount ticks_late) } cs.base_address = current_address; + + if ((current_address & UINT32_C(0x800000)) == 0) + { + // linked list not yet complete + return; + } } break;