Subject: Re: enscript (nenscript)
To: Scott Jann <smj@risk.cs.umn.edu>
From: Monroe Williams <monroe@teleport.com>
List: port-mac68k
Date: 02/06/1996 18:25:47
Scott Jann writes:
>I seem to remember someone asking this before, but don't remember an 
>answer, has anyone gotten gs to print to a stylewriter (2400 
>specifically)? 

I'm working on a gs printer driver for the StyleWriter I.  I've already
done the hardest part -- figuring out the (AFAIK) undocumented codes to
control the printer, and the funky compression scheme used to send
bitmap data (thanks again, Apple!).  I currently have a MacOS program
(with all of the OS-specific serial stuff compartmentalized) that can
print a binary PBM file (generated with gs, of course :-) using just
the serial driver.  I also have a un*x program based on the same code
that looks like it should work.  The last time I tried it (before the
recent serial driver fixes to mac68k), it just didn't work, and I
didn't have the spare time to figure out why.  I intend to drag it out
and see if it will behave Real Soon Now (tm), but I'm looking for a few
pointers:

- Is there an example of another gs driver that needs _two-way_
	communication with the printer?  (The serial protocols the 
	StyleWriter uses are STRANGE.  No flow control is the least
	of it.)
- What's the best way to set up a printer driver that needs to run
	the serial port at 57600?  Last time I looked, lpd had a list
	of speeds supported in printcap entries, and 57600 wasn't in it.
- What's the best (or any) way to plug a printer driver into gs that
	needs to have the graphics rasterized (at 360dpi, if it matters) 
	before it can do anything with them?  I came up with a way that I 
	think will work, but it looks like a kludge to me, so I think 
	maybe I missed something.

As for a driver for the 2400, I'm not sure I can help you.  I figured
out the protocol for talking to the StyleWriter I by using MacsBug to
watch the data passing through the serial port while the Apple printer
drivers printed some simple pages.  I somehow doubt that the 2400
speaks the same language.  (I think even the StyleWriter II is
different enough to cause problems. :-P )  

Maybe, if I can get the driver I'm working on to behave, someone out
there with a 2400 could figure out the control codes and add support
for it.  Of course, I've already been thinking about getting a 2400 for
color capability.  Hmm...

-- monroe
------------------------------------------------------------------------
Monroe Williams                                      monroe@teleport.com