--- uae/src/include/custom.h 2018/04/24 16:39:29 1.1.1.2 +++ uae/src/include/custom.h 2018/04/24 16:47:47 1.1.1.7 @@ -1,27 +1,42 @@ - /* + /* * UAE - The Un*x Amiga Emulator - * + * * custom chip support * * (c) 1995 Bernd Schmidt */ -extern void custom_init(void); -extern void customreset(void); -extern int intlev(void); -extern void dumpcustom(void); +/* These are the masks that are ORed together in the chipset_mask option. + * If CSMASK_AGA is set, the ECS bits are guaranteed to be set as well. */ +#define CSMASK_ECS_AGNUS 1 +#define CSMASK_ECS_DENISE 2 +#define CSMASK_AGA 4 + +extern void custom_init (void); +extern void customreset (void); +extern int intlev (void); +extern void dumpcustom (void); + +extern void do_disk (void); + +extern void notice_new_xcolors (void); +extern void notice_screen_contents_lost (void); +extern void init_row_map (void); -extern void do_disk(void); +extern int picasso_requested_on; +extern int picasso_on; -extern int inhibit_frame; +/* Set to 1 to leave out the current frame in average frame time calculation. + * Useful if the debugger was active. */ extern int bogusframe; -extern UWORD dmacon; -extern UWORD intena,intreq; +extern uae_u16 dmacon; +extern uae_u16 intena,intreq; extern int current_hpos (void); +extern int vpos; -static __inline__ int dmaen(UWORD dmamask) +static __inline__ int dmaen (unsigned int dmamask) { return (dmamask & dmacon) && (dmacon & 0x200); } @@ -36,30 +51,42 @@ static __inline__ int dmaen(UWORD dmamas #define SPCFLAG_DOINT 256 #define SPCFLAG_BLTNASTY 512 #define SPCFLAG_EXEC 1024 -#define SPCFLAG_EMULTRAP 2048 -#define SPCFLAG_TIMER 4096 #define SPCFLAG_MODE_CHANGE 8192 -#define PRESERVED_FLAGS (SPCFLAG_DISK|SPCFLAG_BLTNASTY|SPCFLAG_TIMER) - extern int dskdmaen; -extern UWORD adkcon; +extern uae_u16 adkcon; + +extern unsigned int joy0dir, joy1dir; +extern int joy0button, joy1button; + +extern void INTREQ (uae_u16); +extern uae_u16 INTREQR (void); -extern UWORD joy0dir; -extern int joy0button; +/* maximums for statically allocated tables */ -extern void INTREQ(UWORD); -extern UWORD INTREQR(void); -extern UWORD DMACONR(void); +#define MAXHPOS 227 +#define MAXVPOS 312 + +/* PAL/NTSC values */ -#define maxhpos 227 -#define maxvpos 312 /* The HRM says: The vertical blanking area (PAL) ranges from line 0 to line 29, * and no data can be displayed there. Nevertheless, we lose some overscan data - * if this is set to 29. */ -#define minfirstline 21 -#define vblank_endline 29 -#define numscrlines (maxvpos+1-minfirstline+1) + * if minfirstline is set to 29. */ + +#define MAXHPOS_PAL 227 +#define MAXHPOS_NTSC 227 +#define MAXVPOS_PAL 312 +#define MAXVPOS_NTSC 262 +#define MINFIRSTLINE_PAL 21 +#define MINFIRSTLINE_NTSC 18 +#define VBLANK_ENDLINE_PAL 29 +#define VBLANK_ENDLINE_NTSC 24 +#define VBLANK_HZ_PAL 50 +#define VBLANK_HZ_NTSC 60 + +extern int maxhpos, maxvpos, minfirstline, vblank_endline, numscrlines, vblank_hz; +extern unsigned long syncbase; +#define NUMSCRLINES (maxvpos+1-minfirstline+1) #define DMA_AUD0 0x0001 #define DMA_AUD1 0x0002 @@ -74,3 +101,12 @@ extern UWORD DMACONR(void); 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 + +extern uae_u32 hirestab_h[256][2]; +extern uae_u32 lorestab_h[256][4]; + +extern uae_u32 hirestab_l[256][1]; +extern uae_u32 lorestab_l[256][2];