CPU: Update debug dispatcher flag on init

This commit is contained in:
Stenzek 2024-04-22 00:08:03 +10:00
parent 0fbc1a3a8a
commit 35f0d7f623
No known key found for this signature in database
4 changed files with 7 additions and 2 deletions

View file

@ -170,6 +170,7 @@ void CPU::Initialize()
s_break_after_instruction = false;
UpdateMemoryPointers();
UpdateDebugDispatcherFlag();
GTE::Initialize();
}
@ -1972,7 +1973,6 @@ bool CPU::UpdateDebugDispatcherFlag()
{
const bool has_any_breakpoints = HasAnyBreakpoints() || s_single_step;
// TODO: cop0 breakpoints
const auto& dcic = g_state.cop0_regs.dcic;
const bool has_cop0_breakpoints = dcic.super_master_enable_1 && dcic.super_master_enable_2 &&
dcic.execution_breakpoint_enable && IsCop0ExecutionBreakpointUnmasked();

View file

@ -125,6 +125,7 @@ void Shutdown();
void Reset();
bool DoState(StateWrapper& sw);
void ClearICache();
bool UpdateDebugDispatcherFlag();
void UpdateMemoryPointers();
void ExecutionModeChanged();

View file

@ -25,7 +25,6 @@ ALWAYS_INLINE static void CheckForPendingInterrupt()
}
void DispatchInterrupt();
bool UpdateDebugDispatcherFlag();
// icache stuff
ALWAYS_INLINE static bool IsCachedAddress(VirtualMemoryAddress address)

View file

@ -3763,6 +3763,11 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
if (g_settings.cpu_recompiler_icache != old_settings.cpu_recompiler_icache)
CPU::ClearICache();
}
else if (g_settings.cpu_execution_mode == CPUExecutionMode::Interpreter &&
g_settings.bios_tty_logging != old_settings.bios_tty_logging)
{
CPU::UpdateDebugDispatcherFlag();
}
if (g_settings.enable_cheats != old_settings.enable_cheats)
{