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