Skip to content
Permalink
Browse files

Disable full MMU by default and add it to global config GUI

Requested by JMC.
  • Loading branch information
JosJuice committed Sep 4, 2019
1 parent 08b191e commit 9e0b09ddf4400e6bfb08963a2e5ac1c697eb94f0
@@ -234,6 +234,7 @@ void SConfig::SaveCoreSettings(IniFile& ini)
core->Set("WiimoteEnableSpeaker", m_WiimoteEnableSpeaker);
core->Set("RunCompareServer", bRunCompareServer);
core->Set("RunCompareClient", bRunCompareClient);
core->Set("MMU", bMMU);
core->Set("EmulationSpeed", m_EmulationSpeed);
core->Set("Overclock", m_OCFactor);
core->Set("OverclockEnable", m_OCEnable);
@@ -765,11 +766,7 @@ void SConfig::LoadDefaults()
bFastmem = true;
bFPRF = false;
bAccurateNaNs = false;
#ifdef _M_X86_64
bMMU = true;
#else
bMMU = false;
#endif
bLowDCBZHack = false;
iBBDumpPort = -1;
bSyncGPU = false;
@@ -63,6 +63,9 @@ void AdvancedPane::CreateLayout()
cpu_emulation_layout->addWidget(m_cpu_emulation_engine_combobox, 0, 1, Qt::AlignLeft);
cpu_options_layout->addLayout(cpu_emulation_layout);

m_enable_mmu_checkbox = new QCheckBox(tr("Enable MMU"));
cpu_options_layout->addWidget(m_enable_mmu_checkbox);

auto* clock_override = new QGroupBox(tr("Clock Override"));
auto* clock_override_layout = new QVBoxLayout();
clock_override->setLayout(clock_override_layout);
@@ -134,6 +137,9 @@ void AdvancedPane::ConnectLayout()
Config::SetBaseOrCurrent(Config::MAIN_CPU_CORE, PowerPC::AvailableCPUCores()[index]);
});

connect(m_enable_mmu_checkbox, &QCheckBox::toggled, this,
[this](bool checked) { SConfig::GetInstance().bMMU = checked; });

m_cpu_clock_override_checkbox->setChecked(SConfig::GetInstance().m_OCEnable);
connect(m_cpu_clock_override_checkbox, &QCheckBox::toggled, [this](bool enable_clock_override) {
SConfig::GetInstance().m_OCEnable = enable_clock_override;
@@ -178,6 +184,9 @@ void AdvancedPane::Update()
}
m_cpu_emulation_engine_combobox->setEnabled(!running);

m_enable_mmu_checkbox->setChecked(SConfig::GetInstance().bMMU);
m_enable_mmu_checkbox->setEnabled(!running);

QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(Config::MAIN_OVERCLOCK_ENABLE) !=
Config::LayerType::Base);
@@ -32,6 +32,7 @@ class AdvancedPane final : public QWidget
void Update();

QComboBox* m_cpu_emulation_engine_combobox;
QCheckBox* m_enable_mmu_checkbox;
QCheckBox* m_cpu_clock_override_checkbox;
QSlider* m_cpu_clock_override_slider;
QLabel* m_cpu_clock_override_slider_label;

0 comments on commit 9e0b09d

Please sign in to comment.
You can’t perform that action at this time.