From e72512bae7e162c685d1af46a4ddf9f1670a9053 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 10 Feb 2024 18:49:56 +0200 Subject: [PATCH] Better NTSC vertical positioning in normal overscan mode. --- include/drawing.h | 4 +++- od-win32/win32_scaler.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/drawing.h b/include/drawing.h index 92141065..75116633 100644 --- a/include/drawing.h +++ b/include/drawing.h @@ -28,7 +28,9 @@ extern int detected_screen_resolution; extern int hsync_end_left_border, denisehtotal; #define AMIGA_WIDTH_MAX (754 / 2) -#define AMIGA_HEIGHT_MAX (576 / 2) +#define AMIGA_HEIGHT_MAX_PAL (576 / 2) +#define AMIGA_HEIGHT_MAX_NTSC (484 / 2) +#define AMIGA_HEIGHT_MAX (AMIGA_HEIGHT_MAX_PAL) // Cycles * 2 from start of scanline to first refresh slot (hsync strobe slot) #define DDF_OFFSET (2 * 4) diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index 90fb74ee..7e535d7c 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -135,7 +135,7 @@ static void getmanualpos(int monid, int *cxp, int *cyp, int *cwp, int *chp) ch = avidinfo->outbuffer->outheight << (VRES_MAX - currprefs.gfx_vresolution); } else if (currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN) { // keep old version compatiblity - ch = native ? AMIGA_HEIGHT_MAX << VRES_MAX : avidinfo->outbuffer->outheight; + ch = native ? (ispal(NULL) ? AMIGA_HEIGHT_MAX_PAL : AMIGA_HEIGHT_MAX_NTSC) << VRES_MAX : avidinfo->outbuffer->outheight; } else { ch = native ? (maxvpos_display + maxvpos_display_vsync - minfirstline) << VRES_MAX : avidinfo->outbuffer->outheight; } -- 2.47.3