From 98d0a6b37146693750c3ab828f2290638bfebec2 Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:42:34 -0500 Subject: [PATCH] fix gxfifo stalls being borked under certain circumstances --- src/NDS.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NDS.cpp b/src/NDS.cpp index da89b75030..432d07102c 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -1645,7 +1645,7 @@ bool NDS::MainRAMHandle() { if (A9ContentionTS < ARM7Timestamp) { - if (ARM9.MRTrack.Type == MainRAMType::Null) return 0; + if (ARM9.MRTrack.Type == MainRAMType::Null || (CPUStop & CPUStop_GXStall)) return 0; MainRAMHandleARM9(); } else @@ -1661,7 +1661,7 @@ bool NDS::MainRAMHandle() { if (A9ContentionTS <= ARM7Timestamp) { - if (ARM9.MRTrack.Type == MainRAMType::Null) return 0; + if (ARM9.MRTrack.Type == MainRAMType::Null || (CPUStop & CPUStop_GXStall)) return 0; MainRAMHandleARM9(); } else @@ -1748,15 +1748,15 @@ u32 NDS::RunFrame() RunTimers(0); GPU.GPU3D.Run(); - if (ARM9.MRTrack.Type == MainRAMType::Null) + if (CPUStop & CPUStop_GXStall) { - if (CPUStop & CPUStop_GXStall) - { - // GXFIFO stall - s32 cycles = GPU.GPU3D.CyclesToRunFor(); - DMA9Timestamp = std::min(ARM9Target, std::max(ARM9Timestamp+(cycles<