From ffe25da78aed74784d419ede5b5254e71c6d458d Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Mon, 8 Jun 2015 20:25:48 +0200 Subject: [PATCH] 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. --- Source/Core/Core/BootManager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 85396fad4b..d645fb3c40 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -49,6 +49,7 @@ struct ConfigCache { bool valid, bCPUThread, bSkipIdle, bSyncGPUOnSkipIdleHack, bFPRF, bAccurateNaNs, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread, bSyncGPU, bFastDiscSpeed, bDSPHLE, bHLE_BS2, bProgressive; + int iSelectedLanguage; int iCPUCore, Volume; int iWiimoteSource[MAX_BBMOTES]; SIDevices Pads[MAX_SI_CHANNELS]; @@ -120,6 +121,7 @@ bool BootCore(const std::string& _rFilename) config_cache.framelimit = SConfig::GetInstance().m_Framelimit; config_cache.frameSkip = SConfig::GetInstance().m_FrameSkip; config_cache.bProgressive = StartUp.bProgressive; + config_cache.iSelectedLanguage = StartUp.SelectedLanguage; for (unsigned int i = 0; i < MAX_BBMOTES; ++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 if (StartUp.bWii) { @@ -288,6 +296,7 @@ void Stop() SConfig::GetInstance().sBackend = config_cache.sBackend; SConfig::GetInstance().m_DSPEnableJIT = config_cache.m_EnableJIT; StartUp.bProgressive = config_cache.bProgressive; + StartUp.SelectedLanguage = config_cache.iSelectedLanguage; 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.