From cd8866c8c7e774d5d45db240984f3f9022dd583a Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 26 Feb 2019 19:56:38 +0200 Subject: [PATCH] genlock/grayscale fix. --- custom.cpp | 3 ++- drawing.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/custom.cpp b/custom.cpp index 28b1c794..3581a22a 100644 --- a/custom.cpp +++ b/custom.cpp @@ -5998,7 +5998,8 @@ static void BPLCON0_Denise (int hpos, uae_u16 v, bool immediate) v &= ~0x00F1; else if (! (currprefs.chipset_mask & CSMASK_AGA)) v &= ~0x00B0; - v &= ~(0x0200 | 0x0100 | 0x0080 | 0x0020); + + v &= ~((currprefs.cs_color_burst ? 0x0000 : 0x0200) | 0x0100 | 0x0080 | 0x0020); #if SPRBORDER v |= 1; #endif diff --git a/drawing.cpp b/drawing.cpp index d3bb93a3..baacf245 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2634,7 +2634,7 @@ void init_row_map(void) struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo; static uae_u8 *oldbufmem; static int oldheight, oldpitch; - static bool oldgenlock; + static bool oldgenlock, oldburst; int i, j; if (vidinfo->drawbuffer.height_allocated > max_uae_height) { @@ -2649,7 +2649,8 @@ void init_row_map(void) if (oldbufmem && oldbufmem == vidinfo->drawbuffer.bufmem && oldheight == vidinfo->drawbuffer.height_allocated && oldpitch == vidinfo->drawbuffer.rowbytes && - oldgenlock == init_genlock_data) + oldgenlock == init_genlock_data && + oldburst == (row_map_color_burst_buffer ? 1 : 0)) return; xfree(row_map_genlock_buffer); row_map_genlock_buffer = NULL; @@ -2678,6 +2679,7 @@ void init_row_map(void) oldheight = vidinfo->drawbuffer.height_allocated; oldpitch = vidinfo->drawbuffer.rowbytes; oldgenlock = init_genlock_data; + oldburst = row_map_color_burst_buffer ? 1 : 0; } static void init_aspect_maps(void) @@ -4121,7 +4123,7 @@ static void finish_drawing_frame(bool drawlines) } // genlock - if (currprefs.genlock_image && !currprefs.monitoremu && !currprefs.cs_color_burst && vidinfo->tempbuffer.bufmem_allocated && currprefs.genlock) { + if (currprefs.genlock_image && currprefs.genlock && !currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated) { setspecialmonitorpos(&vidinfo->tempbuffer); if (init_genlock_data != specialmonitor_need_genlock()) { need_genlock_data = init_genlock_data = specialmonitor_need_genlock(); @@ -4148,7 +4150,8 @@ static void finish_drawing_frame(bool drawlines) } // grayscale - if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated && ((!bplcolorburst_field && currprefs.cs_color_burst) || (currprefs.gfx_grayscale))) { + if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated && + ((!currprefs.genlock && (!bplcolorburst_field && currprefs.cs_color_burst)) || currprefs.gfx_grayscale)) { setspecialmonitorpos(&vidinfo->tempbuffer); emulate_grayscale(vb, &vidinfo->tempbuffer); vb = vidinfo->outbuffer = &vidinfo->tempbuffer; -- 2.47.3