mirror of
https://github.com/libretro/snes9x2010.git
synced 2024-12-02 13:26:20 +00:00
Make 2 cycles oc profiles.
This commit is contained in:
parent
fc6e980615
commit
a6795bc0bb
@ -226,6 +226,7 @@ static retro_environment_t environ_cb = NULL;
|
||||
extern s9xcommand_t keymap[1024];
|
||||
bool overclock_cycles = false;
|
||||
bool reduce_sprite_flicker = false;
|
||||
int one_c, slow_one_c, two_c;
|
||||
|
||||
static void check_variables(void)
|
||||
{
|
||||
@ -278,8 +279,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;
|
||||
}
|
||||
@ -393,7 +406,7 @@ void retro_set_environment(retro_environment_t cb)
|
||||
{
|
||||
static const struct retro_variable vars[] = {
|
||||
{ "snes9x_next_overclock", "SuperFX Overclock; Disabled(10MHz)|40MHz|60MHz|80MHz|100MHz|Underclock(5MHz)|Underclock(8MHz)" },
|
||||
{ "snes9x_next_overclock_cycles", "Reduce Slowdown (Hack, Unsafe); disabled|enabled" },
|
||||
{ "snes9x_next_overclock_cycles", "Reduce Slowdown (Hack, Unsafe); disabled|compatible|max" },
|
||||
{ "snes9x_next_reduce_sprite_flicker", "Reduce Flickering (Hack, Unsafe); disabled|enabled" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
@ -188,7 +188,6 @@
|
||||
#include "bsx.h"
|
||||
|
||||
extern uint8 OpenBus;
|
||||
extern bool overclock_cycles;
|
||||
|
||||
int32 memory_speed (uint32 address)
|
||||
{
|
||||
@ -197,7 +196,7 @@ int32 memory_speed (uint32 address)
|
||||
if (address & 0x800000)
|
||||
return (CPU.FastROMSpeed);
|
||||
|
||||
return (overclock_cycles ? 6 : SLOW_ONE_CYCLE);
|
||||
return (SLOW_ONE_CYCLE);
|
||||
}
|
||||
|
||||
if ((address + 0x6000) & 0x4000)
|
||||
|
@ -233,9 +233,9 @@ extern "C" {
|
||||
#define SNES_MAX_PAL_VCOUNTER 312
|
||||
#define SNES_HCOUNTER_MAX 341
|
||||
|
||||
#define ONE_CYCLE (overclock_cycles ? 3 : 6)
|
||||
#define SLOW_ONE_CYCLE (overclock_cycles ? 1 : 8)
|
||||
#define TWO_CYCLES (overclock_cycles ? 1 : 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)
|
||||
#define ONE_DOT_CYCLE 4
|
||||
#define ONE_DOT_CYCLE_DIV_2 2
|
||||
|
||||
@ -276,6 +276,7 @@ extern "C" {
|
||||
#define HALTED_FLAG 4096 /* APU */
|
||||
|
||||
extern bool overclock_cycles;
|
||||
extern int one_c, slow_one_c, two_c;
|
||||
|
||||
struct SCPUState
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user