Implement PPC write-back data cache

This commit is contained in:
TheLordScruffy
2022-10-17 15:28:29 -04:00
parent abf08b5869
commit e97d380437
22 changed files with 559 additions and 132 deletions

View File

@ -74,6 +74,12 @@ void AdvancedPane::CreateLayout()
"affect performance.\nThe performance impact is the same as having Enable MMU on."));
cpu_options_group_layout->addWidget(m_pause_on_panic_checkbox);
m_accurate_cpu_cache_checkbox = new QCheckBox(tr("Enable Write-Back Cache (slow)"));
m_accurate_cpu_cache_checkbox->setToolTip(
tr("Enables emulation of the CPU write-back cache.\nEnabling will have a significant impact "
"on performance.\nThis should be left disabled unless absolutely needed."));
cpu_options_group_layout->addWidget(m_accurate_cpu_cache_checkbox);
auto* clock_override = new QGroupBox(tr("Clock Override"));
auto* clock_override_layout = new QVBoxLayout();
clock_override->setLayout(clock_override_layout);
@ -189,6 +195,9 @@ void AdvancedPane::ConnectLayout()
connect(m_pause_on_panic_checkbox, &QCheckBox::toggled, this,
[](bool checked) { Config::SetBaseOrCurrent(Config::MAIN_PAUSE_ON_PANIC, checked); });
connect(m_accurate_cpu_cache_checkbox, &QCheckBox::toggled, this,
[](bool checked) { Config::SetBaseOrCurrent(Config::MAIN_ACCURATE_CPU_CACHE, checked); });
m_cpu_clock_override_checkbox->setChecked(Config::Get(Config::MAIN_OVERCLOCK_ENABLE));
connect(m_cpu_clock_override_checkbox, &QCheckBox::toggled, [this](bool enable_clock_override) {
Config::SetBaseOrCurrent(Config::MAIN_OVERCLOCK_ENABLE, enable_clock_override);
@ -258,6 +267,9 @@ void AdvancedPane::Update()
m_pause_on_panic_checkbox->setChecked(Config::Get(Config::MAIN_PAUSE_ON_PANIC));
m_pause_on_panic_checkbox->setEnabled(!running);
m_accurate_cpu_cache_checkbox->setChecked(Config::Get(Config::MAIN_ACCURATE_CPU_CACHE));
m_accurate_cpu_cache_checkbox->setEnabled(!running);
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(Config::MAIN_OVERCLOCK_ENABLE) !=
Config::LayerType::Base);