From 0639f4264f0b9b40d99e0e5ce40f4eda91bc881d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 29 Dec 2019 15:34:05 +1000 Subject: [PATCH] DMA: Delay GPU transfers by block count Needs real GPU timings, but fixes NFS5 in the meantime. --- src/core/dma.cpp | 9 +++++++++ src/core/dma.h | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/dma.cpp b/src/core/dma.cpp index c2d038567..16f919d40 100644 --- a/src/core/dma.cpp +++ b/src/core/dma.cpp @@ -197,6 +197,15 @@ TickCount DMA::GetTransferDelay(Channel channel) const } break; + case Channel::GPU: + { + if (cs.channel_control.sync_mode == SyncMode::Request) + return cs.block_control.request.GetBlockCount(); + else + return 1; + } + break; + default: return 1; } diff --git a/src/core/dma.h b/src/core/dma.h index dc66b77ca..2781301bf 100644 --- a/src/core/dma.h +++ b/src/core/dma.h @@ -54,7 +54,6 @@ public: private: static constexpr PhysicalMemoryAddress BASE_ADDRESS_MASK = UINT32_C(0x00FFFFFF); static constexpr PhysicalMemoryAddress ADDRESS_MASK = UINT32_C(0x001FFFFC); - static constexpr u32 TRANSFER_TICKS = 10; enum class SyncMode : u32 {