home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 029.lha / Printer_DRV_Generator / PDG.doc < prev    next >
Text File  |  1987-04-02  |  9KB  |  221 lines

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