]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Blitter BLTCON0 channel modification mid blit emulation update.
authorToni Wilen <twilen@winuae.net>
Fri, 22 Sep 2023 18:30:47 +0000 (21:30 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 22 Sep 2023 18:30:47 +0000 (21:30 +0300)
blitter.cpp

index d13efecfc497890969bf18b3e4dde095f25a32e4..8f32853b45dbf04225278fd4f66f9c6929447343 100644 (file)
@@ -1164,6 +1164,10 @@ static int get_current_channel(void)
                }
        } else {
                // order is important when multiple bits in shift register
+               // A (if not also D)
+               if (shifter[0] && (bltcon0 & BLTCHA) && !shifter[3]) {
+                       return 1;
+               }
                // C
                if (shifter[2] && (bltcon0 & BLTCHC)) {
                        return 3;
@@ -1173,10 +1177,6 @@ static int get_current_channel(void)
                if (shifter[3] && (bltcon0 & BLTCHC) && (shifter[0] || shifter[1])) {
                        return 3;
                }
-               // A
-               if (shifter[0] && (bltcon0 & BLTCHA)) {
-                       return 1;
-               }
                // B
                if (shifter[1] && (bltcon0 & BLTCHB)) {
                        return 2;
@@ -1265,9 +1265,8 @@ static int blitter_next_cycle(void)
        memset(shifter, 0, sizeof(shifter));
 
        if (shifter_skip_b_old && !shifter_skip_b) {
-               // if B skip was disabled: A goes both to B and C
+               // if B skip was disabled: A goes to B
                tmp[1] = tmp[0];
-               tmp[2] = tmp[0];
                shifter_skip_b_old = shifter_skip_b;
                blitchanged = true;
        } else if (!shifter_skip_b_old && shifter_skip_b) {
@@ -1280,6 +1279,7 @@ static int blitter_next_cycle(void)
        if (shifter_skip_y_old && !shifter_skip_y) {
                // if Y skip was disabled: X goes both to Y and OUT
                tmp[3] = tmp[2];
+               shifter_out = tmp[3];
                shifter_skip_y_old = shifter_skip_y;
                blitchanged = true;
        } else if (!shifter_skip_y_old && shifter_skip_y) {