NODOMAIN.NET Terms of Service

TLDR; By selecting this option I agree to the requirements that I share my information and waive my rights as explained below. Selecting this option will reveal the site's content and dismiss these Terms, which can be subsequently viewed and opted-out of at any time by visiting NODOMAIN.NET and selecting Terms from the navigation chevron.

NODOMAIN.NET (a not-for-profit and voluteer-run organization) Terms of Service are different than those of most websites. In order to access NODOMAIN.NET services, you must agree a) to our use of your Shared Information, b) to waive the below rights which may be available to you in your jurisdiction and c) to abide by and honor our Terms of Use by checking each of the 5 boxes below. If you can not or do not agree, then you may not use or access NODOMAIN.NET systems or services and must leave immediately.

Shared Information

Information that you choose to share with NODOMAIN.NET for processing and collection:

What NODOMAIN.NET uses your information for:

How NODOMAIN.NET shares your information and who gets to see it:

I consent to the collection and use of my Shared Information.

Notice and Waiver of Rights and Idemnification

In the event that your Shared Information is compromised, you agree to a) waive the right to be notified of the breach and b) to waive any claims of liability or damages that may result from the breach.

I waive my right to be informed of data breaches and agree to indemnify NODOMAIN.NET from liability and damages that may result.

NODOMAIN.NET will not make acessible to IP packet originators their archived packets. It is the responsibility of the originator to archive their packets at the time of origination and also to be aware of their contents.

I waive my right to access and review my Shared Information that is stored on NODOMAIN.NET systems.

NODOMAIN.NET reserves the right to delete your Shared Information from its systems at its sole discretion.

I waive my right to be forgotten or erased.

Other Terms

By accessing NODOMAIN.NET systems and services you also agree to abide by the following additional terms:

I agree to abide by and be subject to these Terms of Use.

Copyright 2019-2020, NODOMAIN.NET of Seattle, County of King, Washington State (with POPs in Oregon and California), United States of America, Planet Earth. All rights reserved. All trademarks and tradenames are the property of their respective holders. Revised January 2020. Contact us.

A Guide to Running Apple Dot Matrix Printers with Windows and UNIX Clients,
by Josh Moyer <JMoyer@NODOMAIN.NET>

Credits

All trademarks and names are the property of their owners, notably (and with gratitude): Apple, Inc.; Artifex Software; American Telephone and Telegraph Company; Carpentier Pierre-Francois; Microsoft Corporation; NetBSD Foundation, The; Oracle; Regents of the University of California, The(;) and University of Michigan Research Systems UNIX Group.

License

The following guide is copyrighted 2020-2021 by Josh Moyer <JMoyer@NODOMAIN.NET.> All rights reserved.

Synopsis

Herein lays what will eventually be a complete guide to creating an integration between an Apple dot matrix printer and any modern UNIX or Windows system. This guide covers the following printers:

After completing the steps outlined here, you should be able to print to any of the above printers from a Windows or UNIX based host. Please note that, at present, the driver for the printers only supports single-color, unidirectional printing.

The integration covered in this guide uses NetBSD as the Raster Image Processor (RIP) and spooler node that the printer will be connected to or driven by, depending on whether you are using a direct connection or if you are connecting with the ImageWriter II/LQ LocalTalk Option card. Other host operating systems can likely be utilized, too. However, the author noted that AppleTalk support in the Linux kernel seems to have been broken for some time now, based on experience while initially targeting Linux as the RIP and spooler node.

Background

Apple, Inc. (née Apple Computer, Inc.) made the dot matirix printers listed in the synopsis during the years in which that technology was viable in the market. Eventually replaced by quieter, faster and higher quality laser and ink-jet based models, dot matrix printers are known for their distinctive sound and also for their ability to handle multi-part forms and banners.

The author, having obtained an ImageWriter LQ from University of Washington Surplus and which was kept in storage for many years, was motivated to revive his LQ by way of his long-lived Epson Stylus Color RX500's death. Although ease was not expected, the author never anticipated the degree of difficulty encountered. Overall, it took 3-6 months of significant sustained effort to troubleshoot and integrate all of the disparate pieces. It was a lot af hard (and fun) work and, now, the author is happy to share the story of his blood, sweat and tears in order to save you, dear and gentle reader, an invaluable amount of time and effort in order to make your perverse Windows integrated Apple dot-matrix dreams come true!

Audience

This guide is meant for users who are able to edit and manipulate files and directories in a command-line environment. No programming knowledge should be required.

Revision History

Getting Started

To get started you'll need to have the following items:

For AppleTalk based operation (which also delivers an enhanced 230.4 kilobit line rate versus a maximum of 19.2 kilobits, resulting in enhanced printing speed), the following additional pieces are needed:

The Printers

All of Apple's dot matrix printers are based on a common command set based on ecape sequences embedded in the output and are all backwards compatible, in theory. The non-LQ printers (at least) are all based on a family of C. Itoh print engines.

Apple Dot Matrix Printer

Introduced in 1982, The Apple Dot Matrix Printer featured a maximum resolution of 120x72 dpi. It also featured a parallel interface and tractor feed.

Manual

DIP Switches

|SW1-87654321|SW2-87654321|
|------------|------------|

Apple ImageWriter (15")

Introduced in late 1983, The ImageWriter featured a maximum resolution of 160x72dpi. It also featured a serial interface and tractor feed. A separate model with a 15" platen was also available.

Manual

DIP Switches


Apple ImageWriter II

Introduced in late 1985, The ImageWriter II featured a maximum resolution of 160x144dpi. It also featured a serial interface, tractor feed, 4 color CMYK printing, optional cut-sheet feeder and AppleTalk co-processor and interface and buffer memory cards. It won at least one award for it's innovative and distinctive industrial design.

Manual

DIP Switches

|SW1-12345678|SW2-123456|
|------------|-------*--|

* - (LocalTalk) Option Card On/Off

Apple ImageWriter LQ

Introduced in mid-to-late 1987, The ImageWriter LQ featured a maximum resolution of 320x216dpi. It also featured a serial interface and tractor feed, 4 color CMYK printing, a 15" platen width, optional multi-bin cut-sheet feeder (with envelope attachment) and AppleTalk co-processor and interface and memory buffer cards. It was known for its high price ($1,399?) and its tendency to melt the print-head on large, strike-heavy jobs.

DIP Switches

|SW1-12345678|SW2-12345678|
|----00000110|----000*0000|

* - (LocalTalk) Option Card On/Off

Power

Plug the printer in to a grounded outlet and make sure that you don't overload the electircal service circuit. Consult an electrician and the owner's manual for recommendations and power requirements, repspectively.

Data

Either a direct connection or a LocalTalk connector box (requires the optional Apple ImageWriter II/LQ LocalTalk Option co-processor card, with appropriate jumper settings) are supported.

NetBSD

In this guide we use NetBSD 9.0 (i386.)

Installation

Excellent (per-architecture) instructions already exist at the NetBSD website and, so, will not be covered here -- except to say that you should ensure you have enough free-space for the upcoming installation activities and also to make sure to install the pkgsrcs and that the network interface is configured.

Kernel Modification

Most versions (1 & 2) of the 3 ROM revisions in the ImageWriter II/LQ LocalTalk Option card have a bug in their DDP checksum calculation logic, so we gently and skillfully modify (read: brutally hack) the kernel to disable DDP checksum verification on a system-wide basis. Caveat emptor.

Get

Download and untar the source for the kernel so that a custom kernel can be compiled with the DDP checksum verification patch.

cd /
curl http://cdn.NetBSD.org/pub/NetBSD/NetBSD-9.0/source/sets/syssrc.tgz --output syssrc.tgz
tar xzf syssrc.tgz

Patch

Apply patch to the kernel source.

/usr/src/sys/netatalk/ddp_output.c:53

Configure

Create a custom kernel configuration.

cd /src/sys/arch/i386/conf
cp GENERIC NODDPCKSUM
config NODDPCKSUM
cd ../compile/NODDPCKSUM/

Compile

Compile the kernel with the modification.

make depend ; make

Install

Install the new kernel in the system.

mv /netbsd /netbsd-GENERIC
mv netbsd /netbsd

Reboot

shutdown -r now

Ghostscript

Ghostscript is a rendering engine for the PostScript and PDF page description languages. Certain older and more recent versions of Ghostscript contain a driver that supports all of Apple's dot matrix printers.

Install

Agree to the license

Review and agree to the gnu-agpl-v3.

echo "ACCEPTABLE_LICENSES=gnu-agpl-v3" >> /etc/pkg_install.conf

Fetch, untar, compile and install the source (and dependencies)

This took about 3 hours.

cd /usr/pkgsrc/print/ghostscript-agpl
make install

Test

Install a ribbon, power up the printer, load some paper and use either the direct or LocalTalk connection test below -- depending on your printer's capabilities or configuration. The command-lines are only for testing. After completing the CUPS section you'll be able to print with the click of a button.

Set Driver

Enter one of:
driver=appledmp # Apple Dot Matrix Printer
driver=iwlo # ImageWriter (15")
driver=iwhi # ImageWriter II
driver=iwlq # ImageWriter LQ

Set Resolution

Enter one of:
resolution=120x72 # Apple Dot Matrix Printer
resolution=160x72 # ImageWriter (15")
resolution=160x144 # ImageWriter II
resolution=320x216 # ImageWriter LQ

Set Paper Size

Enter one of:
paperSize=letter
paperSize=legal

Print - Direct Connection

gs -q -dBATCH -dNOPAUSE -sDEVICE=$driver -sPAPERSIZE=$paperSize -dFIXEDMEDIA -dPSFitPage -r$resolution -sOutputFile=$outFile $inFile
cat $outFile > $port

Print - LocalTalk (complete netatalk section, first.)

gs -q -dBATCH -dNOPAUSE -sDEVICE=$driver -sPAPERSIZE=$paperSize -dFIXEDMEDIA -dPSFitPage -r$resolution -sOutputFile=$outFile $inFile
pap -p $printerName:$printerType $outFile

Berkeley DB

netatalk has a dependency on Oracle's Berkeley DB (bdb) library, so you must compile and install bdb in order to use netatalk.

Obtaining the source

Download

You will have to register for an Oracle account (if you don't have one already) and agree to their Terms and Conditions in order to download from the BerkeleyDB downloads page.

Untar

cd /usr/local/src
tar zxf db-18.1.40.tar.gz

Agree to the License Agreement

Berkeley DB is free, but comes with conditions. Be sure to review the License Agreement to understand your usage terms and obligations.

Review

cd db-18.1.40
vi LICENSE
Read the license
:q

Build and Install

Configure

cd build_unix
../dist/configure

Make

make

Install

make install

netatalk

netatalk 2.x is both a set of kernel routines and userland programs that enable full interoperability with a wide range of AppleTalk network services, including file and print services. (netatalk 3.x is different and has a very specific TCP/IP-based file sharing focus.)

Obtaining the source

Download

Save to /usr/local/src.

Extract

cd /usr/local/src
tar xzf netatalk-2.2.6.tar.gz

Apply pap.c patch

The base netatalk pap(1) userland program has a bug that prevents it from working with the ImageWriter II and/or LQ in AppleTalk mode, so Carpentier Pierre-Francois' kakwa netatalk/pap.c patch must be used.

Download

Save to /usr/local/src.

Extract

cd /usr/local/src
unzip master.zip

Apply

rasterloop# diff netatalk-2.2.6/bin/pap/pap.c image-writer-master/bin/pap/pap.c
810,813c809,812
< if ( ((char *)rniov[ 0 ].iov_base)[ 0 ] != 0 ) {
< fprintf( stderr, "Bad status response!\n" );
< exit( 1 );
< }
---
> //if ( ((char *)rniov[ 0 ].iov_base)[ 0 ] != 0 ) {
> // fprintf( stderr, "Bad status response!\n" );
> // exit( 1 );
> //}
816,820c815,819
< if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_STATUS ||
< atpb.atp_rresiovcnt != 1 ) {
< fprintf( stderr, "Bad status response!\n" );
< exit( 1 );
< }
---
> //if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_STATUS ||
> // atpb.atp_rresiovcnt != 1 ) {
> // fprintf( stderr, "Bad status response!\n" );
> // exit( 1 );
> //}

Configuration

CFLAGS="-O0 -g"
(CPPFLAGS="-DEBUG")
./configure --with-bdb=$path --without-ldap --with-ssl-dir=no --enable-ddp --disable-cups --enable-debug --enable-debug1 --enable-debugging --enable-maintainer-mode

Compiling the source

Compiling

CUPS

pkg_add cups

Colophon

This guide lives at http://jmoyer.nodomain.net/admp/ and is hosted by NODOMAIN.NET, a private, hybrid cloud run by Josh Moyer <JMoyer@NODOMAIN.NET>.