1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 01:32:55 +00:00

Add further heavily-manual debugging aids.

This commit is contained in:
Thomas Harte 2024-03-24 22:18:30 -04:00
parent 3549488b7a
commit 6980fd760c

View File

@ -162,9 +162,11 @@ class ConcreteMachine:
}
int video_divider_ = 1;
std::set<uint32_t> opcodes;
void tick_cpu() {
static uint32_t last_pc = 0;
static bool log = false;
static bool accumulate = false;
// if(executor_.pc() == 0x03803400) {
// printf("At %08x; after last PC %08x and %zu ago was %08x\n", executor_.pc(), pc_history[(pc_history_ptr - 2 + pc_history.size()) % pc_history.size()], pc_history.size(), pc_history[pc_history_ptr]);
@ -203,6 +205,9 @@ class ConcreteMachine:
}
info.append("]");
}
if(accumulate) {
opcodes.insert(instruction);
}
// logger.info().append("%08x: %08x", executor_.pc(), instruction);
InstructionSet::ARM::execute(instruction, executor_);
++instr_count;