From 044113b0bfad670a3dd3db25638033b098b574b2 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 22 Aug 2018 15:15:27 -0500 Subject: [PATCH] Increase SuperFX speed slightly. --- fxemu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fxemu.cpp b/fxemu.cpp index 09761a3e..4c01a481 100644 --- a/fxemu.cpp +++ b/fxemu.cpp @@ -213,8 +213,9 @@ void S9xInitSuperFX (void) void S9xResetSuperFX (void) { - // FIXME: Snes9x can't execute CPU and SuperFX at a time. Don't ask me what is 0.417 :P - SuperFX.speedPerLine = (uint32) (0.417 * 10.5e6 * ((1.0 / (float) Memory.ROMFramesPerSecond) / ((float) (Timings.V_Max)))); + // FIXME: Snes9x only runs the SuperFX at the end of every line. + // 5823405 is a magic number that seems to work for most games. + SuperFX.speedPerLine = (uint32) (5823405 * ((1.0 / (float) Memory.ROMFramesPerSecond) / ((float) (Timings.V_Max)))); SuperFX.oneLineDone = FALSE; SuperFX.vFlags = 0; CPU.IRQExternal = FALSE;