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

  1. #ifndef    HARDWARE_CUSTOM_H
  2. #define    HARDWARE_CUSTOM_H
  3. /*
  4. **    $VER: custom.h 39.1 (18.09.92)
  5. **    Includes Release 39.108
  6. **
  7. **    Offsets of Amiga custom chip registers
  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 /* EXEC_TYPES_H */
  16.  
  17.  
  18.  
  19. /*
  20.  * do this to get base of custom registers:
  21.  * extern struct Custom custom;
  22.  */
  23.  
  24.  
  25. struct Custom {
  26.     UWORD   bltddat;
  27.     UWORD   dmaconr;
  28.     UWORD   vposr;
  29.     UWORD   vhposr;
  30.     UWORD   dskdatr;
  31.     UWORD   joy0dat;
  32.     UWORD   joy1dat;
  33.     UWORD   clxdat;
  34.     UWORD   adkconr;
  35.     UWORD   pot0dat;
  36.     UWORD   pot1dat;
  37.     UWORD   potinp;
  38.     UWORD   serdatr;
  39.     UWORD   dskbytr;
  40.     UWORD   intenar;
  41.     UWORD   intreqr;
  42.     APTR    dskpt;
  43.     UWORD   dsklen;
  44.     UWORD   dskdat;
  45.     UWORD   refptr;
  46.     UWORD   vposw;
  47.     UWORD   vhposw;
  48.     UWORD   copcon;
  49.     UWORD   serdat;
  50.     UWORD   serper;
  51.     UWORD   potgo;
  52.     UWORD   joytest;
  53.     UWORD   strequ;
  54.     UWORD   strvbl;
  55.     UWORD   strhor;
  56.     UWORD   strlong;
  57.     UWORD   bltcon0;
  58.     UWORD   bltcon1;
  59.     UWORD   bltafwm;
  60.     UWORD   bltalwm;
  61.     APTR    bltcpt;
  62.     APTR    bltbpt;
  63.     APTR    bltapt;
  64.     APTR    bltdpt;
  65.     UWORD   bltsize;
  66.     UBYTE   pad2d;
  67.     UBYTE   bltcon0l;    /* low 8 bits of bltcon0, write only */
  68.     UWORD   bltsizv;
  69.     UWORD   bltsizh;    /* 5e */
  70.     UWORD   bltcmod;
  71.     UWORD   bltbmod;
  72.     UWORD   bltamod;
  73.     UWORD   bltdmod;
  74.     UWORD   pad34[4];
  75.     UWORD   bltcdat;
  76.     UWORD   bltbdat;
  77.     UWORD   bltadat;
  78.     UWORD   pad3b[3];
  79.     UWORD   deniseid;    /* 7c */
  80.     UWORD   dsksync;
  81.     ULONG   cop1lc;
  82.     ULONG   cop2lc;
  83.     UWORD   copjmp1;
  84.     UWORD   copjmp2;
  85.     UWORD   copins;
  86.     UWORD   diwstrt;
  87.     UWORD   diwstop;
  88.     UWORD   ddfstrt;
  89.     UWORD   ddfstop;
  90.     UWORD   dmacon;
  91.     UWORD   clxcon;
  92.     UWORD   intena;
  93.     UWORD   intreq;
  94.     UWORD   adkcon;
  95.     struct  AudChannel {
  96.       UWORD *ac_ptr; /* ptr to start of waveform data */
  97.       UWORD ac_len;    /* length of waveform in words */
  98.       UWORD ac_per;    /* sample period */
  99.       UWORD ac_vol;    /* volume */
  100.       UWORD ac_dat;    /* sample pair */
  101.       UWORD ac_pad[2];    /* unused */
  102.     } aud[4];
  103.     APTR    bplpt[8];
  104.     UWORD   bplcon0;
  105.     UWORD   bplcon1;
  106.     UWORD   bplcon2;
  107.     UWORD   bplcon3;
  108.     UWORD   bpl1mod;
  109.     UWORD   bpl2mod;
  110.     UWORD   bplcon4;
  111.     UWORD   clxcon2;
  112.     UWORD   bpldat[8];
  113.     APTR    sprpt[8];
  114.     struct  SpriteDef {
  115.       UWORD pos;
  116.       UWORD ctl;
  117.       UWORD dataa;
  118.       UWORD datab;
  119.     } spr[8];
  120.     UWORD   color[32];
  121.     UWORD htotal;
  122.     UWORD hsstop;
  123.     UWORD hbstrt;
  124.     UWORD hbstop;
  125.     UWORD vtotal;
  126.     UWORD vsstop;
  127.     UWORD vbstrt;
  128.     UWORD vbstop;
  129.     UWORD sprhstrt;
  130.     UWORD sprhstop;
  131.     UWORD bplhstrt;
  132.     UWORD bplhstop;
  133.     UWORD hhposw;
  134.     UWORD hhposr;
  135.     UWORD beamcon0;
  136.     UWORD hsstrt;
  137.     UWORD vsstrt;
  138.     UWORD hcenter;
  139.     UWORD diwhigh;    /* 1e4 */
  140.     UWORD padf3[11];
  141.     UWORD fmode;
  142. };
  143.  
  144. #ifdef ECS_SPECIFIC
  145.  
  146. /* defines for beamcon register */
  147. #define VARVBLANK    0x1000    /* Variable vertical blank enable */
  148. #define LOLDIS        0x0800    /* long line disable */
  149. #define CSCBLANKEN    0x0400    /* redirect composite sync */
  150. #define VARVSYNC    0x0200    /* Variable vertical sync enable */
  151. #define VARHSYNC    0x0100    /* Variable horizontal sync enable */
  152. #define VARBEAM    0x0080    /* variable beam counter enable */
  153. #define DISPLAYDUAL    0x0040    /* use UHRES pointer and standard pointers */
  154. #define DISPLAYPAL    0x0020    /* set decodes to generate PAL display */
  155. #define VARCSYNC    0x0010    /* Variable composite sync enable */
  156. #define CSBLANK    0x0008    /* Composite blank out to CSY* pin */
  157. #define CSYNCTRUE    0x0004    /* composite sync true signal */
  158. #define VSYNCTRUE    0x0002    /* vertical sync true */
  159. #define HSYNCTRUE    0x0001    /* horizontal sync true */
  160.  
  161. /* new defines for bplcon0 */
  162. #define USE_BPLCON3    1
  163.  
  164. /* new defines for bplcon2 */
  165. #define BPLCON2_ZDCTEN        (1<<10) /* colormapped genlock bit */
  166. #define BPLCON2_ZDBPEN        (1<<11) /* use bitplane as genlock bits */
  167. #define BPLCON2_ZDBPSEL0    (1<<12) /* three bits to select one */
  168. #define BPLCON2_ZDBPSEL1    (1<<13) /* of 8 bitplanes in */
  169. #define BPLCON2_ZDBPSEL2    (1<<14) /* ZDBPEN genlock mode */
  170.  
  171. /* defines for bplcon3 register */
  172. #define BPLCON3_EXTBLNKEN    (1<<0)    /* external blank enable */
  173. #define BPLCON3_EXTBLKZD    (1<<1)    /* external blank ored into trnsprncy */
  174. #define BPLCON3_ZDCLKEN    (1<<2)    /* zd pin outputs a 14mhz clock*/
  175. #define BPLCON3_BRDNTRAN    (1<<4)    /* border is opaque */
  176. #define BPLCON3_BRDNBLNK    (1<<5)    /* border is opaque */
  177.  
  178. #endif    /* ECS_SPECIFIC */
  179.  
  180. #endif    /* HARDWARE_CUSTOM_H */
  181.