From 39cbaf158978bc34f6b550773561113019e8fea7 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 22 Feb 2019 16:37:58 +0200 Subject: [PATCH] BPLCON4 non-zero + border sprites special case HAM fix. --- drawing.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index 41111e66..5fd159c4 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2328,14 +2328,28 @@ static void clear_bitplane_border_aga (void) if (shift < 0) { shift = -shift; len = (real_playfield_start - playfield_start) << shift; - memset (pixdata.apixels + pixels_offset + (playfield_start << shift), v, len); + int offset = playfield_start << shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); + len = (playfield_end - real_playfield_end) << shift; - memset (pixdata.apixels + pixels_offset + (real_playfield_end << shift), v, len); + offset = real_playfield_end << shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); } else { len = (real_playfield_start - playfield_start) >> shift; - memset (pixdata.apixels + pixels_offset + (playfield_start >> shift), v, len); + int offset = playfield_start >> shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); + len = (playfield_end - real_playfield_end) >> shift; - memset (pixdata.apixels + pixels_offset + (real_playfield_end >> shift), v, len); + offset = real_playfield_end >> shift; + memset (pixdata.apixels + pixels_offset + offset, v, len); + if (bplham) + memset(ham_linebuf + pixels_offset + offset, v, len * sizeof(uae_u32)); } } #endif -- 2.47.3