From 1445bf7fb1312ec23445a2ae76133f447dcd47d1 Mon Sep 17 00:00:00 2001 From: Akash Date: Fri, 12 Feb 2016 04:40:41 +0530 Subject: [PATCH] GSDX: Extend macros for all video modes. The following patch detects the other video modes based on Phased lock loop divider (LC) --- plugins/GSdx/GS.h | 16 +++++++++++++--- plugins/GSdx/GSState.cpp | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/GS.h b/plugins/GSdx/GS.h index 12231ce023..b1c7fb5bfd 100644 --- a/plugins/GSdx/GS.h +++ b/plugins/GSdx/GS.h @@ -1285,6 +1285,16 @@ enum stateType {ST_WRITE, ST_TRANSFER, ST_VSYNC}; #define DEFAULT_EXTRA_RENDERING_THREADS 2 // GS Video modes macros -#define Vmode_VESA (m_regs->SMODE1.CMOD == 0) -#define Vmode_NTSC (m_regs->SMODE1.CMOD == 2) -#define Vmode_PAL (m_regs->SMODE1.CMOD == 3) +#define Vmode_VESA_DTV (m_regs->SMODE1.CMOD == 0) +#define Vmode_NTSC (m_regs->SMODE1.CMOD == 2) +#define Vmode_PAL (m_regs->SMODE1.CMOD == 3) +#define Vmode_VESA_1A (m_regs->SMODE1.LC == 15 && Vmode_VESA_DTV) +#define Vmode_VESA_1C (m_regs->SMODE1.LC == 28 && Vmode_VESA_DTV) +#define Vmode_VESA_2B (m_regs->SMODE1.LC == 71 && Vmode_VESA_DTV) +#define Vmode_VESA_2D (m_regs->SMODE1.LC == 44 && Vmode_VESA_DTV) +#define Vmode_VESA_3B (m_regs->SMODE1.LC == 58 && Vmode_VESA_DTV) +#define Vmode_VESA_3D (m_regs->SMODE1.LC == 35 && Vmode_VESA_DTV) +#define Vmode_VESA_4A (m_regs->SMODE1.LC == 8 && Vmode_VESA_DTV) +#define Vmode_VESA_4B (m_regs->SMODE1.LC == 10 && Vmode_VESA_DTV) +#define Vmode_DTV_480P (m_regs->SMODE1.LC == 32 && Vmode_VESA_DTV) +#define Vmode_DTV_720P_1080I (m_regs->SMODE1.LC == 22 && Vmode_VESA_DTV) diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 0e076fe3a8..a00c4c3a87 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -354,7 +354,7 @@ GSVector4i GSState::GetDisplayRect(int i) GSVector4i r; //Some games (such as Pool Paradise) use alternate line reading and provide a massive height which is really half. - if (height > 640 && !Vmode_VESA) + if (height > 640 && !Vmode_VESA_DTV) { height /= 2; }