Commit Graph

14 Commits

Author SHA1 Message Date
Virgil Dupras
475caf35f4 Make KEY non-blocking
... and rename it to KEY?. Then, add KEY from KEY? for its blocking
version.

I need this for an upcoming Remote Shell feature. If a Collapse OS
system remotely controls another shell, it needs to be able to poll
both the remote system and the local keyboard at the same time. A
blocking KEY is incompatible with this.

In some places, the polling mechanism doesn't make sense, so this
new KEY? always returns a character. In some places, I just haven't
implemented the mechanism yet, so I kept the old blocking code and
added a "always 1" flag as a temporary shim.

I have probably broken something, but in emulators, Collapse OS runs
fine. It's an important reminder of what will be lost with the new
"dogfooding" approach (see recent mailing list message): without
emulators, it's much harder to to sweeping changes like this without
breaking stuff.

It's fine, I don't expect many more of these core changes to the
system. It's nearly feature-complete.
2021-01-01 08:23:59 -05:00
Virgil Dupras
6cb310c38c emul+cvm: link to curses instead of ncurses
NetBSD doesn't have ncurses. Linking to curses doesn't seem to change
anything. Tried on OpenBSD and Ubuntu.
2020-11-07 08:45:26 -05:00
Virgil Dupras
705d68deec Move most of the high layer of comp core into the low one
With KEY and EMIT being switch words, most of the high layer can
be defined before drivers.

In addition to this change, I've compacted core blocks which were
becoming quite sparse.
2020-10-28 18:18:00 -04:00
Virgil Dupras
3198cd8d08 emul/8086/pcat: fix broken AT-XY 2020-10-25 18:42:48 -04:00
Virgil Dupras
44abcaa8f8 emul/8086: a little bit of cleanup in cpu.c
De-macroisation negatively impacts speed, but this emulator doesn't
need to be fast. Clear code is more important.
2020-10-25 14:25:12 -04:00
Virgil Dupras
8760766bb4 emul/8086: cleanup a couple of ifdefs
We assume CPU_V20 configuration at all times.
2020-10-25 14:01:46 -04:00
Virgil Dupras
5a77b80d3d emul/8086/pcat: fix broken int13h logic
I had forgotten that heads index increment before track index.
2020-10-25 12:21:44 -04:00
Virgil Dupras
ba21b6a9f5 emul/8086: add PC/AT emulator 2020-10-25 10:27:52 -04:00
Virgil Dupras
c912158744 Run "all" tests under the 8086 emulator 2020-10-24 23:38:06 -04:00
Virgil Dupras
885e7db054 emul/8086: add BLK support 2020-10-24 23:20:20 -04:00
Virgil Dupras
de9103942d emul/8086: implement AT-XY 2020-10-24 23:00:45 -04:00
Virgil Dupras
d11ac3f006 emul/8086: and we have liftoff!
Getting a Collapse OS prompt.
2020-10-24 22:06:51 -04:00
Virgil Dupras
942a50a86d emul/8086: add INT hooks 2020-10-24 21:50:44 -04:00
Virgil Dupras
939c018792 emul/8086: wip 2020-10-24 20:41:51 -04:00