Counters: Update videomode enum with proper prefix

Thanks to @colepcsx2 (https://github.com/PCSX2/pcsx2/pull/1896#commitcomment-21858717) for pointing it out!

I also updated the prefix in the inferior video mode detection of GSdx, I'm not even sure why we need the videomode info on the plugin side, might be useful someday.
This commit is contained in:
Akash 2017-05-02 17:05:00 +05:30 committed by Gregory Hainaut
parent 7a2cbfd6bf
commit 984fcfda2e
5 changed files with 21 additions and 19 deletions

View File

@ -258,8 +258,8 @@ static const char* ReportVideoMode()
case GS_VideoMode::DVD_NTSC: return "DVD NTSC";
case GS_VideoMode::DVD_PAL: return "DVD PAL";
case GS_VideoMode::VESA: return "VESA";
case GS_VideoMode::HDTV_480P: return "HDTV 480p";
case GS_VideoMode::HDTV_576P: return "HDTV 576p";
case GS_VideoMode::SDTV_480P: return "SDTV 480p";
case GS_VideoMode::SDTV_576P: return "SDTV 576p";
case GS_VideoMode::HDTV_720P: return "HDTV 720p";
case GS_VideoMode::HDTV_1080I: return "HDTV 1080i";
case GS_VideoMode::HDTV_1080P: return "HDTV 1080p";
@ -271,7 +271,7 @@ Fixed100 GetVerticalFrequency()
{
switch (gsVideoMode)
{
case GS_VideoMode::Uninitialized: // SYSCALL instruction hasn't executed yet, give some temporary values.
case GS_VideoMode::Uninitialized: // SetGsCrt hasn't executed yet, give some temporary values.
return 60;
case GS_VideoMode::PAL:
case GS_VideoMode::DVD_PAL:
@ -279,12 +279,12 @@ Fixed100 GetVerticalFrequency()
case GS_VideoMode::NTSC:
case GS_VideoMode::DVD_NTSC:
return EmuConfig.GS.FramerateNTSC;
case GS_VideoMode::HDTV_480P:
case GS_VideoMode::SDTV_480P:
return 59.94;
case GS_VideoMode::HDTV_1080P:
case GS_VideoMode::HDTV_1080I:
case GS_VideoMode::HDTV_576P:
case GS_VideoMode::HDTV_720P:
case GS_VideoMode::SDTV_576P:
case GS_VideoMode::VESA:
return 60;
default:
@ -326,10 +326,10 @@ u32 UpdateVSyncRate()
if (!gsIsInterlaced) scanlines += 1;
break;
case GS_VideoMode::HDTV_480P:
case GS_VideoMode::SDTV_480P:
case GS_VideoMode::SDTV_576P:
case GS_VideoMode::HDTV_1080P:
case GS_VideoMode::HDTV_1080I:
case GS_VideoMode::HDTV_576P:
case GS_VideoMode::HDTV_720P:
case GS_VideoMode::VESA:
scanlines = SCANLINES_TOTAL_NTSC;

View File

@ -260,8 +260,8 @@ enum class GS_VideoMode : int
NTSC,
PAL,
VESA,
HDTV_480P,
HDTV_576P,
SDTV_480P,
SDTV_576P,
HDTV_720P,
HDTV_1080I,
HDTV_1080P,

View File

@ -926,10 +926,10 @@ void SYSCALL()
case 0x4A: mode = "VESA 1280x1024 @ 63.981"; gsSetVideoMode(GS_VideoMode::VESA); break;
case 0x4B: mode = "VESA 1280x1024 @ 79.976"; gsSetVideoMode(GS_VideoMode::VESA); break;
case 0x50: mode = "HDTV 720x480 @ 59.94"; gsSetVideoMode(GS_VideoMode::HDTV_480P); break;
case 0x50: mode = "SDTV 720x480 @ 59.94"; gsSetVideoMode(GS_VideoMode::SDTV_480P); break;
case 0x51: mode = "HDTV 1920x1080 @ 60.00"; gsSetVideoMode(GS_VideoMode::HDTV_1080I); break;
case 0x52: mode = "HDTV 1280x720 @ ??.???"; gsSetVideoMode(GS_VideoMode::HDTV_720P); break;
case 0x53: mode = "HDTV 768x576 @ ??.???"; gsSetVideoMode(GS_VideoMode::HDTV_576P); break;
case 0x53: mode = "SDTV 768x576 @ ??.???"; gsSetVideoMode(GS_VideoMode::SDTV_576P); break;
case 0x54: mode = "HDTV 1920x1080 @ ??.???"; gsSetVideoMode(GS_VideoMode::HDTV_1080P); break;
case 0x72: mode = "DVD NTSC 640x448 @ ??.???"; gsSetVideoMode(GS_VideoMode::DVD_NTSC); break;

View File

@ -1411,9 +1411,9 @@ enum class GSVideoMode : uint8
NTSC,
PAL,
VESA,
DTV_480P,
DTV_720P,
DTV_1080I
SDTV_480P,
HDTV_720P,
HDTV_1080I
};
// Ordering was done to keep compatibility with older ini file.

View File

@ -375,6 +375,8 @@ bool GSState::isinterlaced()
GSVideoMode GSState::GetVideoMode()
{
// TODO: Get confirmation of videomode from SYSCALL ? not necessary but would be nice.
// Other videomodes can't be detected on the plugin side without the help of the data from core
// You can only identify a limited number of video modes based on the info from CRTC registers.
GSVideoMode videomode = GSVideoMode::Unknown;
uint8 Colorburst = m_regs->SMODE1.CMOD; // Subcarrier frequency
@ -384,13 +386,13 @@ GSVideoMode GSState::GetVideoMode()
{
case 0:
if (isinterlaced() && PLL_Divider == 22)
videomode = GSVideoMode::DTV_1080I;
videomode = GSVideoMode::HDTV_1080I;
else if (!isinterlaced() && PLL_Divider == 22)
videomode = GSVideoMode::DTV_720P;
videomode = GSVideoMode::HDTV_720P;
else if (!isinterlaced() && PLL_Divider == 32)
videomode = GSVideoMode::DTV_480P; // TODO: 576P will also be reported as 480P, find some way to differeniate.
videomode = GSVideoMode::SDTV_480P; // TODO: 576P will also be reported as 480P, find some way to differeniate.
else
videomode = GSVideoMode::VESA;
@ -531,13 +533,13 @@ float GSState::GetTvRefreshRate()
switch (videomode)
{
case GSVideoMode::NTSC: case GSVideoMode::DTV_480P:
case GSVideoMode::NTSC: case GSVideoMode::SDTV_480P:
vertical_frequency = (60 / 1.001f); break;
case GSVideoMode::PAL:
vertical_frequency = 50; break;
case GSVideoMode::DTV_720P: case GSVideoMode::DTV_1080I:
case GSVideoMode::HDTV_720P: case GSVideoMode::HDTV_1080I:
vertical_frequency = 60; break;
default: