HW/CPU: Refactor to class, move to System.

This commit is contained in:
Admiral H. Curtiss committed 2023-03-08 12:23:37 +01:00
1 parent 0b9002ec2a
commit 3b364c5c16
22 files changed
+368 -276

No files matched your search

@@ -112,9 +112,10 @@ void CachedInterpreter::Run()
{
auto& system = Core::System::GetInstance();
auto& core_timing = system.GetCoreTiming();
auto& cpu = system.GetCPU();
const CPU::State* state_ptr = CPU::GetStatePtr();
while (CPU::GetState() == CPU::State::Running)
const CPU::State* state_ptr = cpu.GetStatePtr();
while (cpu.GetState() == CPU::State::Running)
{
// Start new timing slice
// NOTE: Exceptions may change PC
@@ -199,7 +200,8 @@ static bool CheckProgramException(u32 data)
static bool CheckBreakpoint(u32 data)
{
PowerPC::CheckBreakPoints();
if (CPU::GetState() != CPU::State::Running)
auto& system = Core::System::GetInstance();
if (system.GetCPU().GetState() != CPU::State::Running)
{
PowerPC::ppcState.downcount -= data;
return true;