home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / os-include / graphics / copper.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  3KB  |  110 lines

  1. #ifndef GRAPHICS_COPPER_H
  2. #define GRAPHICS_COPPER_H
  3. /*
  4. **    $VER: copper.h 39.6 (01.07.92)
  5. **    Includes Release 39.108
  6. **
  7. **    graphics copper list intstruction definintions
  8. **
  9. **    (C) Copyright 1985-1992 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. };
  81.  
  82. struct UCopList
  83. {
  84.     struct UCopList *Next;
  85.     struct CopList  *FirstCopList; /* head node of this copper list */
  86.     struct CopList  *CopList;       /* node in use */
  87. };
  88.  
  89. /* Private graphics data structure. This structure has changed in the past,
  90.  * and will continue to change in the future. Do Not Touch!
  91.  */
  92.  
  93. struct copinit
  94. {
  95.     UWORD vsync_hblank[2];
  96.     UWORD diagstrt[12];      /* copper list for first bitplane */
  97.     UWORD fm0[2];
  98.     UWORD diwstart[10];
  99.     UWORD bplcon2[2];
  100.     UWORD sprfix[2*8];
  101.     UWORD sprstrtup[(2*8*2)];
  102.     UWORD wait14[2];
  103.     UWORD norm_hblank[2];
  104.     UWORD jump[(2*2)];
  105.     UWORD wait_forever[2];
  106.     UWORD   sprstop[8];
  107. };
  108.  
  109. #endif    /* GRAPHICS_COPPER_H */
  110.