Commit Graph

10 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 cf79ceefea sms: add cursor visual indicator in VDP mode 4
This required the change of CURSOR! signature: we now supply it
with both old and new cursor positions.

Also, fix broken _bs in Grid subsystem.
2020-11-16 10:05:48 -05:00
Virgil Dupras b1e162b8a3 grid: change the meaning of CELL!
Replace the "g" arg (glyph) with "c" (character). The reason why "g"
was used was to save a "0x20 -" operation at all CELL! implementations,
but this came with too big a drawback: it made CELL! hardly usable
outside of the Grid subsystem, mostly because the user of CELL! would
often have to do "0x20 -".

For example, I want the SMS's Pad driver to use CELL! directly instead
of having to do EMIT+XYPOS-messing-around. I would have had to do a
"0x20 -" there.
2020-11-16 09:11:47 -05:00
Virgil Dupras 7bfec5d9e9 grid: Add CURSOR! to the grid protocol
With the move of CVM's forth to the grid protocol, we've lost the
cursor's visual indication. Now, we have it back.

The challenge now is in implementing it in SMS' text mode. In mode
4, it's easy to mark a cell as inverted, but in text mode, that's
not possible.
2020-11-16 08:41:09 -05:00
Virgil Dupras c7d8de25b2 ti84: use Grid subsystem
Also, rename CLRLN to NEWLN and make it clear that it's only called
on entering a new line. This way, we can set Z offset in there for
the TI-84+ LCD driver.
2020-11-10 20:30:37 -05:00
Virgil Dupras 2d54c3243d grid: add CLRLN and change _lf behavior
Instead of clearing the rest of the line on a _lf, it's simpler
to just clear any new line we're entering into.
2020-11-10 19:35:47 -05:00
Virgil Dupras e0bcf3473e Adjust Grid subsystem
Rename ROWS to LINES (it's what VE uses). Also, don't use COLS and
LINES as immediates in the Grid subsystem: we expect those words to
be available at runtime.
2020-11-10 19:06:39 -05:00
Virgil Dupras b97e761942 Add Grid subsystem
The goal is to offload the SMS VDP driver a little bit.
2020-11-09 17:26:15 -05:00
Virgil Dupras 1a6a549857 Make the SPI Relay protocol support multiple devices
Working on programming AVR chips exposes a glaring omission in my
first design of the SPI Relay: not allowing multiple devices make
this task hard. I constantly have to unplug my SD card before, plug
the AVR chip holder, then play a bit, then unplug the AVR holder,
then replug the SD card...

My prototype for a SPI relay design is built, but I haven't tested
it yet. I need to adapt the code first, which is what I do here.

When the prototype is tested, I'll update the SDC recipe with a new
schema.
2020-09-17 09:48:55 -04:00
Virgil Dupras 124da6adec Move SD Card subsystem outside of RC2014 recipe and add protocols
Although the SPI Relay driver is RC2014-specific, the SD Card driver
is generic enough to be a subsystem. That's the second subsystem we
add and this warrants, I think, the formalization of a new concept:
protocols.
2020-08-16 14:30:33 -04:00