diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 45b33b8190..9a1b4fed85 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -192,6 +192,8 @@ bool CBoot::BootUp() // setup the map from ISOFile ID VolumeHandler::SetVolumeName(_StartupPara.m_strFilename); + VideoInterface::SetRegionReg((char)VolumeHandler::GetVolume()->GetUniqueID().at(3)); + DVDInterface::SetDiscInside(VolumeHandler::IsValid()); u32 _TMDsz = 0x208; diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 3845772f51..581ca53302 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -190,7 +190,7 @@ void SConfig::SaveSettings() ini.Set("Display", "RenderWindowHeight", m_LocalCoreStartupParameter.iRenderWindowHeight); ini.Set("Display", "RenderWindowAutoSize", m_LocalCoreStartupParameter.bRenderWindowAutoSize); ini.Set("Display", "ProgressiveScan", m_LocalCoreStartupParameter.bProgressive); - ini.Set("Display", "NTSCJ", m_LocalCoreStartupParameter.bNTSCJ); + ini.Set("Display", "ForceNTSCJ", m_LocalCoreStartupParameter.bForceNTSCJ); // Game List Control ini.Set("GameList", "ListDrives", m_ListDrives); @@ -317,7 +317,7 @@ void SConfig::LoadSettings() ini.Get("Display", "RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480); ini.Get("Display", "RenderWindowAutoSize", &m_LocalCoreStartupParameter.bRenderWindowAutoSize, false); ini.Get("Display", "ProgressiveScan", &m_LocalCoreStartupParameter.bProgressive, false); - ini.Get("Display", "NTSCJ", &m_LocalCoreStartupParameter.bNTSCJ, false); + ini.Get("Display", "ForceNTSCJ", &m_LocalCoreStartupParameter.bForceNTSCJ, false); // Game List Control ini.Get("GameList", "ListDrives", &m_ListDrives, false); diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 00d0b9d185..cb368d4ae1 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -44,7 +44,7 @@ SCoreStartupParameter::SCoreStartupParameter() bJITILTimeProfiling(false), bJITILOutputIR(false), bEnableFPRF(false), bCPUThread(true), bDSPThread(false), bDSPHLE(true), - bSkipIdle(true), bNTSC(false), bNTSCJ(false), + bSkipIdle(true), bNTSC(false), bForceNTSCJ(false), bHLE_BS2(true), bUseFastMem(false), bLockThreads(false), bEnableCheats(false), diff --git a/Source/Core/Core/Src/CoreParameter.h b/Source/Core/Core/Src/CoreParameter.h index da6508262a..9c5b815794 100644 --- a/Source/Core/Core/Src/CoreParameter.h +++ b/Source/Core/Core/Src/CoreParameter.h @@ -101,7 +101,7 @@ struct SCoreStartupParameter bool bDSPHLE; bool bSkipIdle; bool bNTSC; - bool bNTSCJ; + bool bForceNTSCJ; bool bHLE_BS2; bool bUseFastMem; bool bLockThreads; diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index 4dc589397c..d8d6d98570 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -157,9 +157,9 @@ void Preset(bool _bNTSC) void Init() { - fields = Core::g_CoreStartupParameter.bVBeam?1:2; + fields = Core::g_CoreStartupParameter.bVBeam ? 1 : 2; - m_DTVStatus.ntsc_j = Core::g_CoreStartupParameter.bNTSCJ; + m_DTVStatus.ntsc_j = Core::g_CoreStartupParameter.bForceNTSCJ; for (int i = 0; i < 4; i++) m_InterruptRegister[i].Hex = 0; @@ -168,6 +168,12 @@ void Init() UpdateParameters(); } +void SetRegionReg(char region) +{ + if (!Core::g_CoreStartupParameter.bForceNTSCJ) + m_DTVStatus.ntsc_j = region == 'J'; +} + void Read8(u8& _uReturnValue, const u32 _iAddress) { // Just like 32bit VI transfers, this is technically not allowed, diff --git a/Source/Core/Core/Src/HW/VideoInterface.h b/Source/Core/Core/Src/HW/VideoInterface.h index 5d66bf177d..021e48efdf 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.h +++ b/Source/Core/Core/Src/HW/VideoInterface.h @@ -333,7 +333,8 @@ union UVIDTVStatus // For BS2 HLE void Preset(bool _bNTSC); - void Init(); + void Init(); + void SetRegionReg(char region); void DoState(PointerWrap &p); void Read8(u8& _uReturnValue, const u32 _uAddress); @@ -341,7 +342,7 @@ union UVIDTVStatus void Read32(u32& _uReturnValue, const u32 _uAddress); void Write16(const u16 _uValue, const u32 _uAddress); - void Write32(const u32 _uValue, const u32 _uAddress); + void Write32(const u32 _uValue, const u32 _uAddress); // returns a pointer to the current visible xfb u8* GetXFBPointerTop(); diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 15d4567b44..b6cb731ec0 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -333,7 +333,7 @@ void CConfigMain::InitializeGUIValues() // General - Advanced CPUEngine->SetSelection(startup_params.iCPUCore); LockThreads->SetValue(startup_params.bLockThreads); - _NTSCJ->SetValue(startup_params.bNTSCJ); + _NTSCJ->SetValue(startup_params.bForceNTSCJ); // Display - Interface @@ -486,7 +486,7 @@ void CConfigMain::InitializeGUITooltips() Framelimit->SetToolTip(_("If you set Framelimit higher than game full speed (NTSC:60, PAL:50), you also have to disable Audio Throttle in DSP to make it effective.")); // General - Advanced - _NTSCJ->SetToolTip(_("Required for using the Japanese ROM font.")); + _NTSCJ->SetToolTip(_("Forces NTSC-J mode for using the Japanese ROM font.\nLeft unchecked, dolphin defaults to NTSC-U and automatically enables this setting when playing Japanese games.")); // Display - Interface ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game.")); @@ -545,7 +545,7 @@ void CConfigMain::CreateGUIControls() // Core Settings - Advanced CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, _("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS); LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, _("Lock Threads to Cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); - _NTSCJ = new wxCheckBox(GeneralPage, ID_NTSCJ, _("Set Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); + _NTSCJ = new wxCheckBox(GeneralPage, ID_NTSCJ, _("Force Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); // Populate the General settings wxBoxSizer* sFramelimit = new wxBoxSizer(wxHORIZONTAL); @@ -855,7 +855,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event) SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads = LockThreads->IsChecked(); break; case ID_NTSCJ: - SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSCJ = _NTSCJ->IsChecked(); + SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = _NTSCJ->IsChecked(); break; } }