--- uae/src/include/custom.h 2018/04/24 16:53:27 1.1.1.11 +++ uae/src/include/custom.h 2018/04/24 16:58:52 1.1.1.14 @@ -37,6 +37,8 @@ extern uae_u16 intena,intreq; extern int current_hpos (void); extern int vpos; +extern int n_frames; + STATIC_INLINE int dmaen (unsigned int dmamask) { return (dmamask & dmacon) && (dmacon & 0x200); @@ -102,9 +104,10 @@ extern unsigned long syncbase; extern unsigned long frametime, timeframes; -/* 50 words give you 800 horizontal pixels. An A500 can't do that, so it ought - * to be enough. Don't forget to update the definition in genp2c.c as well. */ -#define MAX_WORDS_PER_LINE 50 +/* 100 words give you 1600 horizontal pixels. Should be more than enough for + * superhires. Don't forget to update the definition in genp2c.c as well. + * needs to be larger for superhires support */ +#define MAX_WORDS_PER_LINE 100 extern uae_u32 hirestab_h[256][2]; extern uae_u32 lorestab_h[256][4]; @@ -114,3 +117,11 @@ extern uae_u32 lorestab_l[256][2]; /* AGA mode color lookup tables */ extern unsigned int xredcolors[256], xgreencolors[256], xbluecolors[256]; + +/* get resolution from bplcon0 */ +#define GET_RES(CON0) (((CON0) & 0x8000) ? RES_HIRES : ((CON0) & 0x40) ? RES_SUPERHIRES : RES_LORES) +/* get sprite width from FMODE */ +#define GET_SPRITEWIDTH(FMODE) ((((FMODE) >> 2) & 3) == 3 ? 64 : (((FMODE) >> 2) & 3) == 0 ? 16 : 32) +/* Compute the number of bitplanes from a value written to BPLCON0 */ +#define GET_PLANES(x) ((((x) >> 12) & 7) | (((x) & 0x10) >> 1)) +