From 6ce3b6671ddbe900fa5cf5b9fe99d01fae8b8a6e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Thu, 20 Jun 2024 21:46:35 +0300 Subject: [PATCH] Fix Picmatic (100Hz TV only) light gun positioning in lores or shres resolutions. --- arcadia.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arcadia.cpp b/arcadia.cpp index 99cf3574..299d4729 100644 --- a/arcadia.cpp +++ b/arcadia.cpp @@ -656,8 +656,10 @@ static uae_u32 REGPARAM2 alg_bget (uaecptr addr) // Picmatic 100Hz games int reg = (addr >> 12) & 15; uae_u8 v = 0; - uae_u16 x = lightpen_x[1 - picmatic_ply]; - uae_u16 y = lightpen_y[1 - picmatic_ply] >> currprefs.gfx_vresolution; + uae_s16 x = lightpen_x[1 - picmatic_ply]; + x <<= 1; + x >>= currprefs.gfx_resolution; + uae_s16 y = lightpen_y[1 - picmatic_ply] >> currprefs.gfx_vresolution; if (reg == 3) { v = 0xff; // left trigger -- 2.47.3