home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 1036.dms / 1036.adf / PrtDrvGen / PDG.doc < prev    next >
Text File  |  1977-12-31  |  10KB  |  234 lines

  1. PrtDrvGen 2.2b / Jørgen Thomsen 20-May-1987
  2. ===========================================
  3.  
  4. The PrtDrvGen program must be run from the CLI and it will use files
  5. located in the current directory.
  6.  
  7. There are no command line parameters for the PrtDrvGen.
  8. The PrtDrvGen is the user interface which will generate an ASCII parameter
  9. file used as input to the PrtDrvGen2 program, which is basically the same
  10. program as the version 1.1 PrtDrvGen.
  11.  
  12. When the PrtDrvGen terminates it will optionally execute PrtDrvGen2. You
  13. may run PrtDrvGen2 yourself by executing PrtDrvGen2 <printer name>, but
  14. there should be no need for that (at least not on a 512K Amiga).
  15.  
  16. Always remember to hit RETURN after changing or entering a printer command
  17. string. If you don't do that the changed string will not be stored.
  18.  
  19. Never embed the SPACE character in the driver name.
  20.  
  21. If you select the "Save parameters only" option when quitting the program,
  22. the headers as well as the actual parameter strings will be written to the
  23. ".dat" file. Use this if you want to print the ".dat" file.
  24.  
  25. Compulsory parameters
  26. =====================
  27.  
  28. The Sample.dat file contains parameters for the NEC CP6 (P6,P7,CP7,P5XL)
  29. printers (Epson compatible).
  30.  
  31. The parameters concerning the text output of the driver are 1-3 and 6-226
  32. (130-226 define the extended ASCII characters, which you may not need in
  33. the first place. If not, specify zero in 130).
  34. For text you must as a minimum set the parameters 3, 6-13, 16-17, 20-21,
  35. 24-25, 28-29, 45-46, 130. Next set 44, 58, 60, 68, 98-99, 108.
  36.  
  37. Most of the remaining parameters concern the graphics. Parameters 230-257
  38. repeat as 258-285, 286-313 and 314-341 because of the possibility of 4
  39. different graphics modes. In the following only reference to parameters
  40. in the range 230-257 is made, but it applies to all four sets.
  41.  
  42. For graphics you must as a minimum set parameters 227, 230, 232, 234-239,
  43. 247, 253, but study carefully your printer manual and the parameters not
  44. mentioned here.
  45.  
  46. Use parameter 242 (270, 298, 326) to modify the aspect ratio of the picture,
  47. making it more or less compressed vertically.
  48.  
  49.  
  50. Shareware contribution
  51. ======================
  52.  
  53. The size of the driver when loaded into memory is around 14500 bytes, which
  54. is less than the file size displayed by the List command. This is due to the
  55. loader information also contained in the file, but not loaded into memory.
  56.  
  57. In case you want to make a smaller driver and/or a driver without graphics,
  58. you should use one of the special PrtDrv.lod files supplied on the 
  59. diskette you will receive upon a full shareware contribution.
  60.  
  61.    PrtDrv_0.lod          driver with complete functions
  62.    PrtDrv_1.lod          no graphics, for daisy-wheel printers
  63.    PrtDrv_2.lod          no vectorization of the picture possible
  64.  
  65. To use one of these drivers
  66.  
  67.    Copy PrtDrv_n.lod To PrtDrv.lod       (n = 0,1,2)
  68.  
  69. before you run the programs.
  70.  
  71. Included on this diskette are the sources for the driver, so you may modify
  72. and optimize it especially for your printer. Also included is the source for
  73. the AssignPRT program, the Fmt (a simple text formatter/printer command
  74. executer e.g. "Fmt \ff" for a form feed or "Fmt \RIN" for resetting the
  75. printer to Preferences values).
  76.  
  77. Also included is the PRoff text formatter (PD software) as well as
  78. parameter files for several printers and a DeluxePaint template
  79. for making very nice diskette labels (the AssignPRT command is very handy
  80. here for printing several labels quickly). Disk space permitting other useful
  81. PD utilities I write (or find) will be included.
  82.  
  83.  
  84. Printer command parameters and the ^p and ^d parameters
  85. =======================================================
  86.  
  87.    The driver allows you access to 8 parameters/values accessed by a
  88.    ^p or ^d parameter.
  89.    Parameters ^p0 - ^p3 (^d0 - ^d3) are the ones provided with the Amiga
  90.    printer command, if any.
  91.    Parameter ^p4 - ^p7 (^d4 - ^d7) are internal values.
  92.  
  93.    These ^p and ^d parameters allow you to transfer data from
  94.          a) the standard Amiga printer commands with parameters
  95.          b) the internal variables of the driver
  96.    to the printer commands you want to send to your printer.
  97.  
  98.    A simple example is the SLRM command (Set Left Right Margin):
  99.  
  100.    If you want to set the margins to 5 and 75 you issue the command
  101.  
  102.                          ESC[5;75s
  103.  
  104.    We assume, that your printer understands this command, so you would
  105.    specify the following in the SLRM command field in PrtDrvGen:
  106.  
  107.                          ^[[^d0;^d1s
  108.  
  109.    The actual string sent to the printer would be
  110.  
  111.                          ESC[005;075s
  112.  
  113.    "^[" are just another way of specifying the ESC character
  114.    which prefixes all the Amiga printer commands.
  115.  
  116.    You will notice, that the ^d0 is the first parameter in the Amiga printer
  117.    command, the ^d1 the following etc.
  118.    If you specified ^p0 and ^p1, the ^p0 would be replaced by one binary
  119.    byte of value 5 and ^p1 by one binary byte of value 75.
  120.  
  121.    The value range of these parameters is 0 - 255 (one byte), but internally
  122.    in the driver they are stored as 16 bit signed integers (-32768 - 32767),
  123.    which you might be able to exploit in connection with the ^a and ^s para-
  124.    meters. The ^d parameter will consider the value an unsigned 16 bit
  125.    integer.
  126.  
  127.    The parameters available for inclusion into the printer commands are
  128.    specified for each parameter in PrtDrvGen. If no parameters are mentioned
  129.    it means that the value of the "^p" and "^d" parameters are undefined for
  130.    parameters 0 - 3. The parameters 4 - 7 will have the value last stored in
  131.    them.
  132.  
  133.    Use the ^f0^nnn parameter to specify the format of the string generated
  134.    by the ^d command, if the default of 3 decimal digits does not suit your
  135.    needs. To insert a 2 hexadecimal digit string use ^f0^242  (242 octal =
  136.    162 decimal, sorry about the octal, but use PrtDrvGens gadgets to
  137.    convert) to specify the base 16 two digit format.
  138.  
  139.  
  140. The graphics data
  141. =================
  142.  
  143. To clarify the parameters for storing dots in the buffer the following
  144. figure of one pass (line) of a print head is presented:
  145.  
  146.            X ->
  147.         Y  0
  148.         0  :::::::::::::::::::::::::::::::::::
  149.            :::::::::::::::::::::::::::::::::::
  150.            :::::::::::::::::::::::::::::::::::
  151.            :::::::::::::::::::::::::::::::::::
  152.  
  153. The dots may be stored in consecutive bytes as
  154.  
  155.  a) Column by column, left to right
  156.     Byte 1: [(0,0), (0,1), (0,2) .... (0,7)]  Byte 2: [(1,0),  (1,1)...]
  157.  
  158.  b) Column by column, right to left
  159.     Byte 1: [(0,7), (0,6), (0,5) .... (0,0)]  Byte 2: [(1,7),  (1,6)...]
  160.  
  161.  c) Row by row, left to right
  162.     Byte 1: [(0,0), (1,0), (2,0) .... (7,0)]  Byte 2: [(8,0),  (9,0)...]
  163.  
  164.  d) Row by row, right to left
  165.     Byte 1: [(7,0), (6,0), (5,0) .... (0,0)]  Byte 2: [(15,0), (14,0)...]
  166.  
  167.  
  168.   The parameters available for inclusion by the ^p, ^d, and ^w commands when
  169.   writing graphics are the following:
  170.  
  171.     Parameter "0-1"     Parameter "2-3"
  172.     [xxxxxxxx xxxxxxxx] [xxxxxxxx xxxxxxxx]
  173.       ^p0       ^p1         ^p2      ^p3        binary bytes
  174.       ^d0       ^d1         ^d2      ^d3        x digit bytes
  175.       ^w0                   ^w2                 x digit words
  176.  
  177.     Parameter "0-1" = ^p0 * 256 + ^p1 = ^w0
  178.  
  179.  Using the driver
  180.  ================
  181.  
  182.  The AmigaDOS printer device code and the printer specific code (printer
  183.  drivers) will not be loaded into memory until the first output operation
  184.  to the printer is performed. You may experience, that after this load
  185.  nothing happens. This is most likely caused by the driver not getting
  186.  enough contiguous memory for its buffers or because the margins specified
  187.  in Preferences are too narrow for the picture to be printed.
  188.  
  189.  The code of this driver is due to the added features larger than most
  190.  other drivers, but it will in case of memory shortage reduce its memory
  191.  requirements and execute in a slower mode. If sufficient contiguous memory
  192.  is still not available, it will print the string "No mem" on the printer
  193.  and a hexadecimal number specifying the amount of memory requested to
  194.  inform you about this.
  195.  
  196.  You may avoid this by setting margins narrower with Preferences. That will
  197.  produce a smaller picture, but it will reduce the memory requirements.
  198.  You may also choose to print with less density, if your printer supports
  199.  more than a single dots-per-inch mode.
  200.  
  201.  Some people claim that the PrtDrvGen driver is much slower than its
  202.  WorkBench counterparts. My own tests show it to be 1.3 times slower than
  203.  the Epson driver (120x72 DPI). This is caused by its generic nature which
  204.  prevents optimizing it for a specific printer. If you run comparison tests
  205.  then make sure that you are comparing the same dots per inch densities.
  206.  
  207.  
  208. Redirection of PRT: output to file
  209. ==================================
  210.  
  211.  When you use the supplied AssignPRT program to redirect PRT: output to a
  212.  file, then remember that the connection between AssignPRT and the driver
  213.  occurs when the program using the PRT: opens that device. The correct
  214.  sequence of operations would be
  215.  
  216.    RUN AssignPRT PrtFile
  217.    <run your program>
  218.  
  219.  The AssignPRT will no longer terminate by itself when the PRT: device is
  220.  closed, but it must be terminated by typing CTRL-C or the command
  221.  "Break 6 c" if the AssignPRT runs as CLI task 6 (see by issuing the
  222.  "Status" command).
  223.  
  224.  
  225. Support
  226. =======
  227.  
  228. I will make no promises to support the PrtDrvGen (especially not to
  229. those people who find it proper to call me and solicit support without
  230. submitting any Shareware contribution). However, I will do it to a certain
  231. extent on Compuserve and Plink anyway. Until around 15-Sep-1987 I will run
  232. a part time BBS at (918) 250-1600 0:00 AM - 7:00 AM CST and from about
  233. 15-Oct-1987 it will operate at 011-45-1-378727 5:00 PM - 0:00 AM CST.
  234.