--- uae/src/include/drawing.h 2018/04/24 16:42:29 1.1 +++ uae/src/include/drawing.h 2018/04/24 16:45:11 1.1.1.3 @@ -12,16 +12,10 @@ #endif /* - * Several people have tried this define, with not much success. Turning on - * AGA garbles the screen. A place you could start looking is the calcdiw() - * function - the AGA timing parameters are different, and apparently I - * haven't figured out the correct formula yet. Pity, the current one looks - * logical. - * - * @@@ Probably won't compile in this version. + * This doesn't work very well */ -/* #define EMULATE_AGA */ +#undef EMULATE_AGA #ifndef EMULATE_AGA #define AGA_CHIPSET 0 @@ -55,7 +49,10 @@ extern int framecnt; struct color_entry { #if AGA_CHIPSET == 0 - /* X86.S expects this at the start of the structure. */ + /* Color values in two formats: 12 bit Amiga RGB (color_regs), and + * the native color value; both for each Amiga hardware color register. + */ + /* X86.S expects acolors at the start of the structure. */ xcolnr acolors[32]; uae_u16 color_regs[32]; #else @@ -132,6 +129,9 @@ struct decision { #endif }; +/* Compute the number of bitplanes from a value written to BPLCON0 */ +#define GET_PLANES(x) ((((x) >> 12) & 7) | (((x) & 0x10) >> 1)) + /* Anything related to changes in hw registers during the DDF for one * line. */ struct draw_info { @@ -143,7 +143,6 @@ struct draw_info { extern struct decision line_decisions[2 * (maxvpos+1) + 1]; extern struct draw_info line_drawinfo[2][2 * (maxvpos+1) + 1]; -extern char line_changed[2 * (maxvpos+1)]; extern uae_u8 line_data[(maxvpos+1) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2]; @@ -163,10 +162,12 @@ enum nln_how { /* Interlace, doubled display, upper line. */ nln_upper, /* Interlace, doubled display, lower line. */ - nln_lower + nln_lower, + /* This line normal, next one black. */ + nln_nblack }; -extern void hsync_record_line_state (int lineno, enum nln_how); +extern void hsync_record_line_state (int lineno, enum nln_how, int changed); extern void vsync_handle_redraw (int long_frame, int lof_changed); extern void init_hardware_for_drawing_frame (void); extern void finish_drawing_frame (void); @@ -180,3 +181,23 @@ extern int thisframe_first_drawn_line, t extern uae_u16 clxdat, clxcon; extern int clx_sprmask; extern int diwfirstword,diwlastword; + +#define IHF_SCROLLLOCK 0 +#define IHF_QUIT_PROGRAM 1 +#define IHF_PICASSO 2 +#define IHF_SOUNDADJUST 3 + +extern int inhibit_frame; + +static __inline__ void set_inhibit_frame (int bit) +{ + inhibit_frame |= 1 << bit; +} +static __inline__ void clear_inhibit_frame (int bit) +{ + inhibit_frame &= ~(1 << bit); +} +static __inline__ void toggle_inhibit_frame (int bit) +{ + inhibit_frame ^= ~(1 << bit); +}