From 5294fb6662ef0fbbfbe0e722d9ac4c9636388531 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 10 Dec 2023 18:45:52 +0200 Subject: [PATCH] Adjust hsync end in programmed modes. --- custom.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom.cpp b/custom.cpp index 7aa57984..9cc74297 100644 --- a/custom.cpp +++ b/custom.cpp @@ -7162,7 +7162,7 @@ static void init_beamcon0(bool fakehz) int hp2 = maxhpos * 2; if (exthblank) { - int hb = 0; + int hb = 1; int hbstrtx = (hbstrt & 0xff) * 2; int hbstopx = (hbstop & 0xff) * 2; if (aga_mode) { @@ -7183,8 +7183,8 @@ static void init_beamcon0(bool fakehz) if (hbstopx > hp2 / 2) { hbstopx = 0; } - if (hb < 0) { - hb = 0; + if (hb < 1) { + hb = 1; } #if 0 @@ -7198,8 +7198,8 @@ static void init_beamcon0(bool fakehz) hsz = hsstop - hsstrt; } #endif - maxhpos_display = maxhpos - (hb / 2); - hsstop_detect = hbstopx; + maxhpos_display = maxhpos - ((hb + 1) / 2); + hsstop_detect = hbstopx - 1; } else { -- 2.47.3