mirror of https://github.com/PCSX2/pcsx2.git
GSDX: Add vertical frequency for all video modes
This commit is contained in:
parent
1445bf7fb1
commit
67a7a63a36
|
@ -467,10 +467,33 @@ bool GSState::IsEnabled(int i)
|
|||
|
||||
float GSState::GetTvRefreshRate()
|
||||
{
|
||||
// TODO: Frequencies for VESA / DTV : http://users.neoscientists.org/~blue/ps2videomodes.txt
|
||||
// SMODE1 PLL Loop divider (LC) could be used for detection of other video modes. CMOD's only useful for NTSC/PAL.(2/3)
|
||||
float vertical_frequency = 0;
|
||||
|
||||
return (Vmode_PAL) ? 50 : (60/1.001f);
|
||||
switch (m_regs->SMODE1.CMOD)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if (Vmode_VESA_1A) vertical_frequency = 59.94f;
|
||||
if (Vmode_VESA_1C) vertical_frequency = 75;
|
||||
if (Vmode_VESA_2B) vertical_frequency = 60.317f;
|
||||
if (Vmode_VESA_2D) vertical_frequency = 75;
|
||||
if (Vmode_VESA_3B) vertical_frequency = 60.004f;
|
||||
if (Vmode_VESA_3D) vertical_frequency = 75.029f;
|
||||
if (Vmode_VESA_4A) vertical_frequency = 60.020f;
|
||||
if (Vmode_VESA_4B) vertical_frequency = 75.025f;
|
||||
if (Vmode_DTV_480P) vertical_frequency = 59.94f;
|
||||
if (Vmode_DTV_720P_1080I) vertical_frequency = 60;
|
||||
break;
|
||||
}
|
||||
|
||||
case 2: vertical_frequency = (60 / 1.001f); //NTSC
|
||||
break;
|
||||
case 3: vertical_frequency = 50; //PAL
|
||||
break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
return vertical_frequency;
|
||||
}
|
||||
|
||||
// GIFPackedRegHandler*
|
||||
|
|
Loading…
Reference in New Issue