diff --git a/pcsx2/R3000AInterpreter.cpp b/pcsx2/R3000AInterpreter.cpp index 372f1c249a..7826231dbd 100644 --- a/pcsx2/R3000AInterpreter.cpp +++ b/pcsx2/R3000AInterpreter.cpp @@ -145,7 +145,7 @@ void psxBreakpoint(bool memcheck) CBreakPoints::SetBreakpointTriggered(true); VMManager::SetPaused(true); - throw Exception::ExitCpuExecute(); + Cpu->ExitExecution(); } void psxMemcheck(u32 op, u32 bits, bool store) @@ -274,22 +274,14 @@ static s32 intExecuteBlock( s32 eeCycles ) psxRegs.iopBreak = 0; psxRegs.iopCycleEE = eeCycles; - try + while (psxRegs.iopCycleEE > 0) { - while (psxRegs.iopCycleEE > 0) { - if ((psxHu32(HW_ICFG) & 8) && ((psxRegs.pc & 0x1fffffffU) == 0xa0 || (psxRegs.pc & 0x1fffffffU) == 0xb0 || (psxRegs.pc & 0x1fffffffU) == 0xc0)) - psxBiosCall(); + if ((psxHu32(HW_ICFG) & 8) && ((psxRegs.pc & 0x1fffffffU) == 0xa0 || (psxRegs.pc & 0x1fffffffU) == 0xb0 || (psxRegs.pc & 0x1fffffffU) == 0xc0)) + psxBiosCall(); - branch2 = 0; - while (!branch2) { - execI(); - } - } - } - catch (Exception::ExitCpuExecute&) - { - // Get out of the EE too, regardless of whether it's int or rec. - Cpu->ExitExecution(); + branch2 = 0; + while (!branch2) + execI(); } return psxRegs.iopBreak + psxRegs.iopCycleEE; diff --git a/pcsx2/R5900.h b/pcsx2/R5900.h index 7efa63733a..2fd5731e93 100644 --- a/pcsx2/R5900.h +++ b/pcsx2/R5900.h @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2010 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -15,34 +15,7 @@ #pragma once -#include "common/Exceptions.h" - -class BaseR5900Exception; - -// -------------------------------------------------------------------------------------- -// Recompiler Stuffs -// -------------------------------------------------------------------------------------- -// This code section contains recompiler vars that are used in "shared" code. Placing -// them in iR5900.h would mean having to include that into more files than I care to -// right now, so we're sticking them here for now until a better solution comes along. - -namespace Exception -{ - // Implementation Note: this exception has no meaningful type information and we don't - // care to have it be caught by any BaseException handlers lying about, so let's not - // derive from BaseException :D - class ExitCpuExecute - { - public: - explicit ExitCpuExecute() { } - }; - - class CancelInstruction - { - public: - explicit CancelInstruction() { } - }; -} +#include "common/Pcsx2Defs.h" // -------------------------------------------------------------------------------------- // EE Bios function name tables. @@ -214,18 +187,6 @@ struct tlbs #ifndef _PC_ -/*#define _i64(x) (s64)x -#define _u64(x) (u64)x - -#define _i32(x) (s32)x -#define _u32(x) (u32)x - -#define _i16(x) (s16)x -#define _u16(x) (u16)x - -#define _i8(x) (s8)x -#define _u8(x) (u8)x*/ - //////////////////////////////////////////////////////////////////// // R5900 Instruction Macros