diff options
| author | uvok | 2026-01-19 19:43:58 +0100 |
|---|---|---|
| committer | uvok | 2026-01-19 19:43:58 +0100 |
| commit | 1f0fc1edcea04e5c1f04803f0bdda337c2245f09 (patch) | |
| tree | 141020efd019d5524b1714c940d4a473826c01b0 /eater_cpu/cpp/simpc_term.cpp | |
| parent | f127505b779dcb134fa48bcf2bf59810b60348c5 (diff) | |
eater: Combine counting in prev. state
save 1 cycle, as explained in video.
also, only print lo->hi clk states to term.
Diffstat (limited to 'eater_cpu/cpp/simpc_term.cpp')
| -rw-r--r-- | eater_cpu/cpp/simpc_term.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eater_cpu/cpp/simpc_term.cpp b/eater_cpu/cpp/simpc_term.cpp index 8ddf83d..540cc98 100644 --- a/eater_cpu/cpp/simpc_term.cpp +++ b/eater_cpu/cpp/simpc_term.cpp @@ -36,6 +36,9 @@ bool paused = false; static void handle_key(); void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) { + // clk hi->lo doesn't do anything, just skip this. + if (i !=0 && !topp->clk_in) + return; // uint16_t opcode = topp->eater_computer->; uint8_t opcode = topp->eater_computer->INS->r_datastore; // topp->halt |
