mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-07 11:45:07 +00:00
Merge pull request #14 from AnonymusRaccoon/Debugger
Fixing ??? message on the bus's debugger
This commit is contained in:
@@ -165,12 +165,12 @@ namespace ComSquare::Debugger
|
|||||||
void MemoryBusDebug::write(uint24_t addr, uint8_t data)
|
void MemoryBusDebug::write(uint24_t addr, uint8_t data)
|
||||||
{
|
{
|
||||||
auto accessor = this->getAccessor(addr);
|
auto accessor = this->getAccessor(addr);
|
||||||
uint8_t value = 0;
|
std::optional<uint8_t> value = std::nullopt;
|
||||||
try {
|
try {
|
||||||
if (accessor)
|
if (accessor)
|
||||||
value = accessor->read(addr - accessor->getStart());
|
value = accessor->read(addr - accessor->getStart());
|
||||||
} catch (InvalidAddress &) {
|
} catch (InvalidAddress &) {
|
||||||
value = 0;
|
value = std::nullopt;
|
||||||
}
|
}
|
||||||
if (!forceSilence)
|
if (!forceSilence)
|
||||||
this->_model.log(BusLog(true, addr, accessor, value, data));
|
this->_model.log(BusLog(true, addr, accessor, value, data));
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ namespace ComSquare::Debugger
|
|||||||
{
|
{
|
||||||
//! @brief The struct used to represent memory bus logs.
|
//! @brief The struct used to represent memory bus logs.
|
||||||
struct BusLog {
|
struct BusLog {
|
||||||
BusLog(bool write, uint24_t addr, std::shared_ptr<Memory::AMemory> &accessor, std::optional<uint8_t> oldData, uint8_t newData);
|
BusLog(bool write,
|
||||||
|
uint24_t addr,
|
||||||
|
std::shared_ptr<Memory::AMemory> &accessor,
|
||||||
|
std::optional<uint8_t> oldData,
|
||||||
|
uint8_t newData);
|
||||||
|
|
||||||
bool write;
|
bool write;
|
||||||
uint24_t addr;
|
uint24_t addr;
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
#include "Debugger/APUDebug.hpp"
|
#include "Debugger/APUDebug.hpp"
|
||||||
#include "Debugger/MemoryBusDebug.hpp"
|
#include "Debugger/MemoryBusDebug.hpp"
|
||||||
#include "Debugger/CGramDebug.hpp"
|
#include "Debugger/CGramDebug.hpp"
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace ComSquare
|
namespace ComSquare
|
||||||
|
|||||||
Reference in New Issue
Block a user