From e97dab5425c216f58e659afc1062f6aa8de7ee59 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 13 Sep 2015 18:10:31 +0000 Subject: [PATCH] fix pal moire stuff with modern deemph --- trunk/src/drivers/common/vidblit.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/trunk/src/drivers/common/vidblit.cpp b/trunk/src/drivers/common/vidblit.cpp index 5ac48938..1bd37458 100644 --- a/trunk/src/drivers/common/vidblit.cpp +++ b/trunk/src/drivers/common/vidblit.cpp @@ -184,7 +184,7 @@ int InitBlitToHigh(int b, uint32 rmask, uint32 gmask, uint32 bmask, int efx, int } else if (specfilt == 9) { - palrgb = (uint32 *)FCEU_dmalloc(265*16*sizeof(uint32)); + palrgb = (uint32 *)FCEU_dmalloc((256+512)*16*sizeof(uint32)); moire = (float *)FCEU_dmalloc( 16*sizeof(float)); } @@ -578,7 +578,7 @@ void Blit8ToHigh(uint8 *src, uint8 *dest, int xr, int yr, int pitch, int xscale, bool hdtv = palhdtv; bool monochrome = palmonochrome; - for (int i=0; i<256; i++) { + for (int i=0; i<256+512; i++) { R = source[i*4 ]; G = source[i*4+1]; B = source[i*4+2]; @@ -641,13 +641,22 @@ void Blit8ToHigh(uint8 *src, uint8 *dest, int xr, int yr, int pitch, int xscale, uint32 *d = (uint32 *)dest; uint8 xsub = 0; uint8 xabs = 0; - uint8 index = 0; + uint32 index = 0; uint32 color; for (y=0; y