]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Overscan TV mode top and bottom border interlace fix.
authorToni Wilen <twilen@winuae.net>
Wed, 2 Apr 2025 17:12:52 +0000 (20:12 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 2 Apr 2025 17:12:52 +0000 (20:12 +0300)
custom.cpp
drawing.cpp
include/drawing.h

index 3c6db2d10faef43d5c15e9439ea890cd6e7b191e..49c15651faa171414237a88fc5b8cfb59adf7fac 100644 (file)
@@ -5092,7 +5092,7 @@ static void check_interlace(void)
                }
        }
        if (!ad->picasso_on) {
-               if (ad->interlace_on) {
+               if (ad->interlace_on && currprefs.gf[GF_INTERLACE].enable) {
                        ad->gf_index = GF_INTERLACE;
                } else {
                        ad->gf_index = GF_NORMAL;
@@ -10757,7 +10757,7 @@ static void draw_line(void)
        int cslen = 10;
        draw_denise_line_queue(dvp, nextline_how, rga_denise_cycle_line, rga_denise_cycle_start, rga_denise_cycle, rga_denise_cycle_count,
                display_hstart_cyclewait_skip, display_hstart_cyclewait_skip2,
-               wclks, cs, cslen, lol, l);
+               wclks, cs, cslen, lof_store, lol, l);
 }
 
 static void dmal_fast(void)
index 4ac9b7ca0e39087be6698729f6fb7f8c5e62f240..044d22f724219ca0ee1f60f0ea889f7ed9577cb9 100644 (file)
@@ -81,7 +81,7 @@ struct denise_rga_queue
        int dtotal;
        int calib_start;
        int calib_len;
-       bool lol;
+       bool lol, lof;
        uae_u16 strobe;
        int strobe_pos;
        struct linestate *ls;
@@ -3631,12 +3631,14 @@ static void handle_strobes(struct denise_rga *rd)
        if (rd->rga == 0x03c && previous_strobe != 0x03c) {
                linear_denise_vbstrt = this_line->linear_vpos;
                if (denise_vblank_extra) {
-                       denise_vblank_extra_vbstrt = this_line->linear_vpos + denise_vblank_extra;
+                       int lof = this_line->lof;
+                       denise_vblank_extra_vbstrt = this_line->linear_vpos + denise_vblank_extra + lof;
                }
        } else if (rd->rga != 0x03c && previous_strobe == 0x03c) {
                linear_denise_vbstop = this_line->linear_vpos;
                if (denise_vblank_extra) {
-                       denise_vblank_extra_vbstop = this_line->linear_vpos - denise_vblank_extra;
+                       int lof = this_line->lof;
+                       denise_vblank_extra_vbstop = this_line->linear_vpos - denise_vblank_extra + lof;
                }
                denise_visible_lines = 0;
        }
@@ -5317,7 +5319,7 @@ void draw_denise_line(int gfx_ypos, enum nln_how how, uae_u32 linecnt, int start
                                        if (h) {
                                                denise_hcounter_next = denise_hcounter_new;
                                        }
-                                       checkhorizontal1_aga(denise_hcounter << 2, denise_hcounter_next << 2, h);
+                                       checkhorizontal1_aga(denise_hcounter, denise_hcounter_next, h);
                                        flush_null();
 #ifdef DEBUGGER
                                        *debug_dma_dhpos_odd = denise_hcounter;
@@ -6754,6 +6756,10 @@ void draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct lines
                return;
        }
 
+       if ((this_line->linear_vpos >= denise_vblank_extra_vbstop || this_line->linear_vpos < denise_vblank_extra_vbstrt) && currprefs.gfx_overscanmode < OVERSCANMODE_ULTRA) {
+               return;
+       }
+
        uae_u32 *buf1p = buf1;
        uae_u32 *buf2p = buf2 != buf1 ? buf2 : NULL;
        int planecnt = GET_PLANES(ls->bplcon0);
@@ -7125,6 +7131,7 @@ static void updatelinedata(void)
 {
        this_line = &temp_line;
        this_line->vpos = vpos;
+       this_line->lof = lof_store;
        this_line->linear_vpos = linear_vpos;
 }
 
@@ -7253,7 +7260,7 @@ void denise_handle_quick_strobe_queue(uae_u16 strobe, int strobe_pos, int endpos
        }
 }
 
-void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int endpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls)
+void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int endpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lof, bool lol, struct linestate *ls)
 {
        if (MULTITHREADED_DENISE) {
 
@@ -7274,6 +7281,7 @@ void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int star
                q->dtotal = dtotal;
                q->calib_start = calib_start;
                q->calib_len = calib_len;
+               q->lof = lof;
                q->lol = lol;
                q->ls = ls;
                q->vpos = vpos;
index eec0fb5fbaf4cf2e199eea06db190aea5ecc21c8..55fd2a1f91624a28743da0789f8d35db457f493e 100644 (file)
@@ -177,7 +177,7 @@ struct linestate
 
 extern struct color_entry denise_colors;
 void draw_denise_line(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls);
-void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int endpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls);
+void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int endpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lof, bool lol, struct linestate *ls);
 void draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);
 void draw_denise_bitplane_line_fast_queue(int gfx_ypos, enum nln_how how, struct linestate *ls);
 void draw_denise_border_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);