X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Flightrec%2Fplugin.c;h=703726e36391958d2c1d9d445ef1b6effc72c814;hb=45d1b3d24ec5dceb21eb42ca3d86e935dfe26925;hp=e87396dcd67a8aef755bf6bd1fe1c4d844e24647;hpb=6c307d2d02698d02f84e4b7f8e0f3bac4c93f83c;p=pcsx_rearmed.git diff --git a/libpcsxcore/lightrec/plugin.c b/libpcsxcore/lightrec/plugin.c index e87396dc..703726e3 100644 --- a/libpcsxcore/lightrec/plugin.c +++ b/libpcsxcore/lightrec/plugin.c @@ -20,7 +20,7 @@ #include "../r3000a.h" #include "../psxinterpreter.h" #include "../psxhle.h" -#include "../new_dynarec/events.h" +#include "../psxevents.h" #include "../frontend/main.h" @@ -492,6 +492,9 @@ static void lightrec_plugin_execute_internal(bool block_only) regs = lightrec_get_registers(lightrec_state); gen_interupt((psxCP0Regs *)regs->cp0); + if (!block_only && stop) + return; + cycles_pcsx = next_interupt - psxRegs.cycle; assert((s32)cycles_pcsx > 0); @@ -525,6 +528,8 @@ static void lightrec_plugin_execute_internal(bool block_only) if (flags & LIGHTREC_EXIT_SYSCALL) psxException(R3000E_Syscall << 2, 0, (psxCP0Regs *)regs->cp0); + if (flags & LIGHTREC_EXIT_BREAK) + psxException(R3000E_Bp << 2, 0, (psxCP0Regs *)regs->cp0); else if (flags & LIGHTREC_EXIT_UNKNOWN_OP) { u32 op = intFakeFetch(psxRegs.pc); u32 hlec = op & 0x03ffffff; @@ -547,8 +552,6 @@ static void lightrec_plugin_execute_internal(bool block_only) static void lightrec_plugin_execute(void) { - extern int stop; - while (!stop) lightrec_plugin_execute_internal(false); }