Category Archives: old machines

Printing to a 1980-era daisywheel printer from OS X, part 4

Printing

If everything is working, you should now be able to print. Feed a piece of paper into the printer and send a test print from the Terminal with, for example echo "this is a test" | lpr -P cables2go_IEEE-1284_Controller

Those unfamiliar with printers of this era — you may need to take the printer off-line to advance the paper, then put it back on-line to print. The off-line/on-line toggle goes by different names on different printers; on the NEC it’s just called “print”.

For text files of any length, simply piping the files to the printer will probably not produce the output you want — these printers do not recognize when they have reached the end of the page and will cheerfully print past the end of a line. Further, if told to go to a new line, but not to back up to the left, they will produce bizarre laddered text, and if told to go back to the start of the line but not to advance the roller, they’ll print right on top of the text they just printed. There are two solutions to this:
1. force line-ends in the software that creates your files. Most sophisticated text editors can do this. In a normal typeface, 80 characters will fit neatly across an 8.5” page. It is important that you save such files in ‘DOS’ format, which includes both carriage return and linefeed commands at the end of each line. If you can not save in this format, don’t bother forcing line-ends at all; they won’t work. On the Mac, I use TextWrangler.

2. Alternatively, you can pipe the file through a UNIX utility that breaks your text into lines (fold -s) , and then through a second command that converts the breaks into the carriage returns and linefeeds the printer needs. There are dedicated utilities that you can install to do this latter task (dos2unix), or you can use awk another similar, more general translation tool.

I generally use the latter path, printing the file example.txt with a command like

cat example.txt | fold -s | awk 'sub("$", "\r")' | lpr -P PrintAdapter

Forcing line breaks as in the first proposed solution can create a bit of a hassle with later edits; the fold -s | awk | lpr solution is therefore more general and typically easier.

The following idea gives some idea of the interaction of file format and output processing

line-end forced linebreaks fold-s | awk | print
CR bad bad
LF bad good
CRLF good good

Printing to a 1980-era daisywheel printer from OS X, part 3

Setting up CUPS

CUPS is the print server used by OSX. It has an open architecture so that manufacturers and other interested parties can create files, called PostScript Printer Descriptions (“PPD”s), that describe the capabilities of each printer and are used by the operating system to support printer-specific features and filter content as appropriate to leave the printer only with content it’s able to handle. We need to teach CUPS about the USB interface (not the printer; remember, the computer never sees the printer, only the interface).

1. enable printer sharing in system preferences
preferences
sharing

2. in terminal, ‘cupsctl WebInterface=yes’ to enable the web interface to CUPS
3. go to CUPS control at http://127.0.0.1:631/

4. add printer
Add Printer
5. adapter should show up (e.g. “Prolific Technology Inc. IEEE-1284 Controller”.

6. Give it a name,
Give it a name
7. then on the next screen, assign it a ‘raw’ type or (If you have found or figure out how to create a pass-through PPD, link to it now).
Assign PPD
8. Add printer.
Add Printer
9. Next screen, set default options and policies if you want.
Set Options
10. CUPS should now be correctly set up to work with your adapter; to check, launch the terminal, and use the command ‘lpstat -p -d’ to confirm that the adapter is visible to the print server and check the name by which it’s known.

Printing to a 1980-era daisywheel printer from OS X, part 2

The Hardware

Printers of this era used a 25-pin parallel interface and connected to computers with what was generally called a “Centronics” cable. Modern computers do not include these ports though they can sometimes be added with a PCI card or express card. As of this writing, Startech manufactures many varieties, but with drivers only for Windows and Linux. There are units from other companies too, but I have never found OS X drivers. For a Mac, we need to go another route.

parallel adapters

Many manufactures sell USB-to-parallel adapters that work pretty well. Of the ones I own, those with chipsets by Prolific seem to work the best, but they’re all pretty good. The adapter is a standard USB device and can be connected directly to the computer or at the far end of a hub. The adapters generally have DB-25 male connecters on the non-USB end and connect directly to the printer. Our job thereafter will be to send the correct ASCII codes to the adapter, which will then pass them on to the printer. There exist fancier adapters that allow the user to change the speed of the adapter and other aspects of its interface but these are more expensive and not necessary; the default settings implemented in the normal adapters are fine.

Printing to a 1980-era daisywheel printer from OS X, part 1

I’ve long been fond of daisywheel printers, and they can generally be picked up for the cost of shipping when somebody finds one rotting in the garage. They’re easy to use with computers of their own era. I generally test them with a Tandy WP-2, which is a dedicated word processor. Connect the WP-2 to the printer with a standard Centronics parallel cable, type a few lines and hit the ‘print’ command. Unfortunately, printing from Windows or Mac is a bit more complicated.

Modern Macs will print to almost any page printer via the CUPS system, but the operating system provides little support for printing to an old line printer. Basically, if the printer expects to get a picture of a page, it will work with a Mac just about instantly. If you want to send across a stream of letters, a bit more work is needed.

The following posts will explain how to get one of these old beasts (an NEC Spinwriter ELF 360 in this example) running under OSX.

Disassembling the Apple Studio Display 21″ CRT

Once upon a time, computers used cathode ray tube monitors (CRTs), and the best ones were made by Sony, and in 1999 Apple bought some Sony tubes for use in creating the wonderful monster that is the Apple Studio Display 21″ CRT.

It was beautiful and enormous.

The monitor is almost three feet deep.

The monitor is almost three feet deep.

G3_monitor1

And very, very heavy. The service manual contains the following warning:

Caution: Out of the box, the Studio Display (21″ CRT) weighs 77 pounds (35 kg). Use caution when lifting or moving the display. To move it, lift it by the hand grips on the bottom of the display. It is recommended that two people lift the monitor together.

After the bloom came off the CRT rose, I got two of these monitors for free by offering to “dispose” of them for designers who were moving up to LCD screens. Neither was working well, and they’ve been in my basement basically ever since. I plan someday to convert the shells into fishtanks or litterboxes or something. At one point, I thought I might build a computer into the case with a modern LCD monitor mounted into the front, but a 20″ square monitor is an odd commodity now that the world has moved on to panoramic aspect ratios.

Anyway, it was time to move the monitors and I decided to gut them first. The things are totally over-engineered, with dozens of screws hidden under mylar stickers. The “Take Apart” section of the service manual is 101 pages long. Not very big pages, but still.

So I found a shortcut . . .

CRTs can be extreme hazardous. Use a wooden-handled implement when discharging.

CRTs can be extreme hazardous. Use a wooden-handled implement when discharging.

Also wear protective eyewear and an airmask; the tube will explode.

Also wear protective eyewear and an airmask; the tube will explode.

Then remove the shell.

Then remove the shell.

And remove the guts.

And remove the guts.