]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Adjust hblank positions
authorToni Wilen <twilen@winuae.net>
Fri, 5 Apr 2024 17:25:14 +0000 (20:25 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 5 Apr 2024 17:25:14 +0000 (20:25 +0300)
custom.cpp
drawing.cpp

index 2b7bcf652659acdd10605eed1549c739a481bc27..d975f7016cf92a6ca65cbed73ad42783e8f61050 100644 (file)
@@ -6115,13 +6115,15 @@ static void set_ocs_denise_blank(uae_u32 v)
 {
        int hpos = current_hpos();
        sync_color_changes(hpos);
-       record_color_change2(hpos, 0, COLOR_CHANGE_BLANK | 1);
+       int pos = hpos_to_diwx(hpos) + 2; // +1 hires
+       record_color_change2(-pos, 0, COLOR_CHANGE_BLANK | 1);
 }
 static void reset_ocs_denise_blank(uae_u32 v)
 {
        int hpos = current_hpos();
        sync_color_changes(hpos);
-       record_color_change2(hpos, 0, COLOR_CHANGE_BLANK | 0);
+       int pos = hpos_to_diwx(hpos) + 2; // +1 hires
+       record_color_change2(-pos, 0, COLOR_CHANGE_BLANK | 0);
 }
 
 
@@ -6163,15 +6165,15 @@ static void reset_decisions_scanline_start(void)
        if (!ecs_denise && currprefs.gfx_overscanmode > OVERSCANMODE_OVERSCAN) {
                if (!ecs_agnus) {
                        if (vb_start_line == 2 + vblank_extraline) {
-                               event2_newevent_xx(-1, 3 * CYCLE_UNIT, 0, set_ocs_denise_blank);
+                               event2_newevent_xx(-1, 2 * CYCLE_UNIT, 0, set_ocs_denise_blank);
                        }
                } else {
                        if (vb_start_line == 1 + vblank_extraline) {
-                               event2_newevent_xx(-1, 3 * CYCLE_UNIT, 0, set_ocs_denise_blank);
+                               event2_newevent_xx(-1, 2 * CYCLE_UNIT, 0, set_ocs_denise_blank);
                        }
                }
                if (vb_end_next_line2) {
-                       event2_newevent_xx(-1, 3 * CYCLE_UNIT, 0, reset_ocs_denise_blank);
+                       event2_newevent_xx(-1, 2 * CYCLE_UNIT, 0, reset_ocs_denise_blank);
                }
        }
 
@@ -6725,12 +6727,10 @@ static void updateextblk(void)
 
        if (!exthblank) {
                hbstrt_v2 = (8 << CCK_SHRES_SHIFT) - 3;
-               hbstop_v2 = (47 << CCK_SHRES_SHIFT) - 7;
-               if (denisea1000) {
-                       hbstop_v2 = (47 << CCK_SHRES_SHIFT) - 7;
-               } else if (!ecs_denise) {
-                       hbstop_v2 = (47 << CCK_SHRES_SHIFT) - 3;
+               if (!ecs_denise) {
+                       hbstrt_v2 -= 4;
                }
+               hbstop_v2 = (47 << CCK_SHRES_SHIFT) - 7;
                hbstrt_v2 = adjust_hr(hbstrt_v2);
                hbstop_v2 = adjust_hr(hbstop_v2);
        }
@@ -13081,7 +13081,7 @@ static void hsync_handlerh(bool onvsync)
        estimate_last_fetch_cycle(hpos);
 
        if (vb_end_next_line && !ecs_denise && currprefs.gfx_overscanmode > OVERSCANMODE_OVERSCAN) {
-               event2_newevent_xx(-1, 3 * CYCLE_UNIT, 0, set_ocs_denise_blank);
+               event2_newevent_xx(-1, 2 * CYCLE_UNIT, 0, set_ocs_denise_blank);
        }
 
        eventtab[ev_hsynch].evtime = get_cycles() + HSYNCTIME;
index 644b60a89f9bb7f2ce383d8b799ec16c4436e2b1..55d7fed1574be4a878449d6629f7d63761accf15 100644 (file)
@@ -654,12 +654,10 @@ static void set_hblanking_limits(void)
        bool hardwired = !dp_for_drawing || !ce_is_extblankset(colors_for_drawing.extra);
        bool doblank = false;
        int hbstrt = ((maxhpos_short + 8) << CCK_SHRES_SHIFT) - 3;
-       int hbstop = (47 << CCK_SHRES_SHIFT) - 7;
-       if (denisea1000) {
-               hbstop = (47 << CCK_SHRES_SHIFT) - 7;
-       } else if (!ecs_denise) {
-               hbstop = (47 << CCK_SHRES_SHIFT) - 3;
+       if (!ecs_denise) {
+               hbstrt -= 4;
        }
+       int hbstop = (47 << CCK_SHRES_SHIFT) - 7;
 
        if (currprefs.gfx_overscanmode < OVERSCANMODE_OVERSCAN) {
                int mult = (OVERSCANMODE_OVERSCAN - currprefs.gfx_overscanmode) * 4;