Here is a utility program to inject an ISR that listens to serial-card inputs and pipes them over to the System ROM kernel. This allows replacing the PS/2 keyboard with an "RS-232 Serial Keyboard" (or basically use some other RS-232 system as a proxy to the PS/2 keyboard).
This is as described here:
The code is intended to be automatically loaded on the X16 on startup inside the AUTOBOOT.X16 (since it is intended that the X16 wouldn't have an attached PS/2 keyboard). You can still attach and use a PS/2 keyboard at the same time if so desired, there would be no conflict in doing so. As-is, the attached code is set to use 300 baud, 8-N-1, and port index 5.
REM HARDCODED FOR NON-INTERACTIVE STARTUP
PORT.IDX=5
PORT.STATE=0
BAUD.CURR=3 : REM DEFAULT TO 300 BAUD
Some keyboards might not properly translate their scancodes into proper ASCII, and as a CBM-derived system the X16 itself does have a few notable differences. The ISR itself would have to be customized to handle these translation differences, but for the most part the main alpha-numeric values will translate fine (so you can do typical CMDR-DOS commands and navigation and run "simple" programs).
Another expansion on this is using the WiFi ports instead, which would enable a wireless keyboard. It's not quite that simple: the ISR would have to monitor for "RING" and know when to issue ATA to accept the connection (at least if using the standard Zimodem firmware), and the WiModem devices would need their own power.
Mostly just a "proof of concept" example to show how RS-232 opens up a way to communicate with other devices, in a kind of (ASCII) "plain text" fashion.
X16 "Serial DOS" RS-232 Keyboard Utility
X16 "Serial DOS" RS-232 Keyboard Utility
- Attachments
-
- X16SDOS.BASL.TXT
- (12.63 KiB) Downloaded 29 times