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

  1. #ifndef GRAPHICS_COPPER_H
  2. #define GRAPHICS_COPPER_H
  3. /*
  4. **    $VER: copper.h 39.10 (31.5.93)
  5. **    Includes Release 40.15
  6. **
  7. **    graphics copper list intstruction definitions
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #define COPPER_MOVE 0        /* pseude opcode for move #XXXX,dir */
  18. #define COPPER_WAIT 1        /* pseudo opcode for wait y,x */
  19. #define CPRNXTBUF   2        /* continue processing with next buffer */
  20. #define CPR_NT_LOF  0x8000  /* copper instruction only for short frames */
  21. #define CPR_NT_SHT  0x4000  /* copper instruction only for long frames */
  22. #define CPR_NT_SYS  0x2000  /* copper user instruction only */
  23.  
  24. struct CopIns
  25. {
  26.     WORD   OpCode; /* 0 = move, 1 = wait */
  27.     union
  28.     {
  29.         struct CopList *nxtlist;
  30.         struct
  31.     {
  32.             union
  33.             {
  34.                 WORD VWaitPos;          /* vertical beam wait */
  35.                 WORD DestAddr;          /* destination address of copper move */
  36.             } u1;
  37.             union
  38.             {
  39.                 WORD HWaitPos;          /* horizontal beam wait position */
  40.                 WORD DestData;          /* destination immediate data to send */
  41.             } u2;
  42.         } u4;
  43.     } u3;
  44. };
  45.  
  46. /* shorthand for above */
  47. #define NXTLIST     u3.nxtlist
  48. #define VWAITPOS    u3.u4.u1.VWaitPos
  49. #define DESTADDR    u3.u4.u1.DestAddr
  50. #define HWAITPOS    u3.u4.u2.HWaitPos
  51. #define DESTDATA    u3.u4.u2.DestData
  52.  
  53.  
  54. /* structure of cprlist that points to list that hardware actually executes */
  55. struct cprlist
  56. {
  57.     struct cprlist *Next;
  58.     UWORD   *start;        /* start of copper list */
  59.     WORD   MaxCount;       /* number of long instructions */
  60. };
  61.  
  62. struct CopList
  63. {
  64.     struct  CopList *Next;  /* next block for this copper list */
  65.     struct  CopList *_CopList;    /* system use */
  66.     struct  ViewPort *_ViewPort;    /* system use */
  67.     struct  CopIns *CopIns; /* start of this block */
  68.     struct  CopIns *CopPtr; /* intermediate ptr */
  69.     UWORD   *CopLStart;     /* mrgcop fills this in for Long Frame*/
  70.     UWORD   *CopSStart;     /* mrgcop fills this in for Short Frame*/
  71.     WORD   Count;       /* intermediate counter */
  72.     WORD   MaxCount;       /* max # of copins for this block */
  73.     WORD   DyOffset;       /* offset this copper list vertical waits */
  74. #ifdef V1_3
  75.     UWORD   *Cop2Start;
  76.     UWORD   *Cop3Start;
  77.     UWORD   *Cop4Start;
  78.     UWORD   *Cop5Start;
  79. #endif
  80.     UWORD  SLRepeat;
  81.     UWORD  Flags;
  82. };
  83.  
  84. /* These CopList->Flags are private */
  85. #define EXACT_LINE 1
  86. #define HALF_LINE 2
  87.  
  88.  
  89. struct UCopList
  90. {
  91.     struct UCopList *Next;
  92.     struct CopList  *FirstCopList; /* head node of this copper list */
  93.     struct CopList  *CopList;       /* node in use */
  94. };
  95.  
  96. /* Private graphics data structure. This structure has changed in the past,
  97.  * and will continue to change in the future. Do Not Touch!
  98.  */
  99.  
  100. struct copinit
  101. {
  102.     UWORD vsync_hblank[2];
  103.     UWORD diagstrt[12];      /* copper list for first bitplane */
  104.     UWORD fm0[2];
  105.     UWORD diwstart[10];
  106.     UWORD bplcon2[2];
  107.     UWORD sprfix[2*8];
  108.     UWORD sprstrtup[(2*8*2)];
  109.     UWORD wait14[2];
  110.     UWORD norm_hblank[2];
  111.     UWORD jump[2];
  112.     UWORD wait_forever[6];
  113.     UWORD   sprstop[8];
  114. };
  115.  
  116. #endif    /* GRAPHICS_COPPER_H */
  117.