Add a setting to skip 0xDEADBEEF reg filling.

For debugging purposes.  Can't think of a better way.
This commit is contained in:
Unknown W. Brackets 2013-10-29 23:02:05 -07:00
parent 9ebaf7b68b
commit ee57498b16
3 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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(&currentMIPS->r[MIPS_REG_A0], deadbeefRegs, sizeof(deadbeefRegs));