Qt: Move recompiler icache to console settings page
This commit is contained in:
parent
8af4f4f01a
commit
19b358359c
|
@ -225,8 +225,6 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget*
|
||||||
Settings::ParseCPUFastmemMode, Settings::GetCPUFastmemModeName,
|
Settings::ParseCPUFastmemMode, Settings::GetCPUFastmemModeName,
|
||||||
Settings::GetCPUFastmemModeDisplayName, "CPUFastmemMode",
|
Settings::GetCPUFastmemModeDisplayName, "CPUFastmemMode",
|
||||||
static_cast<u32>(CPUFastmemMode::Count), Settings::DEFAULT_CPU_FASTMEM_MODE);
|
static_cast<u32>(CPUFastmemMode::Count), Settings::DEFAULT_CPU_FASTMEM_MODE);
|
||||||
addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Enable Recompiler ICache"), "CPU", "RecompilerICache",
|
|
||||||
false);
|
|
||||||
|
|
||||||
addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Enable VRAM Write Texture Replacement"),
|
addBooleanTweakOption(dialog, m_ui.tweakOptionTable, tr("Enable VRAM Write Texture Replacement"),
|
||||||
"TextureReplacements", "EnableVRAMWriteReplacements", false);
|
"TextureReplacements", "EnableVRAMWriteReplacements", false);
|
||||||
|
@ -295,7 +293,6 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Recompiler memory exceptions
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Recompiler memory exceptions
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Recompiler block linking
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, true); // Recompiler block linking
|
||||||
setChoiceTweakOption(m_ui.tweakOptionTable, i++, Settings::DEFAULT_CPU_FASTMEM_MODE); // Recompiler fastmem mode
|
setChoiceTweakOption(m_ui.tweakOptionTable, i++, Settings::DEFAULT_CPU_FASTMEM_MODE); // Recompiler fastmem mode
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Recompiler Icache
|
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // VRAM write texture replacement
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // VRAM write texture replacement
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Preload texture replacements
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Preload texture replacements
|
||||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Dump replacable VRAM writes
|
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Dump replacable VRAM writes
|
||||||
|
|
|
@ -44,6 +44,7 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsDialog* dialog, QWidget* pa
|
||||||
&Settings::ParseCPUExecutionMode, &Settings::GetCPUExecutionModeName,
|
&Settings::ParseCPUExecutionMode, &Settings::GetCPUExecutionModeName,
|
||||||
Settings::DEFAULT_CPU_EXECUTION_MODE);
|
Settings::DEFAULT_CPU_EXECUTION_MODE);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableCPUClockSpeedControl, "CPU", "OverclockEnable", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableCPUClockSpeedControl, "CPU", "OverclockEnable", false);
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.recompilerICache, "CPU", "RecompilerICache", false);
|
||||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cdromReadaheadSectors, "CDROM", "ReadaheadSectors",
|
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cdromReadaheadSectors, "CDROM", "ReadaheadSectors",
|
||||||
Settings::DEFAULT_CDROM_READAHEAD_SECTORS);
|
Settings::DEFAULT_CDROM_READAHEAD_SECTORS);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.cdromRegionCheck, "CDROM", "RegionCheck", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.cdromRegionCheck, "CDROM", "RegionCheck", false);
|
||||||
|
@ -61,6 +62,10 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsDialog* dialog, QWidget* pa
|
||||||
tr("When this option is chosen, the clock speed set below will be used."));
|
tr("When this option is chosen, the clock speed set below will be used."));
|
||||||
dialog->registerWidgetHelp(m_ui.cpuClockSpeed, tr("Overclocking Percentage"), tr("100%"),
|
dialog->registerWidgetHelp(m_ui.cpuClockSpeed, tr("Overclocking Percentage"), tr("100%"),
|
||||||
tr("Selects the percentage of the normal clock speed the emulated hardware will run at."));
|
tr("Selects the percentage of the normal clock speed the emulated hardware will run at."));
|
||||||
|
dialog->registerWidgetHelp(m_ui.recompilerICache, tr("Enable Recompiler ICache"), tr("Unchecked"),
|
||||||
|
tr("Simulates stalls in the recompilers when the emulated CPU would have to fetch "
|
||||||
|
"instructions into its cache. Makes games run closer to their console framerate, at a "
|
||||||
|
"small cost to performance. Interpreter mode always simulates the instruction cache."));
|
||||||
dialog->registerWidgetHelp(
|
dialog->registerWidgetHelp(
|
||||||
m_ui.enable8MBRAM, tr("Enable 8MB RAM (Dev Console)"), tr("Unchecked"),
|
m_ui.enable8MBRAM, tr("Enable 8MB RAM (Dev Console)"), tr("Unchecked"),
|
||||||
tr("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles. Games have "
|
tr("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles. Games have "
|
||||||
|
@ -104,6 +109,18 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsDialog* dialog, QWidget* pa
|
||||||
|
|
||||||
ConsoleSettingsWidget::~ConsoleSettingsWidget() = default;
|
ConsoleSettingsWidget::~ConsoleSettingsWidget() = default;
|
||||||
|
|
||||||
|
void ConsoleSettingsWidget::updateRecompilerICacheEnabled()
|
||||||
|
{
|
||||||
|
const CPUExecutionMode mode =
|
||||||
|
Settings::ParseCPUExecutionMode(
|
||||||
|
m_dialog
|
||||||
|
->getEffectiveStringValue("CPU", "ExecutionMode",
|
||||||
|
Settings::GetCPUExecutionModeName(Settings::DEFAULT_CPU_EXECUTION_MODE))
|
||||||
|
.c_str())
|
||||||
|
.value_or(Settings::DEFAULT_CPU_EXECUTION_MODE);
|
||||||
|
m_ui.recompilerICache->setEnabled(mode != CPUExecutionMode::Interpreter);
|
||||||
|
}
|
||||||
|
|
||||||
void ConsoleSettingsWidget::onEnableCPUClockSpeedControlChecked(int state)
|
void ConsoleSettingsWidget::onEnableCPUClockSpeedControlChecked(int state)
|
||||||
{
|
{
|
||||||
if (state == Qt::Checked &&
|
if (state == Qt::Checked &&
|
||||||
|
@ -116,7 +133,8 @@ void ConsoleSettingsWidget::onEnableCPUClockSpeedControlChecked(int state)
|
||||||
"have confirmed the bug also occurs with overclocking disabled.\n\nThis warning will only be shown once.");
|
"have confirmed the bug also occurs with overclocking disabled.\n\nThis warning will only be shown once.");
|
||||||
|
|
||||||
QMessageBox mb(QMessageBox::Warning, tr("CPU Overclocking Warning"), message, QMessageBox::NoButton, this);
|
QMessageBox mb(QMessageBox::Warning, tr("CPU Overclocking Warning"), message, QMessageBox::NoButton, this);
|
||||||
const QAbstractButton* const yes_button = mb.addButton(tr("Yes, I will confirm bugs without overclocking before reporting."), QMessageBox::YesRole);
|
const QAbstractButton* const yes_button =
|
||||||
|
mb.addButton(tr("Yes, I will confirm bugs without overclocking before reporting."), QMessageBox::YesRole);
|
||||||
mb.addButton(tr("No, take me back to safety."), QMessageBox::NoRole);
|
mb.addButton(tr("No, take me back to safety."), QMessageBox::NoRole);
|
||||||
mb.exec();
|
mb.exec();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ public:
|
||||||
~ConsoleSettingsWidget();
|
~ConsoleSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void updateRecompilerICacheEnabled();
|
||||||
void onEnableCPUClockSpeedControlChecked(int state);
|
void onEnableCPUClockSpeedControlChecked(int state);
|
||||||
void onCPUClockSpeedValueChanged(int value);
|
void onCPUClockSpeedValueChanged(int value);
|
||||||
void updateCPUClockSpeedLabel();
|
void updateCPUClockSpeedLabel();
|
||||||
|
|
|
@ -128,6 +128,13 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="recompilerICache">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Recompiler ICache</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue