summaryrefslogtreecommitdiff
path: root/eater_cpu
diff options
context:
space:
mode:
Diffstat (limited to 'eater_cpu')
-rw-r--r--eater_cpu/cpp/simpc_curses.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/eater_cpu/cpp/simpc_curses.cpp b/eater_cpu/cpp/simpc_curses.cpp
index 5ae98b1..c7de19b 100644
--- a/eater_cpu/cpp/simpc_curses.cpp
+++ b/eater_cpu/cpp/simpc_curses.cpp
@@ -59,9 +59,14 @@ void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) {
PRINT_ME_W(status_top, 1, 1, "Step: %10lu", i);
PRINT_ME_W(status_top, 2, 1, "%-20s", paused ? "Paused" : "Running");
- PRINT_ME_W(clock_regs, 1, 1, "CLK: %2d\tState: 0x%02X\tHLT: %-2d",
+ const char* alu_flags;
+ if(topp->eater_computer->ALU_flags_out & 0xc0) alu_flags = "ZC";
+ else if(topp->eater_computer->ALU_flags_out & 0x80) alu_flags = "Z-";
+ else if(topp->eater_computer->ALU_flags_out & 0x40) alu_flags = "-C";
+ else alu_flags = "--";
+ PRINT_ME_W(clock_regs, 1, 1, "CLK: %2d\tState: 0x%02X\tHLT: %-6d\tFlags: %s",
topp->clk_in, topp->eater_computer->decoder__DOT__internal_state,
- topp->halt);
+ topp->halt, alu_flags);
PRINT_ME_W(clock_regs, 2, 1, "BUS: %02X\tPC: @0x%02X\tINS: 0x%02X",
topp->eater_computer->bus, topp->eater_computer->PC_out, opcode);