From d9237660429adaa9f549d10e79252a713f1da874 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 12 Aug 2018 20:41:28 -0500 Subject: CPU/Timing: Use an approximated amortized amount of ticks when advancing timing. We divide the number of ticks to add by the number of cores (4) to obtain a more or less rough estimate of the actual number of ticks added. This assumes that all 4 cores are doing similar work. Previously we were adding ~4 times the number of ticks, thus making the games think that time was going way too fast. This lets us bypass certain hangs in some games like Breath of the Wild. We should modify our CoreTiming to support multiple cores (both running in a single thread, and in multiple host threads). --- src/core/core_cpu.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/core_cpu.cpp') diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp index 46a522fcd..3f1c70624 100644 --- a/src/core/core_cpu.cpp +++ b/src/core/core_cpu.cpp @@ -90,6 +90,7 @@ void Cpu::RunLoop(bool tight_loop) { LOG_TRACE(Core, "Core-{} idling", core_index); if (IsMainCore()) { + // TODO(Subv): Only let CoreTiming idle if all 4 cores are idling. CoreTiming::Idle(); CoreTiming::Advance(); } -- cgit v1.2.3