]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix vblank start/end position in programmed modes and fix also ECS Denise special...
authorToni Wilen <twilen@winuae.net>
Wed, 27 Mar 2024 18:13:44 +0000 (20:13 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 27 Mar 2024 18:13:44 +0000 (20:13 +0200)
custom.cpp

index 4d0e8536db58823a103e97bc1c5cce0fcf82d2ca..f023e6ed7abaf742c5f5d06e6b2f63a5476cef32 100644 (file)
@@ -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;
        }