From 646b46fd4bf0da32365b0611d21fd19cb5c5e135 Mon Sep 17 00:00:00 2001 From: Matthew Daniels Date: Sun, 23 Jan 2022 15:32:53 +0000 Subject: [PATCH] Adjust the number of PowerPC cycles executed per frame to assume 57.524 Hz refresh rate Fighting Vipers 2 attract mode no longer requires 100+ MHz to run smoothly Supermodel itself still runs at 60 Hz --- Src/Model3/Model3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Model3/Model3.cpp b/Src/Model3/Model3.cpp index 08fd885..6d6811c 100644 --- a/Src/Model3/Model3.cpp +++ b/Src/Model3/Model3.cpp @@ -2031,7 +2031,7 @@ void CModel3::RunMainBoardFrame(void) // Compute display and VBlank timings unsigned ppcCycles = m_config["PowerPCFrequency"].ValueAs() * 1000000; - unsigned frameCycles = ppcCycles / 60; + unsigned frameCycles = (unsigned)((float)ppcCycles / 57.524160f); unsigned gapCycles = (unsigned)((float)frameCycles * 2.5f / 100.0f); // we need a gap between asserting irq2 & irq 0x40 unsigned offsetCycles = (unsigned)((float)frameCycles * 33.f / 100.0f); unsigned dispCycles = frameCycles - gapCycles - offsetCycles;