home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / devices / prtbase.i < prev    next >
Text File  |  1993-10-15  |  6KB  |  177 lines

  1.    IFND  DEVICES_PRTBASE_I
  2. DEVICES_PRTBASE_I EQU    1
  3. **
  4. **    $VER: prtbase.i 1.9 (26.7.90)
  5. **    Includes Release 40.15
  6. **
  7. **    printer.device base structure definitions
  8. **
  9. **    (C) Copyright 1987-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.    IFND  EXEC_TYPES_I
  14.    INCLUDE  "exec/types.i"
  15.    ENDC
  16.    IFND  EXEC_NODES_I
  17.    INCLUDE  "exec/nodes.i"
  18.    ENDC
  19.    IFND  EXEC_LISTS_I
  20.    INCLUDE  "exec/lists.i"
  21.    ENDC
  22.    IFND  EXEC_PORTS_I
  23.    INCLUDE  "exec/ports.i"
  24.    ENDC
  25.    IFND  EXEC_LIBRARIES_I
  26.    INCLUDE  "exec/libraries.i"
  27.    ENDC
  28.    IFND  EXEC_TASKS_I
  29.    INCLUDE  "exec/tasks.i"
  30.    ENDC
  31.  
  32.    IFND  DEVICES_PARALLEL_I
  33.    INCLUDE  "devices/parallel.i"
  34.    ENDC
  35.    IFND  DEVICES_SERIAL_I
  36.    INCLUDE  "devices/serial.i"
  37.    ENDC
  38.    IFND  DEVICES_TIMER_I
  39.    INCLUDE  "devices/timer.i"
  40.    ENDC
  41.    IFND  LIBRARIES_DOSEXTENS_I
  42.    INCLUDE  "libraries/dosextens.i"
  43.    ENDC
  44.    IFND  INTUITION_INTUITION_I
  45.    INCLUDE  "intuition/intuition.i"
  46.    ENDC
  47.  
  48.  
  49.  STRUCTURE  DeviceData,LIB_SIZE
  50.     APTR dd_Segment          ; A0 when initialized
  51.     APTR dd_ExecBase          ; A6 for exec
  52.     APTR dd_CmdVectors          ; command table for device commands
  53.     APTR dd_CmdBytes          ; bytes describing which command queue
  54.     UWORD   dd_NumCommands    ; the number of commands supported
  55.     LABEL   dd_SIZEOF
  56.  
  57.  
  58. *------
  59. *------ device driver private variables ------------------------------
  60. *------
  61. du_Flags EQU   LN_PRI          ; various unit flags
  62.  
  63. ;------ IO_FLAGS
  64.     BITDEF  IO,QUEUED,4       ; command is queued to be performed
  65.     BITDEF  IO,CURRENT,5      ; command is being performed
  66.     BITDEF  IO,SERVICING,6    ; command is being actively performed
  67.     BITDEF  IO,DONE,7          ; command is done
  68.  
  69. ;------ du_Flags
  70.     BITDEF  DU,STOPPED,0      ; commands are not to be performed
  71.  
  72.  
  73. *------ Constants ----------------------------------------------------
  74. P_PRIORITY    EQU    0
  75. P_OLDSTKSIZE    EQU    $0800    ; stack size for child task (OBSOLETE)
  76. P_STKSIZE    EQU    $1000    ; stack size for child task
  77. P_BUFSIZE    EQU    256    ; size of internal buffers for text i/o
  78. P_SAFESIZE    EQU    128    ; safety margin for text output buffer
  79.  
  80. *------ pd_Flags ------
  81.    BITDEF   P,IOR0,0          ; IOR0 is in use
  82.    BITDEF   P,IOR1,1          ; IOR1 is in use
  83.    BITDEF   P,EXPUNGED,7      ; device to be expunged when all closed
  84.  
  85.  STRUCTURE  PrinterData,dd_SIZEOF
  86.     STRUCT  pd_Unit,MP_SIZE   ; the one and only unit
  87.     BPTR pd_PrinterSegment    ; the printer specific segment
  88.     UWORD   pd_PrinterType    ; the segment printer type
  89.     APTR pd_SegmentData       ; the segment data structure
  90.     APTR pd_PrintBuf          ; the raster print buffer
  91.     APTR pd_PWrite          ; the parallel write function
  92.     APTR pd_PBothReady          ; the parallel write function's done
  93.  
  94.     IFGT IOEXTPar_SIZE-IOEXTSER_SIZE
  95.     STRUCT  pd_IOR0,IOEXTPar_SIZE   ; port I/O request 0
  96.     STRUCT  pd_IOR1,IOEXTPar_SIZE   ;   and 1 for double buffering
  97.     ENDC
  98.  
  99.     IFLE IOEXTPar_SIZE-IOEXTSER_SIZE
  100.     STRUCT  pd_IOR0,IOEXTSER_SIZE   ; port I/O request 0
  101.     STRUCT  pd_IOR1,IOEXTSER_SIZE   ;   and 1 for double buffering
  102.     ENDC
  103.  
  104.     STRUCT  pd_TIOR,IOTV_SIZE       ; timer I/O request
  105.     STRUCT  pd_IORPort,MP_SIZE      ;   and message reply port
  106.     STRUCT  pd_TC,TC_SIZE           ; write task
  107.     STRUCT  pd_OldStk,P_OLDSTKSIZE  ;   and stack space (OBSOLETE)
  108.     UBYTE   pd_Flags                ; device flags
  109.     UBYTE   pd_pad            ; padding
  110.     STRUCT  pd_Preferences,pf_SIZEOF ; the latest preferences
  111.     UBYTE   pd_PWaitEnabled         ; wait function switch
  112. ;   /* new fields for V2.0 */
  113.     UBYTE   pd_Pad1            ; padding
  114.     STRUCT  pd_Stk,P_STKSIZE        ; stack space
  115.     LABEL   pd_SIZEOF               ; warning! this may be odd
  116.  
  117.     BITDEF  PPC,GFX,0        ;graphics (bit position)
  118.     BITDEF  PPC,COLOR,1        ;color (bit position)
  119.  
  120. PPC_BWALPHA    EQU    $00    ;black&white alphanumerics
  121. PPC_BWGFX    EQU    $01    ;black&white graphics
  122. PPC_COLORALPHA    EQU    $02    ;color alphanumerics
  123. PPC_COLORGFX    EQU    $03    ;color graphics
  124.  
  125. PCC_BW        EQU    1    ;black&white only
  126. PCC_YMC        EQU    2    ;yellow/magenta/cyan only
  127. PCC_YMC_BW    EQU    3    ;yellow/magenta/cyan or black&white
  128. PCC_YMCB    EQU    4    ;yellow/magenta/cyan/black
  129.  
  130. PCC_4COLOR    EQU    $4    ;a flag for YMCB and BGRW
  131. PCC_ADDITIVE    EQU    $8    ;not ymcb but blue/green/red/white
  132. PCC_WB        EQU    $9    ;black&white only, 0 == BLACK
  133. PCC_BGR        EQU    $a    ;blue/green/red
  134. PCC_BGR_WB    EQU    $b    ;blue/green/red or black&white
  135. PCC_BGRW    EQU    $c    ;blue/green/red/white
  136. ;    The picture must be scanned once for each color component, as the
  137. ;    printer can only define one color at a time.  ie. If 'PCC_YMC' then
  138. ;    first pass sends all 'Y' info to printer, second pass sends all 'M'
  139. ;    info, and third pass sends all C info to printer.  The CalComp
  140. ;    PlotMaster is an example of this type of printer.
  141. PCC_MULTI_PASS    EQU    $10    ;see explanation above
  142.  
  143.  STRUCTURE  PrinterExtendedData,0
  144.     APTR    ped_PrinterName   ; printer name, null terminated
  145.     APTR    ped_Init          ; called after LoadSeg
  146.     APTR    ped_Expunge       ; called before UnLoadSeg
  147.     APTR    ped_Open          ; called at OpenDevice
  148.     APTR    ped_Close         ; called at CloseDevice
  149.     UBYTE   ped_PrinterClass  ; printer class
  150.     UBYTE   ped_ColorClass    ; color class
  151.     UBYTE   ped_MaxColumns    ; number of print columns available
  152.     UBYTE   ped_NumCharSets   ; number of character sets
  153.     UWORD   ped_NumRows       ; number of 'pins' in print head
  154.     ULONG   ped_MaxXDots      ; number of dots maximum in a raster dump
  155.     ULONG   ped_MaxYDots      ; number of dots maximum in a raster dump
  156.     UWORD   ped_XDotsInch     ; horizontal dot density
  157.     UWORD   ped_YDotsInch     ; vertical dot density
  158.     APTR    ped_Commands      ; printer text command table
  159.     APTR    ped_DoSpecial     ; special command handler
  160.     APTR    ped_Render        ; raster render function
  161.     LONG    ped_TimeoutSecs   ; good write timeout
  162. ;------    the following only exists if the segment version is 33 or greater
  163.     APTR     ped_8BitChars    ;conversion strings for the extended font
  164.     LONG     ped_PrintMode    ;set if text printed, otherwise 0
  165. ;------    the following only exists if the segment version is 34 or greater
  166.     APTR    ped_ConvFunv    ; ptr to conversion function for all chars
  167.     LABEL   ped_SIZEOF
  168.  
  169.  STRUCTURE  PrinterSegment,0
  170.     ULONG   ps_NextSegment    ; (actually a BPTR)
  171.     ULONG   ps_runAlert       ; MOVEQ #0,D0 : RTS
  172.     UWORD   ps_Version        ; segment version
  173.     UWORD   ps_Revision       ; segment revision
  174.     LABEL   ps_PED            ; printer extended data
  175.  
  176.    ENDC
  177.