From 5b24468f07e6b7265170e0363c7fddd259635371 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 8 Nov 2020 22:13:55 +1000 Subject: [PATCH] GPU: Fix incorrect hsync start tick --- src/core/gpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index f02d9b0b6..8a7a032e5 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -465,7 +465,7 @@ void GPU::UpdateCRTCConfig() cs.vertical_total = PAL_TOTAL_LINES; cs.current_scanline %= PAL_TOTAL_LINES; cs.horizontal_total = PAL_TICKS_PER_LINE; - cs.horizontal_sync_start = PAL_HSYNC_TICKS; + cs.horizontal_sync_start = PAL_TICKS_PER_LINE - PAL_HSYNC_TICKS; cs.current_tick_in_scanline %= System::ScaleTicksToOverclock(PAL_TICKS_PER_LINE); } else @@ -473,7 +473,7 @@ void GPU::UpdateCRTCConfig() cs.vertical_total = NTSC_TOTAL_LINES; cs.current_scanline %= NTSC_TOTAL_LINES; cs.horizontal_total = NTSC_TICKS_PER_LINE; - cs.horizontal_sync_start = NTSC_HSYNC_TICKS; + cs.horizontal_sync_start = NTSC_TICKS_PER_LINE - NTSC_HSYNC_TICKS; cs.current_tick_in_scanline %= System::ScaleTicksToOverclock(NTSC_TICKS_PER_LINE); }