Added a game property to disable the clearing of the data cache. This is needed by one known game, "Rubik's Puzzle Galaxy: Rush".

Fixes Violin Paradise.
This commit is contained in:
skidau 2013-01-20 13:09:38 +11:00
parent 6ec95d30af
commit 0a5f479250
9 changed files with 26 additions and 25 deletions

View File

@ -1,5 +1,6 @@
# WZIPTW - Rubik's: Rush # WZIPTW - Rubik's: Rush
[Core] Values set here will override the main dolphin settings. [Core] Values set here will override the main dolphin settings.
DCBZ = 1
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. [EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 1 EmulationStateId = 1
EmulationIssues = Requires data cache emulation EmulationIssues = Requires data cache emulation

View File

@ -54,7 +54,7 @@ namespace BootManager
// Apply fire liberally // Apply fire liberally
struct ConfigCache struct ConfigCache
{ {
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT, bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bDCBZOFF,
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker, bHLE_BS2; bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker, bHLE_BS2;
int iTLBHack, iCPUCore; int iTLBHack, iCPUCore;
std::string strBackend; std::string strBackend;
@ -92,7 +92,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.iCPUCore = StartUp.iCPUCore; config_cache.iCPUCore = StartUp.iCPUCore;
config_cache.bEnableFPRF = StartUp.bEnableFPRF; config_cache.bEnableFPRF = StartUp.bEnableFPRF;
config_cache.bMMU = StartUp.bMMU; config_cache.bMMU = StartUp.bMMU;
config_cache.bMMUBAT = StartUp.bMMUBAT; config_cache.bDCBZOFF = StartUp.bDCBZOFF;
config_cache.iTLBHack = StartUp.iTLBHack; config_cache.iTLBHack = StartUp.iTLBHack;
config_cache.bVBeam = StartUp.bVBeam; config_cache.bVBeam = StartUp.bVBeam;
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed; config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
@ -107,8 +107,8 @@ bool BootCore(const std::string& _rFilename)
game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle); game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF); game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU); game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU);
game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT);
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack); game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
game_ini.Get("Core", "DCBZ", &StartUp.bDCBZOFF, StartUp.bDCBZOFF);
game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam); game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam);
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed); game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks); game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
@ -167,7 +167,7 @@ void Stop()
StartUp.iCPUCore = config_cache.iCPUCore; StartUp.iCPUCore = config_cache.iCPUCore;
StartUp.bEnableFPRF = config_cache.bEnableFPRF; StartUp.bEnableFPRF = config_cache.bEnableFPRF;
StartUp.bMMU = config_cache.bMMU; StartUp.bMMU = config_cache.bMMU;
StartUp.bMMUBAT = config_cache.bMMUBAT; StartUp.bDCBZOFF = config_cache.bDCBZOFF;
StartUp.iTLBHack = config_cache.iTLBHack; StartUp.iTLBHack = config_cache.iTLBHack;
StartUp.bVBeam = config_cache.bVBeam; StartUp.bVBeam = config_cache.bVBeam;
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed; StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;

View File

@ -400,7 +400,7 @@ void SConfig::LoadSettings()
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0); ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
ini.Get("Core", "VBeam", &m_LocalCoreStartupParameter.bVBeam, false); ini.Get("Core", "VBeam", &m_LocalCoreStartupParameter.bVBeam, false);
ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false); ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false);
ini.Get("Core", "BAT", &m_LocalCoreStartupParameter.bMMUBAT, false); ini.Get("Core", "DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false);
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default ini.Get("Core", "UseFPS", &b_UseFPS, false); // use vps as default

View File

@ -49,7 +49,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bMergeBlocks(false), bMergeBlocks(false),
bDPL2Decoder(false), iLatency(14), bDPL2Decoder(false), iLatency(14),
bRunCompareServer(false), bRunCompareClient(false), bRunCompareServer(false), bRunCompareClient(false),
bMMU(false), bMMUBAT(false), iTLBHack(0), bVBeam(false), bMMU(false), bDCBZOFF(false), iTLBHack(0), bVBeam(false),
bFastDiscSpeed(false), bFastDiscSpeed(false),
SelectedLanguage(0), bWii(false), bDisableWiimoteSpeaker(false), SelectedLanguage(0), bWii(false), bDisableWiimoteSpeaker(false),
bConfirmStop(false), bHideCursor(false), bConfirmStop(false), bHideCursor(false),
@ -75,7 +75,7 @@ void SCoreStartupParameter::LoadDefaults()
bDSPThread = true; bDSPThread = true;
bEnableFPRF = false; bEnableFPRF = false;
bMMU = false; bMMU = false;
bMMUBAT = false; bDCBZOFF = false;
iTLBHack = 0; iTLBHack = 0;
bVBeam = false; bVBeam = false;
bFastDiscSpeed = false; bFastDiscSpeed = false;

View File

@ -113,7 +113,7 @@ struct SCoreStartupParameter
bool bRunCompareClient; bool bRunCompareClient;
bool bMMU; bool bMMU;
bool bMMUBAT; bool bDCBZOFF;
int iTLBHack; int iTLBHack;
bool bVBeam; bool bVBeam;
bool bFastDiscSpeed; bool bFastDiscSpeed;

View File

@ -956,7 +956,7 @@ u32 TranslateAddress(const u32 _Address, const XCheckTLBFlag _Flag)
// Check MSR[DR] bit before translating data addresses // Check MSR[DR] bit before translating data addresses
//if (((_Flag == FLAG_READ) || (_Flag == FLAG_WRITE)) && !(MSR & (1 << (31 - 27)))) return _Address; //if (((_Flag == FLAG_READ) || (_Flag == FLAG_WRITE)) && !(MSR & (1 << (31 - 27)))) return _Address;
u32 tlb_addr = Core::g_CoreStartupParameter.bMMUBAT?TranslateBlockAddress(_Address, _Flag):0; u32 tlb_addr = TranslateBlockAddress(_Address, _Flag);
if (tlb_addr == 0) if (tlb_addr == 0)
{ {
tlb_addr = TranslatePageAddress(_Address, _Flag); tlb_addr = TranslatePageAddress(_Address, _Flag);

View File

@ -407,7 +407,7 @@ void Interpreter::dcbtst(UGeckoInstruction _inst)
void Interpreter::dcbz(UGeckoInstruction _inst) void Interpreter::dcbz(UGeckoInstruction _inst)
{ {
// HACK but works... we think // HACK but works... we think
if (HID2.WPE || !HID0.DCFA) if (!Core::g_CoreStartupParameter.bDCBZOFF)
Memory::Memset(Helper_Get_EA_X(_inst) & (~31), 0, 32); Memory::Memset(Helper_Get_EA_X(_inst) & (~31), 0, 32);
if (!jit) if (!jit)
PowerPC::CheckExceptions(); PowerPC::CheckExceptions();

View File

@ -315,10 +315,10 @@ 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); 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); MMU = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable MMU"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
MMU->SetToolTip(_("Enables the Memory Management Unit, needed for some games. (ON = Compatible, OFF = Fast)")); MMU->SetToolTip(_("Enables the Memory Management Unit, needed for some games. (ON = Compatible, OFF = Fast)"));
MMUBAT = new wxCheckBox(m_GameConfig, ID_MMUBAT, _("Enable BAT"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
MMUBAT->SetToolTip(_("Enables Block Address Translation (BAT); a function of the Memory Management Unit. Accurate to the hardware, but slow to emulate. (ON = Compatible, OFF = Fast)"));
TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), 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);
TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game.")); TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game."));
DCBZOFF = new wxCheckBox(m_GameConfig, ID_DCBZOFF, _("Skip DCBZ clearing"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
DCBZOFF->SetToolTip(_("Bypass the clearing of the data cache by the DCBZ instruction. Usually leave this option disabled."));
VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("Accurate VBeam emulation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("Accurate VBeam emulation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
VBeam->SetToolTip(_("If the FPS is erratic, this option may help. (ON = Compatible, OFF = Fast)")); VBeam->SetToolTip(_("If the FPS is erratic, this option may help. (ON = Compatible, OFF = Fast)"));
FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
@ -364,7 +364,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbCoreOverrides->Add(CPUThread, 0, wxLEFT, 5); sbCoreOverrides->Add(CPUThread, 0, wxLEFT, 5);
sbCoreOverrides->Add(SkipIdle, 0, wxLEFT, 5); sbCoreOverrides->Add(SkipIdle, 0, wxLEFT, 5);
sbCoreOverrides->Add(MMU, 0, wxLEFT, 5); sbCoreOverrides->Add(MMU, 0, wxLEFT, 5);
sbCoreOverrides->Add(MMUBAT, 0, wxLEFT, 5); sbCoreOverrides->Add(DCBZOFF, 0, wxLEFT, 5);
sbCoreOverrides->Add(TLBHack, 0, wxLEFT, 5); sbCoreOverrides->Add(TLBHack, 0, wxLEFT, 5);
sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5); sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5);
sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5); sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5);
@ -930,16 +930,16 @@ void CISOProperties::LoadGameConfig()
else else
MMU->Set3StateValue(wxCHK_UNDETERMINED); MMU->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "BAT", &bTemp))
MMUBAT->Set3StateValue((wxCheckBoxState)bTemp);
else
MMUBAT->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "TLBHack", &bTemp)) if (GameIni.Get("Core", "TLBHack", &bTemp))
TLBHack->Set3StateValue((wxCheckBoxState)bTemp); TLBHack->Set3StateValue((wxCheckBoxState)bTemp);
else else
TLBHack->Set3StateValue(wxCHK_UNDETERMINED); TLBHack->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "DCBZ", &bTemp))
DCBZOFF->Set3StateValue((wxCheckBoxState)bTemp);
else
DCBZOFF->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "VBeam", &bTemp)) if (GameIni.Get("Core", "VBeam", &bTemp))
VBeam->Set3StateValue((wxCheckBoxState)bTemp); VBeam->Set3StateValue((wxCheckBoxState)bTemp);
else else
@ -1025,16 +1025,16 @@ bool CISOProperties::SaveGameConfig()
else else
GameIni.Set("Core", "MMU", MMU->Get3StateValue()); GameIni.Set("Core", "MMU", MMU->Get3StateValue());
if (MMUBAT->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "BAT");
else
GameIni.Set("Core", "BAT", MMUBAT->Get3StateValue());
if (TLBHack->Get3StateValue() == wxCHK_UNDETERMINED) if (TLBHack->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "TLBHack"); GameIni.DeleteKey("Core", "TLBHack");
else else
GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue()); GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue());
if (DCBZOFF->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "DCBZ");
else
GameIni.Set("Core", "DCBZ", DCBZOFF->Get3StateValue());
if (VBeam->Get3StateValue() == wxCHK_UNDETERMINED) if (VBeam->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "VBeam"); GameIni.DeleteKey("Core", "VBeam");
else else

View File

@ -69,7 +69,7 @@ private:
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE();
// Core // Core
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack; wxCheckBox *CPUThread, *SkipIdle, *MMU, *DCBZOFF, *TLBHack;
wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE; wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE;
// Wii // Wii
wxCheckBox *EnableWideScreen, *DisableWiimoteSpeaker; wxCheckBox *EnableWideScreen, *DisableWiimoteSpeaker;
@ -127,7 +127,7 @@ private:
ID_USEDUALCORE, ID_USEDUALCORE,
ID_IDLESKIP, ID_IDLESKIP,
ID_MMU, ID_MMU,
ID_MMUBAT, ID_DCBZOFF,
ID_TLBHACK, ID_TLBHACK,
ID_VBEAM, ID_VBEAM,
ID_DISCSPEED, ID_DISCSPEED,