home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Read-Me1.3 / Printer1.3 / HowToCall < prev    next >
Encoding:
Text File  |  1988-08-02  |  24.2 KB  |  591 lines

  1.  
  2.            Programmer Notes on Calling the V1.3 Printer Device
  3.            ---------------------------------------------------
  4.  
  5.             by David Berezowski
  6.  
  7. The printer device has been exetensively revised under V1.3 of the Amiga 
  8. system software.  The following programmer's notes are presented to help
  9. you take full advantage of those changes in your application software.
  10. These notes assume that you are already familiar with how the printer
  11. device works - for more information, see the ROM Kernel manual.
  12.  
  13.  
  14. Arguments to DumpRPort
  15. ----------------------
  16.  
  17. io_Command      PRD_DUMPRPORT.
  18. io_RastPort     pointer to a RastPort - could be in fastmem.
  19. io_ColorMap     pointer to a ColorMap - could be your own custom one.
  20. io_Modes        the 'modes' flag from a ViewPort structure (you can fake
  21.                 it but the upper word is reserved and should be zero).
  22. io_SrcX            x offset into the RastPort to start printing from.
  23. io_SrcY            y offset into the RastPort to start printing from.
  24. io_SrcWidth     width of the RastPort to print from io_SrcX.
  25. io_SrcHeight    height of the RastPort to print from io_SrcY.
  26. io_DestCols     width of the printout in printer pixels.
  27. io_DestRows     height of the printout in printer pixels.
  28. io_Special      flag bits - these are explained below.
  29.  
  30.  
  31.  
  32. The Old Special Flags
  33. ---------------------
  34.  
  35. SPECIAL_MILROWS and SPECIAL_MILCOLS - the associated parameter is specified
  36. in thousandths of an inch on the printer;  ie. if DestCols = 8000, and
  37. DestRows = 10500 then the printout would be 8.000 x 10.500 inches.
  38.  
  39. SPECIAL_FULLROWS and SPECIAL_FULLCOLS - the specific dimension is set to the
  40. maximum possible as determined by the printer limits or the configuration
  41. limits, whichever is less.
  42.  
  43. SPECIAL_FRACROWS and SPECIAL_FRACCOLS - the associated parameter is taken 
  44. to be a longword binary fraction of the maximum for that dimension; ie. if
  45. SPECIAL_FRACCOLS is set and DestCols = 0x8000 then the width of the dumped
  46. picture would be 1/2 (0x8000 / 0xffff) the width of the paper.
  47.  
  48. SPECIAL_CENTER - the image will be automatically centered.
  49.  
  50. SPECIAL_ASPECT - one of the dimensions may be reduced or expanded to 
  51. preserve the aspect-ratio of the print.
  52.  
  53. SPECIAL_DENSITY (1-4) - see SPECIAL_DENSITY (1-7) under the new flags.
  54.  
  55. SPECIAL_TRUSTME - the printer specific driver is instructed to not issue a
  56. reset command before and after the dump.  If this flag is NOT checked by the
  57. printer specific driver then setting this flag has no effect.  Since we now
  58. recommend that printer driver writers no longer issue a reset command (ever)
  59. it is probably a good idea to always set this flag when calling for a dump.
  60.  
  61.  
  62. The New Special Flags
  63. ---------------------
  64.  
  65. SPECIAL_DENSITY1 to SPECIAL_DENSITY7 - Allows for a maximum of 7 print
  66. densities.  DENSITY1 is the lowest density and the default.  Any printer's
  67. actual density for each setting can be determined programatically using the
  68. SPECIAL_NOPRINT flag described below.  THESE FLAGS ARE NOW OBSOLETE AS THEY
  69. ARE OVERRIDDEN BY THE DENSITY SETTING IN PREFERENCES.  IF YOU WANT TO CHANGE
  70. THE DENSITY, REFER TO THE SECTION ON CHANGING THE PRINTER DEVICE'S COPY OF
  71. PREFERNCES.
  72.  
  73. SPECIAL_NOFORMFEED - Allows for the mixing of text and graphics or multiple
  74. graphic dumps on page oriented printers (usually laser jet printers).  When
  75. this flag is set the page will not be ejected after a graphic dump.  If you
  76. perform another graphic dump without this flag set OR close the printer device
  77. after printing text after a graphic dump, the page will be ejected.  This
  78. flag MUST be set if you are doing strip printing (covered later on in this
  79. article).
  80.  
  81. SPECIAL_NOPRINT - Performs internal calculations, doesn't print and exits.
  82. This gives the calling program a chance to see what the printer specific
  83. values are for any given density.  This is useful for determine the dot 
  84. density and the maximum dots the printer has for any given density.  
  85.  
  86. This option also computes the final print size, and sets 'io_DestCols' and
  87. 'io_DestRows' in the calling program's 'IODRPReq' structure.  This allows 
  88. the calling program to see what the final print size would be in printer 
  89. pixels.  Note that it modifies the 'io_DestCols' and 'io_DestRows' fields of
  90. your 'IODRPReq' structure.
  91.  
  92.  
  93.  
  94. Data Structures
  95. ---------------
  96.  
  97. The printer data structures can be read once you have opened the printer
  98. device. Below is a code fragment to show how to do this.
  99.  
  100.     #include <exec/types.h>
  101.     #include <devices/printer.h>
  102.     #include <devices/prtbase.h>
  103.  
  104.     struct IODRPReq PReq;
  105.     struct PrinterData *PD;
  106.     struct PrinterExtendedData *PED;
  107.  
  108.     /* open the printer device  if it opened... */
  109.     if (OpenDevice("printer.device", 0, &PReq, 0) == NULL) {
  110.  
  111.         /* get pointer to printer data */
  112.         PD = (struct PrinterData *)PReq.io_Device;
  113.  
  114.         /* get pointer to printer extended data */
  115.         PED = &PD->pd_SegmentData->ps_PED;
  116.  
  117.         /* let's see what's there */
  118.         printf("PrinterName = '%s', Version=%u, Revision=%u",
  119.             PED->ped_PrinterName, PD->pd_SegmentData->ps_Version,
  120.             PD->pd_SegmentData->ps_Revision,);
  121.  
  122.         printf("PrinterClass=%u, ColorClass=%u",
  123.             PED->ped_PrinterClass, PED->ped_ColorClass);
  124.  
  125.         printf("MaxColumns=%u, NumCharSets=%u, NumRows=%u",
  126.             PED->ped_MaxColumns, PED->ped_NumCharSets,
  127.             PED->ped_NumRows);
  128.  
  129.         printf("MaxXDots=%lu, MaxYDots=%lu, XDotsInch=%u,YDotsInch=%u",
  130.             PED->ped_MaxXDots, PED->ped_MaxYDots,
  131.             PED->ped_XDotsInch, PED->ped_YDotsInch);
  132.  
  133.         CloseDevice(&PReq); /* close the printer device */
  134.     }
  135.  
  136. If you want the user to be able to access printer preferences without actually
  137. having to run Preferences (like DPAINT II's printer requester does), then use
  138. the code fragment above to examine the current settings.  This can be done by
  139. refering to 'PD->pd_Preferences'.  Note that the printer device must already
  140. be opened at this point.  
  141.  
  142. Next, put up a requester and allow the user to change whatever parameters
  143. they choose.  Remember, you are responsible for range checking these
  144. selections.  Listed below are the printer preferences items and their valid
  145. ranges.
  146.  
  147.  
  148. Text Preferences
  149. ----------------
  150. PrintPitch          - PICA, ELITE, FINE.
  151. PrintQuality        - DRAFT, LETTER.
  152. PrintSpacing        - SIX_LPI, EIGHT_LPI.
  153. PrintLeftMargin     - 1 to PrintRightMargin.
  154. PrintRightMargin    - PrintLeftMargin to 999.
  155. PaperLength         - 1 to 999.
  156.  
  157. Graphic Preferences
  158. -------------------
  159. PrintImage      - IMAGE_POSITIVE, IMAGE_NEGATIVE.
  160. PrintAspect     - ASPECT_HORIZ, ASPECT_VERT.
  161. PrintShade      - SHADE_BW, SHADE_GREYSCALE, SHADE_COLOR.
  162. PrintThreshold  - 1 to 15.
  163. PrintFlags      - CORRECT_RED, CORRECT_GREEN, CORRECT_BLUE, CENTER_IMAGE,
  164.                   IGNORE_DIMENSIONS, BOUNDED_DIMENSIONS, ABSOLUTE_DIMENSIONS,
  165.                   PIXEL_DIMENSIONS, MULTIPLY_DIMENSIONS, INTEGER_SCALING,
  166.                   ORDERED_DITHERING, HALFTONE_DITHERING, FLOYD_DITHERING,
  167.                   ANTI_ALIAS, GREY_SCALE2.
  168. PrintMaxWidth   - 0 to 65535.
  169. PrintMaxHeight  - 0 to 65535.
  170. PrintDensity    - 1 to 7.
  171. PrintXOffset    - 0 to 255.
  172.  
  173.  
  174. Asynchronous IO
  175. ---------------
  176.  
  177. We recommend that you use asynchronous IO for printing in your programs and
  178. give the user a way of aborting all requests.  Here are the notes on the 
  179. recommended way to do this.
  180.  
  181. To send requests for IO:
  182.  
  183.     struct IORequest *ioreq;
  184.     struct MsgPort *port;
  185.     UBYTE signal;
  186.  
  187.     port = ioreq->io_Message.mn_ReplyPort;
  188.     signal = port->mp_SigBit;
  189.  
  190.     SendIO(ioreq); /* send request */
  191.     Wait(signal); /* wait for completion (go to sleep) */
  192.     while ((Msg = GetMsg(port)) != NULL) { /* get ALL messages */
  193.     }
  194.  
  195.  
  196. To abort a previous request for IO use:
  197.  
  198.     struct IORequest *ioreq;
  199.  
  200.     AbortIO(ioreq); /* abort request */
  201.     WaitIO(ioreq); /* wait for reply */
  202.     /* at this point you can re-use 'ioreq'. */
  203.  
  204.  
  205. In the code fragments above 'ioreq' could be any one of:
  206.  
  207.     a) struct IOStdReq    /* a standard i/o request */
  208.     b) struct IODRPReq    /* a dumprport i/i request */
  209.     c) struct IOPrtCmdReq /* a printer command i/o request */
  210.  
  211.  
  212. Strip Printing
  213. --------------
  214.  
  215. Strip printing is a technique which allows you to print a picture that
  216. normally requires lots of memory when you only have a little to spare.
  217. This trick works by creating a temporary rastport as wide as your source
  218. rastport but not as high.  You then render a horizontal strip of your source
  219. rastport into the temporary rastport and dump it, moving down your rastport
  220. for each dump. 
  221.  
  222. The height of the strip must be an integer multiple of the printer's NumRows
  223. if you are doing a non-aspect-ratio-corrected picture.  You can find NumRows 
  224. by checking PED->ped_NumRows with the code fragment shown above. 
  225.  
  226. If you are doing an aspect-ratio-corrected picture then you'll have to use 
  227. the SPECIAL_NOPRINT flag to find a DestRows that is an integer multiple of 
  228. NumRows.  You do this by varying your source height and asking for a 
  229. SPECIAL_NOPRINT dump until DestRows comes back with a number that is an 
  230. integer multiple of NumRows. 
  231.  
  232. Another consideration to keep in mind is that DestRows should also be
  233. evenly divisible by 4 since the printer device uses a 4x4 dither matrix.
  234. You only need to worry about this if you are doing a grey-scale or color
  235. dump as b&w dumps do not do any dithering.  Fortunately most printers have
  236. a NumRows that is evenly divisible by 4.
  237.  
  238. If you are going to do strip printing and you want SMOOTHING to work across
  239. strip boundaries, you must add a raster line above and below the actual area
  240. that you are printing.  The line above should be the last line from the
  241. previous strip.  The line below should be the first line from the next strip.
  242. Don't forget to omit the line above on the first strip, and the line below
  243. on the last strip.
  244.  
  245. So if your source data is 200 lines high and you are printing in strips of
  246. 50 lines (ie. 4 separate dumps), your strip rastport will need to be 52 
  247. lines high.  Below is one scenario for doing the dump:
  248.  
  249.         1st strip - copy source line 0 thru 50 (51 lines) to strip rastport
  250.                     lines 0 thru 50 (51 lines).
  251.  
  252.                   - io_SrcY = 0, io_Height = 50.
  253.  
  254.                   - here the printer device can see that there is no line
  255.                     above the first line to dump (since SrcY = 0) and that
  256.                     there is a line below the last line to dump (since we
  257.                     have a 52 line rastport and are only dumping 51 lines).
  258.  
  259.  
  260.         2nd strip - copy source line 49 thru 100 (52 lines) to strip rastport
  261.                     lines 0 thru 51 (52 lines).
  262.  
  263.                   - io_SrcY = 1, io_Height = 50.
  264.  
  265.                   - here the printer device can see that there is a line
  266.                     above the first line to dump (since SrcY = 1) and that
  267.                     there is a line below the last line to dump (since we have
  268.                     a 52 line rastport and are only dumping 50 lines).
  269.  
  270.         3rd strip - copy source line 99 thru 150 (52 lines) to strip rastport
  271.                     lines 0 thru 51 (52 lines).
  272.  
  273.                   - io_SrcY = 1, io_Height = 50.
  274.  
  275.                   - here the printer device can see that there is a line
  276.                     above the first line to dump (since SrcY = 1) and that
  277.                     there is a line below the last line to dump (since we
  278.                     have a 52 line rastport and are only dumping 50 lines).
  279.         
  280.         4th strip - copy source line 149 thru 199 (51 lines) to strip rastport
  281.                     lines 1 thru 51 (51 lines).
  282.  
  283.                   - io_SrcY = 2, io_Height = 50.
  284.  
  285.                   - here the printer device can see that there is a line
  286.                     above the first line to dump (since SrcY = 2) and that
  287.                     there is no line below the last line to dump (since we
  288.                     have a 52 line rastport and are dumping only 50 lines).
  289.              
  290.  
  291. Error Codes
  292. -----------
  293.  
  294. If an error comes back to you please try and relay this back to the user
  295. instead of simply not printing.  Current errors and descriptions are:
  296.  
  297.     PDERR_NOERR        /* clean exit, no errors */
  298.     PDERR_CANCEL        /* user canceled print */
  299.     PDERR_NOTGRAPHICS    /* printer cannot output graphics */
  300.     PDERR_INVERTHAM        /* OBSOLETE */
  301.     PDERR_BADDIMENSION    /* print dimensions illegal */
  302.     PDERR_DIMENSIONOVFLOW    /* OBSOLETE */
  303.     PDERR_INTERNALMEMORY    /* no memory for internal variables */
  304.     PDERR_BUFFERMEMORY    /* no memory for print buffer */
  305.  
  306.  
  307. 12 Bit Planes
  308. -------------
  309.  
  310. The V1.3 printer device can dump up to 12 bit planes of data from either 
  311. chip or fast memory; use this to your advantage.  Assume we are using a 
  312. package called YAD (Yet Another Digitizer) that captures data as 24-bit RGB
  313. files and displays them on the Amiga in HAM mode.  When YAD goes to print 
  314. it simply does a screen dump of the HAM image.  
  315.  
  316. Well we all know that the HAM image is only an approximation of the real 
  317. colors.  Wouldn't it be nice if YAD had an option whereby it would build 
  318. a 12-bit plane image in fastmem and dump that to the printer.  This would
  319. produce much better looking output as each pixel could be any 1 of 4096
  320. colors - with none of the HAM limitations!
  321.  
  322.  
  323. Large Bit Maps
  324. --------------
  325.  
  326. Another new feature you can exploit is the ability of the V1.3 printer 
  327. device to dump very large bitmaps from either chip or fast memory.
  328. Suppose we have an application called YART (Yet Another Ray Tracer) that 
  329. ray traces images to the screen in 320x400 resolution.  When YART goes to
  330. print it simply does a screen dump of the low res 320x400 screen.  We 
  331. could expand the printed image to a size of 1280x1600 but then each single
  332. screen pixel is expanded to a (rather chunky) 4x4 block of printer pixels.
  333.  
  334. Wouldn't it be nice if YART had an option that would allow us to create a
  335. 1280x1600 image in fastmem or on disk and then dump that.  This would 
  336. produce a very impressive picture as 1 source pixel would correspond to 1 
  337. printer pixel (ie. no jaggies)!
  338.  
  339.  
  340. Aspect Ratio
  341. ------------
  342.  
  343. When dumping a non-displayed rastport you have two choices for aspect-ratio
  344. correction.  You can either do it yourself or let the printer device do it
  345. for you.
  346.  
  347.         Doing it Yourself
  348.  
  349.         a) You must look at the printer's XDotsInch and YDotsInch and
  350.            account for the fact that the printer may not have square
  351.            pixels.  You can then ask for a non-aspect-ratio-corrected
  352.            dump; probably a 1:1 dump.
  353.  
  354.         Letting the Printer Device Do It
  355.  
  356.         a) You could build your rastport such that the dimensions are an
  357.            integer multiple of one the Amiga's normal display resolutions
  358.            and then set the io_Modes argument to an appropriate value.
  359.        
  360.            For example, if your rasport dimensions were 1280 x 800 (an even
  361.            multiple of 640 x 400) you would want to set io_Modes to
  362.            'LACE | HIRES'.  Now the normal aspect-ratio correction code
  363.            of the printer device will work correctly (if you turn it on).
  364.  
  365.         b) You could build an arbitrary sized rastport and set
  366.            GfxBase->NormalDPMX and GfxBaseNormalDPYM to the dimensions
  367.            of your rastport.  You would then ask for a aspect-ratio-corrected
  368.            dump and the printer device will figure it all out.  If you use
  369.            this option you must restore GfxBase->NormalDPMX and
  370.            GfxBaseNormalDPYM to their previous values after the dump. 
  371.  
  372.            I know that math scholars among you are probably saying,
  373.            'Hey, if I have a square rastport, can't I just set DPMX and DPMY
  374.            both to 1?'.  Mathematically this is correct BUT for mysterious
  375.            reasons DPMX and DPMY must always be >= 182.  So if you have a
  376.            a square rastport you can set DPMX and DPMY to 182.
  377.  
  378.  
  379. 12 Bit Planes and Large Bit Maps
  380. --------------------------------
  381.  
  382. Obviously the above two techniques require that the system have quite
  383. a bit of memory floating around; but they do have their uses.  Large bit maps
  384. can be utilized by paint, desktop publishing, CAD and ray tracing programs
  385. to produce printed output to the resolution of the output device.  Remember
  386. that the printer's resolution can be determined programatically by looking at
  387. the PED structure discussed earlier.  Twelve bit plane rastports can be used
  388. to produce printed output which exceeds the Amiga's HAM display limitation. 
  389. Combining these two techniques can give amazingly good printed output.
  390.  
  391.  
  392. Miscellaneous Items
  393. -------------------
  394.  
  395. There are two final items to consider when writing applications that use
  396. the new V1.3 printer device.  The first is, whenever the printer device 
  397. is opened it grabs a copy of Preferences.  For this reason, we  recommend
  398. that when you want to print you open the printer device, print, and close
  399. the printer device.  If you leave the printer device open you'll never 
  400. know about user changes to Preferences.
  401.  
  402. And finally, if your application is working in one bit plane (black&white)
  403. it is recommended that you perform a b&w (vs a grey-scale or color) dump 
  404. as they are the fastest.  Don't forget to set the threshold value.
  405.  
  406.                 Changes to the Printer Device for V1.3
  407.                 --------------------------------------
  408.                         by David Berezowski
  409.  
  410.  
  411.  
  412. One area of the Amiga system software that has been extensively revised
  413. under the V1.3 Workbench is the printer drivers.  The purpose of this 
  414. article is to summarize those changes. 
  415.  
  416.  
  417. User Enhancements
  418. -----------------
  419.  
  420.  
  421. 1. Speed - the V1.3 printer device is anywhere from 5 to 30 times faster
  422.            than the V1.2 printer device.  The speed increase depends on a
  423.            number of factors such as type of printer (ink-jet, dot matrix, 
  424.            or thermal transfer), shade of picture (bw, grey-scale or color),
  425.            aspect of picture (horizontal or vertical), amount of white-space
  426.            and color in the picture, and the type of printer driver (V1.3 
  427.            printer drivers are much faster than their V1.2 counterparts).
  428.            In general the speed of printouts is now printer or IO bound and
  429.            not CPU bound.
  430.  
  431. 2. Center  - the printer device now automatically centers the picture if 
  432.              the flag 'SPECIAL_CENTER' is turned on in io_Special or if 
  433.              the user has turned on the Center gadget in Preferences. 
  434.  
  435. 3. Density - graphics print density is now user selectable.
  436.  
  437.            - all printer drivers support multiple densities if the
  438.              printer has them.
  439.  
  440. 4. Dithering - there are now three user selectable dithering modes.
  441.  
  442. 5. Scaling   - the scaling method is now user selectable.
  443.  
  444. 6. Smoothing - this provides smoothing of diagonal lines.
  445.  
  446. 7. Left Offset - the left offset may now be exactly defined by the user.
  447.  
  448. 8. Color Correction - this provides a closer matching of screen colors 
  449.                       to printer colors.
  450.  
  451. 9. Height and Width - printout height and width may now be exactly defined
  452.                       by the user.
  453.  
  454. 10. HAM pictures - these can now be printed from any valid starting x
  455.                    position as as opposed to the previous limitation of
  456.                    starting from an x position of 0.  Inverted HAM pictures
  457.                    are now supported as well.
  458.  
  459. 11. Preferences -  there are a new set of Preferences selections for the
  460.                    printer device.  Refer to the article on V1.3 Preferences
  461.                    for a detailed explanation.
  462.  
  463.  
  464.  
  465. Programmer Enhancements
  466. -----------------------
  467.  
  468. 1. Multi-pass    - printers which require multiple passes of the color info
  469.                    (such as the CalComp_ColorMaster) are now supported via a
  470.                    new ColorType of 'PCC_MULTI_PASS' and a new 'case 6' in
  471.                    the render.c file.
  472.  
  473. 2. Page Ejection - a new flag called 'SPECIAL_NOFORMFEED' has been added to
  474.                    accommodate page oriented printers like the H-P LaserJet
  475.                    and the CalComp_ColorMaster .  This flag allows the mixing
  476.                    of text and graphics modes on the same page.
  477.  
  478. 3. Density - a new flag called 'SPECIAL_NOPRINT' has been added to allow the
  479.              calling program to see the effect of changing the density 
  480.              without actually doing a dump.
  481.  
  482. 4. PrintSize - a new flag called 'SPECIAL_NOPRINT' has been added to allow
  483.                the calling program to see the final width and height (in
  484.                printer pixels) of the printed picture without actually
  485.                doing a dump.
  486.  
  487. 5. Overflow - the error 'PDERR_DIMENSIONOVFLOW' is now obsolete.  In the 
  488.               past if a dump was requested that was larger than the 
  489.               printer's capabilities, this error would be returned.  Now the
  490.               driver gives you a dump as large as possible while keeping it
  491.               within the printer's capabilities.
  492.  
  493. 6. Query status - a new command 'PRD_QUERY' has been added which returns the
  494.                   IO status of the printer.  See the autodoc description at
  495.                   the end of this article.
  496.  
  497.  
  498.  
  499. Bug Fixes
  500. ---------
  501.  
  502. 1. There is no longer a memory loss when aborting - via AbortIO - an
  503.    asynchronous printer request.  In particular, aborts from DPaint II 
  504.    no longer lose any memory.
  505.  
  506. 2. The rounding error in the MILROW/MILCOL calculations is corrected.
  507.  
  508. 3. The printer device can now support very large source/destination sizes 
  509.    and large dot densities.  This means that a 2048 x 2048 rastport could be
  510.    dumped to a 8.0 x 10.0 inch picture with 600 x 600 dpi. (ie. 2048 x 2048
  511.    source picture to a 4800 x 6000 destination size).
  512.  
  513. 4. The calculation for the intensity of black on grey scale printouts was
  514.    slightly in error.  It had 1/256 too much green and 1/256 too little
  515.    blue in it.
  516.  
  517. 5. The V1.2 release was limited to working with a maximum of 8 bitplanes.
  518.    This release is now able to go up to 12 bitplanes which allows one
  519.    to have a rastport with all of the 4096 colors in it.  We have
  520.    successfully created and printed a 12 bitplane rastport here at CBM.
  521.  
  522. 6. The alpha command 'word center' has been fixed.  This has never worked.
  523.  
  524. 7. An IO bug which has been present since the V1.0 release has finally been
  525.    fixed.  This bug occurred when an AbortIO/WaitIO was followed immediately
  526.    by a DoIO or SendIO using the same IO request that was aborted.  The
  527.    abort would never succeed and the DoIO or SendIO command would probably
  528.    not get executed.  This is the final known bug with respect to aborting
  529.    or canceling requests.
  530.  
  531. 8. The aJFY3 (letter space justify) and aJFY1 (word fill / auto center)
  532.    commands have never been sent to the printer.  They now are when
  533.    all justification (left, right, or full) is off.
  534.  
  535. 9. All printer drivers no longer issue a linefeed when told to initialize
  536.    the printer.  This has been a bug since the original V1.0 software.
  537.  
  538. 10. A 'case 5' render call is now made when the printer device is opened.
  539.    This allows the printer driver to initialize the fields MaxXDots, MaxYDots,
  540.    XDotsInch, YDotsInch, MaxColumns, etc. based on the density setting.
  541.  
  542.  
  543.  
  544. ******* printer.device/Query ****************************************
  545. *
  546. *   NAME
  547. *   Query - query printer port/line status
  548. *
  549. *   FUNCTION
  550. *   This command returns the status of the printer port's lines and registers.
  551. *   Since the printer port uses either the serial or parallel port for IO,
  552. *   the actual status returned is either the serial or parallel port's status.
  553. *
  554. *   IO REQUEST
  555. *   io_Message  mn_ReplyPort set if quick IO is not possible
  556. *   io_Device   preset by the call to OpenDevice
  557. *   io_Command  PRD_QUERY
  558. *   io_Data     ptr to 2 UBYTES where result will be stored.
  559. *
  560. *   RESULTS
  561. *     io_Data          BIT  ACTIVE  FUNCTION (SERIAL DEVICE)
  562. *
  563. *             LSB       0    low    reserved
  564. *                       1    low    reserved
  565. *                       2    low    reserved
  566. *                       3    low    Data Set Ready
  567. *                       4    low    Clear To Send
  568. *                       5    low    Carrier Detect
  569. *                       6    low    Ready To Send
  570. *                       7    low    Data Terminal Ready
  571. *             MSB       8    high   read buffer overflow
  572. *                       9    high   break sent (most recent output)
  573. *                      10    high   break received (as latest input)
  574. *                      11    high   transmit x-OFFed
  575. *                      12    high   receive x-OFFed
  576. *                   13-15           reserved
  577. *
  578. *
  579. *     io_Data          BIT  ACTIVE  FUNCTION (PARALLEL DEVICE)
  580. *
  581. *                       0     low    printer selected
  582. *                       1     low    paper out
  583. *                       2     hi     printer in busy toggle (offline)
  584. *                       3      -     read=0, write=1
  585. *                     4-7            reserved
  586. *
  587. *     io_Actual       1-parallel, 2-serial
  588. *
  589. **********************************************************************
  590.  
  591.