From c7c2ff4f6f1fc99e91e320533d9375d7ba233655 Mon Sep 17 00:00:00 2001 From: OV2 Date: Fri, 11 Feb 2011 22:10:19 +0100 Subject: [PATCH] Fix glitched images on one-frame interlace changes (e.g. chrono trigger) --- gfx.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gfx.cpp b/gfx.cpp index 9055e6db..579aa526 100644 --- a/gfx.cpp +++ b/gfx.cpp @@ -718,6 +718,16 @@ void S9xUpdateScreen (void) for (register int32 y = (int32) GFX.StartY - 1; y >= 0; y--) memmove(GFX.Screen + y * GFX.PPL, GFX.Screen + y * GFX.RealPPL, IPPU.RenderedScreenWidth * sizeof(uint16)); } + else if (IPPU.DoubleHeightPixels && !IPPU.Interlace) + { + for (register int32 y = 0; y < (int32) GFX.StartY; y++) + memmove(GFX.Screen + y * GFX.RealPPL, GFX.Screen + y * GFX.PPL, IPPU.RenderedScreenWidth * sizeof(uint16)); + + IPPU.DoubleHeightPixels = FALSE; + IPPU.RenderedScreenHeight = PPU.ScreenHeight; + GFX.PPL = GFX.RealPPL; + GFX.DoInterlace = 0; + } } if ((Memory.FillRAM[0x2130] & 0x30) != 0x30 && (Memory.FillRAM[0x2131] & 0x3f))