diff options
Diffstat (limited to 'nandgame/cpp/Vcomputer__main.cpp')
| -rw-r--r-- | nandgame/cpp/Vcomputer__main.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nandgame/cpp/Vcomputer__main.cpp b/nandgame/cpp/Vcomputer__main.cpp index 6908377..77e291f 100644 --- a/nandgame/cpp/Vcomputer__main.cpp +++ b/nandgame/cpp/Vcomputer__main.cpp @@ -53,7 +53,8 @@ int main(int argc, char **argv, char **) { simpc_ui_init(); - while (VL_LIKELY(!contextp->gotFinish()) && contextp->time() < 500) { + while (VL_LIKELY(!contextp->gotFinish()) && contextp->time() < 500 && + !topp->halt) { auto i = contextp->time(); if (i != 0 && (i % TICKS_PER_INS) == 0) { @@ -65,10 +66,6 @@ int main(int argc, char **argv, char **) { // Evaluate model topp->eval(); - // both bits 14 and 15 need to be set - if (topp->halt) - break; - simpc_ui_write(topp, i, StepPosition_t::AFTER_EVAL); // Advance time |
