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
commit 0a5f479250
9 changed files with 26 additions and 25 deletions

View file

@ -54,7 +54,7 @@ namespace BootManager
// Apply fire liberally
struct ConfigCache
{
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bDCBZOFF,
bVBeam, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bDisableWiimoteSpeaker, bHLE_BS2;
int iTLBHack, iCPUCore;
std::string strBackend;
@ -92,7 +92,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.iCPUCore = StartUp.iCPUCore;
config_cache.bEnableFPRF = StartUp.bEnableFPRF;
config_cache.bMMU = StartUp.bMMU;
config_cache.bMMUBAT = StartUp.bMMUBAT;
config_cache.bDCBZOFF = StartUp.bDCBZOFF;
config_cache.iTLBHack = StartUp.iTLBHack;
config_cache.bVBeam = StartUp.bVBeam;
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", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
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", "DCBZ", &StartUp.bDCBZOFF, StartUp.bDCBZOFF);
game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam);
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
@ -167,7 +167,7 @@ void Stop()
StartUp.iCPUCore = config_cache.iCPUCore;
StartUp.bEnableFPRF = config_cache.bEnableFPRF;
StartUp.bMMU = config_cache.bMMU;
StartUp.bMMUBAT = config_cache.bMMUBAT;
StartUp.bDCBZOFF = config_cache.bDCBZOFF;
StartUp.iTLBHack = config_cache.iTLBHack;
StartUp.bVBeam = config_cache.bVBeam;
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", "VBeam", &m_LocalCoreStartupParameter.bVBeam, 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", "UseFPS", &b_UseFPS, false); // use vps as default

View file

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

View file

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

View file

@ -956,7 +956,7 @@ u32 TranslateAddress(const u32 _Address, const XCheckTLBFlag _Flag)
// Check MSR[DR] bit before translating data addresses
//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)
{
tlb_addr = TranslatePageAddress(_Address, _Flag);

View file

@ -407,7 +407,7 @@ void Interpreter::dcbtst(UGeckoInstruction _inst)
void Interpreter::dcbz(UGeckoInstruction _inst)
{
// 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);
if (!jit)
PowerPC::CheckExceptions();