diff --git a/Ui/cpu.ui b/Ui/cpu.ui index 19a841e..4efa2d9 100644 --- a/Ui/cpu.ui +++ b/Ui/cpu.ui @@ -1,29 +1,42 @@ - CPU - + CPUView + 0 0 - 584 - 407 + 600 + 400 - CPU + CPU's Debugger - + - 270 - 160 - 67 - 17 + 0 + 25 + 200 + 375 + + + + + + + 0 + 0 + 200 + 25 - CPU + Instructions History + + + Qt::AlignCenter diff --git a/sources/Debugger/DebugCpu.cpp b/sources/Debugger/DebugCpu.cpp index 83a7610..d986fd2 100644 --- a/sources/Debugger/DebugCpu.cpp +++ b/sources/Debugger/DebugCpu.cpp @@ -2,15 +2,14 @@ // Created by anonymus-raccoon on 2/14/20. // -#include #include "DebugCpu.hpp" namespace ComSquare::Debugger { CPUDebug::CPUDebug(ComSquare::CPU::CPU &basicCPU, SNES &snes) - : CPU::CPU(basicCPU), _snes(snes) + : CPU::CPU(basicCPU), Ui::CPUView(), _snes(snes) { - this->_ui.setupUi(&this->_widget); + this->setupUi(&this->_widget); this->_widget.show(); } @@ -21,8 +20,7 @@ namespace ComSquare::Debugger return 0; } -// this->_renderer.drawScreen(); -// this->_renderer.getEvents(); + this->logger->append("Update"); if (this->_isPaused) return 0xFF; return CPU::update(); diff --git a/sources/Debugger/DebugCpu.hpp b/sources/Debugger/DebugCpu.hpp index e5552a2..daca359 100644 --- a/sources/Debugger/DebugCpu.hpp +++ b/sources/Debugger/DebugCpu.hpp @@ -14,12 +14,10 @@ namespace ComSquare::Debugger { //! @brief A custom CPU with a window that show it's registers and the disassembly. - class CPUDebug : public CPU::CPU { + class CPUDebug : public CPU::CPU, Ui::CPUView { private: //! @brief A widget that contain the whole UI. QWidget _widget; - //! @brief The ui that reside inside the window. - Ui::CPU _ui; //! @brief If this is set to true, the execution of the CPU will be paused. bool _isPaused = true; //! @brief A reference to the snes (to disable the debugger).