mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-22 23:25:22 +00:00
30 lines
619 B
C++
30 lines
619 B
C++
//
|
|
// Created by anonymus-raccoon on 2/14/20.
|
|
//
|
|
|
|
#include <iostream>
|
|
#include "DebugCpu.hpp"
|
|
|
|
namespace ComSquare::Debugger
|
|
{
|
|
CPUDebug::CPUDebug(ComSquare::CPU::CPU &basicCPU, SNES &snes)
|
|
: CPU::CPU(basicCPU), _renderer(600, 1000, 60), _snes(snes)
|
|
{
|
|
this->_renderer.setWindowName("CPU's Debugger");
|
|
std::cout << "CPU debugging enabled!" << std::endl;
|
|
}
|
|
|
|
unsigned CPUDebug::update()
|
|
{
|
|
if (this->_renderer.shouldExit) {
|
|
this->_snes.disableCPUDebugging ();
|
|
return 0;
|
|
}
|
|
|
|
this->_renderer.drawScreen();
|
|
this->_renderer.getEvents();
|
|
if (this->_isPaused)
|
|
return 0xFF;
|
|
return CPU::update();
|
|
}
|
|
} |