From: Toni Wilen Date: Wed, 27 Mar 2024 18:13:44 +0000 (+0200) Subject: Fix vblank start/end position in programmed modes and fix also ECS Denise special... X-Git-Tag: 5300~67 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=f77a0750bb3f13a2831a04f3b6a33b3715b5e63a;p=francis%2Fwinuae.git Fix vblank start/end position in programmed modes and fix also ECS Denise special case. --- diff --git a/custom.cpp b/custom.cpp index 4d0e8536..f023e6ed 100644 --- a/custom.cpp +++ b/custom.cpp @@ -6279,15 +6279,17 @@ static void reset_decisions_hsync_start(void) thisline_decision.fmode = fmode; if (!aga_mode && ecs_denise && exthblank) { - // ECS Denise + EXTBLANK: VBLANK blanking is different - thisline_decision.vb = VB_NOVB; + // ECS Denise + EXTBLANK: VBLANK blanking is different. if (new_beamcon0 & BEAMCON0_BLANKEN) { - // blanking working same as AGA - thisline_decision.vb = vb_start_line >= 1 + vblank_extraline || vb_end_next_line ? 0 : VB_NOVB; + // Follow Agnus VBLANK state directly via CSYNC connection. Ignore strobe vblank state. + thisline_decision.vb = vb_state || vb_end_line ? VB_PRGVB : VB_NOVB; + } else { + // CSYNC: follow CSYNC state + thisline_decision.vb = vs_state_on ? VB_PRGVB : VB_NOVB; } } else if (ecs_agnus) { // Visible vblank end is delayed by 1 line - thisline_decision.vb = vb_start_line >= 1 + vblank_extraline || vb_end_next_line ? 0 : VB_NOVB; + thisline_decision.vb = vb_start_line >= 2 + vblank_extraline || vb_end_next_line ? 0 : VB_NOVB; } else { thisline_decision.vb = vb_start_line >= 2 + vblank_extraline || vb_end_next_line ? 0 : VB_NOVB; }