mirror of https://github.com/snes9xgit/snes9x.git
Add SuperFX overclock multiplier setting.
Our speed isn't nearly correct, so letting the users adjust it is OK.
This commit is contained in:
parent
39601dd174
commit
fdae8cc72f
|
@ -329,7 +329,7 @@ void S9xSuperFXExec (void)
|
|||
{
|
||||
if ((Memory.FillRAM[0x3000 + GSU_SFR] & FLG_G) && (Memory.FillRAM[0x3000 + GSU_SCMR] & 0x18) == 0x18)
|
||||
{
|
||||
FxEmulate((Memory.FillRAM[0x3000 + GSU_CLSR] & 1) ? SuperFX.speedPerLine * 2 : SuperFX.speedPerLine);
|
||||
FxEmulate(((Memory.FillRAM[0x3000 + GSU_CLSR] & 1) ? SuperFX.speedPerLine * 2 : SuperFX.speedPerLine) * Settings.SuperFXClockMultiplier / 100);
|
||||
|
||||
uint16 GSUStatus = Memory.FillRAM[0x3000 + GSU_SFR] | (Memory.FillRAM[0x3000 + GSU_SFR + 1] << 8);
|
||||
if ((GSUStatus & (FLG_G | FLG_IRQ)) == FLG_IRQ)
|
||||
|
|
|
@ -256,6 +256,7 @@ Snes9xConfig::load_defaults (void)
|
|||
Settings.DynamicRateControl = FALSE;
|
||||
Settings.DynamicRateLimit = 5;
|
||||
Settings.HDMATimingHack = 100;
|
||||
Settings.SuperFXClockMultiplier = 100;
|
||||
|
||||
#ifdef NETPLAY_SUPPORT
|
||||
Settings.NetPlay = FALSE;
|
||||
|
@ -415,6 +416,7 @@ Snes9xConfig::save_config_file (void)
|
|||
xml_out_int (xml, "reverse_stereo", Settings.ReverseStereo);
|
||||
xml_out_int (xml, "playback_rate", gui_config->sound_playback_rate);
|
||||
xml_out_int (xml, "block_invalid_vram_access", Settings.BlockInvalidVRAMAccessMaster);
|
||||
xml_out_int (xml, "superfx_clock_multiplier", Settings.SuperFXClockMultiplier);
|
||||
xml_out_int (xml, "upanddown", Settings.UpAndDown);
|
||||
|
||||
xmlTextWriterEndElement (xml); /* preferences */
|
||||
|
@ -695,6 +697,11 @@ Snes9xConfig::set_option (const char *name, const char *value)
|
|||
{
|
||||
/* Deprecated */
|
||||
}
|
||||
else if (!strcasecmp (name, "superfx_clock_multiplier"))
|
||||
{
|
||||
Settings.SuperFXClockMultiplier = atoi (value);
|
||||
Settings.SuperFXClockMultiplier = CLAMP (Settings.SuperFXClockMultiplier, 50, 400);
|
||||
}
|
||||
else if (!strcasecmp (name, "speedhacks"))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -704,6 +704,7 @@ Snes9xPreferences::move_settings_to_dialog (void)
|
|||
set_spin ("dynamic_rate_limit", Settings.DynamicRateLimit / 1000.0);
|
||||
set_spin ("rewind_buffer_size", config->rewind_buffer_size);
|
||||
set_spin ("rewind_granularity", config->rewind_granularity);
|
||||
set_spin ("superfx_multiplier", Settings.SuperFXClockMultiplier);
|
||||
|
||||
int num_sound_drivers = 0;
|
||||
#ifdef USE_PORTAUDIO
|
||||
|
@ -843,6 +844,7 @@ Snes9xPreferences::get_settings_from_dialog (void)
|
|||
Settings.SkipFrames = get_combo ("frameskip_combo");
|
||||
Settings.BlockInvalidVRAMAccessMaster = get_check ("block_invalid_vram_access");
|
||||
Settings.UpAndDown = get_check ("upanddown");
|
||||
Settings.SuperFXClockMultiplier = get_spin ("superfx_multiplier");
|
||||
config->sound_driver = get_combo ("sound_driver");
|
||||
Settings.Stereo = get_check ("stereo_check");
|
||||
config->sound_playback_rate = 7 - (get_combo ("playback_combo"));
|
||||
|
|
|
@ -157,6 +157,13 @@
|
|||
<property name="step_increment">0.001</property>
|
||||
<property name="page_increment">0.010</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="superfx_multiplier_adjustment">
|
||||
<property name="lower">50</property>
|
||||
<property name="upper">400</property>
|
||||
<property name="value">100</property>
|
||||
<property name="step_increment">10</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment13">
|
||||
<property name="lower">-1</property>
|
||||
<property name="upper">1</property>
|
||||
|
@ -4508,6 +4515,48 @@
|
|||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="superfx_multiplier_hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="superfx_multiplier_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">SuperFX clock speed %:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="superfx_multiplier">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">superfx_multiplier_adjustment</property>
|
||||
<property name="snap_to_ticks">True</property>
|
||||
<property name="numeric">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="rewind_buffer_hbox">
|
||||
<property name="visible">True</property>
|
||||
|
@ -4547,7 +4596,7 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -4589,7 +4638,7 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -484,6 +484,7 @@ void S9xLoadConfigFiles (char **argv, int argc)
|
|||
parse_crosshair_spec(X_JUSTIFIER2, conf.GetString("Controls::Justifier2Crosshair"));
|
||||
|
||||
// Hack
|
||||
Settings.SuperFXClockMultiplier = conf.GetUInt("Hack::SuperFXClockMultiplier", 100);
|
||||
|
||||
Settings.DisableGameSpecificHacks = !conf.GetBool("Hack::EnableGameSpecificHacks", true);
|
||||
Settings.BlockInvalidVRAMAccessMaster = !conf.GetBool("Hack::AllowInvalidVRAMAccess", false);
|
||||
|
|
Loading…
Reference in New Issue