home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / include / mondello / davinci.h < prev    next >
C/C++ Source or Header  |  1996-05-27  |  28KB  |  744 lines

  1. /******************************************************************************
  2. *
  3. *   Module:     DAVINCI.H       DaVinci Specific Define Module
  4. *
  5. *   Revision:   1.00
  6. *
  7. *   Date:       September 26, 1995
  8. *
  9. *   Author:     Goran Devic
  10. *
  11. *******************************************************************************
  12. *
  13. *   Module Description:
  14. *
  15. *       This module contains DaVinci board Rev B specific defines and
  16. *       macros for microcode.
  17. *
  18. *******************************************************************************
  19. *
  20. *   Changes:
  21. *
  22. *    DATE     REVISION  DESCRIPTION                             AUTHOR
  23. *  --------   --------  -------------------------------------------------------
  24. *  09/26/95     1.00    Original                                Goran Devic
  25. *
  26. ******************************************************************************/
  27. #ifndef __DAVINCI__
  28. #define __DAVINCI__
  29.  
  30. #include "type.h"
  31.  
  32. /******************************************************************************
  33. *
  34. *  Display Context structure definition
  35. *
  36. ******************************************************************************/
  37.  
  38. typedef struct StructDC
  39. {
  40.     DWORD * pdwBoardPtr;        /* Pointer to the first meg of DaVinci board */
  41.     DWORD * pdwBoardPtr2;       /* Pointer to the second meg                 */
  42.     DWORD * pdwDLbuild;         /* Ptr for building the display list         */
  43.     
  44.     DWORD   dwTotalMemory;      /* Amount of private memory installed (Kb)   */
  45.     WORD    wResolution;        /* Graphics mode that is set                 */
  46.     WORD    wColors;            /* Color mode that is set                    */
  47.  
  48.     WORD    wErrorCode;         /* Error code of the last error              */
  49.  
  50.     BYTE    bQuality;           /* Speed/Quality dial variable               */
  51.     BYTE    bPing;              /* Execution display list toggle             */
  52.  
  53. /*    LL_DisplayContext UserInfo; */ /* User relevant information about the state */
  54.                                 /* of the graphics engine                    */
  55.  
  56. } TypeDC;
  57.  
  58. extern TypeDC DC;               /* The system wide Display Context           */
  59.  
  60.  
  61. /******************************************************************************
  62. *
  63. *  System defines that are not relevant to the users
  64. *
  65. ******************************************************************************/
  66.  
  67. /* The last error number (they start with 0 and have contigous numbers)      */
  68. #define LL_LAST_ERR     LLE_SYSTEM
  69.  
  70. /* The last operation code (they start with 0 and have contigous numbers)    */
  71. #define LL_LAST_OP      LL_SET_DISPLAY_PAGE
  72.  
  73.  
  74. /******************************************************************************
  75. *
  76. *  Opcode definition for microinstructions
  77. *
  78. ******************************************************************************/
  79.  
  80. #define BLUE_BANK               0x00000008
  81. #define GREEN_BANK              0x00000080
  82. #define RED_BANK                0x00000800
  83.  
  84. #define VECTF1P                 0x00008004
  85. #define VECTH1P                 0x02008004
  86. #define VECTF2PF                0x00408004
  87. #define VECTH2PF                0x02408004
  88. #define VECTF2P                 0x00808004
  89. #define VECTH2P                 0x02808004
  90. #define VECTF3P                 0x00C08004
  91. #define VECTH3P                 0x02C08004
  92. #define VECTFZ2P                0x04800006
  93. #define VECTHZ2P                0x06800006
  94. #define VECTFZ3P                0x04C00006
  95. #define VECTHZ3P                0x06C00006
  96. #define VECTFZG2P               0x0C800008
  97. #define VECTHZG2P               0x0E800008
  98. #define VECTFZG3P               0x0CC00008
  99. #define VECTHZG3P               0x0EC00008
  100.  
  101. #define PVECTF1P                0x00008080
  102. #define PVECTH1P                0x02008080
  103. #define PVECTF2PF               0x00408080
  104. #define PVECTH2PF               0x02408080
  105. #define PVECTF2P                0x00808080
  106. #define PVECTH2P                0x02808080
  107. #define PVECTF3P                0x00C08080
  108. #define PVECTH3P                0x02C08080
  109. #define PVECTFZ2P               0x04800080
  110. #define PVECTHZ2P               0x06800080
  111. #define PVECTFZ3P               0x04C00080
  112. #define PVECTHZ3P               0x06C00080
  113. #define PVECTFZG2P              0x0C800080
  114. #define PVECTHZG2P              0x0E800080
  115. #define PVECTFZG3P              0x0CC00080
  116. #define PVECTHZG3P              0x0EC00080
  117.  
  118. #define POLYF1P                 0x1000800C
  119. #define POLYH1P                 0x1200800C
  120. #define POLYF2PF                0x1040800C
  121. #define POLYH2PF                0x1240800C
  122. #define POLYF2P                 0x1080800C
  123. #define POLYH2P                 0x1280800C
  124. #define POLYF3P                 0x10C0800C
  125. #define POLYH3P                 0x12C0800C
  126. #define POLYFZ2P                0x1480000E
  127. #define POLYHZ2P                0x1680000E
  128. #define POLYFZ3P                0x14C0000E
  129. #define POLYHZ3P                0x16C0000E
  130. #define POLYFZG2P               0x1C800010
  131. #define POLYHZG2P               0x1E800010
  132. #define POLYFZG3P               0x1CC00010
  133. #define POLYHZG3P               0x1EC00010
  134. #define POLYFZGA2P              0x18800012
  135. #define POLYHZGA2P              0x1A800012
  136. #define POLYFZGA3P              0x18C00012
  137. #define POLYHZGA3P              0x1AC00012
  138.  
  139. #define BLTF                    0x2040c004
  140. #define BLTZ                    0x21408004
  141. #define BLTFZ                   0x23400004
  142. #define BLTH                    0x2240c005
  143. #define BLTFF                   0x2480c005
  144. #define BLTFH                   0x2280c005
  145. #define BLTZH                   0x2180c005
  146. #define BLTHH                   0x2680c005
  147. #define BLTHF                   0x2C80c005
  148. #define BLTHZ                   0x2D808005
  149. #define BLTHFZ                  0x28C00000
  150. #define PBLTHFZ                 0x29C00000
  151. #define BLTHHZ                  0x2AC00000
  152. #define PBLTHHZ                 0x2BC00000
  153. #define BLTSS                   0x3580c080
  154. #define BLTSC                   0x3EC0c080
  155.  
  156. #define LOAD_SHORT              0x80000000
  157. #define LOAD_LONG               0xC0000080
  158. #define SNOP                    0x8F000000
  159.  
  160. #define STORE                   0x60000000
  161. #define RETURN                  0x40000000
  162. #define BRANCH                  0x41000000
  163. #define CALL                    0x42000000
  164. #define START                   0x43000000
  165. #define IDLE                    0x44000000
  166. #define WAIT                    0x45000000
  167. #define INTOUT                  0x46000000
  168. #define CLEAR                   0x57000000
  169. #define FLUSH                   0x5F000000
  170.  
  171. #define NFIELD_LSHIFT           16
  172. #define ZFIELD_LSHIFT           14
  173. #define MFIELD_LSHIFT           8
  174. #define REG_LSHIFT              24
  175.  
  176. /***************************************************************************
  177.  *
  178.  *  Parameter definitions for opcodes
  179.  */
  180.  
  181. /* NFIELD OPTIONS */
  182. /* option 1 */
  183. #define         SRCA_PATB       0x00        /* alu isrc a/pattern b         */
  184. #define         PATA_PATB       0x10        /* pattern a/pattern b          */
  185. #define         SRCA_OFFB       0x20        /* isrc a/offset b              */
  186. #define         PATA_OFFB       0x30        /* pattern a/offset b           */
  187.  
  188. /* option 2 */
  189. #define         IOUTPAT         0x00        /* intensity interpolator       */
  190. #define         SRCPAT          0x04        /* isrc                         */
  191. #define         PRAMPAT         0x08        /* pattern for c1 and c0        */
  192.  
  193. /* option 3 */
  194. #define         AOUTALF         0x00        /* alpha interpolator           */
  195. #define         SRCALF          0x01        /* isrc                         */
  196. #define         PRAMALF         0x02        /* pattern for a1 and a0        */
  197.  
  198. /* ZFIELD OPTIONS */
  199. #define         ZNORMAL         0x00        /* normal z buffer op           */
  200. #define         ZMASK           0x01        /* compare z update frame if true*/
  201.                                             /* but do not write z           */
  202. #define         ZALWAYS         0x02        /* always write frame and z     */
  203. #define         ZFLAT           0x03        /* always to frame, mask z      */
  204.  
  205. /*
  206.  
  207.     M-field (alu)  (bit 0 is CIN)
  208.     -------------
  209.     
  210.     00000?  -   A +  B + CIN
  211.     00001?  -   B + ~A + CIN        (B - A + CIN)   2's comp needs CIN=1
  212.     00010?  -   A + ~B + CIN        (A - B + CIN)   2's comp needs CIN=1
  213.     00011?  -  ~A + ~B + CIN
  214.  
  215.     01000x  -   A ^  B
  216.     01001x  - ~(A ^  B)
  217.     01010x  - ~(A ^  B)
  218.     01011x  -   A ^  B
  219.  
  220.     10000x  - ~(A ^  B)
  221.     10001x  -   A ^  B
  222.     10010x  -   A ^  B
  223.     10011x  - ~(A ^  B)
  224.  
  225.     00100?  - ~(A &  B) ^ CIN
  226.     00101?  -  (A | ~B) ^ CIN
  227.     00110?  - (~A |  B) ^ CIN
  228.     00111?  -  (A |  B) ^ CIN
  229.  
  230.     01100x  - ~(A &  B)
  231.     01101x  -   A | ~B
  232.     01110x  -  ~A |  B
  233.     01111x  -   A |  B
  234.  
  235.     10100x  -   A &  B
  236.     10101x  -  ~A &  B
  237.     10110x  -   A & ~B
  238.     10111x  - ~(A |  B)
  239.  
  240.     11000x  -   1
  241.     11001x  -  ~B
  242.     11011x  -   B
  243.     11100x  -   0
  244.     11110x  -  ~A
  245.     11111x  -   A
  246. */
  247.  
  248. /* M FIELD OPTIONS (alu modes) */
  249. #define         A_ONLY                   0x3e            /* changed */
  250. #define         ABAR                     0x3c
  251. #define         B_ONLY                   0x36
  252. #define         BBAR                     0x32
  253. #define         ALL_ZEROS                0x38
  254. #define         ALL_ONES                 0x30
  255. #define         NEG_1                    ALL_ONES
  256.  
  257. #define         A_NAND_B                 0x18
  258. #define         A_NOR_B                  0x2e
  259. #define         A_XNOR_B                 0x20
  260.  
  261. #define         A_AND_B                  0x28
  262. #define         ABAR_AND_B               0x2a
  263. #define         A_AND_BBAR               0x2c
  264. #define         ABAR_AND_BBAR            A_NOR_B
  265.  
  266. #define         A_OR_B                   0x1e
  267. #define         ABAR_OR_B                0x1c
  268. #define         A_OR_BBAR                0x1a
  269. #define         ABAR_OR_BBAR             A_NAND_B
  270.  
  271. #define         ABAR_NAND_B              A_OR_BBAR
  272. #define         A_NAND_BBAR              ABAR_OR_B
  273. #define         ABAR_NAND_BBAR           A_OR_B
  274.  
  275. #define         ABAR_NOR_B               A_AND_BBAR
  276. #define         A_NOR_BBAR               ABAR_AND_B
  277. #define         ABAR_NOR_BBAR            A_AND_B
  278.  
  279. #define         A_XOR_B                  0x22            /* changed */
  280. #define         ABAR_XOR_B               A_XNOR_B
  281. #define         A_XOR_BBAR               A_XNOR_B
  282.  
  283. #define         A_MINUS_B                0x5
  284. #define         B_MINUS_A                0x3
  285. #define         A_MINUS_B_MINUS_1        0x4
  286. #define         B_MINUS_A_MINUS_1        0x2
  287.  
  288. #define         A_PLUS_B_PLUS_1          0x1
  289. #define         A_PLUS_B                 0x0
  290.  
  291.  
  292. /***************************************************************************
  293.  *
  294.  *  Core registers for DaVInci board
  295.  */
  296.  
  297. #define PATTERN_RAM             0x00000000      /* eight 32-bit 16x16 */
  298. #define PATTERN_RAM1            0x00000001
  299. #define PATTERN_RAM2            0x00000002
  300. #define PATTERN_RAM3            0x00000003
  301. #define PATTERN_RAM4            0x00000004
  302. #define PATTERN_RAM5            0x00000005
  303. #define PATTERN_RAM6            0x00000006
  304. #define PATTERN_RAM7            0x00000007
  305. #define C_AND_A_REG             0x00000008      /* a1,a0,c1,c0 */
  306. #define OFFSET_REG              0x00000009      /* x,x,offset1,offset0 */
  307. #define BNDH_REG                0x0000000a      /* x,x,x,boundh */
  308. #define BNDL_REG                0x0000000b      /* x,x,x,boundl */
  309. #define PMASK_REG               0x0000000c      /* x,x,x,pmask */
  310. #define DASH_REG                0x0000000d      /* 32-bit line pattern */
  311. #define DISABLE_REG             0x0000000e      /* 32-bit line pattern */
  312. #define WRSYNC_REG              0x00000010
  313. #define REF0_REG                0x00000010
  314. #define REF1_REG                0x00000011
  315. #define REF2_REG                0x00000012
  316. #define REF3_REG                0x00000013
  317. #define REF4_REG                0x00000014
  318. #define REF5_REG                0x00000015
  319. #define REF6_REG                0x00000016
  320. #define REF7_REG                0x00000017
  321. #define REF8_REG                0x00000018
  322. #define REF9_REG                0x00000019
  323. #define REFA_REG                0x0000001a
  324. #define REFB_REG                0x0000001b
  325. #define REFC_REG                0x0000001c
  326. #define REFD_REG                0x0000001d
  327. #define REFE_REG                0x0000001e
  328. #define REFF_REG                0x0000001f
  329. #define CONTROL_REG             0x00000020
  330. /*      bit 21, 20  z control
  331.     0       0    new >= old
  332.     1       0    new <  old
  333.     0       1    new >  old
  334.     1       1    new =  old
  335.     bit 19, 18  alpha control
  336.     1       1    disable
  337.     1       0    idest=1/a(host)*(isrc+offset1)
  338.     0       1    idest=(1-1/a(host))*idestold-offset2
  339.     0       0    idest=1/a(host)*(isrc+offset1)
  340.             +(1-1/a(host))*(idestold+offset1)-offset2
  341.     bit 17  - zoff  kills z compare
  342.     bit 16  - rndh  render to host
  343.     bit 15  - slave 1
  344.     bit 14  - dbuff offsets y by 2048
  345.     bit 13, 12 - host DRAM memory config
  346.     bit 11, 10 - VRAM/DRAM memory config
  347.     bit 9   - zms z most significant bank select
  348.     bit 8   - ztype 0 - 256k x n 1 - 1M x n devices
  349.           also used for special both bank z clear with 256k DRAMs
  350.     bit 7   - global mask - pattern RAM used for transparency (1 masks)
  351.     bit 6, 5    pattern control
  352.     1       1       every step or pixel incs (vert lines)
  353.     1       0       dash register enable
  354.     0       1       pattern register enable
  355.     0       0       disable register select
  356.     bit 4   - inverts pattern data
  357.  
  358.     operates on idest
  359.     -----------------
  360.     bit 3   - ccin - color inclusive
  361.     bit 2   - ccmp - color compare
  362.     bit 1   - csat - color saturation to bounds
  363.     bit 0   - csrc - isrc for bound high
  364.  
  365.     01xx    - color compare, mask to bounds, inclusive
  366.     11xx    - color compare, mask to bounds, exclusive
  367.     0xx1    - color compare, saturate to isrc, inclusive
  368.     1xx1    - color compare, saturate to isrc, exclusive
  369.     0x1x    - color compare, saturate to bounds, inclusive
  370.     1x1x    - color compare, saturate to bounds, exclusive
  371. */
  372. #define MASK_REG                0x00000022
  373. #define MASK_B_REG              0x00000023
  374. /*
  375.     !! WRITE ONLY !!  
  376.     ones mask, zeros enable
  377.     bits 31-24 interrupt enable (clear) masks for status bits 15-8
  378.     bit 23 - message mask for status bits 7-0
  379.     bit 22 - control mask for status bits 29-24
  380.     bit 21 - z control bit mask for bits 21,20
  381.     bit 20 - nmi mask for status bit 29
  382.     bits 19-0 identical to control for write mask
  383. */
  384. #define STATUS_REG              0x00000024
  385. /*
  386.     bit 31 idle (ro)
  387.     bit 30 hold (ro)
  388.     bit 29 nmi 1 halts WARP/screen refresh continues
  389.     bit 28 lock a 1 syncs refreshes between WARP busses
  390.     bit 27 sync 1->0 starts count (for multiple warps)
  391.     bit 26 hld_ req
  392.     bit 25 idle_ req
  393.     bit 24 local (ro) 1 - processor 0 - coprocessor
  394.     bits 23 - 16 ro interrupt pending (cleared on read)
  395.         idle
  396.         inst intout instruction interrupt
  397.         msg
  398.         vstat
  399.         lp   local VRAM/DRAM refresh panic
  400.         hp   host DRAM refresh panic
  401.         ext
  402.         int
  403.     bits 15 - 8 rw interrupt control/clear
  404.         idle 
  405.         inst intout instruction interrupt
  406.         msg
  407.         vstat
  408.         lp   local VRAM/DRAM refresh panic
  409.         hp   host DRAM refresh panic
  410.         ext
  411.         int
  412.     bits 7-0 rw message interrupt status
  413. */
  414. #define BANK_ENABLE_REG         0x00000025
  415. #define BANK_MASK_REG           0x00000026
  416. #define BANK_COMPARE_REG        0x00000027
  417. #define YMAIN_REG               0x00000028
  418. #define YSLOPE_REG              0x00000029
  419. #define XMAIN_REG               0x0000002a
  420. #define XSLOPE_REG              0x0000002b
  421. #define ZMAIN_REG               0x0000002c
  422. #define ZSLOPE_REG              0x0000002d
  423. #define IMAIN_REG               0x0000002e
  424. #define ISLOPE_REG              0x0000002f
  425. #define W1MAIN_REG              0x00000030
  426. #define W1SLOPE_REG             0x00000031
  427. #define W2MAIN_REG              0x00000032
  428. #define W2SLOPE_REG             0x00000033
  429. #define ZERROR_REG              0x00000034
  430. #define ZORTHO_REG              0x00000035
  431. #define IERROR_REG              0x00000036
  432. #define IORTHO_REG              0x00000037
  433. #define AORTHO_REG              0x00000038
  434. #define A_MAIN_SLOPE_REG        0x00000039
  435. #define HOST_PITCH_REG          0x0000003a
  436. #define HOST_INSTRUCTION_REG    0x0000003b
  437. #define HOST_BASE_REG           0x0000003c
  438. #define HOST_OFFSET_REG         0x0000003d
  439.  
  440.  
  441. /***************************************************************************
  442.  *
  443.  *  Macros returning Warp opcodes
  444.  */
  445.  
  446. #define WARP_PRIM_FIELDS(n, z, m)   (n << NFIELD_LSHIFT)|(z << ZFIELD_LSHIFT)|(m << MFIELD_LSHIFT)
  447. #define WARP_BLT_FIELDS(n, m)       (n << NFIELD_LSHIFT)|(m << MFIELD_LSHIFT)
  448.  
  449. /***************************************************************************/
  450. /* make_ro generates the opcode for the instruction taking n, z and m fields
  451.  * Those instr are: Vectors, Poly-vectors, Polygons
  452.  */
  453.  
  454. #define make_ro(instr,n,z,m) (instr|(n << NFIELD_LSHIFT)|(z << ZFIELD_LSHIFT)|(m << MFIELD_LSHIFT))
  455.  
  456. /***************************************************************************/
  457. /* blit_ro generates the opcode for the blit instructions requiring
  458.  * n and m fields: BLTF, BLTZ, BLTFZ, BLTH
  459.  *                 BLTFF, BLTHF, BLTZH, BLTHH, BLTFH, BLTHZ
  460.  */
  461.  
  462. #define blit_ro(instr,n,m)    (instr|(n << NFIELD_LSHIFT)|(m << MFIELD_LSHIFT))
  463.  
  464. /***************************************************************************/
  465. /* STORE */
  466.  
  467. #define store_ro(core_reg, store_addr) STORE|(core_reg << REG_LSHIFT)|(store_addr & 0x00ffffff)
  468.  
  469. /***************************************************************************/
  470. /* LOAD */
  471.  
  472. #define load_short_ro(core_reg, reg_value) LOAD_SHORT|(core_reg << REG_LSHIFT)|(reg_value & 0x00ffffff)
  473.  
  474. #define load_long_ro(core_reg, load_count) LOAD_LONG|(core_reg << REG_LSHIFT)|(load_count & 0x0000007f)
  475.  
  476. /***************************************************************************/
  477. /* STALL - with nop */
  478.  
  479. #define snop_ro()                              SNOP
  480.  
  481. /***************************************************************************/
  482. /* CONTROL */
  483.  
  484. #define branch_ro(branch_addr)                 BRANCH|(branch_addr & 0x00ffffff)
  485.  
  486. #define call_ro(call_addr)                     CALL |(call_addr & 0x00ffffff)
  487.  
  488. #define start_ro()                             START
  489.  
  490. #define idle_ro()                              IDLE
  491.  
  492. #define clear_ro()                             CLEAR
  493.  
  494. #define flush_ro()                             FLUSH
  495.  
  496. #define wait_ro()                              WAIT
  497.  
  498. #define intout_ro()                            INTOUT
  499.  
  500.  
  501. /***************************************************************************/
  502. /* VECTORS - frame buffer */
  503.  
  504. /* One-pipe flat, 2d vectors */
  505. #define vectf1p_ro(n, z, m)         VECTF1P | WARP_PRIM_FIELDS(n,z,m) 
  506.  
  507. /* Fast-two-pipe flat, 2d vectors */
  508. #define vectf2pf_ro(n, z, m)        VECTF2PF | WARP_PRIM_FIELDS(n,z,m) 
  509.  
  510. /* Two-pipe flat, 2d vectors */
  511. #define vectf2p_ro(n, z, m)         VECTF2P | WARP_PRIM_FIELDS(n,z,m) 
  512.  
  513. /* Three-pipe flat, 2d vectors */
  514. #define vectf3p_ro(n, z, m)         VECTF3P | WARP_PRIM_FIELDS(n,z,m) 
  515.  
  516. /* Two-pipe flat, z-buffered vectors */
  517. #define vectfz2p_ro(n, z, m)        VECTFZ2P | WARP_PRIM_FIELDS(n,z,m) 
  518.  
  519. /* Three-pipe flat, z-buffered vectors */
  520. #define vectfz3p_ro(n, z, m)        VECTFZ3P | WARP_PRIM_FIELDS(n,z,m) 
  521.  
  522. /* Two-pipe shaded, z-buffered vectors */
  523. #define vectfzg2p_ro(n, z, m)       VECTFZG2P | WARP_PRIM_FIELDS(n,z,m) 
  524.  
  525. /* Three-pipe shaded, z-buffered vectors */
  526. #define vectfzg3p_ro(n, z, m)       VECTFZG3P | WARP_PRIM_FIELDS(n,z,m) 
  527.  
  528. /***************************************************************************/
  529. /* VECTORS - host buffer */
  530.  
  531. /* One-pipe flat, 2d vectors */
  532. #define vecth1p_ro(n, z, m)         VECTH1P | WARP_PRIM_FIELDS(n,z,m) 
  533.  
  534. /* Fast-two-pipe flat, 2d vectors */
  535. #define vecth2pf_ro(n, z, m)        VECTH2PF | WARP_PRIM_FIELDS(n,z,m) 
  536.  
  537. /* Two-pipe flat, 2d vectors */
  538. #define vecth2p_ro(n, z, m)         VECTH2P | WARP_PRIM_FIELDS(n,z,m) 
  539.  
  540. /* Three-pipe flat, 2d vectors */
  541. #define vecth3p_ro(n, z, m)         VECTH3P | WARP_PRIM_FIELDS(n,z,m) 
  542.  
  543. /* Two-pipe flat, z-buffered vectors */
  544. #define vecthz2p_ro(n, z, m)        VECTHZ2P | WARP_PRIM_FIELDS(n,z,m) 
  545.  
  546. /* Three-pipe flat, z-buffered vectors */
  547. #define vecthz3p_ro(n, z, m)        VECTHZ3P | WARP_PRIM_FIELDS(n,z,m) 
  548.  
  549. /* Two-pipe shaded, z-buffered vectors */
  550. #define vecthzg2p_ro(n, z, m)       VECTHZG2P | WARP_PRIM_FIELDS(n,z,m) 
  551.  
  552. /* Three-pipe shaded, z-buffered vectors */
  553. #define vecthzg3p_ro(n, z, m)       VECTHZG3P | WARP_PRIM_FIELDS(n,z,m) 
  554.  
  555. /***************************************************************************/
  556. /* POLY VECTORS - frame buffer */
  557.  
  558. /* One-pipe flat, 2d poly vectors */
  559. #define pvectf1p_ro(n, z, m)        PVECTF1P | WARP_PRIM_FIELDS(n,z,m) 
  560.  
  561. /* Fast-two-pipe flat, 2d poly vectors */
  562. #define pvectf2pf_ro(n, z, m)       PVECTF2PF | WARP_PRIM_FIELDS(n,z,m) 
  563.  
  564. /* Two-pipe flat, 2d poly vectors */
  565. #define pvectf2p_ro(n, z, m)        PVECTF2P | WARP_PRIM_FIELDS(n,z,m) 
  566.  
  567. /* Three-pipe flat, 2d poly vectors */
  568. #define pvectf3p_ro(n, z, m)        PVECTF3P | WARP_PRIM_FIELDS(n,z,m) 
  569.  
  570. /* Two-pipe flat, z-buffered poly vectors */
  571. #define pvectfz2p_ro(n, z, m)       PVECTFZ2P | WARP_PRIM_FIELDS(n,z,m) 
  572.  
  573. /* Three-pipe flat, z-buffered poly vectors */
  574. #define pvectfz3p_ro(n, z, m)       PVECTFZ3P | WARP_PRIM_FIELDS(n,z,m) 
  575.  
  576. /* Two-pipe shaded, z-buffered poly vectors */
  577. #define pvectfzg2p_ro(n, z, m)      PVECTFZG2P | WARP_PRIM_FIELDS(n,z,m) 
  578.  
  579. /* Three-pipe shaded, z-buffered poly vectors */
  580. #define pvectfzg3p_ro(n, z, m)      PVECTFZG3P | WARP_PRIM_FIELDS(n,z,m) 
  581.  
  582. /***************************************************************************/
  583. /* POLY VECTORS - host buffer */
  584.  
  585. /* One-pipe flat, 2d poly vectors */
  586. #define pvecth1p_ro(n, z, m)        PVECTH1P | WARP_PRIM_FIELDS(n,z,m) 
  587.  
  588. /* Fast-two-pipe flat, 2d poly vectors */
  589. #define pvecth2pf_ro(n, z, m)       PVECTH2PF | WARP_PRIM_FIELDS(n,z,m) 
  590.  
  591. /* Two-pipe flat, 2d poly vectors */
  592. #define pvecth2p_ro(n, z, m)        PVECTH2P | WARP_PRIM_FIELDS(n,z,m) 
  593.  
  594. /* Three-pipe flat, 2d poly vectors */
  595. #define pvecth3p_ro(n, z, m)        PVECTH3P | WARP_PRIM_FIELDS(n,z,m) 
  596.  
  597. /* Two-pipe flat, z-buffered poly vectors */
  598. #define pvecthz2p_ro(n, z, m)       PVECTHZ2P | WARP_PRIM_FIELDS(n,z,m) 
  599.  
  600. /* Three-pipe flat, z-buffered poly vectors */
  601. #define pvecthz3p_ro(n, z, m)       PVECTHZ3P | WARP_PRIM_FIELDS(n,z,m)
  602.  
  603. /* Two-pipe shaded, z-buffered poly vectors */
  604. #define pvecthzg2p_ro(n, z, m)      PVECTHZG2P | WARP_PRIM_FIELDS(n,z,m) 
  605.  
  606. /* Three-pipe shaded, z-buffered poly vectors */
  607. #define pvecthzg3p_ro(n, z, m)      PVECTHZG3P | WARP_PRIM_FIELDS(n,z,m) 
  608.  
  609. /***************************************************************************/
  610. /* POLYGONS - frame buffer */
  611.  
  612. /* One-pipe flat, 2d polygons */
  613. #define polyf1p_ro(n, z, m)         POLYF1P | WARP_PRIM_FIELDS(n,z,m) 
  614.  
  615. /* Fast-two-pipe flat, 2d polygons */
  616. #define polyf2pf_ro(n, z, m)        POLYF2PF | WARP_PRIM_FIELDS(n,z,m) 
  617.  
  618. /* Two-pipe flat, 2d polygons */
  619. #define polyf2p_ro(n, z, m)         POLYF2P | WARP_PRIM_FIELDS(n,z,m) 
  620.  
  621. /* Three-pipe flat, 2d polygons */
  622. #define polyf3p_ro(n, z, m)         POLYF3P | WARP_PRIM_FIELDS(n,z,m) 
  623.  
  624. /* Two-pipe flat, z-buffered polygons */
  625. #define polyfz2p_ro(n, z, m)        POLYFZ2P | WARP_PRIM_FIELDS(n,z,m) 
  626.  
  627. /* Three-pipe flat, z-buffered polygons */
  628. #define polyfz3p_ro(n, z, m)        POLYFZ3P | WARP_PRIM_FIELDS(n,z,m) 
  629.  
  630. /* Two-pipe shaded, z-buffered polygons */
  631. #define polyfzg2p_ro(n, z, m)       POLYFZG2P | WARP_PRIM_FIELDS(n,z,m) 
  632.  
  633. /* Three-pipe shaded, z-buffered polygons */
  634. #define polyfzg3p_ro(n, z, m)       POLYFZG3P | WARP_PRIM_FIELDS(n,z,m) 
  635.  
  636. /* Two-pipe shaded, z-buffered, alphaout polygons */
  637. #define polyfzga2p_ro(n, z, m)      POLYFZGA2P | WARP_PRIM_FIELDS(n,z,m) 
  638.  
  639. /* Three-pipe shaded, z-buffered, alpha-blended polygons */
  640. #define polyfzga3p_ro(n, z, m)      POLYFZGA3P | WARP_PRIM_FIELDS(n,z,m) 
  641.  
  642. /***************************************************************************/
  643. /* POLYGONS - host buffer */
  644.  
  645. /* One-pipe flat, 2d polygons */
  646. #define polyh1p_ro(n, z, m)         POLYH1P | WARP_PRIM_FIELDS(n,z,m) 
  647.  
  648. /* Fast-two-pipe flat, 2d polygons */
  649. #define polyh2pf_ro(n, z, m)        POLYH2PF | WARP_PRIM_FIELDS(n,z,m) 
  650.  
  651. /* Two-pipe flat, 2d polygons */
  652. #define polyh2p_ro(n, z, m)         POLYH2P | WARP_PRIM_FIELDS(n,z,m) 
  653.  
  654. /* Three-pipe flat, 2d polygons */
  655. #define polyh3p_ro(n, z, m)         POLYH3P | WARP_PRIM_FIELDS(n,z,m) 
  656.  
  657. /* Two-pipe flat, z-buffered polygons */
  658. #define polyhz2p_ro(n, z, m)        POLYHZ2P | WARP_PRIM_FIELDS(n,z,m) 
  659.  
  660. /* Three-pipe flat, z-buffered polygons */
  661. #define polyhz3p_ro(n, z, m)        POLYHZ3P | WARP_PRIM_FIELDS(n,z,m) 
  662.  
  663. /* Two-pipe shaded, z-buffered polygons */
  664. #define polyhzg2p_ro(n, z, m)       POLYHZG2P | WARP_PRIM_FIELDS(n,z,m) 
  665.  
  666. /* Three-pipe shaded, z-buffered polygons */
  667. #define polyhzg3p_ro(n, z, m)       POLYHZG3P | WARP_PRIM_FIELDS(n,z,m) 
  668.  
  669. /* Two-pipe shaded, z-buffered, alphaout polygons */
  670. #define polyhzga2p_ro(n, z, m)      POLYHZGA2P | WARP_PRIM_FIELDS(n,z,m) 
  671.  
  672. /* Three-pipe shaded, z-buffered, alpha-blended polygons */
  673. #define polyhzga3p_ro(n, z, m)      POLYHZGA3P | WARP_PRIM_FIELDS(n,z,m) 
  674.  
  675. /***************************************************************************/
  676. /* BLTS - fixed */
  677.  
  678. /* Blt fixed to frame-buffer */
  679. #define bltf_ro(n, m)               BLTF | WARP_BLT_FIELDS(n,m) 
  680.  
  681. /* Blt fixed to z-buffer */
  682. #define bltz_ro(n, m)               BLTZ | WARP_BLT_FIELDS(n,m) 
  683.  
  684. /* Blt fixed to z-buffer and frame-buffer */
  685. #define bltfz_ro(n, m)              BLTFZ | WARP_BLT_FIELDS(n,m) 
  686.  
  687. /* Blt fixed to host-buffer */
  688. #define blth_ro(n, m)               BLTH | WARP_BLT_FIELDS(n,m) 
  689.  
  690. /***************************************************************************/
  691. /* BLTS - screen */
  692.  
  693. /* Blt frame-buffer to frame-buffer */
  694. #define bltff_ro(n, m)              BLTFF | WARP_BLT_FIELDS(n,m) 
  695.  
  696. /* Blt host-buffer to frame-buffer */
  697. #define blthf_ro(n, m)              BLTHF | WARP_BLT_FIELDS(n,m) 
  698.  
  699. /* Blt z-buffer to host-buffer */
  700. #define bltzh_ro(n, m)              BLTZH | WARP_BLT_FIELDS(n,m) 
  701.  
  702. /* Blt complex from host-buffer to screen with z-compare */
  703. #define blthfz_ro(n, z, m)          BLTHFZ | WARP_PRIM_FIELDS(n,z,m) 
  704.  
  705. /* Blt polygonal from host-buffer to screen with z-compare */
  706. #define pblthfz_ro(n, z, m)         PBLTHFZ | WARP_PRIM_FIELDS(n,z,m) 
  707.  
  708. /* Blt string simplex from host-buffer to screen */
  709. #define bltss_ro(n, m, count)       BLTSS | WARP_BLT_FIELDS(n,m) | count 
  710.  
  711. /* Blt string complex from host-buffer to screen */
  712. #define bltsc_ro(n, m, count)       BLTSC | WARP_BLT_FIELDS(n,m) | count 
  713.  
  714. /***************************************************************************/
  715. /* BLTS - host */
  716.  
  717. /* Blt host-buffer to host-buffer */
  718. #define blthh_ro(n, m)              BLTHH | WARP_BLT_FIELDS(n,m) 
  719.  
  720. /* Blt frame-buffer to host-buffer */
  721. #define bltfh_ro(n, m)              BLTFH | WARP_BLT_FIELDS(n,m) 
  722.  
  723. /* Blt host-buffer to z-buffer */
  724. #define blthz_ro(n, m)              BLTHZ | WARP_BLT_FIELDS(n,m) 
  725.  
  726. /* Blt (complex) host-buffer to host-buffer with z-compare */
  727. #define blthhz_ro(n, z, m)          BLTHHZ | WARP_PRIM_FIELDS(n,z,m) 
  728.  
  729. /* Blt (polygonal) host-buffer to host-buffer with z-compare */
  730. #define pblthhz_ro(n, z, m)         PBLTHHZ | WARP_PRIM_FIELDS(n,z,m) 
  731.  
  732. /***************************************************************************/
  733.  
  734.  
  735. /******************************************************************************
  736. *
  737. *  Private functions of the library
  738. *
  739. ******************************************************************************/
  740. extern void out_warp_io( const int reg, const DWORD data );
  741.  
  742.  
  743. #endif
  744.