diff options
| -rw-r--r-- | nandgame/cpp/simpc_ui.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/nandgame/cpp/simpc_ui.cpp b/nandgame/cpp/simpc_ui.cpp index dcb7300..cc44bc9 100644 --- a/nandgame/cpp/simpc_ui.cpp +++ b/nandgame/cpp/simpc_ui.cpp @@ -72,10 +72,6 @@ void simpc_ui_write(const std::unique_ptr<Vcomputer> &topp, uint64_t &i, topp->computer->store_to_pA_int ? '*' : ' ', topp->computer->reg_pA_int, topp->computer->result_int); - SIMPLE_BORDER(ROM, '|', '-', '+'); - PRINT_ME_W(ROM, 0, 1, "%-35s", "--- ROM ---"); - PRINT_ME_W(RAM1, 0, 1, "%-15s", "--- RAM1 ---"); - PRINT_ME_W(RAM2, 0, 1, "%-15s", "-- RAM2 --"); for (int i = -MEMORY_CONTEXT; i <= MEMORY_CONTEXT; i++) { const int ypos_base = 1 + MEMORY_CONTEXT; const char *prefix = i == 0 ? "> " : " "; @@ -112,6 +108,15 @@ void simpc_ui_write(const std::unique_ptr<Vcomputer> &topp, uint64_t &i, PRINT_ME_W(RAM2, ypos_base + i, 1, "%04X %04X%30c", p, mem_content, ' '); } } + + // borders at the bottom, because of wrapping logic I don't grasp + SIMPLE_BORDER(ROM, '|', '-', '+'); + PRINT_ME_W(ROM, 0, 1, "--- ROM ---"); + SIMPLE_BORDER(RAM1, '|', '-', '+'); + PRINT_ME_W(RAM1, 0, 1, "--- RAM1 ---"); + SIMPLE_BORDER(RAM2, '|', '-', '+'); + PRINT_ME_W(RAM2, 0, 1, "-- RAM2 --"); + // PRINT_ME(7 + NCUR_OFFSET, NCUR_X, "ALU"); // PRINT_ME(8 + NCUR_OFFSET, NCUR_X, "X: %5d\tY: %5d", // topp->computer->CPU->my_alu->int_op_x, |
