summaryrefslogtreecommitdiff
path: root/nandgame/cpp/simpc_ui.cpp
diff options
context:
space:
mode:
authoruvok2026-01-11 15:19:28 +0100
committeruvok2026-01-11 15:19:28 +0100
commit676f696d4e800db7e2c62c2557da631114d95951 (patch)
tree87643114694d84729c6bfd914fcf629efa37d84e /nandgame/cpp/simpc_ui.cpp
parentb66c7c78a9917235f29612b584fbf7f6726d90ea (diff)
Split off pure terminal output
Diffstat (limited to 'nandgame/cpp/simpc_ui.cpp')
-rw-r--r--nandgame/cpp/simpc_ui.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/nandgame/cpp/simpc_ui.cpp b/nandgame/cpp/simpc_ui.cpp
index 5b7591e..53e9b06 100644
--- a/nandgame/cpp/simpc_ui.cpp
+++ b/nandgame/cpp/simpc_ui.cpp
@@ -6,7 +6,6 @@
#define NCUR_X 5
#define MEMORY_CONTEXT 3
-#if NCUR
#include <ncurses.h>
#define PRINT_ME(y, x, ...) \
@@ -17,6 +16,7 @@
{ \
refresh(); \
napms(NCUR_DELAY_MS); \
+ wrefresh(status_top); \
}
#define SIMPLE_BORDER(w, lr, tb, c) \
@@ -24,21 +24,6 @@
static WINDOW *status_top = NULL;
-#else
-
-#define attroff(...)
-#define attron(...)
-#define PRINT_ME(y, x, ...) \
- { \
- printf("%*c", x, ' '); \
- printf(__VA_ARGS__); \
- printf("\n"); \
- }
-#define PRINT_NEXT() \
- { puts("-----"); }
-
-#endif
-
#include "Vcomputer.h"
#include "Vcomputer___024root.h"
#include "Vcomputer_comb_mem.h"
@@ -60,7 +45,6 @@ void simpc_ui_write(const std::unique_ptr<Vcomputer> &topp, uint64_t &i,
PRINT_ME_W(status_top, 0, 0, "Step: %10lu \b%c", i,
sp == StepPosition_t::BEFORE_EVAL ? 'A' : 'B');
PRINT_ME_W(status_top, 1, 0, "%-20s", paused ? "Paused" : "Running");
- wrefresh(status_top);
PRINT_ME(3, NCUR_X, "CLK1: %4d\tPC: @0x%04X\tINS: 0x%04X\tHLT: %d",
topp->clk_in,