From 0448f6f230c8d4ccd242a7fa9f6a43e2f5791cf5 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 1 Jan 2023 16:04:31 +0200 Subject: [PATCH] VBLANK interrupt trigger position fix --- custom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom.cpp b/custom.cpp index 5344a7cc..8c036f9e 100644 --- a/custom.cpp +++ b/custom.cpp @@ -12666,7 +12666,7 @@ static void check_vblank_copjmp(uae_u32 v) static void delayed_framestart(uae_u32 v) { check_vblank_copjmp(0); - INTREQ_INT(5, 2); // total REFRESH_FIRST_HPOS + 1 + INTREQ_INT(5, 0); // total REFRESH_FIRST_HPOS - 1 + 1 (in INTREQ_INT) } // this prepares for new line @@ -12763,7 +12763,7 @@ static void hsync_handler_post(bool onvsync) // copper and vblank trigger in same line event2_newevent_xx(-1, 2 * CYCLE_UNIT, 0, delayed_framestart); } else if (vb_start_line == 1) { - INTREQ_INT(5, REFRESH_FIRST_HPOS + 1); + INTREQ_INT(5, REFRESH_FIRST_HPOS - 1); } else if (vpos == 0) { event2_newevent_xx(-1, 2 * CYCLE_UNIT, 0, check_vblank_copjmp); } -- 2.47.3