From: Toni Wilen Date: Thu, 20 Jul 2023 17:35:40 +0000 (+0300) Subject: Fix BPLCON0 Agnus mask. (SHRES and UHRES) X-Git-Tag: 5.1.0~148 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=7ff003a35b7af514c3019f5e060b77d20826da58;p=francis%2Fwinuae.git Fix BPLCON0 Agnus mask. (SHRES and UHRES) --- diff --git a/custom.cpp b/custom.cpp index bf15f8df..75b5c09b 100644 --- a/custom.cpp +++ b/custom.cpp @@ -6120,6 +6120,16 @@ static uae_u16 BPLCON0_Denise_mask(uae_u16 v) return v; } +static uae_u16 BPLCON0_Agnus_mask(uae_u16 v) +{ + if (!ecs_agnus) { + v &= 0xff0e; + } else if (!aga_mode) { + v &= 0xffce; + } + return v; +} + static void reset_decisions_hsync_start(void) { if (nodraw()) { @@ -8969,12 +8979,7 @@ static void BPLCON0(int hpos, uae_u16 v) { uae_u16 old = bplcon0; bplcon0_saved = v; - if (!ecs_denise) { - v &= ~0x00F1; - } else if (!aga_mode) { - v &= ~0x00B0; - } - v &= ~0x0080; + v = BPLCON0_Agnus_mask(v); #if SPRBORDER v |= 1;