home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Includes / hardware / blit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-12  |  2.0 KB  |  95 lines

  1. #ifndef HARDWARE_BLIT_H
  2. #define HARDWARE_BLIT_H
  3. /*
  4. **    $Filename: hardware/blit.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    include file for blitter 
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #define     HSIZEBITS   6
  14. #define VSIZEBITS 16-HSIZEBITS
  15. #define HSIZEMASK 0x3f          /* 2^6 -- 1 */
  16. #define VSIZEMASK 0x3FF          /* 2^10 - 1 */
  17.  
  18. #define     MAXBYTESPERROW 128
  19.  
  20. /* definitions for blitter control register 0 */
  21.  
  22. #define ABC    0x80
  23. #define ABNC   0x40
  24. #define ANBC   0x20
  25. #define ANBNC  0x10
  26. #define NABC   0x8
  27. #define NABNC  0x4
  28. #define NANBC  0x2
  29. #define NANBNC 0x1
  30.  
  31. /* some commonly used operations */
  32. #define A_OR_B      ABC|ANBC|NABC | ABNC|ANBNC|NABNC
  33. #define A_OR_C      ABC|NABC|ABNC | ANBC|NANBC|ANBNC
  34. #define A_XOR_C      NABC|ABNC   | NANBC|ANBNC
  35. #define A_TO_D      ABC|ANBC|ABNC|ANBNC
  36.  
  37. #define BC0B_DEST 8
  38. #define BC0B_SRCC 9
  39. #define BC0B_SRCB   10
  40. #define BC0B_SRCA 11
  41. #define BC0F_DEST 0x100
  42. #define BC0F_SRCC 0x200
  43. #define BC0F_SRCB 0x400
  44. #define BC0F_SRCA 0x800
  45.  
  46. #define BC1F_DESC   2          /* blitter descend direction */
  47.  
  48. #define DEST 0x100
  49. #define SRCC 0x200
  50. #define SRCB 0x400
  51. #define SRCA 0x800
  52.  
  53. #define ASHIFTSHIFT  12          /* bits to right align ashift value */
  54. #define BSHIFTSHIFT  12          /* bits to right align bshift value */
  55.  
  56. /* definations for blitter control register 1 */
  57. #define LINEMODE     0x1
  58. #define FILL_OR         0x8
  59. #define FILL_XOR     0x10
  60. #define FILL_CARRYIN 0x4
  61. #define ONEDOT         0x2      /* one dot per horizontal line */
  62. #define OVFLAG         0x20
  63. #define SIGNFLAG     0x40
  64. #define BLITREVERSE  0x2
  65.  
  66. #define SUD         0x10
  67. #define SUL         0x8
  68. #define AUL         0x4
  69.  
  70. #define OCTANT8      24
  71. #define OCTANT7      4
  72. #define OCTANT6      12
  73. #define OCTANT5      28
  74. #define OCTANT4      20
  75. #define OCTANT3      8
  76. #define OCTANT2      0
  77. #define OCTANT1      16
  78.  
  79. /* stuff for blit qeuer */
  80. struct bltnode
  81. {
  82.     struct  bltnode *n;
  83.     int        (*function)();
  84.     char    stat;
  85.     short   blitsize;
  86.     short   beamsync;
  87.     int        (*cleanup)();
  88. };
  89.  
  90. /* defined bits for bltstat */
  91. #define CLEANUP 0x40
  92. #define CLEANME CLEANUP
  93.  
  94. #endif    /* HARDWARE_BLIT_H */
  95.