Printing from a TI to a modern printer

So, obviously, the TI-99/4A doesn’t support printing to USB printers, nor can it print to network printers.

With a little help, though, it can print to modern printers via a helper device running UNIX/FreeBSD/etc. This leverages the BeagleBone Black-based cassette emulator I described in an earlier web log entry.

Here’s how it’s done:

  • Decide if you’re going to use the TI’s parallel port or the serial port. I recommend the parallel port for the sake of speed — the serial port lacks any sort of handshaking, so you will drop characters if you choose serial.
  • (parallel): obtain a parallel-to-serial converter. They’re about fifteen bucks on eBay. Pretty much any unit will do, so long as it has a Centronics port on the input and a DB25/DB9 on the output. Configure it to output as fast as it can (typically 38400, which we’ll refer to as ${SPEED} for the rest of this procedure), 8N1.
  • (serial): obtain a straight-through DB25 <-> DB9 cable. DB25 will be male, DB9 will be female.
  • obtain and connect a USB serial adapter to the BeagleBone Black. You will probably need a small USB hub if you’re also using it as a cassette deck emulator — passive hubs are fine. Run “dmesg” on the BBB’s console until you see it detect the serial adapter and assign a device name (typically “ttyUSB0”). Note the device name; we’ll refer to it as ${DEVICE} for the rest of this procedure.
  • connect the TI to the BBB. If you went with step 1a, verify that you can successfully send characters through your parallel converter — i.e., print a file while running minicom on ${DEVICE} at ${SPEED}. If you went with (serial), no further actions are necessary for this step.
  • download my TI utilities from GitHub here … you care about everything in the printer_listener subdirectory.
  • on the BBB, make an incoming printer spool directory wherever convenient. We will refer to it as ${SPOOL_DIRECTORY} for the rest of this procedure.
  • inside the printer_listener subdirectory is an “epsonps” directory. Enter it, and execute “make; sudo make install”. The Epson-to-PostScript converter (and its PostScript preamble) should be installed to /usr/local/bin.
  • on the BBB, as root, ensure that the python2-pyserial package is installed.
  • on the BBB, copy the script from the printer_listener subdirectory to someplace convenient in your path. You can also leave it in-place, but you’ll need to explicitly specify its location when started.
  • on the BBB, look at the sample filter scripts and optionally choose one to use. One will send the printed output to a networked printer as HP PCL, the other will leave a PDF in /tmp. If you choose to use a filter, copy it to someplace convenient in your path (hereafter referred to as ${PATH_TO_FILTER})
  • on the BBB, execute “ -d ${DEVICE} -s ${SPEED} -f ${PATH_TO_FILTER} -n ${SPOOL_DIRECTORY} (with the “-f” and “-n” options being, well, optional). You will see “printer listener listening” after the serial port is initialized.

At this point, anything you print will appear either in the directory that you ran from, or the ${SPOOL_DIRECTORY} if you specified that option. If you specified a filter with “-f”, the output will be processed per the directives in the filter file.

That’s about it. You’ll probably want to wire this into a startup script; I despise systemd, so I’m leaving that as an exercise for the student.


About Chris Kobayashi

I'm a security systems engineer, specializing in UNIX, network, and physical security. I'm in Tokyo, and I'm mostly retired now. I'm well-versed in both electrical and software engineering, with a particular interest in old computers and game consoles. You can contact me here.
This entry was posted in TI-99/4A. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.