]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
BPLCON4 XOR value didn't affect possible background color between end of bitplanes...
authorToni Wilen <twilen@winuae.net>
Fri, 17 Mar 2017 16:56:52 +0000 (18:56 +0200)
committerToni Wilen <twilen@winuae.net>
Fri, 17 Mar 2017 16:56:52 +0000 (18:56 +0200)
custom.cpp
drawing.cpp
include/drawing.h

index 74336904810a67fee450d787e879bb813c079d45..b406341fce7913e8fdb5346dffb410ffbf2d4ad4 100644 (file)
@@ -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;
index c67818e74381afa1d901c1326ea6a05e9770677a..25c9ff09a1b66b9ce30da5a29317bd3fa3795952 100644 (file)
@@ -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) {
index 19d0f03c4ef4f4e52583a383bc89cf11b8f329ea..ce99be0611064f60afdd34d4ab8c2b9199410203 100644 (file)
@@ -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