diff --git a/sources/CPU/CPU.hpp b/sources/CPU/CPU.hpp index 5470e31..6276732 100644 --- a/sources/CPU/CPU.hpp +++ b/sources/CPU/CPU.hpp @@ -446,7 +446,7 @@ namespace ComSquare::CPU void write(uint24_t addr, uint8_t data) override; //! @brief Reset interrupt - Called on boot and when the reset button is pressed. - void RESB(); + virtual void RESB(); }; } diff --git a/sources/Debugger/DebugCpu.cpp b/sources/Debugger/DebugCpu.cpp index e889f32..77f6784 100644 --- a/sources/Debugger/DebugCpu.cpp +++ b/sources/Debugger/DebugCpu.cpp @@ -212,4 +212,10 @@ namespace ComSquare::Debugger default: return "Unknown"; } } + + void CPUDebug::RESB() + { + CPU::RESB(); + this->_updateRegistersPanel(); + } } \ No newline at end of file diff --git a/sources/Debugger/DebugCpu.hpp b/sources/Debugger/DebugCpu.hpp index 66184a9..823505f 100644 --- a/sources/Debugger/DebugCpu.hpp +++ b/sources/Debugger/DebugCpu.hpp @@ -37,6 +37,8 @@ namespace ComSquare::Debugger //! @brief Step - Execute a single instruction. void step(); public: + //! @brief Update the UI when reseting the CPU. + void RESB() override; //! @brief Convert a basic CPU to a debugging CPU. explicit CPUDebug(ComSquare::CPU::CPU &cpu, SNES &snes); CPUDebug(const CPUDebug &) = delete;