Change behavior of NTSC-J option:

Left unselected, dolphin defaults to nstc-u and sets ntsc-j if the iso is japanese (old behavior).
Selected, ntsc-j is forced.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7580 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2011-06-03 00:55:58 +00:00
parent 7e2adf6714
commit 77b8813e31
7 changed files with 21 additions and 12 deletions

View File

@ -192,6 +192,8 @@ bool CBoot::BootUp()
// setup the map from ISOFile ID // setup the map from ISOFile ID
VolumeHandler::SetVolumeName(_StartupPara.m_strFilename); VolumeHandler::SetVolumeName(_StartupPara.m_strFilename);
VideoInterface::SetRegionReg((char)VolumeHandler::GetVolume()->GetUniqueID().at(3));
DVDInterface::SetDiscInside(VolumeHandler::IsValid()); DVDInterface::SetDiscInside(VolumeHandler::IsValid());
u32 _TMDsz = 0x208; u32 _TMDsz = 0x208;

View File

@ -190,7 +190,7 @@ void SConfig::SaveSettings()
ini.Set("Display", "RenderWindowHeight", m_LocalCoreStartupParameter.iRenderWindowHeight); ini.Set("Display", "RenderWindowHeight", m_LocalCoreStartupParameter.iRenderWindowHeight);
ini.Set("Display", "RenderWindowAutoSize", m_LocalCoreStartupParameter.bRenderWindowAutoSize); ini.Set("Display", "RenderWindowAutoSize", m_LocalCoreStartupParameter.bRenderWindowAutoSize);
ini.Set("Display", "ProgressiveScan", m_LocalCoreStartupParameter.bProgressive); ini.Set("Display", "ProgressiveScan", m_LocalCoreStartupParameter.bProgressive);
ini.Set("Display", "NTSCJ", m_LocalCoreStartupParameter.bNTSCJ); ini.Set("Display", "ForceNTSCJ", m_LocalCoreStartupParameter.bForceNTSCJ);
// Game List Control // Game List Control
ini.Set("GameList", "ListDrives", m_ListDrives); ini.Set("GameList", "ListDrives", m_ListDrives);
@ -317,7 +317,7 @@ void SConfig::LoadSettings()
ini.Get("Display", "RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480); ini.Get("Display", "RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480);
ini.Get("Display", "RenderWindowAutoSize", &m_LocalCoreStartupParameter.bRenderWindowAutoSize, false); ini.Get("Display", "RenderWindowAutoSize", &m_LocalCoreStartupParameter.bRenderWindowAutoSize, false);
ini.Get("Display", "ProgressiveScan", &m_LocalCoreStartupParameter.bProgressive, 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 // Game List Control
ini.Get("GameList", "ListDrives", &m_ListDrives, false); ini.Get("GameList", "ListDrives", &m_ListDrives, false);

View File

@ -44,7 +44,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bJITILTimeProfiling(false), bJITILOutputIR(false), bJITILTimeProfiling(false), bJITILOutputIR(false),
bEnableFPRF(false), bEnableFPRF(false),
bCPUThread(true), bDSPThread(false), bDSPHLE(true), bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bNTSC(false), bNTSCJ(false), bSkipIdle(true), bNTSC(false), bForceNTSCJ(false),
bHLE_BS2(true), bUseFastMem(false), bHLE_BS2(true), bUseFastMem(false),
bLockThreads(false), bLockThreads(false),
bEnableCheats(false), bEnableCheats(false),

View File

@ -101,7 +101,7 @@ struct SCoreStartupParameter
bool bDSPHLE; bool bDSPHLE;
bool bSkipIdle; bool bSkipIdle;
bool bNTSC; bool bNTSC;
bool bNTSCJ; bool bForceNTSCJ;
bool bHLE_BS2; bool bHLE_BS2;
bool bUseFastMem; bool bUseFastMem;
bool bLockThreads; bool bLockThreads;

View File

@ -157,9 +157,9 @@ void Preset(bool _bNTSC)
void Init() 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++) for (int i = 0; i < 4; i++)
m_InterruptRegister[i].Hex = 0; m_InterruptRegister[i].Hex = 0;
@ -168,6 +168,12 @@ void Init()
UpdateParameters(); UpdateParameters();
} }
void SetRegionReg(char region)
{
if (!Core::g_CoreStartupParameter.bForceNTSCJ)
m_DTVStatus.ntsc_j = region == 'J';
}
void Read8(u8& _uReturnValue, const u32 _iAddress) void Read8(u8& _uReturnValue, const u32 _iAddress)
{ {
// Just like 32bit VI transfers, this is technically not allowed, // Just like 32bit VI transfers, this is technically not allowed,

View File

@ -334,6 +334,7 @@ union UVIDTVStatus
void Preset(bool _bNTSC); void Preset(bool _bNTSC);
void Init(); void Init();
void SetRegionReg(char region);
void DoState(PointerWrap &p); void DoState(PointerWrap &p);
void Read8(u8& _uReturnValue, const u32 _uAddress); void Read8(u8& _uReturnValue, const u32 _uAddress);

View File

@ -333,7 +333,7 @@ void CConfigMain::InitializeGUIValues()
// General - Advanced // General - Advanced
CPUEngine->SetSelection(startup_params.iCPUCore); CPUEngine->SetSelection(startup_params.iCPUCore);
LockThreads->SetValue(startup_params.bLockThreads); LockThreads->SetValue(startup_params.bLockThreads);
_NTSCJ->SetValue(startup_params.bNTSCJ); _NTSCJ->SetValue(startup_params.bForceNTSCJ);
// Display - Interface // 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.")); 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 // 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 // Display - Interface
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game.")); ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
@ -545,7 +545,7 @@ void CConfigMain::CreateGUIControls()
// Core Settings - Advanced // Core Settings - Advanced
CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, _("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS); 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); 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 // Populate the General settings
wxBoxSizer* sFramelimit = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sFramelimit = new wxBoxSizer(wxHORIZONTAL);
@ -855,7 +855,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads = LockThreads->IsChecked(); SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads = LockThreads->IsChecked();
break; break;
case ID_NTSCJ: case ID_NTSCJ:
SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSCJ = _NTSCJ->IsChecked(); SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = _NTSCJ->IsChecked();
break; break;
} }
} }