From: Toni Wilen Date: Fri, 17 Mar 2017 16:56:52 +0000 (+0200) Subject: BPLCON4 XOR value didn't affect possible background color between end of bitplanes... X-Git-Tag: 3500~81 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1a2bd46c1e86ddba48e7c33e0f67501d19b6b779;p=francis%2Fwinuae.git BPLCON4 XOR value didn't affect possible background color between end of bitplanes and end of diw. --- diff --git a/custom.cpp b/custom.cpp index 74336904..b406341f 100644 --- a/custom.cpp +++ b/custom.cpp @@ -1052,6 +1052,8 @@ static void record_color_change2 (int hpos, int regno, unsigned long value) curr_color_changes[next_color_change].value = value; next_color_change++; curr_color_changes[next_color_change].regno = -1; + if (value & 0xff00) + thisline_decision.xor_seen = true; } static bool isehb (uae_u16 bplcon0, uae_u16 bplcon2) @@ -3808,6 +3810,7 @@ static void reset_decisions (void) thisline_decision.ehb_seen = !! isehb (bplcon0, bplcon2); thisline_decision.ham_at_start = !! (bplcon0 & 0x800); thisline_decision.bordersprite_seen = issprbrd (-1, bplcon0, bplcon3); + thisline_decision.xor_seen = (bplcon4 & 0xff00) != 0; /* decided_res shouldn't be touched before it's initialized by decide_line(). */ thisline_decision.diwfirstword = -1; diff --git a/drawing.cpp b/drawing.cpp index c67818e7..25c9ff09 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -868,6 +868,7 @@ static void pfield_init_linetoscr (bool border) int ddf_right = dp_for_drawing->plfright * 2 + DIW_DDF_OFFSET; int leftborderhidden; int native_ddf_left2; + bool expanded = false; hsync_shift_hack = 0; @@ -940,6 +941,13 @@ static void pfield_init_linetoscr (bool border) } #ifdef AGA + // if BPLCON4 is non-zero: it will affect background color until end of DIW. + if (dp_for_drawing->xor_seen) { + if (playfield_end < linetoscr_diw_end && hblank_right_stop > playfield_end) { + playfield_end = linetoscr_diw_end; + expanded = true; + } + } may_require_hard_way = false; if (dp_for_drawing->bordersprite_seen && !ce_is_borderblank(colors_for_drawing.extra) && dip_for_drawing->nr_sprites) { int min = visible_right_border, max = visible_left_border, i; @@ -1002,10 +1010,10 @@ static void pfield_init_linetoscr (bool border) leftborderhidden += hblank_left_start - playfield_start; src_pixel = MAX_PIXELS_PER_LINE + res_shift_from_window (leftborderhidden); - if (dip_for_drawing->nr_sprites == 0) + if (dip_for_drawing->nr_sprites == 0 && !expanded) return; - if (aga_mode) { + if (dip_for_drawing->nr_sprites && aga_mode) { int add = get_shdelay_add(); if (add) { if (sprite_playfield_start > 0) { diff --git a/include/drawing.h b/include/drawing.h index 19d0f03c..ce99be06 100644 --- a/include/drawing.h +++ b/include/drawing.h @@ -267,7 +267,10 @@ struct decision { bool ehb_seen; bool ham_seen; bool ham_at_start; +#ifdef AGA bool bordersprite_seen; + bool xor_seen; +#endif }; /* Anything related to changes in hw registers during the DDF for one