Boot: Automatically temporarily set GameCube language to 0 when booting NTSC games.

NTSC GameCubes have no Language setting, so the language byte in SRAM is always 0. Some NTSC games do react oddly and display unfinished translations and similar when the byte is set to a nonzero value that corresponds to a non-English language on a PAL GameCube. See issue 7731: https://code.google.com/p/dolphin-emu/issues/detail?id=7731.
This commit is contained in:
Admiral H. Curtiss 2015-06-08 20:25:48 +02:00
parent be1d1e2798
commit ffe25da78a
1 changed files with 9 additions and 0 deletions

View File

@ -49,6 +49,7 @@ struct ConfigCache
{ {
bool valid, bCPUThread, bSkipIdle, bSyncGPUOnSkipIdleHack, bFPRF, bAccurateNaNs, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread, bool valid, bCPUThread, bSkipIdle, bSyncGPUOnSkipIdleHack, bFPRF, bAccurateNaNs, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread,
bSyncGPU, bFastDiscSpeed, bDSPHLE, bHLE_BS2, bProgressive; bSyncGPU, bFastDiscSpeed, bDSPHLE, bHLE_BS2, bProgressive;
int iSelectedLanguage;
int iCPUCore, Volume; int iCPUCore, Volume;
int iWiimoteSource[MAX_BBMOTES]; int iWiimoteSource[MAX_BBMOTES];
SIDevices Pads[MAX_SI_CHANNELS]; SIDevices Pads[MAX_SI_CHANNELS];
@ -120,6 +121,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.framelimit = SConfig::GetInstance().m_Framelimit; config_cache.framelimit = SConfig::GetInstance().m_Framelimit;
config_cache.frameSkip = SConfig::GetInstance().m_FrameSkip; config_cache.frameSkip = SConfig::GetInstance().m_FrameSkip;
config_cache.bProgressive = StartUp.bProgressive; config_cache.bProgressive = StartUp.bProgressive;
config_cache.iSelectedLanguage = StartUp.SelectedLanguage;
for (unsigned int i = 0; i < MAX_BBMOTES; ++i) for (unsigned int i = 0; i < MAX_BBMOTES; ++i)
{ {
config_cache.iWiimoteSource[i] = g_wiimote_sources[i]; config_cache.iWiimoteSource[i] = g_wiimote_sources[i];
@ -183,6 +185,12 @@ bool BootCore(const std::string& _rFilename)
} }
} }
// Some NTSC GameCube games such as Baten Kaitos react strangely to language settings that would be invalid on an NTSC system
if (StartUp.bNTSC)
{
StartUp.SelectedLanguage = 0;
}
// Wii settings // Wii settings
if (StartUp.bWii) if (StartUp.bWii)
{ {
@ -288,6 +296,7 @@ void Stop()
SConfig::GetInstance().sBackend = config_cache.sBackend; SConfig::GetInstance().sBackend = config_cache.sBackend;
SConfig::GetInstance().m_DSPEnableJIT = config_cache.m_EnableJIT; SConfig::GetInstance().m_DSPEnableJIT = config_cache.m_EnableJIT;
StartUp.bProgressive = config_cache.bProgressive; StartUp.bProgressive = config_cache.bProgressive;
StartUp.SelectedLanguage = config_cache.iSelectedLanguage;
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", config_cache.bProgressive); SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", config_cache.bProgressive);
// Only change these back if they were actually set by game ini, since they can be changed while a game is running. // Only change these back if they were actually set by game ini, since they can be changed while a game is running.