summaryrefslogtreecommitdiff
path: root/eater_cpu/cpp/simpc_curses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'eater_cpu/cpp/simpc_curses.cpp')
-rw-r--r--eater_cpu/cpp/simpc_curses.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/eater_cpu/cpp/simpc_curses.cpp b/eater_cpu/cpp/simpc_curses.cpp
index 0fb29c8..24533e7 100644
--- a/eater_cpu/cpp/simpc_curses.cpp
+++ b/eater_cpu/cpp/simpc_curses.cpp
@@ -103,12 +103,12 @@ void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) {
topp->eater_computer->flags.__PVT__flags_in ? flag_on : flag_off);
PRINT_ME_W(clock_regs, flagstart + 2, 1,
"%c InsO | %c RAO | %c AlO | %c Sub | %c OI",
- topp->eater_computer->flags.__PVT__INS_out ? flag_on : flag_off,
- topp->eater_computer->flags.__PVT__RAM_out ? flag_on : flag_off,
- topp->eater_computer->flags.__PVT__ALU_out ? flag_on : flag_off,
+ topp->eater_computer->flags.__PVT__INS_out ? flag_on : flag_off,
+ topp->eater_computer->flags.__PVT__RAM_out ? flag_on : flag_off,
+ topp->eater_computer->flags.__PVT__ALU_out ? flag_on : flag_off,
topp->eater_computer->flags.__PVT__ALU_subtract_nadd ? flag_on
: flag_off,
- topp->eater_computer->flags.__PVT__OUT_in ? flag_on : flag_off);
+ topp->eater_computer->flags.__PVT__OUT_in ? flag_on : flag_off);
// PRINT_ME_W(
// clock_regs, flagstart, 1,
// "| %c | %c | %c %c | %c %c | %c %c | %c %c | %c %c | %c | %c %c %c |",
@@ -139,7 +139,18 @@ void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) {
const int ypos_base = 1;
const int adr_factored = adr % 8;
const int xpos_base = adr < 8 ? 1 : 21;
- const char *prefix = adr == topp->eater_computer->MAR_out ? "> " : " ";
+ const bool is_m = adr == topp->eater_computer->MAR_out;
+ const bool is_p = adr == topp->eater_computer->PC_out;
+ const char *prefix;
+ if (is_m && is_p)
+ prefix = "MP> ";
+ else if (is_m)
+ prefix = "M > ";
+ else if (is_p)
+ prefix = " P> ";
+ else
+ prefix = " ";
+
{
const uint16_t program_op_code =
topp->eater_computer->RAM->r_datastore[adr];