[Gamecube/Wii] added 50hz progressive mode (576p) support for emulation

This commit is contained in:
EkeEke 2013-07-11 23:34:51 +02:00
parent b00df47c1e
commit ca143abd26
2 changed files with 23 additions and 27 deletions

View File

@ -1548,19 +1548,12 @@ static void videomenu ()
config.render = (config.render + 1) % 3; config.render = (config.render + 1) % 3;
if (config.render == 2) if (config.render == 2)
{ {
if (VIDEO_HaveComponentCable()) /* progressive mode is only possible through component cable */
if (!VIDEO_HaveComponentCable())
{ {
/* progressive mode (60hz only) */
config.tv_mode = 0;
sprintf (items[1].text, "TV Mode: 60HZ");
}
else
{
/* do nothing if component cable is not detected */
config.render = 0; config.render = 0;
} }
} }
if (config.render == 1) if (config.render == 1)
sprintf (items[0].text,"Display: INTERLACED"); sprintf (items[0].text,"Display: INTERLACED");
else if (config.render == 2) else if (config.render == 2)
@ -1571,21 +1564,14 @@ static void videomenu ()
break; break;
case 1: /*** tv mode ***/ case 1: /*** tv mode ***/
if (config.render != 2) config.tv_mode = (config.tv_mode + 1) % 3;
{ if (config.tv_mode == 0)
config.tv_mode = (config.tv_mode + 1) % 3; sprintf (items[1].text, "TV Mode: 60HZ");
if (config.tv_mode == 0) else if (config.tv_mode == 1)
sprintf (items[1].text, "TV Mode: 60HZ"); sprintf (items[1].text, "TV Mode: 50HZ");
else if (config.tv_mode == 1)
sprintf (items[1].text, "TV Mode: 50HZ");
else
sprintf (items[1].text, "TV Mode: 50/60HZ");
reinit = 1;
}
else else
{ sprintf (items[1].text, "TV Mode: 50/60HZ");
GUI_WaitPrompt("Error","Progressive Mode is 60hz only !\n"); reinit = 1;
}
break; break;
case 2: /*** VSYNC ***/ case 2: /*** VSYNC ***/

View File

@ -1522,16 +1522,26 @@ void gx_video_Start(void)
VIDEO_Flush(); VIDEO_Flush();
} }
/* set interlaced or progressive video mode */ /* Enable progressive or interlaced video mode */
if (config.render == 2) if (config.render == 2)
{ {
tvmodes[2]->viTVMode = VI_TVMODE_NTSC_PROG; /* 480p */
tvmodes[2]->viTVMode = (tvmodes[2]->viTVMode & ~3) | VI_PROGRESSIVE;
tvmodes[2]->xfbMode = VI_XFBMODE_SF; tvmodes[2]->xfbMode = VI_XFBMODE_SF;
/* 576p */
tvmodes[5]->viTVMode = VI_TVMODE_PAL_PROG;
tvmodes[5]->xfbMode = VI_XFBMODE_SF;
} }
else if (config.render == 1) else if (config.render == 1)
{ {
tvmodes[2]->viTVMode = tvmodes[0]->viTVMode & ~3; /* 480i */
tvmodes[2]->viTVMode = (tvmodes[2]->viTVMode & ~3) | VI_INTERLACE;
tvmodes[2]->xfbMode = VI_XFBMODE_DF; tvmodes[2]->xfbMode = VI_XFBMODE_DF;
/* 576i */
tvmodes[5]->viTVMode = VI_TVMODE_PAL_INT;
tvmodes[5]->xfbMode = VI_XFBMODE_DF;
} }
/* update horizontal border width */ /* update horizontal border width */
@ -1786,7 +1796,7 @@ void gx_video_Init(void)
/* Get the current VIDEO mode then : /* Get the current VIDEO mode then :
- set menu video mode (480p/576p/480i/576i) - set menu video mode (480p/576p/480i/576i)
- set emulator rendering 60hz TV modes (PAL/MPAL/NTSC/EURGB60) - set emulator rendering 60hz TV modes (MPAL/NTSC/EURGB60)
*/ */
vmode = VIDEO_GetPreferredMode(NULL); vmode = VIDEO_GetPreferredMode(NULL);