static int refresh_handled_slot;
static bool refptr_preupdated;
static bool hstrobe_conflict;
-static uae_u16 last_hstrobe;
+static uae_u16 strobe_vblank;
static bool vhposw_modified;
static int line_disabled;
static bool custom_disabled;
} else if (ecs_agnus) {
// Visible vblank end is delayed by 1 line
thisline_decision.vb = vb_start_line >= 2 + vblank_extraline || vb_end_next_line ? 0 : VB_NOVB;
- if (hstrobe_conflict && last_hstrobe == 0x3a && thisline_decision.vb) {
+ if (hstrobe_conflict && strobe_vblank && thisline_decision.vb) {
thisline_decision.vb = VB_XBLANK;
}
} else {
thisline_decision.vb = vb_start_line >= 2 + vblank_extraline || vb_end_next_line ? 0 : VB_NOVB;
+ if (hstrobe_conflict && strobe_vblank && thisline_decision.vb) {
+ thisline_decision.vb = VB_XBLANK;
+ }
}
// if programmed vblank
uae_u16 strobe = get_strobe_reg(i);
if (i == 0) {
if (!hstrobe_conflict) {
- last_hstrobe = strobe;
+ if (strobe == 0x38 || (strobe == 0x3a && ecs_denise)) {
+ // OCS: only STREQU enables vblank. STREQU and STRVBL if ECS Denise.
+ strobe_vblank = 1;
+ } else if (strobe == 0x3c) {
+ // STRHOR disables vblank
+ strobe_vblank = 0;
+ }
}
}
alloc_cycle(hp, strobe != 0x1fe ? CYCLE_STROBE : CYCLE_REFRESH);
hdiwstate_blank = diw_states::DIW_waiting_start;
maxvpos_display_vsync_next = false;
hstrobe_conflict = false;
- last_hstrobe = 0;
+ strobe_vblank = 0;
irq_forced_delay = 0;
irq_forced = 0;
#endif
case 0x034: POTGO(value); break;
- case 0x038: last_hstrobe = 0x38; break;
- case 0x03a: last_hstrobe = 0x3a; break;
- case 0x03c: last_hstrobe = 0x3c; break;
+ case 0x038:
+ strobe_vblank = 1;
+ break;
+ case 0x03a:
+ if (ecs_denise) {
+ strobe_vblank = 1;
+ }
+ break;
+ case 0x03c:
+ strobe_vblank = 0;
+ break;
case 0x040: BLTCON0(hpos, value); break;
case 0x042: BLTCON1(hpos, value); break;