diff options
author | Twinaphex | 2018-02-13 03:27:59 +0100 |
---|---|---|
committer | GitHub | 2018-02-13 03:27:59 +0100 |
commit | b2859c8e0d5a7799058de685451ab8257d61ddcb (patch) | |
tree | 84bfc9b1009cf939b65da9e4b0294342b77400dc | |
parent | 9cc3ad1599ad7e9edcf9e594a3a6e365fed950f8 (diff) | |
parent | ef0c8e3cd5f55e838f0e01b50d865f9b2f309064 (diff) | |
download | snes9x2005-b2859c8e0d5a7799058de685451ab8257d61ddcb.tar.gz snes9x2005-b2859c8e0d5a7799058de685451ab8257d61ddcb.tar.bz2 snes9x2005-b2859c8e0d5a7799058de685451ab8257d61ddcb.zip |
Merge pull request #51 from Tatsuya79/master
Make 2 cycles oc profiles.
-rw-r--r-- | libretro.c | 19 | ||||
-rw-r--r-- | source/snes9x.h | 7 |
2 files changed, 20 insertions, 6 deletions
@@ -38,6 +38,7 @@ char retro_save_directory[PATH_MAX]; char retro_base_name[PATH_MAX]; bool overclock_cycles = false; bool reduce_sprite_flicker = false; +int one_c, slow_one_c, two_c; #ifdef _WIN32 char slash = '\\'; @@ -296,7 +297,7 @@ void retro_init(void) static const struct retro_variable vars[] = { { "catsfc_VideoMode", "Video Mode; auto|NTSC|PAL" }, - { "catsfc_overclock_cycles", "Reduce Slowdown (Hack, Unsafe, Restart); disabled|enabled" }, + { "catsfc_overclock_cycles", "Reduce Slowdown (Hack, Unsafe, Restart); disabled|compatible|max" }, { "catsfc_reduce_sprite_flicker", "Reduce Flickering (Hack, Unsafe); disabled|enabled" }, { NULL, NULL }, }; @@ -388,8 +389,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/source/snes9x.h b/source/snes9x.h index 4a4364c..11dc1ff 100644 --- a/source/snes9x.h +++ b/source/snes9x.h @@ -46,9 +46,9 @@ #define SNES_CYCLES_PER_SCANLINE ((uint32_t) ((SNES_SCANLINE_TIME / SNES_CLOCK_LEN) * 6 + 0.5)) -#define ONE_CYCLE (overclock_cycles ? 4u : 6u) -#define SLOW_ONE_CYCLE (overclock_cycles ? 4u : 8u) -#define TWO_CYCLES (overclock_cycles ? 6u : 12u) +#define ONE_CYCLE (overclock_cycles ? one_c : 6u) +#define SLOW_ONE_CYCLE (overclock_cycles ? slow_one_c : 8u) +#define TWO_CYCLES (overclock_cycles ? two_c : 12u) #define SNES_TR_MASK (1u << 4) #define SNES_TL_MASK (1u << 5) @@ -64,6 +64,7 @@ #define SNES_B_MASK (1u << 15) extern bool overclock_cycles; +extern int one_c, slow_one_c, two_c; enum { |