]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Remove interlace artifacts blitter/cycle state fix.
authorToni Wilen <twilen@winuae.net>
Fri, 26 May 2023 18:27:22 +0000 (21:27 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 26 May 2023 18:27:22 +0000 (21:27 +0300)
blitter.cpp
custom.cpp
include/custom.h

index fca77c1e10f8c691fac035c5b086b445d3169684..6764ee6e6a2f162b80b2885fab5e070fb0ab82e6 100644 (file)
@@ -1500,6 +1500,10 @@ static bool decide_blitter_maybe_write2(int until_hpos, uaecptr addr, uae_u32 va
        bool written = false;
        int hsync = until_hpos < 0;
 
+       if (scandoubled_line) {
+               return 0;
+       }
+
        if (hsync && blt_delayed_irq) {
                if (blt_delayed_irq > 0)
                        blt_delayed_irq--;
index ba58c379104d52186d6408d9f4c8a20685570174..262f077adbb30de93e8bd622fdffffff9a24be6e 100644 (file)
@@ -132,6 +132,7 @@ static int hpos_hsync_extra;
 static int vpos_count, vpos_count_diff;
 int lof_store; // real bit in custom registers
 int lof_display; // what display device thinks
+int scandoubled_line;
 static bool lof_lastline, lof_prev_lastline;
 static int lol, lol_prev;
 static int next_lineno;
@@ -142,7 +143,6 @@ static int vposw_change;
 static bool lof_lace;
 static bool prevlofs[3];
 static bool bplcon0_interlace_seen;
-static int scandoubled_line;
 static bool vsync_rendered, frame_rendered, frame_shown;
 static frame_time_t vsynctimeperline;
 static frame_time_t frameskiptime;
@@ -12326,6 +12326,13 @@ static void hsync_scandoubler(int hpos)
                        }
                }
        }
+
+       uae_u8 cycle_line_slot_tmp[MAX_CHIPSETSLOTS];
+       uae_u16 cycle_line_pipe_tmp[MAX_CHIPSETSLOTS];
+
+       memcpy(cycle_line_slot_tmp, cycle_line_slot, sizeof(uae_u8) * MAX_CHIPSETSLOTS);
+       memcpy(cycle_line_pipe_tmp, cycle_line_pipe, sizeof(uae_u16) * MAX_CHIPSETSLOTS);
+
        reset_decisions_scanline_start();
        reset_scandoubler_sync(hpos);
        reset_decisions_hsync_start();
@@ -12356,6 +12363,9 @@ static void hsync_scandoubler(int hpos)
        dmacon = odmacon;
        copper_enabled_thisline = ocop;
 
+       memcpy(cycle_line_slot, cycle_line_slot_tmp, sizeof(uae_u8) * MAX_CHIPSETSLOTS);
+       memcpy(cycle_line_pipe, cycle_line_pipe_tmp, sizeof(uae_u16) * MAX_CHIPSETSLOTS);
+
        for (int i = 0; i < MAX_PLANES; i++) {
                bplpt[i] = bpltmp[i];
                bplptx[i] = bpltmpx[i];
index 86742083d2b2399626dbd1ae0f980d6c151604af..f6a7f558ca40b06d4fc314547dc5b1ad8abef516 100644 (file)
@@ -76,6 +76,7 @@ extern uae_u16 dmacon;
 extern uae_u16 intena, intreq, intreqr;
 
 extern int vpos, lof_store, lof_display;
+extern int scandoubled_line;
 
 extern int n_frames;