Xref: utzoo comp.sys.ibm.pc:32515 comp.periphs:1990 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!adam.pika.mit.edu!scs From: scs@adam.pika.mit.edu (Steve Summit) Newsgroups: comp.sys.ibm.pc,comp.periphs Subject: Dot-matrix Graphics on Various Printers Keywords: dot-matrix graphics, NEC Pinwriter, Diconix, Epson, IBM QuietWriter Message-ID: <13208@bloom-beacon.MIT.EDU> Date: 2 Aug 89 13:14:16 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: scs@adam.pika.mit.edu (Steve Summit) Distribution: usa Lines: 67 I have written a few programs to do dot-matrix graphics on an NEC P6 Pinwriter, and I now have occasion to get these programs working on two other printers, neither of which I have documentation for. I believe that the P6 implements a superset of some de-facto standard "Epson" escape codes. The problem is that I don't really know which codes I'm using are "standard" and likely to work on most PC printers, and which are NEC extensions. The two printers I'm interested in expanding to first are a dinky little Diconix (ink jet, apparently, manufactured by Kodak) and an IBM QuietWriter. It appears that the Diconix accepts many of the codes I've been using (albeit at a different resolution); I know nothing about the QuietWriter. The escape sequences I've been using are ESC 3 n set line spacing in 180ths FS 3 n set line spacing in 360ths ESC \ n1 n2 horizontal motion ESC K n1 n2 bitmap graphics, 60 dpi ESC * m n1 n2 bitmap graphics, programmable resolution ESC x n set letter-quality/draft mode ESC P set 10 cpi pitch ESC 2 set 6 lpi ESC 0 set 8 lpi So far, as long as I stay away from ESC \ and FS 3 (which don't work), I can get my plots to come out on the Diconix, except that the resolution isn't 60dpi (the plots are smaller than I expect). Is there a better way to move horizontally (other than explicit spaces)? What's the story on resolution? Can a QuietWriter do graphics? Does it accept escape sequences anything like the ones above? Is there an extra escape sequence to put it in graphics (Epson emulation?) mode? (The one screen dump program I tried didn't work.) Ideally, I'd like to target whatever de-facto standards there are for PC dot-matrix graphics, rather than tailoring my software for each new printer I have occasion to use. If anyone has any suggestions on how best to achieve this, I'd be interested to hear them. (The various screen dump programs seem to do pretty well at driving arbitrary printers, so there must be some standards or subsets which are widely accepted.) One other question, in case I've reached any PC printer graphics gurus: is there a decent solution to what I call the bitmap 26 problem? You can't send an ASCII 26 (0x1A) to device PRN, because it's a control-Z, and DOS, in its infinite wisdom, looks for it going by and, in the process of thinking it's an end-of- file, deletes it and (apparently) the following character. This wreaks havoc with the bitmap being output. Right now, I'm examining every byte in every bitmap I send out and if it's a 26, toggling a random bit (!) just to keep things from getting garbaged up. (I could explicitly use the BIOS printer interrupt, which sends control-Z's through unmolested, but I prefer to create my graphics in regular files which can be spooled with the PRINT command, etc.) Please reply by mail, if possible, since I don't really follow these newsgroups. ("If possible" refers to the fact that mail into adam is, alas, unreliable.) Steve Summit scs@adam.pika.mit.edu