1 #ifndef GRAPHICS_COPPER_H
    2 #define GRAPHICS_COPPER_H
    3 
    4 /*
    5 	graphics copper list instruction definitions
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #pragma pack(2)
   15 
   16 
   17 #define COPPER_MOVE  0
   18 #define COPPER_WAIT  1
   19 #define CPRNXTBUF    2
   20 #define CPR_NT_LOF   0x8000
   21 #define CPR_NT_SHT   0x4000
   22 #define CPR_NT_SYS   0x2000
   23 
   24 
   25 struct CopIns
   26 {
   27 	WORD OpCode;
   28 
   29 	union
   30 	{
   31 		struct CopList *nxtlist;
   32 
   33 		struct
   34 		{
   35 			union
   36 			{
   37 				WORD VWaitPos;
   38 				WORD DestAddr;
   39 			} u1;
   40 
   41 			union
   42 			{
   43 				WORD HWaitPos;
   44 				WORD DestData;
   45 			} u2;
   46 		} u4;
   47 	} u3;
   48 };
   49 
   50 #define NXTLIST   u3.nxtlist
   51 #define VWAITPOS  u3.u4.u1.VWaitPos
   52 #define DESTADDR  u3.u4.u1.DestAddr
   53 #define HWAITPOS  u3.u4.u2.HWaitPos
   54 #define DESTDATA  u3.u4.u2.DestData
   55 
   56 
   57 struct cprlist
   58 {
   59 	struct cprlist *Next;
   60 	UWORD          *start;
   61 	WORD            MaxCount;
   62 };
   63 
   64 struct CopList
   65 {
   66 	struct CopList  *Next;
   67 	struct CopList  *_CopList;
   68 	struct ViewPort *_ViewPort;
   69 	struct CopIns   *CopIns;
   70 	struct CopIns   *CopPtr;
   71 	UWORD           *CopLStart;
   72 	UWORD           *CopSStart;
   73 	WORD             Count;
   74 	WORD             MaxCount;
   75 	WORD             DyOffset;
   76 
   77 #ifdef V1_3
   78 	UWORD           *Cop2Start;
   79 	UWORD           *Cop3Start;
   80 	UWORD           *Cop4Start;
   81 	UWORD           *Cop5Start;
   82 #endif
   83 
   84 	UWORD            SLRepeat;
   85 	UWORD            Flags;
   86 };
   87 
   88 #define EXACT_LINE  1
   89 #define HALF_LINE   2
   90 
   91 
   92 struct UCopList
   93 {
   94 	struct UCopList *Next;
   95 	struct CopList  *FirstCopList;
   96 	struct CopList  *CopList;
   97 };
   98 
   99 
  100 struct copinit
  101 {
  102 	UWORD vsync_hblank[2];
  103 	UWORD diagstrt[12];
  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 
  117 #pragma pack()
  118 
  119 #endif /* GRAPHICS_COPPER_H */