diff options
-rw-r--r-- | source/gfx.cpp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/source/gfx.cpp b/source/gfx.cpp index decd195..d2b8b6e 100644 --- a/source/gfx.cpp +++ b/source/gfx.cpp @@ -663,18 +663,9 @@ void S9xStartScreenRefresh () IPPU.Interlace = (Memory.FillRAM[0x2133] & 1); if (Settings.SupportHiRes && (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.Interlace)) { - if (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.Interlace) - { - IPPU.RenderedScreenWidth = 512; - IPPU.DoubleWidthPixels = TRUE; - IPPU.HalfWidthPixels = FALSE; - } - else - { - IPPU.RenderedScreenWidth = 256; - IPPU.DoubleWidthPixels = FALSE; - IPPU.HalfWidthPixels = FALSE; - } + IPPU.RenderedScreenWidth = 512; + IPPU.DoubleWidthPixels = TRUE; + IPPU.HalfWidthPixels = FALSE; if (IPPU.Interlace) { @@ -707,13 +698,13 @@ void S9xStartScreenRefresh () GFX.PPLx2 = GFX.PPL << 1; } } - else if (!Settings.SupportHiRes && (PPU.BGMode == 5)) + else if (!Settings.SupportHiRes && (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.Interlace)) { + IPPU.RenderedScreenWidth = 256; + IPPU.DoubleWidthPixels = FALSE; // Secret of Mana displays menus with mode 5. // Make them readable. - IPPU.DoubleWidthPixels = FALSE; IPPU.HalfWidthPixels = TRUE; - IPPU.DoubleHeightPixels = FALSE; } else { @@ -3741,6 +3732,27 @@ void S9xUpdateScreen () } } } + else if (!Settings.SupportHiRes) + { + if (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.Interlace) + { + if (!IPPU.HalfWidthPixels) + { + // The game has switched from lo-res to hi-res mode part way down + // the screen. Hi-res pixels must now be drawn at half width. + IPPU.HalfWidthPixels = TRUE; + } + } + else + { + if (IPPU.HalfWidthPixels) + { + // The game has switched from hi-res to lo-res mode part way down + // the screen. Lo-res pixels must now be drawn at FULL width. + IPPU.HalfWidthPixels = FALSE; + } + } + } uint32 black = BLACK | (BLACK << 16); |