GSdx-PCRTC: Minor modification to NTSC saturation

Allow the output circuit saturation to take place at cases where one of the output circuit is enabled with frame mode rendering, I'm not sure it would be safe to allow saturations when both of the output circuits are enabled with frame mode rendering. Unlike field mode rendering, frame mode doesn't use identical rectangles at same co-ordinates for output in two alternating fields and potentially they could use a much bigger output size when both of the output circuits are enabled and are separated without any intersection. So let's limit the saturation to only the cases where we detect a single output circuit for frame mode rendering.

Fixes a regression in Devil May Cry 3 and Sky Gunner.
This commit is contained in:
Akash 2017-03-16 22:43:32 +05:30 committed by Gregory Hainaut
parent a18d624bcb
commit 38c2de3ae3
1 changed files with 4 additions and 1 deletions

View File

@ -424,7 +424,10 @@ void GSState::SaturateOutputSize(GSVector4i& r)
// Limit games to standard NTSC resolutions. games with 512X512 (PAL resolution) on NTSC video mode produces black border on the bottom.
// 512 X 448 is the resolution generally used by NTSC, saturating the height value seems to get rid of the black borders.
// Though it's quite a bad hack as it affects binaries which are patched to run on a non-native video mode.
if (m_NTSC_Saturation && (m_regs->SMODE2.INT & !m_regs->SMODE2.FFMD) && videomode == GSVideoMode::NTSC && r.height() > 448 && r.width() < 640)
const bool interlaced_field = m_regs->SMODE2.INT && !m_regs->SMODE2.FFMD;
const bool single_frame_output = m_regs->SMODE2.INT && m_regs->SMODE2.FFMD && (m_regs->PMODE.EN1 ^ m_regs->PMODE.EN2);
const bool unsupported_output_size = r.height() > 448 && r.width() < 640;
if (m_NTSC_Saturation && videomode == GSVideoMode::NTSC && (interlaced_field || single_frame_output) && unsupported_output_size)
{
r.bottom = r.top + 448;
}