diff --git a/Core/Config.cpp b/Core/Config.cpp index 80ae8d41b0..965a56ddb3 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -285,6 +285,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { debugConfig->Get("DisplayStatusBar", &bDisplayStatusBar, true); debugConfig->Get("ShowBottomTabTitles",&bShowBottomTabTitles,true); debugConfig->Get("ShowDeveloperMenu", &bShowDeveloperMenu, false); + debugConfig->Get("SkipDeadbeefFilling", &bSkipDeadbeefFilling, false); IniFile::Section *speedhacks = iniFile.GetOrCreateSection("SpeedHacks"); speedhacks->Get("PrescaleUV", &bPrescaleUV, false); @@ -481,6 +482,7 @@ void Config::Save() { debugConfig->Set("DisplayStatusBar", bDisplayStatusBar); debugConfig->Set("ShowBottomTabTitles",bShowBottomTabTitles); debugConfig->Set("ShowDeveloperMenu", bShowDeveloperMenu); + debugConfig->Set("SkipDeadbeefFilling", bSkipDeadbeefFilling); IniFile::Section *speedhacks = iniFile.GetOrCreateSection("SpeedHacks"); speedhacks->Set("PrescaleUV", bPrescaleUV); diff --git a/Core/Config.h b/Core/Config.h index 61163f596f..11c78b2fbf 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -215,6 +215,8 @@ public: bool bDisplayStatusBar; bool bShowBottomTabTitles; bool bShowDeveloperMenu; + // Double edged sword: much easier debugging, but not accurate. + bool bSkipDeadbeefFilling; std::string currentDirectory; std::string externalDirectory; diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index 007bedae2e..b840a37b0f 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -351,7 +351,9 @@ void hleEatMicro(int usec) const static u32 deadbeefRegs[12] = {0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF}; inline static void SetDeadbeefRegs() { - // TODO: Debug setting? + if (g_Config.bSkipDeadbeefFilling) + return; + currentMIPS->r[MIPS_REG_COMPILER_SCRATCH] = 0xDEADBEEF; // Set all the arguments and temp regs. memcpy(¤tMIPS->r[MIPS_REG_A0], deadbeefRegs, sizeof(deadbeefRegs));