Removing unintended logs to the bus's debugger

This commit is contained in:
Anonymus Raccoon
2020-05-14 18:12:29 +02:00
parent efbf009f21
commit 24bcafeea3
4 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -414,7 +414,7 @@ QVariant StackModel::data(const QModelIndex &index, int role) const
return QVariant();
uint16_t addr = index.row() * 2 + index.column();
try {
uint8_t value = this->_bus->read(addr);
uint8_t value = this->_bus->read(addr, true);
return (ComSquare::Utility::to_hex(value, ComSquare::Utility::NoPrefix).c_str());
} catch (std::exception &) {
return "??";
+5 -5
View File
@@ -42,13 +42,13 @@ namespace ComSquare::Debugger
ctx.mFlag = true;
ctx.xFlag = true;
} else {
uint8_t m = this->_bus->read(pc - 1);
uint8_t m = this->_bus->read(pc - 1, true);
ctx.mFlag &= ~m & 0b00100000u;
ctx.xFlag &= ~m & 0b00010000u;
}
}
if (instruction.opcode == 0xE2) { // SEP
uint8_t m = this->_bus->read(pc - 1);
uint8_t m = this->_bus->read(pc - 1, true);
ctx.mFlag |= m & 0b00100000u;
ctx.xFlag |= m & 0b00010000u;
}
@@ -150,7 +150,7 @@ namespace ComSquare::Debugger
std::string CPUDebug::_getAbsoluteValue(uint24_t pc)
{
uint24_t value = this->_bus->read(pc) + (this->_bus->read(pc + 1, true) << 8u);
uint24_t value = this->_bus->read(pc, true) + (this->_bus->read(pc + 1, true) << 8u);
return Utility::to_hex(value, Utility::HexString::AsmPrefix);
}
@@ -193,13 +193,13 @@ namespace ComSquare::Debugger
std::string CPUDebug::_getAbsoluteIndexByXValue(uint24_t pc)
{
uint24_t value = this->_bus->read(pc) + (this->_bus->read(pc + 1, true) << 8u);
uint24_t value = this->_bus->read(pc, true) + (this->_bus->read(pc + 1, true) << 8u);
return Utility::to_hex(value, Utility::HexString::AsmPrefix) + ", x";
}
std::string CPUDebug::_getAbsoluteIndexByYValue(uint24_t pc)
{
uint24_t value = this->_bus->read(pc) + (this->_bus->read(pc + 1, true) << 8u);
uint24_t value = this->_bus->read(pc, true) + (this->_bus->read(pc + 1, true) << 8u);
return Utility::to_hex(value, Utility::HexString::AsmPrefix) + ", y";
}