Implementing an array of instructions with method's pointer for the CPU (it does not work well for now

This commit is contained in:
Anonymus Raccoon
2020-03-26 03:39:55 +01:00
parent 4b9f8002b9
commit bd948b520c
25 changed files with 924 additions and 724 deletions
+6 -4
View File
@@ -34,12 +34,14 @@ 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();
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;