Make NTSC-J setting an option. This allows games which use Japanese ROM fonts to work correctly. Unfortunately trying to autodetect when to enable this setting is not good enough.

Also move Progressive Scan option to main display settings, since it affects both GC and Wii.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6335 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2010-11-03 06:28:47 +00:00
parent 381f92b151
commit 9df772ed89
8 changed files with 78 additions and 53 deletions

View File

@ -188,8 +188,6 @@ 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;

View File

@ -122,6 +122,7 @@ void SConfig::SaveSettings()
ini.Set("Display", "RenderWindowWidth", m_LocalCoreStartupParameter.iRenderWindowWidth);
ini.Set("Display", "RenderWindowHeight", m_LocalCoreStartupParameter.iRenderWindowHeight);
ini.Set("Display", "ProgressiveScan", m_LocalCoreStartupParameter.bProgressive);
ini.Set("Display", "NTSCJ", m_LocalCoreStartupParameter.bNTSCJ);
// Game List Control
ini.Set("GameList", "ListDrives", m_ListDrives);
@ -245,6 +246,7 @@ void SConfig::LoadSettings()
ini.Get("Display", "RenderWindowWidth", &m_LocalCoreStartupParameter.iRenderWindowWidth, 640);
ini.Get("Display", "RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480);
ini.Get("Display", "ProgressiveScan", &m_LocalCoreStartupParameter.bProgressive, false);
ini.Get("Display", "NTSCJ", &m_LocalCoreStartupParameter.bNTSCJ, false);
// Game List Control
ini.Get("GameList", "ListDrives", &m_ListDrives, false);

View File

@ -42,7 +42,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bJITBranchOff(false), bJITProfiledReJIT(false),
bEnableFPRF(false),
bCPUThread(true), bDSPThread(false),
bSkipIdle(true), bNTSC(false),
bSkipIdle(true), bNTSC(false), bNTSCJ(false),
bHLE_BS2(true), bUseFastMem(false),
bLockThreads(false),
bEnableCheats(false),

View File

@ -69,6 +69,7 @@ struct SCoreStartupParameter
bool bDSPThread;
bool bSkipIdle;
bool bNTSC;
bool bNTSCJ;
bool bHLE_BS2;
bool bEnableOpenCL;
bool bUseFastMem;

View File

@ -54,7 +54,7 @@ static UVIHorizontalScaling m_HorizontalScaling;
static SVIFilterCoefTables m_FilterCoefTables;
static u32 m_UnkAARegister = 0;// ??? 0x00FF0000
static u16 m_Clock = 0; // 0: 27MHz, 1: 54MHz
static u16 m_DTVStatus = 0; // Region char and component cable bit
static UVIDTVStatus m_DTVStatus;
static u16 m_FBWidth = 0; // Only correct when scaling is enabled?
static UVIBorderBlankRegister m_BorderHBlank;
// 0xcc002076 - 0xcc00207f is full of 0x00FF: unknown
@ -145,21 +145,18 @@ void Preset(bool _bNTSC)
m_VBeamPos = 1;
// 54MHz, capable of progressive scan
m_Clock = Core::g_CoreStartupParameter.bProgressive?1:0;
m_Clock = Core::g_CoreStartupParameter.bProgressive;
// Say component cable is plugged
m_DTVStatus = Core::g_CoreStartupParameter.bProgressive?1:0;
m_DTVStatus.component_plugged = Core::g_CoreStartupParameter.bProgressive;
UpdateParameters();
}
void SetRegionReg(char _region)
{
m_DTVStatus = _region | (m_DTVStatus & 1);
}
void Init()
{
m_DTVStatus.ntsc_j = Core::g_CoreStartupParameter.bNTSCJ;
for (int i = 0; i < 4; i++)
m_InterruptRegister[i].Hex = 0;
@ -385,7 +382,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
break;
case VI_DTV_STATUS:
_uReturnValue = m_DTVStatus;
_uReturnValue = m_DTVStatus.Hex;
break;
case VI_FBWIDTH:
@ -637,7 +634,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
break;
case VI_DTV_STATUS:
m_DTVStatus = _iValue;
m_DTVStatus.Hex = _iValue;
break;
case VI_FBWIDTH:

View File

@ -315,12 +315,23 @@ union UVIBorderBlankRegister
};
};
// ntsc-j and component cable bits
union UVIDTVStatus
{
u16 Hex;
struct
{
u16 component_plugged : 1;
u16 ntsc_j : 1;
u16 :14;
};
};
// urgh, ugly externs.
extern u32 TargetRefreshRate;
// For BS2 HLE
void Preset(bool _bNTSC);
void SetRegionReg(char _region);
void Init();
void DoState(PointerWrap &p);