uae_u32 hsync_counter, vsync_counter;
frame_time_t idletime;
int bogusframe;
+static int display_vsync_counter;
/* Recording of custom chip register changes. */
static int current_change_set;
lineno++;
} else if (!interlace_seen && doublescan <= 0 && currprefs.gfx_vresolution && currprefs.gfx_pscanlines > 1) {
lineno *= 2;
- if (vsync_counter & 1) {
+ if (display_vsync_counter & 1) {
lineno++;
nextline_how = currprefs.gfx_pscanlines == 3 ? nln_lower_black_always : nln_lower_black;
} else {
}
if (vpos == maxvpos_display_vsync) {
+ hsync_record_line_state_last(next_lineno, nextline_how, 0);
inputdevice_read_msg(true);
vsync_display_render();
vsync_display_rendered = false;
hstrobe_conflict = false;
minfirstline_linear = minfirstline;
reset_autoscale();
+ display_vsync_counter++;
}
vsync_line = vs;
hsync_handler_post(vs);
extra_cycle = 0;
hsync_counter = 0;
vsync_counter = 0;
+ display_vsync_counter = 0;
currprefs.chipset_mask = changed_prefs.chipset_mask;
update_mirrors();
blitter_reset();
color_reg_cpy (&colors_for_drawing, curr_color_tables + ctable);
color_match_type = color_match_full;
} else {
- memcpy (colors_for_drawing.acolors, curr_color_tables[ctable].acolors, sizeof colors_for_drawing.acolors);
+ if (aga_mode) {
+ memcpy(colors_for_drawing.acolors, curr_color_tables[ctable].acolors, sizeof(xcolnr) * 256);
+ } else {
+ memcpy(colors_for_drawing.acolors, curr_color_tables[ctable].acolors, sizeof(xcolnr) * 32);
+ }
colors_for_drawing.extra = curr_color_tables[ctable].extra;
color_match_type = color_match_acolors;
}
gui_flicker_led (-1, 0, 0);
}
-void hsync_record_line_state (int lineno, enum nln_how how, int changed)
+void hsync_record_line_state_last(int lineno, enum nln_how how, int changed)
+{
+ uae_u8 *state = linestate + lineno;
+
+ switch (how) {
+ case nln_upper_black:
+ case nln_upper_black_always:
+ case nln_lower_black:
+ case nln_lower_black_always:
+ hsync_record_line_state(lineno, how, 0);
+ break;
+ }
+}
+
+void hsync_record_line_state(int lineno, enum nln_how how, int changed)
{
struct amigadisplay *ad = &adisplays[0];
uae_u8 *state;
nln_lower_black_always
};
-extern void hsync_record_line_state (int lineno, enum nln_how, int changed);
+extern void hsync_record_line_state(int lineno, enum nln_how, int changed);
+extern void hsync_record_line_state_last(int lineno, enum nln_how, int changed);
extern void vsync_handle_redraw (int long_field, int lof_changed, uae_u16, uae_u16, bool drawlines, bool initial);
extern bool vsync_handle_check (void);
extern void draw_lines(int end, int section);