home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / hardware / blit.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  2KB  |  103 lines

  1. #ifndef    HARDWARE_BLIT_H
  2. #define    HARDWARE_BLIT_H
  3. /*
  4. **    $VER: blit.h 39.1 (18.9.92)
  5. **    Includes Release 40.15
  6. **
  7. **    Defines for direct hardware use of the blitter.
  8. **
  9. **    (C) Copyright 1985-1993 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. /* all agnii support horizontal blit of at least 1024 bits (128 bytes) wide */
  19. /* some agnii support horizontal blit of up to 32768 bits (4096 bytes) wide */
  20.  
  21. #ifndef     NO_BIG_BLITS
  22. #define  MINBYTESPERROW 128
  23. #define  MAXBYTESPERROW 4096
  24. #else
  25. #define  MAXBYTESPERROW 128
  26. #endif
  27.  
  28. /* definitions for blitter control register 0 */
  29.  
  30. #define ABC    0x80
  31. #define ABNC   0x40
  32. #define ANBC   0x20
  33. #define ANBNC  0x10
  34. #define NABC   0x8
  35. #define NABNC  0x4
  36. #define NANBC  0x2
  37. #define NANBNC 0x1
  38.  
  39. /* some commonly used operations */
  40. #define A_OR_B      ABC|ANBC|NABC | ABNC|ANBNC|NABNC
  41. #define A_OR_C      ABC|NABC|ABNC | ANBC|NANBC|ANBNC
  42. #define A_XOR_C   NABC|ABNC   | NANBC|ANBNC
  43. #define A_TO_D      ABC|ANBC|ABNC|ANBNC
  44.  
  45. #define BC0B_DEST 8
  46. #define BC0B_SRCC 9
  47. #define BC0B_SRCB   10
  48. #define BC0B_SRCA 11
  49. #define BC0F_DEST 0x100
  50. #define BC0F_SRCC 0x200
  51. #define BC0F_SRCB 0x400
  52. #define BC0F_SRCA 0x800
  53.  
  54. #define BC1F_DESC   2          /* blitter descend direction */
  55.  
  56. #define DEST 0x100
  57. #define SRCC 0x200
  58. #define SRCB 0x400
  59. #define SRCA 0x800
  60.  
  61. #define ASHIFTSHIFT  12       /* bits to right align ashift value */
  62. #define BSHIFTSHIFT  12       /* bits to right align bshift value */
  63.  
  64. /* definations for blitter control register 1 */
  65. #define LINEMODE     0x1
  66. #define FILL_OR      0x8
  67. #define FILL_XOR     0x10
  68. #define FILL_CARRYIN 0x4
  69. #define ONEDOT         0x2      /* one dot per horizontal line */
  70. #define OVFLAG         0x20
  71. #define SIGNFLAG     0x40
  72. #define BLITREVERSE  0x2
  73.  
  74. #define SUD         0x10
  75. #define SUL         0x8
  76. #define AUL         0x4
  77.  
  78. #define OCTANT8   24
  79. #define OCTANT7   4
  80. #define OCTANT6   12
  81. #define OCTANT5   28
  82. #define OCTANT4   20
  83. #define OCTANT3   8
  84. #define OCTANT2   0
  85. #define OCTANT1   16
  86.  
  87. /* stuff for blit qeuer */
  88. struct bltnode
  89. {
  90.     struct  bltnode *n;
  91.     int     (*function)();
  92.     char    stat;
  93.     short   blitsize;
  94.     short   beamsync;
  95.     int     (*cleanup)();
  96. };
  97.  
  98. /* defined bits for bltstat */
  99. #define CLEANUP 0x40
  100. #define CLEANME CLEANUP
  101.  
  102. #endif    /* HARDWARE_BLIT_H */
  103.