From: Toni Wilen Date: Fri, 22 Sep 2023 18:30:47 +0000 (+0300) Subject: Blitter BLTCON0 channel modification mid blit emulation update. X-Git-Tag: 5.1.0~97 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=cc2cb06a4af614140e1d3c1154864433aa66aaeb;p=francis%2Fwinuae.git Blitter BLTCON0 channel modification mid blit emulation update. --- diff --git a/blitter.cpp b/blitter.cpp index d13efecf..8f32853b 100644 --- a/blitter.cpp +++ b/blitter.cpp @@ -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) {