Core: Break on unhandled memory

This commit is contained in:
zilmar 2022-08-01 10:00:07 +09:30
parent 629fe54ccb
commit 7b851e6b6e
11 changed files with 203 additions and 210 deletions

View File

@ -245,8 +245,7 @@ CJniBridegSettings::CJniBridegSettings()
// Debugger
ADD_SETTING(Debugger_Enabled);
ADD_SETTING(Debugger_ShowTLBMisses);
ADD_SETTING(Debugger_ShowUnhandledMemory);
ADD_SETTING(Debugger_BreakOnUnhandledMemory);
ADD_SETTING(Debugger_ShowPifErrors);
ADD_SETTING(Debugger_ShowDivByZero);
ADD_SETTING(Debugger_RecordRecompilerAsm);

View File

@ -53,7 +53,7 @@ bool PifRamHandler::Write32(uint32_t Address, uint32_t Value, uint32_t Mask)
if (Address < 0x1FC007C0)
{
if (HaveDebugger())
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}

View File

@ -610,7 +610,10 @@ bool CMipsMemoryVM::LB_NonMemory(uint32_t VAddr, uint8_t & Value)
}
else
{
g_Notify->BreakPoint(__FILE__, __LINE__);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
Value = 0;
}
return true;
@ -731,7 +734,10 @@ bool CMipsMemoryVM::SB_NonMemory(uint32_t VAddr, uint8_t Value)
}
break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return false;
}
@ -775,7 +781,10 @@ bool CMipsMemoryVM::SH_NonMemory(uint32_t VAddr, uint16_t Value)
}
break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return false;
}
@ -801,6 +810,7 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t VAddr, uint32_t Value)
case 0x00500000:
case 0x00600000:
case 0x00700000:
case 0x00800000:
if (PAddr < RdramSize())
{
if (CGameSettings::bSMM_Protect() || CGameSettings::bSMM_StoreInstruc())
@ -847,11 +857,11 @@ bool CMipsMemoryVM::SW_NonMemory(uint32_t VAddr, uint32_t Value)
case 0x1FC00000: m_PifRamHandler.Write32(PAddr, Value, 0xFFFFFFFF); break;
case 0x1FF00000: m_CartridgeDomain1Address3Handler.Write32(PAddr, Value, 0xFFFFFFFF); break;
default:
if (PAddr >= 0x10000000 && PAddr < 0x16000000)
if (PAddr >= 0x10000000 && PAddr < 0x20000000)
{
m_RomMemoryHandler.Write32(PAddr, Value, 0xFFFFFFFF);
}
else
else if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
@ -887,7 +897,10 @@ bool CMipsMemoryVM::SD_NonMemory(uint32_t VAddr, uint64_t Value)
}
break;
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return false;
}

View File

@ -6023,9 +6023,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -6063,9 +6063,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x03F8000C: break;
case 0x03F80014: break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -6105,9 +6105,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x04080000: MoveConstToVariable(Value & 0xFFC, &g_Reg->SP_PC_REG, "SP_PC_REG"); break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6124,9 +6124,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
m_RegWorkingSet.AfterCallDirect();
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6239,9 +6239,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6315,9 +6315,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x04400034: MoveConstToVariable(Value, &g_Reg->VI_Y_SCALE_REG, "VI_Y_SCALE_REG"); break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6362,9 +6362,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x04500014: MoveConstToVariable(Value, &g_Reg->AI_BITRATE_REG, "AI_BITRATE_REG"); break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6413,9 +6413,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x04600030: MoveConstToVariable((Value & 0xFF), &g_Reg->PI_BSD_DOM2_RLS_REG, "PI_BSD_DOM2_RLS_REG"); break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6429,9 +6429,9 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x0470000C: MoveConstToVariable(Value, &g_Reg->RI_SELECT_REG, "RI_SELECT_REG"); break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
@ -6470,11 +6470,10 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
case 0x05000000:
@ -6490,11 +6489,10 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
}
@ -6512,11 +6510,10 @@ void CArmRecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %X in to %08X ?", Value, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
}
@ -6543,9 +6540,9 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -6573,11 +6570,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
case 0x03F80014: break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
case 0x04000000:
@ -6625,11 +6621,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
else
{
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
}
break;
@ -6669,11 +6664,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
case 0x04400000:
@ -6741,9 +6735,9 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
case 0x04400034: MoveArmRegToVariable(Reg, &g_Reg->VI_Y_SCALE_REG, "VI_Y_SCALE_REG"); break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -6794,9 +6788,9 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
case 0x04500014: MoveArmRegToVariable(Reg, &g_Reg->AI_BITRATE_REG, "AI_BITRATE_REG"); break;
default:
MoveArmRegToVariable(Reg, PAddr + g_MMU->Rdram(), stdstr_f("RDRAM + %X", PAddr).c_str());
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -6833,9 +6827,9 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
m_RegWorkingSet.AfterCallDirect();*/
break;
case 0x04600010:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
AndConstToVariable(&g_Reg->MI_INTR_REG, "MI_INTR_REG", (uint32_t)~MI_INTR_PI);
m_RegWorkingSet.BeforeCallDirect();
@ -6877,11 +6871,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
case 0x04700000:
@ -6893,11 +6886,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
case 0x04700010: MoveArmRegToVariable(Reg, &g_Reg->RI_REFRESH_REG, "RI_REFRESH_REG"); break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
case 0x04800000:
@ -6928,11 +6920,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
break;
case 0x05000000:
@ -6980,11 +6971,10 @@ void CArmRecompilerOps::SW_Register(ArmReg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", ArmRegName(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
}
}
@ -7085,13 +7075,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
break;
case 0x04080000: MoveVariableToArmReg(&g_Reg->SP_PC_REG, "SP_PC_REG", Reg); break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
}
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04100000:
@ -7112,10 +7101,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
case 0x04300008: MoveVariableToArmReg(&g_Reg->MI_INTR_REG, "MI_INTR_REG", Reg); break;
case 0x0430000C: MoveVariableToArmReg(&g_Reg->MI_INTR_MASK_REG, "MI_INTR_MASK_REG", Reg); break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory()) { g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str()); }
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04400000:
@ -7133,10 +7124,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
MoveVariableToArmReg((void *)&g_MMU->m_HalfLine, "MMU->m_HalfLine", Reg);*/
break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory()) { g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str()); }
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04500000: // AI registers
@ -7192,10 +7185,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
}
break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory()) { g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str()); }
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04600000:
@ -7215,13 +7210,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
case 0x0460002C: MoveVariableToArmReg(&g_Reg->PI_BSD_DOM2_PGS_REG, "PI_BSD_DOM2_PGS_REG", Reg); break;
case 0x04600030: MoveVariableToArmReg(&g_Reg->PI_BSD_DOM2_RLS_REG, "PI_BSD_DOM2_RLS_REG", Reg); break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
}
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04700000:
@ -7230,13 +7224,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
case 0x0470000C: MoveVariableToArmReg(&g_Reg->RI_SELECT_REG, "RI_SELECT_REG", Reg); break;
case 0x04700010: MoveVariableToArmReg(&g_Reg->RI_REFRESH_REG, "RI_REFRESH_REG", Reg); break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
}
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04800000:
@ -7245,13 +7238,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
case 0x04800000: MoveVariableToArmReg(&g_Reg->SI_DRAM_ADDR_REG, "SI_DRAM_ADDR_REG", Reg); break;
case 0x04800018: MoveVariableToArmReg(&g_Reg->SI_STATUS_REG, "SI_STATUS_REG", Reg); break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
}
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x05000000:
@ -7285,13 +7277,12 @@ void CArmRecompilerOps::LW_KnownAddress(ArmReg Reg, uint32_t VAddr)
case 0x05000544: MoveVariableToArmReg(&g_Reg->ASIC_TEST_REG, "ASIC_TEST_REG", Reg); break;
case 0x05000548: MoveVariableToArmReg(&g_Reg->ASIC_TEST_PIN_SEL, "ASIC_TEST_PIN_SEL", Reg); break;
default:
MoveConstToArmReg(Reg, (uint32_t)0);
if (ShowUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
}
CPU_Message(" should be loading from %08X ?", VAddr);
if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); }
MoveConstToArmReg(Reg, (uint32_t)0);
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
else

View File

@ -2743,9 +2743,9 @@ void CX86RecompilerOps::LB_KnownAddress(x86Reg Reg, uint32_t VAddr, bool SignExt
{
MoveConstToX86reg(0, Reg);
CPU_Message("%s\nFailed to translate address %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -2802,9 +2802,9 @@ void CX86RecompilerOps::LB_KnownAddress(x86Reg Reg, uint32_t VAddr, bool SignExt
else
{
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to compile address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -2845,9 +2845,9 @@ void CX86RecompilerOps::LB_KnownAddress(x86Reg Reg, uint32_t VAddr, bool SignExt
break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to compile address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -2867,9 +2867,9 @@ void CX86RecompilerOps::LH_KnownAddress(x86Reg Reg, uint32_t VAddr, bool SignExt
{
MoveConstToX86reg(0, Reg);
CPU_Message("%s\nFailed to translate address %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -2932,9 +2932,9 @@ void CX86RecompilerOps::LH_KnownAddress(x86Reg Reg, uint32_t VAddr, bool SignExt
break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to compile address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -3181,7 +3181,10 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
case 0x0430000C: MoveVariableToX86reg(&g_Reg->MI_INTR_MASK_REG, "MI_INTR_MASK_REG", Reg); break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory()) { g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str()); }
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
case 0x04400000:
@ -3240,9 +3243,9 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
case 0x04600030: MoveVariableToX86reg(&g_Reg->PI_BSD_DOM2_RLS_REG, "PI_BSD_DOM2_RLS_REG", Reg); break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -3253,9 +3256,9 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
case 0x04700010: MoveVariableToX86reg(&g_Reg->RI_REFRESH_REG, "RI_REFRESH_REG", Reg); break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -3265,9 +3268,9 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
case 0x04800018: MoveVariableToX86reg(&g_Reg->SI_STATUS_REG, "SI_STATUS_REG", Reg); break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -3303,9 +3306,9 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
case 0x05000548: MoveVariableToX86reg(&g_Reg->ASIC_TEST_PIN_SEL, "ASIC_TEST_PIN_SEL", Reg); break;
default:
MoveConstToX86reg(0, Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -3342,10 +3345,9 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
else
{
MoveConstToX86reg(((PAddr & 0xFFFF) << 16) | (PAddr & 0xFFFF), Reg);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10114,7 +10116,10 @@ void CX86RecompilerOps::SB_Const(uint8_t Value, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory()) { g_Notify->DisplayError(stdstr_f("%s, \nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str()); }
if (BreakOnUnhandledMemory())
{
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -10150,16 +10155,16 @@ void CX86RecompilerOps::SB_Const(uint8_t Value, uint32_t VAddr)
}
else
{
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %02X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %02X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10179,9 +10184,9 @@ void CX86RecompilerOps::SB_Register(x86Reg Reg, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -10208,9 +10213,9 @@ void CX86RecompilerOps::SB_Register(x86Reg Reg, uint32_t VAddr)
}
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10229,9 +10234,9 @@ void CX86RecompilerOps::SH_Const(uint16_t Value, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -10258,9 +10263,9 @@ void CX86RecompilerOps::SH_Const(uint16_t Value, uint32_t VAddr)
}
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %04X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10302,18 +10307,18 @@ void CX86RecompilerOps::SH_Register(x86Reg Reg, uint32_t VAddr)
}
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, PAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
else
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10335,9 +10340,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -10383,9 +10388,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x03F8000C: break;
case 0x03F80014: break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10439,9 +10444,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x0404001C: MoveConstToVariable(0, &g_Reg->SP_SEMAPHORE_REG, "SP_SEMAPHORE_REG"); break;
case 0x04080000: MoveConstToVariable(Value & 0xFFC, &g_Reg->SP_PC_REG, "SP_PC_REG"); break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10464,9 +10469,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
#endif
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10582,9 +10587,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
}
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10666,9 +10671,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x04400030: MoveConstToVariable(Value, &g_Reg->VI_X_SCALE_REG, "VI_X_SCALE_REG"); break;
case 0x04400034: MoveConstToVariable(Value, &g_Reg->VI_Y_SCALE_REG, "VI_Y_SCALE_REG"); break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -10725,9 +10730,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x0460002C: MoveConstToVariable((Value & 0xFF), &g_Reg->PI_BSD_DOM2_PGS_REG, "PI_BSD_DOM2_PGS_REG"); break;
case 0x04600030: MoveConstToVariable((Value & 0xFF), &g_Reg->PI_BSD_DOM2_RLS_REG, "PI_BSD_DOM2_RLS_REG"); break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10739,9 +10744,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
case 0x04700008: MoveConstToVariable(Value, &g_Reg->RI_CURRENT_LOAD_REG, "RI_CURRENT_LOAD_REG"); break;
case 0x0470000C: MoveConstToVariable(Value, &g_Reg->RI_SELECT_REG, "RI_SELECT_REG"); break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10792,9 +10797,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
m_RegWorkingSet.AfterCallDirect();
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10810,9 +10815,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
m_RegWorkingSet.AfterCallDirect();
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -10836,9 +10841,9 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr)
}
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store %08X in %08X?", __FUNCTION__, Value, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
UpdateCounters(m_RegWorkingSet, false, true, true);
@ -10874,9 +10879,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
if (!m_MMU.VAddrToPAddr(VAddr, PAddr))
{
CPU_Message("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
return;
}
@ -10954,9 +10959,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
else
{
CPU_Message(" should be moving %s in to %08X ?", x86_Name(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -11005,9 +11010,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", x86_Name(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -11095,9 +11100,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
case 0x04400034: MoveX86regToVariable(Reg, &g_Reg->VI_Y_SCALE_REG, "VI_Y_SCALE_REG"); break;
default:
CPU_Message(" should be moving %s in to %08X ?", x86_Name(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}
@ -11179,9 +11184,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", x86_Name(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -11193,9 +11198,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
case 0x0470000C: MoveX86regToVariable(Reg, &g_Reg->RI_SELECT_REG, "RI_SELECT_REG"); break;
case 0x04700010: MoveX86regToVariable(Reg, &g_Reg->RI_REFRESH_REG, "RI_REFRESH_REG"); break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -11244,9 +11249,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
m_RegWorkingSet.AfterCallDirect();
break;
default:
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
break;
@ -11294,9 +11299,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
break;
default:
CPU_Message(" should be moving %s in to %08X ?", x86_Name(Reg), VAddr);
if (ShowUnhandledMemory())
if (BreakOnUnhandledMemory())
{
g_Notify->DisplayError(stdstr_f("%s\nTrying to store in %08X?", __FUNCTION__, VAddr).c_str());
g_Notify->BreakPoint(__FILE__, __LINE__);
}
}
}

View File

@ -319,8 +319,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
AddHandler(File_DiskIPLTOOLPath, new CSettingTypeApplicationPath("Settings", "Disk IPL TOOL ROM Path", Default_None));
AddHandler(Debugger_Enabled, new CSettingTypeApplication("Debugger", "Debugger", false));
AddHandler(Debugger_ShowTLBMisses, new CSettingTypeApplication("Debugger", "Show TLB Misses", false));
AddHandler(Debugger_ShowUnhandledMemory, new CSettingTypeApplication("Debugger", "Show Unhandled Memory", false));
AddHandler(Debugger_BreakOnUnhandledMemory, new CSettingTypeApplication("Debugger", "Break On Unhandled Memory", false));
AddHandler(Debugger_ShowPifErrors, new CSettingTypeApplication("Debugger", "Show Pif Errors", false));
AddHandler(Debugger_DisableGameFixes, new CSettingTypeApplication("Debugger", "Disable Game Fixes", false));
AddHandler(Debugger_ShowDListAListCount, new CSettingTypeApplication("Debugger", "Show Dlist Alist Count", false));

View File

@ -23,7 +23,7 @@ uint32_t CDebugSettings::m_ExceptionBreakpoints = 0;
uint32_t CDebugSettings::m_FpExceptionBreakpoints = 0;
uint32_t CDebugSettings::m_IntrBreakpoints = 0;
uint32_t CDebugSettings::m_RcpIntrBreakpoints = 0;
bool CDebugSettings::m_ShowUnhandledMemory = false;
bool CDebugSettings::m_BreakOnUnhandledMemory = false;
CDebugSettings::CDebugSettings()
{
@ -33,7 +33,6 @@ CDebugSettings::CDebugSettings()
m_Registered = true;
g_Settings->RegisterChangeCB(Debugger_Enabled, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_RecordRecompilerAsm, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_ShowTLBMisses, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_ShowDivByZero, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_RecordExecutionTimes, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_SteppingOps, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
@ -48,7 +47,7 @@ CDebugSettings::CDebugSettings()
g_Settings->RegisterChangeCB(Debugger_FpExceptionBreakpoints, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_IntrBreakpoints, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_RcpIntrBreakpoints, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_ShowUnhandledMemory, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->RegisterChangeCB(Debugger_BreakOnUnhandledMemory, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
RefreshSettings();
}
@ -61,7 +60,6 @@ CDebugSettings::~CDebugSettings()
{
g_Settings->UnregisterChangeCB(Debugger_Enabled, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_RecordRecompilerAsm, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_ShowTLBMisses, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_ShowDivByZero, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_RecordExecutionTimes, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_SteppingOps, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
@ -75,7 +73,7 @@ CDebugSettings::~CDebugSettings()
g_Settings->UnregisterChangeCB(Debugger_FpExceptionBreakpoints, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_IntrBreakpoints, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_RcpIntrBreakpoints, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_ShowUnhandledMemory, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
g_Settings->UnregisterChangeCB(Debugger_BreakOnUnhandledMemory, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
}
}
@ -83,7 +81,6 @@ void CDebugSettings::RefreshSettings()
{
m_HaveDebugger = g_Settings->LoadBool(Debugger_Enabled);
m_bRecordRecompilerAsm = m_HaveDebugger && g_Settings->LoadBool(Debugger_RecordRecompilerAsm);
m_bShowTLBMisses = m_HaveDebugger && g_Settings->LoadBool(Debugger_ShowTLBMisses);
m_bShowDivByZero = m_HaveDebugger && g_Settings->LoadBool(Debugger_ShowDivByZero);
m_RecordExecutionTimes = m_HaveDebugger && g_Settings->LoadBool(Debugger_RecordExecutionTimes);
m_Stepping = m_HaveDebugger && g_Settings->LoadBool(Debugger_SteppingOps);
@ -98,7 +95,7 @@ void CDebugSettings::RefreshSettings()
m_FpExceptionBreakpoints = m_HaveDebugger ? g_Settings->LoadDword(Debugger_FpExceptionBreakpoints) : 0;
m_IntrBreakpoints = m_HaveDebugger ? g_Settings->LoadDword(Debugger_IntrBreakpoints) : 0;
m_RcpIntrBreakpoints = m_HaveDebugger ? g_Settings->LoadDword(Debugger_RcpIntrBreakpoints) : 0;
m_ShowUnhandledMemory = m_HaveDebugger && g_Settings->LoadBool(Debugger_ShowUnhandledMemory);
m_BreakOnUnhandledMemory = m_HaveDebugger && g_Settings->LoadBool(Debugger_BreakOnUnhandledMemory);
m_Debugging = m_HaveDebugger && (m_HaveExecutionBP || m_WaitingForStep || m_HaveWriteBP || m_HaveReadBP);
}

View File

@ -26,7 +26,7 @@ public:
static inline uint32_t FpExceptionBreakpoints(void) { return m_FpExceptionBreakpoints; }
static inline uint32_t IntrBreakpoints(void) { return m_IntrBreakpoints; }
static inline uint32_t RcpIntrBreakpoints(void) { return m_RcpIntrBreakpoints; }
static inline bool ShowUnhandledMemory(void) { return m_ShowUnhandledMemory; }
static inline bool BreakOnUnhandledMemory(void) { return m_BreakOnUnhandledMemory; }
private:
static void StaticRefreshSettings(CDebugSettings * _this)
@ -54,7 +54,7 @@ private:
static uint32_t m_FpExceptionBreakpoints;
static uint32_t m_IntrBreakpoints;
static uint32_t m_RcpIntrBreakpoints;
static bool m_ShowUnhandledMemory;
static bool m_BreakOnUnhandledMemory;
static int32_t m_RefCount;
static bool m_Registered;

View File

@ -236,8 +236,7 @@ enum SettingID
// Debugger
Debugger_Enabled,
Debugger_ShowTLBMisses,
Debugger_ShowUnhandledMemory,
Debugger_BreakOnUnhandledMemory,
Debugger_ShowPifErrors,
Debugger_ShowDivByZero,
Debugger_RecordRecompilerAsm,

View File

@ -24,8 +24,7 @@ CMainMenu::CMainMenu(CMainGui * hMainWindow) :
m_ChangeSettingList.push_back(UserInterface_ShowCPUPer);
m_ChangeSettingList.push_back(Logging_GenerateLog);
m_ChangeSettingList.push_back(Debugger_RecordExecutionTimes);
m_ChangeSettingList.push_back(Debugger_ShowTLBMisses);
m_ChangeSettingList.push_back(Debugger_ShowUnhandledMemory);
m_ChangeSettingList.push_back(Debugger_BreakOnUnhandledMemory);
m_ChangeSettingList.push_back(Debugger_ShowPifErrors);
m_ChangeSettingList.push_back(Debugger_ShowDListAListCount);
m_ChangeSettingList.push_back(Debugger_DebugLanguage);
@ -497,11 +496,8 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
break;
case ID_PROFILE_RESETCOUNTER: g_BaseSystem->ExternalEvent(SysEvent_ResetFunctionTimes); break;
case ID_PROFILE_GENERATELOG: g_BaseSystem->ExternalEvent(SysEvent_DumpFunctionTimes); break;
case ID_DEBUG_SHOW_TLB_MISSES:
g_Settings->SaveBool(Debugger_ShowTLBMisses, !g_Settings->LoadBool(Debugger_ShowTLBMisses));
break;
case ID_DEBUG_SHOW_UNHANDLED_MEM:
g_Settings->SaveBool(Debugger_ShowUnhandledMemory, !g_Settings->LoadBool(Debugger_ShowUnhandledMemory));
case ID_DEBUG_BREAK_ON_UNHANDLED_MEM:
g_Settings->SaveBool(Debugger_BreakOnUnhandledMemory, !g_Settings->LoadBool(Debugger_BreakOnUnhandledMemory));
break;
case ID_DEBUG_SHOW_PIF_ERRORS:
g_Settings->SaveBool(Debugger_ShowPifErrors, !g_Settings->LoadBool(Debugger_ShowPifErrors));
@ -1221,8 +1217,8 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
}
// Notification menu
Item.Reset(ID_DEBUG_SHOW_UNHANDLED_MEM, EMPTY_STRING, EMPTY_STDSTR, nullptr, L"On unhandled memory actions");
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory))
Item.Reset(ID_DEBUG_BREAK_ON_UNHANDLED_MEM, EMPTY_STRING, EMPTY_STDSTR, nullptr, L"Break on unhandled memory actions");
if (g_Settings->LoadBool(Debugger_BreakOnUnhandledMemory))
{
Item.SetItemTicked(true);
}
@ -1250,12 +1246,6 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
Item.Reset(SUB_MENU, EMPTY_STRING, EMPTY_STDSTR, &DebugNotificationMenu, L"Notification");
DebugMenu.push_back(Item);
DebugMenu.push_back(MENU_ITEM(SPLITER));
Item.Reset(ID_DEBUG_SHOW_TLB_MISSES, EMPTY_STRING, EMPTY_STDSTR, nullptr, L"Show TLB misses");
if (g_Settings->LoadBool(Debugger_ShowTLBMisses))
{
Item.SetItemTicked(true);
}
DebugMenu.push_back(Item);
Item.Reset(ID_DEBUG_SHOW_DLIST_COUNT, EMPTY_STRING, EMPTY_STDSTR, nullptr, L"Display Alist/Dlist count");
if (g_Settings->LoadBool(Debugger_ShowDListAListCount))
{

View File

@ -33,7 +33,7 @@ enum MainMenuID
ID_OPTIONS_DECREASE_SPEED,
// Debugger menu
ID_DEBUG_SHOW_TLB_MISSES, ID_DEBUG_SHOW_UNHANDLED_MEM, ID_DEBUG_SHOW_PIF_ERRORS,
ID_DEBUG_BREAK_ON_UNHANDLED_MEM, ID_DEBUG_SHOW_PIF_ERRORS,
ID_DEBUG_SHOW_DLIST_COUNT, ID_DEBUG_SHOW_RECOMP_MEM_SIZE, ID_DEBUG_SHOW_DIV_BY_ZERO,
ID_DEBUG_RECORD_RECOMPILER_ASM, ID_DEBUG_DISABLE_GAMEFIX, ID_DEBUG_LANGUAGE,
ID_DEBUGGER_LOGOPTIONS, ID_DEBUGGER_GENERATELOG, ID_DEBUGGER_DUMPMEMORY, ID_DEBUGGER_SEARCHMEMORY,