-changed video mode options, now should be more clear

what they do ;)
-fixed bug of game crashing when selecting progressive
as video mode (issue 94)
-updated german.ini
-updated english.ini
-updated theme default.ini
note: if you have the problem of overlapping options, then
its most likely a outdated default.ini, try updating to this
one and see if the problem is fixed
This commit is contained in:
fix94.1 2012-06-28 13:05:31 +00:00
parent edcd610bf1
commit d0b57d4161
10 changed files with 66 additions and 70 deletions

View File

@ -101,7 +101,6 @@ void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipa
NewSuperMarioBrosPatch(); NewSuperMarioBrosPatch();
patchVideoModes(dst, len, vidMode, vmode, patchVidModes); patchVideoModes(dst, len, vidMode, vmode, patchVidModes);
if(hooktype != 0 && dogamehooks(dst, len, false)) if(hooktype != 0 && dogamehooks(dst, len, false))
hookpatched = true; hookpatched = true;
if(vipatch) if(vipatch)

View File

@ -130,24 +130,23 @@ GXRModeObj * __Disc_SelectVMode(u8 videoselected, u64 chantitle)
break; break;
} }
break; break;
case 1: // PAL50 case 1: // SYSTEM
break;
case 2: // PAL50
vmode = &TVPal528IntDf; vmode = &TVPal528IntDf;
vmode_reg = vmode->viTVMode >> 2; vmode_reg = vmode->viTVMode >> 2;
break; break;
case 2: // PAL60 case 3: // PAL60
vmode = progressive ? &TVNtsc480Prog : &TVEurgb60Hz480IntDf; vmode = progressive ? &TVNtsc480Prog : &TVEurgb60Hz480IntDf;
vmode_reg = progressive ? TVEurgb60Hz480Prog.viTVMode >> 2 : vmode->viTVMode >> 2; vmode_reg = progressive ? TVEurgb60Hz480Prog.viTVMode >> 2 : vmode->viTVMode >> 2;
break; break;
case 3: // NTSC case 4: // NTSC
vmode = progressive ? &TVNtsc480Prog : &TVNtsc480IntDf; vmode = progressive ? &TVNtsc480Prog : &TVNtsc480IntDf;
vmode_reg = vmode->viTVMode >> 2; vmode_reg = vmode->viTVMode >> 2;
break; break;
case 4: // AUTO PATCH TO SYSTEM case 5: // PROGRESSIVE 480P
case 5: // SYSTEM
break;
case 6: // PROGRESSIVE 480P(NTSC + PATCH ALL)
vmode = &TVNtsc480Prog; vmode = &TVNtsc480Prog;
vmode_reg = vmode->viTVMode >> 2; vmode_reg = Region == 'P' ? TVEurgb60Hz480Prog.viTVMode >> 2 : vmode->viTVMode >> 2;
break; break;
default: default:
break; break;

View File

@ -278,34 +278,15 @@ void patchVideoModes(void *dst, u32 len, int vidMode, GXRModeObj *vmode, int pat
{ {
GXRModeObj **table = 0; GXRModeObj **table = 0;
if (vidMode == 5) // system if(patchVidModes && vmode != 0)
{
return;
}
if (vidMode == 6) // progressive 480P(NTSC + patch all)
{
applyVideoPatch(dst, len, vmode, 2);
}
else if (patchVidModes > 0 && vmode != 0)
{
applyVideoPatch(dst, len, vmode, patchVidModes - 1); applyVideoPatch(dst, len, vmode, patchVidModes - 1);
}
else else
{ {
switch(vidMode) switch(vidMode)
{ {
case 0: // default / disc / game case 0: // default / disc / game
break; break;
case 1: // PAL50 case 1: // SYSTEM
Search_and_patch_Video_Modes(dst, len, NTSC2PAL);
break;
case 2: // PAL60
Search_and_patch_Video_Modes(dst, len, NTSC2PAL60);
break;
case 3: // NTSC
Search_and_patch_Video_Modes(dst, len, PAL2NTSC);
break;
case 4: // auto patch / system
switch(CONF_GetVideo()) switch(CONF_GetVideo())
{ {
case CONF_VIDEO_PAL: case CONF_VIDEO_PAL:
@ -320,6 +301,15 @@ void patchVideoModes(void *dst, u32 len, int vidMode, GXRModeObj *vmode, int pat
} }
Search_and_patch_Video_Modes(dst, len, table); Search_and_patch_Video_Modes(dst, len, table);
break; break;
case 2: // PAL50
Search_and_patch_Video_Modes(dst, len, NTSC2PAL);
break;
case 3: // PAL60
Search_and_patch_Video_Modes(dst, len, NTSC2PAL60);
break;
case 4: // NTSC
Search_and_patch_Video_Modes(dst, len, PAL2NTSC);
break;
default: default:
break; break;
} }

View File

@ -1078,7 +1078,9 @@ private:
struct SOption { const char id[10]; const wchar_t text[16]; }; struct SOption { const char id[10]; const wchar_t text[16]; };
static const string _translations[23]; static const string _translations[23];
static const SOption _languages[11]; static const SOption _languages[11];
static const SOption _videoModes[7];
static const SOption _GlobalVideoModes[6];
static const SOption _VideoModes[7];
static const SOption _GlobalDMLvideoModes[6]; static const SOption _GlobalDMLvideoModes[6];
static const SOption _GlobalGClanguages[7]; static const SOption _GlobalGClanguages[7];

View File

@ -85,8 +85,8 @@ void CMenu::_showConfig3(void)
if(m_current_view != COVERFLOW_DML) if(m_current_view != COVERFLOW_DML)
{ {
i = min(max(0, m_cfg.getInt("GENERAL", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_videoModes) - 1); i = min(max(0, m_cfg.getInt("GENERAL", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1);
m_btnMgr.setText(m_config3LblVideo, _t(CMenu::_videoModes[i].id, CMenu::_videoModes[i].text)); m_btnMgr.setText(m_config3LblVideo, _t(CMenu::_GlobalVideoModes[i].id, CMenu::_GlobalVideoModes[i].text));
i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1); i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1);
m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text)); m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
@ -126,7 +126,7 @@ int CMenu::_config3(void)
else if (m_btnMgr.selected(m_config3BtnVideoP) || m_btnMgr.selected(m_config3BtnVideoM)) else if (m_btnMgr.selected(m_config3BtnVideoP) || m_btnMgr.selected(m_config3BtnVideoM))
{ {
s8 direction = m_btnMgr.selected(m_config3BtnVideoP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_config3BtnVideoP) ? 1 : -1;
m_cfg.setInt("GENERAL", "video_mode", (int)loopNum((u32)m_cfg.getInt("GENERAL", "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_videoModes))); m_cfg.setInt("GENERAL", "video_mode", (int)loopNum((u32)m_cfg.getInt("GENERAL", "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_GlobalVideoModes)));
_showConfig3(); _showConfig3();
} }
else if (m_btnMgr.selected(m_config3BtnDMLLanguageP) || m_btnMgr.selected(m_config3BtnDMLLanguageM)) else if (m_btnMgr.selected(m_config3BtnDMLLanguageP) || m_btnMgr.selected(m_config3BtnDMLLanguageM))

View File

@ -389,8 +389,8 @@ void CMenu::_showGameSettings(void)
m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0))); m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0)));
m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0))); m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0)));
m_btnMgr.setText(m_gameSettingsBtnIOSreloadBlock, _optBoolToString(m_gcfg2.getOptBool(id, "reload_block", 0))); m_btnMgr.setText(m_gameSettingsBtnIOSreloadBlock, _optBoolToString(m_gcfg2.getOptBool(id, "reload_block", 0)));
i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_videoModes) - 1u); i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_videoModes[i].id, CMenu::_videoModes[i].text)); m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text));
i = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u); i = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
m_btnMgr.setText(m_gameSettingsLblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text)); m_btnMgr.setText(m_gameSettingsLblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
i = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u); i = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u);
@ -517,7 +517,7 @@ void CMenu::_gameSettings(void)
else if (m_btnMgr.selected(m_gameSettingsBtnVideoP) || m_btnMgr.selected(m_gameSettingsBtnVideoM)) else if (m_btnMgr.selected(m_gameSettingsBtnVideoP) || m_btnMgr.selected(m_gameSettingsBtnVideoM))
{ {
s8 direction = m_btnMgr.selected(m_gameSettingsBtnVideoP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_gameSettingsBtnVideoP) ? 1 : -1;
m_gcfg2.setInt(id, "video_mode", (int)loopNum((u32)m_gcfg2.getInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_videoModes))); m_gcfg2.setInt(id, "video_mode", (int)loopNum((u32)m_gcfg2.getInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_VideoModes)));
_showGameSettings(); _showGameSettings();
} }
else if (m_btnMgr.selected(m_gameSettingsBtnDMLVideoP) || m_btnMgr.selected(m_gameSettingsBtnDMLVideoM)) else if (m_btnMgr.selected(m_gameSettingsBtnDMLVideoP) || m_btnMgr.selected(m_gameSettingsBtnDMLVideoM))

View File

@ -97,14 +97,23 @@ const CMenu::SOption CMenu::_languages[11] = {
{ "lngkor", L"Korean" } { "lngkor", L"Korean" }
}; };
const CMenu::SOption CMenu::_videoModes[7] = { const CMenu::SOption CMenu::_GlobalVideoModes[6] = {
{ "viddef", L"Default" }, { "vidgame", L"Game" },
{ "vidsys", L"System" },
{ "vidp50", L"PAL 50Hz" }, { "vidp50", L"PAL 50Hz" },
{ "vidp60", L"PAL 60Hz" }, { "vidp60", L"PAL 60Hz" },
{ "vidntsc", L"NTSC" }, { "vidntsc", L"NTSC" },
{ "vidpatch", L"Auto Patch" }, { "vidprog", L"Progressive" },
};
const CMenu::SOption CMenu::_VideoModes[7] = {
{ "viddef", L"Default" },
{ "vidgame", L"Game" },
{ "vidsys", L"System" }, { "vidsys", L"System" },
{ "vidprog", L"Progressive" } { "vidp50", L"PAL 50Hz" },
{ "vidp60", L"PAL 60Hz" },
{ "vidntsc", L"NTSC" },
{ "vidprog", L"Progressive" },
}; };
const CMenu::SOption CMenu::_GlobalDMLvideoModes[6] = { const CMenu::SOption CMenu::_GlobalDMLvideoModes[6] = {
@ -908,8 +917,13 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false)); bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false));
bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("NAND", "cheat", false)); bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("NAND", "cheat", false));
bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false)); bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false));
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_videoModes) - 1u);
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
videoMode = (videoMode == 0) ? (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1) : videoMode-1;
int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u); int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language;
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL; const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u); u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1; int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
@ -923,10 +937,6 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
hooktype = 1; hooktype = 1;
if(!debuggerselect && !cheat) if(!debuggerselect && !cheat)
hooktype = 0; hooktype = 0;
if (videoMode == 0)
videoMode = (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_videoModes) - 1);
if (language == 0)
language = min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1);
} }
m_cfg.setString("NAND", "current_item", id); m_cfg.setString("NAND", "current_item", id);
@ -950,14 +960,6 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
m_cat.save(true); m_cat.save(true);
m_cfg.save(true); m_cfg.save(true);
/*if(!emu_disabled && emulate_mode == 1)
{
char basepath[64];
snprintf(basepath, sizeof(basepath), "%s:%s", DeviceName[emuPartition], emuPath.c_str());
Nand::Instance()->CreateConfig(basepath);
Nand::Instance()->Do_Region_Change(id);
}*/
CheckGameSoundThread(); CheckGameSoundThread();
m_vid.CheckWaitThread(true); m_vid.CheckWaitThread(true);
cleanup(); cleanup();
@ -1145,8 +1147,13 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false)); bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false));
bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("GAMES", "cheat", false)); bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("GAMES", "cheat", false));
bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false)); bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false));
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_videoModes) - 1u);
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
videoMode = (videoMode == 0) ? (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1) : videoMode-1;
int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u); int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language;
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL; const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1; int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
@ -1232,8 +1239,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
u32 cheatSize = 0, gameconfigSize = 0; u32 cheatSize = 0, gameconfigSize = 0;
CheckGameSoundThread(); CheckGameSoundThread();
if(videoMode == 0) videoMode = (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_videoModes) - 1);
if(language == 0) language = min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1);
m_cfg.setString("GAMES", "current_item", id); m_cfg.setString("GAMES", "current_item", id);
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1); m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL)); m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));

View File

@ -263,10 +263,10 @@ turbografx16=TurboGrafx-16
turbografxcd=TurboGrafx-CD turbografxcd=TurboGrafx-CD
unknown=Unknown unknown=Unknown
viddef=Default viddef=Default
vidgame=Game
vidntsc=NTSC vidntsc=NTSC
vidp50=PAL 50Hz vidp50=PAL 50Hz
vidp60=PAL 60Hz vidp60=PAL 60Hz
vidpatch=Auto Patch
vidprog=Progressive vidprog=Progressive
vidsys=System vidsys=System
vmpall=All vmpall=All

View File

@ -259,10 +259,10 @@ turbografx16=TurboGrafx-16
turbografxcd=TurboGrafx-CD turbografxcd=TurboGrafx-CD
unknown=Unbekannt unknown=Unbekannt
viddef=Standard viddef=Standard
vidgame=Spiel
vidntsc=NTSC vidntsc=NTSC
vidp50=PAL 50Hz vidp50=PAL 50Hz
vidp60=PAL 60Hz vidp60=PAL 60Hz
vidpatch=Auto Patch
vidprog=Progressive vidprog=Progressive
vidsys=Konsole vidsys=Konsole
vmpall=Alle vmpall=Alle

View File

@ -1,3 +1,4 @@
[_BREWFLOW_1] [_BREWFLOW_1]
blur_factor=1.200000048 blur_factor=1.200000048
blur_radius=2 blur_radius=2