Disable interlace mode for bg modes not 5 or 6.

This commit is contained in:
Brandon Wright 2018-06-25 18:02:10 -05:00
parent 146e9084f5
commit ff1925cc0a
2 changed files with 12 additions and 36 deletions

28
gfx.cpp
View File

@ -369,11 +369,6 @@ void S9xStartScreenRefresh (void)
}
else
{
#ifdef USE_OPENGL
if (Settings.OpenGLEnable)
GFX.RealPPL = SNES_WIDTH;
else
#endif
GFX.RealPPL = GFX.Pitch >> 1;
IPPU.DoubleWidthPixels = FALSE;
IPPU.RenderedScreenWidth = SNES_WIDTH;
@ -684,28 +679,6 @@ void S9xUpdateScreen (void)
if (Settings.SupportHiRes)
{
if (!IPPU.DoubleWidthPixels && (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.PseudoHires))
{
#ifdef USE_OPENGL
if (Settings.OpenGLEnable && GFX.RealPPL == 256)
{
// Have to back out of the speed up hack where the low res.
// SNES image was rendered into a 256x239 sized buffer,
// ignoring the true, larger size of the buffer.
GFX.RealPPL = GFX.Pitch >> 1;
for (register int32 y = (int32) GFX.StartY - 1; y >= 0; y--)
{
register uint16 *p = GFX.Screen + y * GFX.PPL + 255;
register uint16 *q = GFX.Screen + y * GFX.RealPPL + 510;
for (register int x = 255; x >= 0; x--, p--, q -= 2)
*q = *(q + 1) = *p;
}
GFX.PPL = GFX.RealPPL; // = GFX.Pitch >> 1 above
}
else
#endif
{
// Have to back out of the regular speed hack
for (register uint32 y = 0; y < GFX.StartY; y++)
@ -716,7 +689,6 @@ void S9xUpdateScreen (void)
for (register int x = 255; x >= 0; x--, p--, q -= 2)
*q = *(q + 1) = *p;
}
}
IPPU.DoubleWidthPixels = TRUE;
IPPU.RenderedScreenWidth = 512;

View File

@ -546,7 +546,10 @@ void S9xSetPPU (uint8 Byte, uint16 Address)
PPU.BGMode = Byte & 7;
// BJ: BG3Priority only takes effect if BGMode == 1 and the bit is set
PPU.BG3Priority = ((Byte & 0x0f) == 0x09);
if (PPU.BGMode == 6 || PPU.BGMode == 5)
IPPU.Interlace = Memory.FillRAM[0x2133] & 1;
else
IPPU.Interlace = 0;
#ifdef DEBUGGER
missing.modes[PPU.BGMode] = 1;
#endif
@ -1068,6 +1071,7 @@ void S9xSetPPU (uint8 Byte, uint16 Address)
FLUSH_REDRAW();
if ((Memory.FillRAM[0x2133] ^ Byte) & 2)
IPPU.OBJChanged = TRUE;
IPPU.Interlace = Byte & 1;
IPPU.InterlaceOBJ = Byte & 2;
}