Загрузка...

Example of RS-232 Serial Keyboard (Tandy Model 102 as Terminal to Commander X16)

This is an example of writing some code to use an RS-232 interface as a substitute for the system keyboard. In this case, a Tandy Model 102 is used as the keyboard, tethered via an RS-232 null-modem cable over to the serial card interface of a Commander X16.

The code is written using BASLOAD, a native utility on the X16 that takes plain-text BASIC that does not require line numbers, and adapts it over to regular CBM BASIC. But most of the principles in the code are easily adapted into other languages.

The 6502 online virtual assembler is located here:
https://www.masswerk.at/6502/assembler.html

The software works using an ISR (interrupt service routine) that is ran inline with the main system kernel. SEMIBIGFONT is used to spruce up the program a little bit. Originally I was going to have the received ASCII get streamed out in this larger font, but then I realized it would be more fun to pipe it straight to the kernel and actually use the system remotely -- but this only works as long as whatever you are invoking doesn't also make heavy use of the Golden RAM region - though there are ways to work around that, such as: the ISR could go into banked memory instead, or a more appropriate way is to adjust BASIC's MEMTOP and place the handler above there.

The X16 system used is my custom made "Carbon Fiber" Developer Edition PR900, that can run for 10+ hours on battery (including with the 12" VGA LCD), built in speakers, 4-port SNES connections, IEC emulated disk drive, and a convenient USB charger port. Next to this on the left is the humble X16 #PR16, just taking it easy running Tony's excellent SLIDESHOW. Its blue case is from https://www.bitbybitsynths.com/ and is described here:
https://voidstar.blog/commander-x16-assembling-the-x16-dev-edition-laser-cut-case/

The code presented here is available in the Commander X16 forum:
https://cx16forum.com/forum/viewtopic.php?t=7953

SEMIBIGFONT is described here:
https://cx16forum.com/forum/viewtopic.php?t=7910

BASTERM is described here:
https://cx16forum.com/forum/viewtopic.php?p=34336
(NOTE: ROMTERM is better and can handle higher speeds, BASTERM is mostly intended just for initial exploration into how interacting with the serial card works - and is generally limited to 2400 baud)

Original VIA/ISR handling on X16 is described here: (be aware you must add "-via2" to the command line of the emulator to activate the VIA#2 component, but the emulator itself does not include a model of the serial port expansion card-- but the VIA/ISR example below is independent of the serial card)
https://cx16forum.com/forum/viewtopic.php?p=30095

The Tandy Model 100 and 102 systems were sold in the mid-1980s. Millions were sold and they still remain very versatile and enjoyable systems.

Видео Example of RS-232 Serial Keyboard (Tandy Model 102 as Terminal to Commander X16) канала Xiphod / voidstar tech
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять