summaryrefslogtreecommitdiff
path: root/nandgame/cpp
diff options
context:
space:
mode:
authoruvok2026-01-11 12:13:59 +0100
committeruvok2026-01-11 12:13:59 +0100
commitfa340ee32daf9ce6d3b4f4f5b39ec2fc4b0a6239 (patch)
treeffee3ca47c9491f4a997badb7bcbc6b1e2ccc6bb /nandgame/cpp
parent921fd4cb73ae155c8638e66b31c4b927b522c737 (diff)
Remove "offset" variable
Diffstat (limited to 'nandgame/cpp')
-rw-r--r--nandgame/cpp/simpc_ui.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/nandgame/cpp/simpc_ui.cpp b/nandgame/cpp/simpc_ui.cpp
index abe1fa8..02d4cf0 100644
--- a/nandgame/cpp/simpc_ui.cpp
+++ b/nandgame/cpp/simpc_ui.cpp
@@ -51,21 +51,20 @@ void simpc_ui_write(const std::unique_ptr<Vcomputer> &topp, uint64_t &i,
PRINT_ME(1, 1, "Step: %10d \b%c", i,
sp == StepPosition_t::BEFORE_EVAL ? 'A' : 'B');
PRINT_ME(2, 1, "%-20s", paused ? "Paused" : "Running");
- PRINT_ME(1 + NCUR_OFFSET, NCUR_X,
- "CLK1: %4d\tPC: @0x%04X\tINS: 0x%04X\tHLT: %d", topp->clk_in,
+ PRINT_ME(3, NCUR_X, "CLK1: %4d\tPC: @0x%04X\tINS: 0x%04X\tHLT: %d",
+ topp->clk_in,
// wrong
// topp->computer->clk_in,
topp->computer->PC_addr_int, opcode, topp->halt);
auto insline = print_decoded(opcode, true);
- PRINT_ME(3 + NCUR_OFFSET, NCUR_X, "%-80s", insline.c_str());
+ PRINT_ME(5, NCUR_X, "%-80s", insline.c_str());
- PRINT_ME(5 + NCUR_OFFSET, NCUR_X,
- "A: 0x%04X\tD: 0x%04X\tM: 0x%04X\tRES: 0x%04X",
+ PRINT_ME(7, NCUR_X, "A: 0x%04X\tD: 0x%04X\tM: 0x%04X\tRES: 0x%04X",
topp->computer->reg_A_int, topp->computer->reg_D_int,
topp->computer->reg_pA_int, topp->computer->result_int);
PRINT_ME(
- 6 + NCUR_OFFSET, NCUR_X, "%c%8d\t%c%8d\t%c%8d\t%11d",
+ 8, NCUR_X, "%c%8d\t%c%8d\t%c%8d\t%11d",
topp->computer->store_to_A_int ? '*' : ' ', topp->computer->reg_A_int,
topp->computer->store_to_D_int ? '*' : ' ', topp->computer->reg_D_int,
topp->computer->store_to_pA_int ? '*' : ' ', topp->computer->reg_pA_int,