From b0c41459508ee9aff112f458541cc85cb369460b Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Sat, 20 Sep 2008 08:31:32 +0000 Subject: [PATCH] Corrected the UpdateVSyncRate functions to properly set a NTSC framerate of 59.94fps. When framelimiting is enabled on NTSC games, the SPU2 plugin now does not need to stretch constantly. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@134 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/Counters.c | 13 +++++++++---- pcsx2/R5900.c | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/pcsx2/Counters.c b/pcsx2/Counters.c index 211434d845..e81c2c8971 100644 --- a/pcsx2/Counters.c +++ b/pcsx2/Counters.c @@ -195,10 +195,15 @@ void UpdateVSyncRate() { counters[5].Cycle = PS2VBLANKEND;*/ { - u32 vsyncs = (Config.PsxType&1) ? 50:60; - if(Config.CustomFps>0) vsyncs = Config.CustomFps; - iTicks = GetTickFrequency()/vsyncs; - SysPrintf("Framelimiter rate updated (UpdateVSyncRate): %d fps\n",vsyncs); + u32 vsyncs = (Config.PsxType&1) ? 5000:5994; + if(Config.CustomFps>0) vsyncs = Config.CustomFps*100; + iTicks = GetTickFrequency()/vsyncs*100; + if (Config.CustomFps != 0) + SysPrintf("Framelimiter rate updated (UpdateVSyncRate): %d fps\n", Config.CustomFps); + else if (Config.PsxType&1) + SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50 fps\n"); + else + SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50.94 fps\n"); } rcntSet(); } diff --git a/pcsx2/R5900.c b/pcsx2/R5900.c index 0d89acde38..5a167b46c3 100644 --- a/pcsx2/R5900.c +++ b/pcsx2/R5900.c @@ -534,10 +534,15 @@ void cpuExecuteBios() { extern u64 GetTickFrequency(); extern u64 iTicks; - u32 vsyncs = (Config.PsxType&1) ? 50:60; - if(Config.CustomFps>0) vsyncs = Config.CustomFps; - iTicks = GetTickFrequency()/vsyncs; - SysPrintf("Framelimiter rate updated (cpuExecuteBios): %d fps\n",vsyncs); + u32 vsyncs = (Config.PsxType&1) ? 5000:5994; + if(Config.CustomFps>0) vsyncs = Config.CustomFps*100; + iTicks = GetTickFrequency()/vsyncs*100; + if (Config.CustomFps != 0) + SysPrintf("Framelimiter rate updated (UpdateVSyncRate): %d fps\n", Config.CustomFps); + else if (Config.PsxType&1) + SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50 fps\n"); + else + SysPrintf("Framelimiter rate updated (UpdateVSyncRate): 50.94 fps\n"); } SysPrintf("* PCSX2 *: ExecuteBios\n");