From aff6cd661f6039b81deb4db3b42af01a49167438 Mon Sep 17 00:00:00 2001 From: bladeoner Date: Tue, 15 Jan 2019 20:28:00 +0100 Subject: [PATCH] SA1 Hack Super Mario RPG and Kirby's Dreamland 3 This fixes the FPS drops in Super Mario RPG and Kirby's Dreamland 3. --- source/snes9x/memmap.cpp | 8 ++++++++ source/snes9x/snes9x.h | 7 ++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source/snes9x/memmap.cpp b/source/snes9x/memmap.cpp index 620122f..4f53a2f 100644 --- a/source/snes9x/memmap.cpp +++ b/source/snes9x/memmap.cpp @@ -3700,6 +3700,14 @@ void CMemory::ApplyROMFixes (void) match_id ("A35") || // Mechwarrior 3050 / Battle Tech 3050 match_na ("DOOM TROOPERS")) // Doom Troopers Timings.APUAllowTimeOverflow = TRUE; + + if (match_id("ARWJ") || match_id("ARWE") || // Super Mario RPG + match_id("AFJJ") || match_id("AFJE")) { // Kirby's Dream Land 3 + Settings.OneClockCycle = 8; + } + else { + Settings.OneClockCycle = 6; + } #endif } diff --git a/source/snes9x/snes9x.h b/source/snes9x/snes9x.h index 3d04154..a2cfc72 100644 --- a/source/snes9x/snes9x.h +++ b/source/snes9x/snes9x.h @@ -69,15 +69,12 @@ #define SNES_MAX_PAL_VCOUNTER 312 #define SNES_HCOUNTER_MAX 341 -#ifndef ALLOW_CPU_OVERCLOCK -#define ONE_CYCLE 6 -#define SLOW_ONE_CYCLE 8 -#define TWO_CYCLES 12 -#else +#ifdef GEKKO #define ONE_CYCLE (Settings.OneClockCycle) #define SLOW_ONE_CYCLE (Settings.OneSlowClockCycle) #define TWO_CYCLES (Settings.TwoClockCycles) #endif + #define ONE_DOT_CYCLE 4 #define SNES_CYCLES_PER_SCANLINE (SNES_HCOUNTER_MAX * ONE_DOT_CYCLE)