mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-05 19:04:22 +00:00
the project compile but you can't access the cgram debugger
This commit is contained in:
@@ -9,26 +9,26 @@
|
||||
#include "../Exceptions/InvalidAction.hpp"
|
||||
#include "../Exceptions/InvalidAddress.hpp"
|
||||
|
||||
namespace ComSquare::cgramDebugger
|
||||
namespace ComSquare::Debugger
|
||||
{
|
||||
cgramDebug::cgramDebug(SNES &snes, ComSquare::PPU::PPU &ppu)
|
||||
: _window(new ClosableWindow<cgramDebug>(*this, &cgramDebug::disableViewer)),
|
||||
_snes(snes),
|
||||
_ui(),
|
||||
_model(),
|
||||
_ppu(ppu),
|
||||
_ppu(ppu)
|
||||
{
|
||||
this->_window->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
this->_window->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
this->_window->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
this->_ui.setupUi(this->_window);
|
||||
/*this->_ui.setupUi(this->_window);
|
||||
this->_ui.log->setModel(&this->_model);
|
||||
this->_ui.log->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
|
||||
//this->_ui.log->horizontalHeader()->setStretchLastSection(true);
|
||||
this->_ui.log->horizontalHeader()->setSectionsMovable(false);
|
||||
for (int i = 0; i < this->_model.column; i++)
|
||||
this->_ui.log->setColumnWidth(i, this->_ui.log->width());
|
||||
this->_ui.log->setColumnWidth(i, this->_ui.log->width());*/
|
||||
|
||||
this->_window->show();
|
||||
}
|
||||
@@ -71,5 +71,5 @@ QVariant cgramModel::data(const QModelIndex &index, int role) const
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
if (role == Qt::BackgroundRole)
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
namespace ComSquare::cgramDebugger
|
||||
namespace ComSquare::Debugger
|
||||
{
|
||||
//! @brief window that allow the user to view all data going through the memory bus.
|
||||
class cgramDebug {
|
||||
@@ -59,7 +59,7 @@ namespace ComSquare::cgramDebugger
|
||||
//! @brief A reference to the snes (to disable the debugger).
|
||||
SNES &_snes;
|
||||
//! @brief A widget that contain the whole UI.
|
||||
Ui::cgramView _ui;
|
||||
Ui::CgramView _ui;
|
||||
//! @brief The Log visualizer model for QT.
|
||||
cgramModel _model;
|
||||
//! @brief A reference to the ppu
|
||||
@@ -76,13 +76,13 @@ namespace ComSquare::cgramDebugger
|
||||
//! @brief Read data at the CGRAM address send it to the debugger.
|
||||
//! @param addr The address to read from.
|
||||
//! @return The color value in BGR, looks like this xbbbbbgggggrrrrr.
|
||||
uint16_t read(uint8_t addr) override;
|
||||
uint16_t read(uint8_t addr);
|
||||
|
||||
//! @brief Focus the debugger's window.
|
||||
void focus();
|
||||
|
||||
//! @brief Return true if the Bus is overloaded with debugging features.
|
||||
bool isDebugger() override;
|
||||
bool isDebugger();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Debugger/CPUDebug.hpp"
|
||||
#include "Debugger/APUDebug.hpp"
|
||||
#include "Debugger/MemoryBusDebug.hpp"
|
||||
#include "Debugger/cgramDebug.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<class>CgramView</class>
|
||||
<widget class="QMainWindow" name="CgramView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
||||
Reference in New Issue
Block a user