Qt: More overclock options.
This commit is contained in:
parent
6555feecda
commit
cf49325555
@ -278,7 +278,7 @@ bool EmuConfig::setDefaults(int section)
|
||||
|
||||
allow_invalid_vram_access = false;
|
||||
allow_opposing_dpad_directions = false;
|
||||
overclock = false;
|
||||
overclock = eNoOverclock;
|
||||
remove_sprite_limit = false;
|
||||
enable_shadow_buffer = false;
|
||||
superfx_clock_multiplier = 100;
|
||||
@ -489,7 +489,7 @@ void EmuConfig::config(std::string filename, bool write)
|
||||
Int("RewindFrameInterval", rewind_frame_interval);
|
||||
Bool("AllowInvalidVRAMAccess", allow_invalid_vram_access);
|
||||
Bool("AllowOpposingDpadDirections", allow_opposing_dpad_directions);
|
||||
Bool("Overclock", overclock);
|
||||
Int("Overclock", overclock);
|
||||
Bool("RemoveSpriteLimit", remove_sprite_limit);
|
||||
Bool("EnableShadowBuffer", enable_shadow_buffer);
|
||||
Int("SuperFXClockMultiplier", superfx_clock_multiplier);
|
||||
|
@ -116,7 +116,14 @@ struct EmuConfig
|
||||
|
||||
bool allow_invalid_vram_access;
|
||||
bool allow_opposing_dpad_directions;
|
||||
bool overclock;
|
||||
enum Overclock
|
||||
{
|
||||
eNoOverclock = 0,
|
||||
eAutoFastROM = 1,
|
||||
eLow = 2,
|
||||
eHigh = 3
|
||||
};
|
||||
int overclock;
|
||||
bool remove_sprite_limit;
|
||||
bool enable_shadow_buffer;
|
||||
int superfx_clock_multiplier;
|
||||
|
@ -36,7 +36,7 @@ EmulationPanel::EmulationPanel(EmuApplication *app_)
|
||||
|
||||
connect_checkbox(checkBox_allow_invalid_vram_access, &app->config->allow_invalid_vram_access);
|
||||
connect_checkbox(checkBox_allow_opposing_dpad_directions, &app->config->allow_opposing_dpad_directions);
|
||||
connect_checkbox(checkBox_overclock, &app->config->overclock);
|
||||
connect_combo(comboBox_overclock, &app->config->overclock);
|
||||
connect_checkbox(checkBox_remove_sprite_limit, &app->config->remove_sprite_limit);
|
||||
connect_checkbox(checkBox_use_shadow_echo_buffer, &app->config->enable_shadow_buffer);
|
||||
connect_spin(spinBox_superfx_clock_speed, &app->config->superfx_clock_multiplier);
|
||||
@ -59,7 +59,7 @@ void EmulationPanel::showEvent(QShowEvent *event)
|
||||
|
||||
checkBox_allow_invalid_vram_access->setChecked(config->allow_invalid_vram_access);
|
||||
checkBox_allow_opposing_dpad_directions->setChecked(config->allow_opposing_dpad_directions);
|
||||
checkBox_overclock->setChecked(config->overclock);
|
||||
comboBox_overclock->setCurrentIndex(config->overclock);
|
||||
checkBox_remove_sprite_limit->setChecked(config->remove_sprite_limit);
|
||||
checkBox_use_shadow_echo_buffer->setChecked(config->enable_shadow_buffer);
|
||||
spinBox_superfx_clock_speed->setValue(config->superfx_clock_multiplier);
|
||||
|
@ -248,16 +248,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_overclock">
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>Decrease the time it takes for the CPU to perform operations, making it faster. This can remove slowdown, but can also cause glitches in many games.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overclock the CPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_use_shadow_echo_buffer">
|
||||
<property name="whatsThis">
|
||||
@ -278,7 +268,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_remove_sprite_limit">
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>Allows more sprites to be displayed on the screen in an attempt to remove flickering.</p><p>Some games take advantage of this limit and use it to hide glitches, and removing the limit will make those visible.</p></body></html></string>
|
||||
@ -392,6 +382,54 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Overclock:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_overclock">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Auto-FastROM</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Low</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>High</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -174,18 +174,10 @@ void Snes9xController::updateSettings(const EmuConfig * const config)
|
||||
else
|
||||
Settings.MaxSpriteTilesPerLine = 34;
|
||||
|
||||
if (!config->overclock)
|
||||
{
|
||||
Settings.OneClockCycle = 6;
|
||||
Settings.OneSlowClockCycle = 8;
|
||||
Settings.TwoClockCycles = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.OneClockCycle = 2;
|
||||
Settings.OneSlowClockCycle = 3;
|
||||
Settings.TwoClockCycles = 4;
|
||||
}
|
||||
const int overclock_cycles[4][2] = { { 6, 8 }, { 6, 6 }, { 3, 4 }, { 1, 1 } };
|
||||
Settings.OneClockCycle = overclock_cycles[config->overclock][0];
|
||||
Settings.OneSlowClockCycle = overclock_cycles[config->overclock][1];
|
||||
Settings.TwoClockCycles = overclock_cycles[config->overclock][0] * 2;
|
||||
|
||||
Settings.ShowOverscan = config->show_overscan;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user