From df12f08ac369ac34ea8007bf1ebc7fcddb2e2a91 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 15 Nov 2020 21:50:59 +1000 Subject: [PATCH] DMA: Add additional tick penalty to DMA chains for page change --- src/core/dma.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/dma.cpp b/src/core/dma.cpp index 0f943dc41..43bc01031 100644 --- a/src/core/dma.cpp +++ b/src/core/dma.cpp @@ -294,7 +294,7 @@ bool DMA::TransferChannel(Channel channel) { u32 header; std::memcpy(&header, &ram_pointer[current_address & ADDRESS_MASK], sizeof(header)); - used_ticks++; + used_ticks += 10; const u32 word_count = header >> 24; const u32 next_address = header & UINT32_C(0x00FFFFFF); @@ -302,6 +302,7 @@ bool DMA::TransferChannel(Channel channel) word_count * UINT32_C(4), word_count, next_address); if (word_count > 0) { + used_ticks += 5; used_ticks += TransferMemoryToDevice(channel, (current_address + sizeof(header)) & ADDRESS_MASK, 4, word_count); }