From bae2c9c1d859dc1a51a166f6b33de1896dbc991b Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 3 Apr 2022 12:51:45 +0100 Subject: [PATCH] GS: Saturate DISPLAY heights and limit max height --- bin/resources/GameIndex.yaml | 12 ------------ pcsx2/GS/GSState.cpp | 30 +++++++----------------------- 2 files changed, 7 insertions(+), 35 deletions(-) diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 7b4ae01e51..0a0ae30087 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -36521,12 +36521,6 @@ SLUS-20217: name: "Arctic Thunder" region: "NTSC-U" compat: 5 - patches: - 2B2E1535: - content: |- - author=kozarovv - // Set proper height for in game videos. Prevent videos being displayed doubled vertically. - patch=1,EE,0013345C,word,240701c0 SLUS-20218: name: "Stunt GP" region: "NTSC-U" @@ -36592,12 +36586,6 @@ SLUS-20229: name: "Jonny Moseley - Mad Trix" region: "NTSC-U" compat: 5 - patches: - AE94FAF8: - content: |- - author=refraction - comment=Fixes interlacing for videos - patch=1,EE,0024a6f0,word,24030003 SLUS-20230: name: "Max Payne" region: "NTSC-U" diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 0f110821bc..326f036bc2 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -380,31 +380,15 @@ void GSState::SaturateOutputSize(GSVector4i& r) const bool is_ntsc = videomode == GSVideoMode::NTSC; const bool is_pal = videomode == GSVideoMode::PAL; - //Some games (such as Pool Paradise) use alternate line reading and provide a massive height which is really half. - if (r.height() > 640 && (is_ntsc || is_pal)) - { - r.bottom = r.top + (r.height() / 2); - return; - } - const auto& SMODE2 = m_regs->SMODE2; const auto& PMODE = m_regs->PMODE; - - // 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. - const bool interlaced_field = SMODE2.INT && !SMODE2.FFMD; - const bool single_frame_output = SMODE2.INT && SMODE2.FFMD && (PMODE.EN1 ^ PMODE.EN2); - const bool unsupported_output_size = r.height() > 448 && r.width() < 640; - - const bool saturate = - m_NTSC_Saturation && - is_ntsc && - (interlaced_field || single_frame_output) && - unsupported_output_size; - - if (saturate) - r.bottom = r.top + 448; + const int res_multi = (SMODE2.INT + 1); + // Pixels only get drawn so quick so oversizing of the DISPLAY is ignored when rasterized. + // Non-Interlaced pictures can only do half the number of lines (double strike) + if (is_ntsc) + r.bottom = r.top + std::min(r.height(), 224 * res_multi); + else if (is_pal) + r.bottom = r.top + std::min(r.height(), 256 * res_multi); } GSVector4i GSState::GetDisplayRect(int i)