X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=retrocrawl;a=blobdiff_plain;f=src%2Famiga%2Fhwregs.h;h=ccedb57a73b0cfa1cb82f5421f5eaf53b1988cb8;hp=04385e55cf1e0a7ed89ba7becf7bf55463bad79c;hb=bba694e9bc50fb24ffe4b3c8f7b5d33f01b3ea4d;hpb=cab072d239d772d1c3445612d2599da36b087b25 diff --git a/src/amiga/hwregs.h b/src/amiga/hwregs.h index 04385e5..ccedb57 100644 --- a/src/amiga/hwregs.h +++ b/src/amiga/hwregs.h @@ -345,6 +345,33 @@ #define REG_COPJMP1 REG(REGN_COPJMP1) #define REG_COPJMP2 REG(REGN_COPJMP2) +#define REG_BLTCON0 REG(REGN_BLTCON0) +#define REG_BLTCON1 REG(REGN_BLTCON1) +#define REG32_BLTCON *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BLTCON0) +#define REG_BLTAFWM REG(REGN_BLTAFWM) +#define REG_BLTALWM REG(REGN_BLTALWM) +#define REG32_BLTAFLWM *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BLTAFWM) +#define REG_BLTCPTH REG(REGN_BLTCPTH) +#define REG_BLTCPTL REG(REGN_BLTCPTL) +#define REG32_BLTCPT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BLTCPTH) +#define REG_BLTBPTH REG(REGN_BLTBPTH) +#define REG_BLTBPTL REG(REGN_BLTBPTL) +#define REG32_BLTBPT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BLTBPTH) +#define REG_BLTAPTH REG(REGN_BLTAPTH) +#define REG_BLTAPTL REG(REGN_BLTAPTL) +#define REG32_BLTAPT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BLTAPTH) +#define REG_BLTDPTH REG(REGN_BLTDPTH) +#define REG_BLTDPTL REG(REGN_BLTDPTL) +#define REG32_BLTDPT *(volatile uint32_t*)(REG_BASE_ADDR | REGN_BLTDPTH) +#define REG_BLTSIZE REG(REGN_BLTSIZE) +#define REG_BLTCMOD REG(REGN_BLTCMOD) +#define REG_BLTBMOD REG(REGN_BLTBMOD) +#define REG_BLTAMOD REG(REGN_BLTAMOD) +#define REG_BLTDMOD REG(REGN_BLTDMOD) +#define REG_BLTCDAT REG(REGN_BLTCDAT) +#define REG_BLTBDAT REG(REGN_BLTBDAT) +#define REG_BLTADAT REG(REGN_BLTADAT) + #define REG_SERPER REG(REGN_SERPER) #define REG_SERDATR REG(REGN_SERDATR) #define REG_SERDAT REG(REGN_SERDAT) @@ -426,6 +453,50 @@ enum { #define BPLCON0_COUNT(x) ((x) << 12) +/* blitter control */ +enum { + BLTCON0_USED = 0x0100, + BLTCON0_USEC = 0x0200, + BLTCON0_USEB = 0x0400, + BLTCON0_USEA = 0x0800 +}; + +enum { + BLTCON1_LINE = 0x0001, + BLTCON1_DECR = 0x0002, + BLTCON1_FCI = 0x0004, + BLTCON1_IFE = 0x0008, + BLTCON1_EFE = 0x0010, + BLTCON1_DOFF = 0x0080 +}; + +#define BLTCON0_LF(x) (x) +#define BLTCON0_ASH(x) ((x) << 12) +#define BLTCON1_BSH(x) ((x) << 12) + +enum { + BLTCON_LINE = 0x00000001, + BLTCON_DECR = 0x00000002, + BLTCON_FCI = 0x00000004, + BLTCON_IFE = 0x00000008, + BLTCON_EFE = 0x00000010, + BLTCON_DOFF = 0x00000080, + BLTCON_USED = 0x01000000, + BLTCON_USEC = 0x02000000, + BLTCON_USEB = 0x04000000, + BLTCON_USEA = 0x08000000 +}; + +#define BLTCON_LF(x) ((uint32_t)(x) << 16) +#define BLTCON_ASH(x) ((uint32_t)(x) << 28) +#define BLTCON_BSH(x) ((uint32_t)(x) << 12) + +#define BLTSIZE_XWORDS(x) ((uint16_t)(x) & 0x7f) +#define BLTSIZE_X(x) BLTSIZE_XWORDS((x) / 16) +#define BLTSIZE_Y(x) ((uint16_t)(x) << 6) +#define BLTSIZE(x, y) (BLTSIZE_X(x) | BLTSIZE_Y(y)) + + #define CIAA_PA_FIR0 0x40 #define CIAA_PA_FIR1 0x80