From 3eb6b39292bb12aec8424d25888deeaf1b7b0904 Mon Sep 17 00:00:00 2001
From: Anonymus Raccoon
Date: Sun, 16 Feb 2020 23:50:08 +0100
Subject: [PATCH] Updating the debugger's ui when reseting the game
---
sources/CPU/CPU.hpp | 2 +-
sources/Debugger/DebugCpu.cpp | 6 ++++++
sources/Debugger/DebugCpu.hpp | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
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;