Fix glitched images on one-frame interlace changes (e.g. chrono trigger)

Fix hires pixel plotter
This commit is contained in:
dborth 2011-02-16 00:23:19 +00:00
parent 19c8d16c74
commit 4d0bc13fa8
2 changed files with 12 additions and 2 deletions

View File

@ -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))

View File

@ -1388,8 +1388,8 @@ extern struct SLineMatrixData LineMatrixData[240];
#define DRAW_PIXEL_H2x1(N, M) \
if (Z1 > GFX.DB[Offset + 2 * N] && (M)) \
{ \
GFX.S[Offset + 2 * N] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \
GFX.S[Offset + 2 * N + 1] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N + 2]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \
GFX.S[Offset + 2 * N] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \
GFX.S[Offset + 2 * N + 1] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \
GFX.DB[Offset + 2 * N] = GFX.DB[Offset + 2 * N + 1] = Z2; \
}