Marge master into PPU

This commit is contained in:
Clément Le Bihan
2020-03-28 23:35:38 +01:00
38 changed files with 1512 additions and 971 deletions
+8 -4
View File
@@ -35,15 +35,19 @@ namespace ComSquare
this->apu->update(cycleCount);
}
void SNES::enableCPUDebugging()
void SNES::enableCPUDebugging(bool pause)
{
#ifdef DEBUGGER_ENABLED
if (this->cpu->isDebugger())
std::static_pointer_cast<Debugger::CPUDebug>(this->cpu)->focus();
else
if (this->cpu->isDebugger()) {
auto cpuDebug = std::static_pointer_cast<Debugger::CPUDebug>(this->cpu);
cpuDebug->focus();
if (pause)
cpuDebug->pause();
} else
this->cpu = std::make_shared<Debugger::CPUDebug>(*this->cpu, *this);
#else
std::cerr << "Debugging features are not enabled. You can't enable the debugger." << std::endl;
(void)pause;
#endif
}