diff options
author | Tatsuya79 | 2018-02-13 00:55:05 +0100 |
---|---|---|
committer | Tatsuya79 | 2018-02-13 00:55:05 +0100 |
commit | e09b3a980d58c06032c6ab65eeb7a04408dd1ad6 (patch) | |
tree | 993403f7c20a5f3a957c25e6bfe5b9db06ccc066 | |
parent | 69290442540fffe9e5a80a75fb83ded5171dbbd0 (diff) | |
download | snes9x2002-e09b3a980d58c06032c6ab65eeb7a04408dd1ad6.tar.gz snes9x2002-e09b3a980d58c06032c6ab65eeb7a04408dd1ad6.tar.bz2 snes9x2002-e09b3a980d58c06032c6ab65eeb7a04408dd1ad6.zip |
Make 2 cycles oc profiles.
-rw-r--r-- | libretro/libretro.c | 19 | ||||
-rw-r--r-- | src/snes9x.h | 7 |
2 files changed, 20 insertions, 6 deletions
diff --git a/libretro/libretro.c b/libretro/libretro.c index bbb7b92..6609973 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -92,6 +92,7 @@ static uint32 joys[5]; bool8 ROMAPUEnabled = 0; char currentWorkingDir[MAX_PATH+1] = {0}; bool overclock_cycles = false; +int one_c, slow_one_c, two_c; memstream_t *s_stream; @@ -354,7 +355,7 @@ void retro_init (void) { static const struct retro_variable vars[] = { - { "snes9x2002_overclock_cycles", "Reduce Slowdown (Hack, Unsafe, Restart); disabled|enabled" }, + { "snes9x2002_overclock_cycles", "Reduce Slowdown (Hack, Unsafe, Restart); disabled|compatible|max" }, { NULL, NULL }, }; @@ -431,8 +432,20 @@ static void check_variables(void) if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) { - if (strcmp(var.value, "enabled") == 0) - overclock_cycles = true; + if (strcmp(var.value, "compatible") == 0) + { + overclock_cycles = true; + one_c = 4; + slow_one_c = 5; + two_c = 6; + } + else if (strcmp(var.value, "max") == 0) + { + overclock_cycles = true; + one_c = 3; + slow_one_c = 3; + two_c = 3; + } else overclock_cycles = false; } diff --git a/src/snes9x.h b/src/snes9x.h index 065b98d..b051828 100644 --- a/src/snes9x.h +++ b/src/snes9x.h @@ -134,6 +134,7 @@ enum };
extern bool overclock_cycles;
+extern int one_c, slow_one_c, two_c;
#define DEBUG_MODE_FLAG (1 << 0)
#define TRACE_FLAG (1 << 1)
@@ -149,9 +150,9 @@ extern bool overclock_cycles; #define IRQ_PENDING_FLAG (1 << 11)
#ifdef VAR_CYCLES
-#define ONE_CYCLE (overclock_cycles ? 4 : 6)
-#define SLOW_ONE_CYCLE (overclock_cycles ? 4 : 8)
-#define TWO_CYCLES (overclock_cycles ? 6 : 12)
+#define ONE_CYCLE (overclock_cycles ? one_c : 6)
+#define SLOW_ONE_CYCLE (overclock_cycles ? slow_one_c : 8)
+#define TWO_CYCLES (overclock_cycles ? two_c : 12)
#else
#define ONE_CYCLE 1
#define SLOW_ONE_CYCLE 1
|