Added a self modifying code option in the game properties. Turn this on for Monster House and other games that hang or show memory errors. Turn it off for everything else. This fixes Legends of Wrestling.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6005 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau 2010-07-30 17:12:59 +00:00
parent 84b5824670
commit 1d2f4283d1
6 changed files with 19 additions and 3 deletions

View File

@ -45,7 +45,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bSkipIdle(true), bNTSC(false),
bHLE_BS2(true), bUseFastMem(false),
bLockThreads(false),
bEnableCheats(false),
bEnableCheats(false), bSMC(false),
bRunCompareServer(false), bRunCompareClient(false),
bMMU(false), iTLBHack(0), SelectedLanguage(0), bWii(false),
bConfirmStop(false), bHideCursor(false),
@ -70,6 +70,7 @@ void SCoreStartupParameter::LoadDefaults()
bLockThreads = true;
bEnableFPRF = false;
bMMU = false;
bSMC = false;
iTLBHack = 0;
SelectedLanguage = 0;
bWii = false;

View File

@ -78,6 +78,7 @@ struct SCoreStartupParameter
bool bRunCompareClient;
bool bMMU;
bool bSMC;
int iTLBHack;
int SelectedLanguage;

View File

@ -270,7 +270,7 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
*(T*)&m_pRAM[em_address & RAM_MASK] = bswap(data);
// Required for games with self modifying code (e.g. Monster House)
if (Core::g_CoreStartupParameter.bMMU)
if (Core::g_CoreStartupParameter.bSMC)
Write_Opcode_JIT(em_address, 0x14141414);
return;

View File

@ -108,6 +108,7 @@ bool BootCore(const std::string& _rFilename)
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU);
game_ini.Get("Core", "SMC", &StartUp.bSMC, StartUp.bSMC);
// Wii settings
if (StartUp.bWii)
{

View File

@ -292,6 +292,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
MMU = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable MMU"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
SMC = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable self modifying code check"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
// Wii Console
sbWiiOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Wii Console"));
EnableProgressiveScan = new wxCheckBox(m_GameConfig, ID_ENABLEPROGRESSIVESCAN, _("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
@ -349,6 +350,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbCoreOverrides->Add(SkipIdle, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(MMU, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(SMC, 0, wxEXPAND|wxLEFT, 5);
sbWiiOverrides->Add(EnableProgressiveScan, 0, wxEXPAND|wxLEFT, 5);
sbWiiOverrides->Add(EnableWideScreen, 0, wxEXPAND|wxLEFT, 5);
sbVideoOverrides->Add(ForceFiltering, 0, wxEXPAND|wxLEFT, 5);
@ -821,6 +823,11 @@ void CISOProperties::LoadGameConfig()
else
TLBHack->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "SMC", &bTemp))
SMC->Set3StateValue((wxCheckBoxState)bTemp);
else
SMC->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Wii", "ProgressiveScan", &bTemp))
EnableProgressiveScan->Set3StateValue((wxCheckBoxState)bTemp);
else
@ -907,6 +914,11 @@ bool CISOProperties::SaveGameConfig()
else
GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue());
if (SMC->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "SMC");
else
GameIni.Set("Core", "SMC", SMC->Get3StateValue());
if (EnableProgressiveScan->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Wii", "ProgressiveScan");
else

View File

@ -84,7 +84,7 @@ class CISOProperties : public wxDialog
wxStaticText *OverrideText;
// Core
wxCheckBox *CPUThread, *SkipIdle, *MMU, *TLBHack;
wxCheckBox *CPUThread, *SkipIdle, *MMU, *SMC, *TLBHack;
// Wii
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
// Video
@ -166,6 +166,7 @@ class CISOProperties : public wxDialog
ID_IDLESKIP,
ID_MMU,
ID_TLBHACK,
ID_SMC,
ID_FORCEFILTERING,
ID_EFBCOPYDISABLE,
ID_EFBTOTEXTUREENABLE,