From 69c9a3d7935c159a6e68086551ffca0a6f714cbf Mon Sep 17 00:00:00 2001 From: Akash Date: Wed, 6 Apr 2016 10:21:17 +0530 Subject: [PATCH] GSDX: Add an option to disable NTSC saturation v2: convert it into a member variable. --- plugins/GSdx/GSState.cpp | 10 +++++----- plugins/GSdx/GSState.h | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 99f6ca5c40..9ba9951ff2 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -44,6 +44,7 @@ GSState::GSState() { m_nativeres = theApp.GetConfig("upscale_multiplier",1) == 1; m_mipmap = !!theApp.GetConfig("mipmap", 1); + m_NTSC_Saturation = !!theApp.GetConfig("NTSC_Saturation", true); s_n = 0; s_dump = !!theApp.GetConfig("dump", 0); @@ -379,11 +380,10 @@ GSVector4i GSState::GetFrameRect(int i) int w = r.width(); int h = r.height(); -// NTSC: Saturate higher height values for games which have CRTC width lower than 640. -// Some NTSC mode games request higher height values for accurate display size / position when width is 640 -// Testcases : PS logo (640x512) , Resident Evil:CVX (640x480). potentially more test cases... - - if (Vmode_NTSC && h > 448 && w < 640) +// 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 (Vmode_NTSC && h > 448 && w < 640 && m_NTSC_Saturation) h = 448; if (m_regs->SMODE2.INT && m_regs->SMODE2.FFMD && h > 1) diff --git a/plugins/GSdx/GSState.h b/plugins/GSdx/GSState.h index 1005987c34..efd34f7c19 100644 --- a/plugins/GSdx/GSState.h +++ b/plugins/GSdx/GSState.h @@ -195,12 +195,13 @@ public: GSDrawingContext* m_context; GSPerfMon m_perfmon; uint32 m_crc; + CRC::Game m_game; + GSDump m_dump; int m_options; int m_frameskip; bool m_crcinited; bool m_framelimit; - CRC::Game m_game; - GSDump m_dump; + bool m_NTSC_Saturation; bool m_nativeres; bool m_mipmap;