Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!cbmvax!amiga!andy From: andy@amiga.UUCP (Andy Finkel) Newsgroups: net.micro.amiga Subject: Re: Printer Driver for Toshiba P1340 Message-ID: <1588@amiga.amiga.UUCP> Date: Wed, 29-Oct-86 10:38:11 EST Article-I.D.: amiga.1588 Posted: Wed Oct 29 10:38:11 1986 Date-Received: Fri, 31-Oct-86 01:54:32 EST References: <3117@ece-csc.UUCP> Reply-To: andy@skipper.UUCP (andy finkel) Organization: Commodore Business Machines, 1200 Wilson Drive, West Chester, PA 19380 Lines: 101 In article <3117@ece-csc.UUCP> mark@ece-csc.UUCP (Mark Lanzo) writes: >Questions, questions, and more questions... > >I have written a printer driver for a Toshiba P1340 printer. >It doesn't support all printer functions yet; mostly because I don't >know what some of the sequences are supposed to do. >For instance, what is the difference between "RESET" and "INITIALIZE" ? >("aRIN" and "aRIS" I believe are the correct names for these). -- My >driver treats these as the same for now. aRIS (reset) is the escape sequence to RESET the printer, using the manufacturer's reset code aRIN is the escape sequence to do a read from preferences printer selections. This sequence makes the printer state match preferences. This sequence also does a CR/LF. (Because most printers require this as part of the set margins commands.) Under V1.1, this command is issued automatically every time the printer is Opened. Under V1.2 this command is issued only the first time this printer is Opened. (If you change printers using preferences, or change one of the preference items that the printer is listening to, this command will be issued on the next Open, again) What is the "set normalization on" >sequence for? (I first thought that this pertained to justification, >but there are separate codes for that.) Etc. etc. Unfortunately I don't >have the manuals with me here else I would list all the sequences I don't >understand. > The Normalize escape sequence is cancel superscript/subscript modes, and if you've been using PLU or PLD commands, return the printer to the starting line. >My biggest question pertains to graphics dumps. When I print pictures, Dave (one of my co-conspirators on the printer.device) has given some hints already on this. >Another problem: >My DoSpecial seems to get called for a lot of functions where it shouldn't >be. There are entries in the command-table which do NOT contain any \377 >characters, but for which DoSpecial is still being called. I thought >DoSpecial was only supposed to be called for functions which couldn't be >handled through simple text substitution via the command-table. Yet >some entries in the command table work fine. > No, actually, dospecial is given a chance to override any of the commands, whether there is a \377 there, or not. The \377 is a place holder, which doesn't come up when dealing with printers. (At least, any of the ones we've hit so far. If one does come up, that sequence could be handled in dospecial, anyway.) >My last question is not about the driver per se, but is simply a request for >opinions on how to handle certain sequences: > >The P1340 unfortunately is not very smart in regards to different character >sets et al. It's a 24 pin printer which prints very nicely, particularly >when put into NLQ mode. However, it does not have italics or boldface, >although it does have underlining. The question is: how should I treat >requests for italics and other special fonts? My current solution is to >treat any request for italics/boldface/shadow-print/etc as a single >"standout" mode. If I am in draft-mode (non NLQ), I turn on NLQ mode, >which causes the text in "standout" mode to print as darker and more >distinct than the surrounding text. When all "standout" attributes are turned >off, I switch back to draft mode. If I'm already in NLQ mode, >there's nothing much I can do, so I just ignore the requests. I can't say >that I really like this arrangement, but I don't have any better ideas. >Suggestions? On the Amiga printer drivers, I decided to give what the printer was capable of...ie if a printer couldn't so italics I left that unimplemented. I also didn't mix NLQ modes in with the SGR commands...NLQ is really slow on some printers, and didn't help on those without italics (generally daisy wheel printers) anyway. > >Well, enough noise for now... thanks in advance for any help you'd care to >send. > > --- Mark --- andy finkel -- andy finkel Commodore(Amiga) {ihnp4|seismo|allegra}!cbmvax!andy or pyramid!amiga!andy Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors. "Remember, no matter where you grow, there you are." - Buckaroo Bonsai.