Ever since including a printer with this project, I've been interested in somehow having the system able to print out old-school banners on the printer. My BSD-derived Mac still has the program (type "banner" in a terminal). Over the last couple of years I have been showing the computer at various shows and exhibits and have created a demo version of the firmware that does stuff like reset itself to a known state and display inviting information after a period of inactivity. Recently I also introduced the idea of "virtual host" programs into the firmware. The feature is intended to make it possible to have programs run locally and interface to the built-in terminal emulator as though it was connected to some external system (without having to have an external system). I moved the Eliza module over to the new system and then went out search for the source to banner which I found in an online repository of an ancient version of BSD unix (which I can't seem to find again as I write this).

Porting it was fairly straightforward. As discussed in the wiki article about the program, the original program (included in the downloads section) is a pretty big hack with two hand-crafted tables of font and index information. It expects to run as a command line program outputting directly to stdout. I had to change it into cooperative multitasking process interfacing with the printer buffer in the main firmware (and relearning - yet again - about buffer management and flow-control...). I ended up having it load all the lines for one character at a time and waiting for a token passed through all the buffers to be returned by the printer (via my serial_to_parallel sketch that interfaces the parallel-port printer to the computer's serial output).

The virtual hosts are now selected via the terminal's configuration menu. Code for anyone who is interested is in github (dl1416SmartTerm_demo).

Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.