From: Toni Wilen Date: Thu, 20 Jun 2024 18:46:35 +0000 (+0300) Subject: Fix Picmatic (100Hz TV only) light gun positioning in lores or shres resolutions. X-Git-Tag: 5310~29 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=6ce3b6671ddbe900fa5cf5b9fe99d01fae8b8a6e;p=francis%2Fwinuae.git Fix Picmatic (100Hz TV only) light gun positioning in lores or shres resolutions. --- 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