From: Toni Wilen Date: Fri, 5 Apr 2024 17:25:14 +0000 (+0300) Subject: Adjust hblank positions X-Git-Tag: 5300~43 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=46c5f1f68562cce1f986657bfc1b198e139a2524;p=francis%2Fwinuae.git Adjust hblank positions --- diff --git a/custom.cpp b/custom.cpp index 2b7bcf65..d975f701 100644 --- a/custom.cpp +++ b/custom.cpp @@ -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; diff --git a/drawing.cpp b/drawing.cpp index 644b60a8..55d7fed1 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -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;