home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / nduk-v37.lha / V37 / include / devices / prtbase.i < prev    next >
Text File  |  1991-11-27  |  6KB  |  179 lines

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