X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Flightrec%2Fplugin.c;h=1fe04f654b7c2274460764103cf1c9ef327384ad;hb=a95fc05a0d459771793550bffefafe1ec0afe669;hp=7248c178260d9dbf142137ee5808056841f1982b;hpb=ec4baa7d5d08c244066f11638298e20e37f91368;p=pcsx_rearmed.git diff --git a/libpcsxcore/lightrec/plugin.c b/libpcsxcore/lightrec/plugin.c index 7248c178..1fe04f65 100644 --- a/libpcsxcore/lightrec/plugin.c +++ b/libpcsxcore/lightrec/plugin.c @@ -66,6 +66,8 @@ static bool use_lightrec_interpreter; static bool use_pcsx_interpreter; static bool block_stepping; +extern u32 lightrec_hacks; + enum my_cp2_opcodes { OP_CP2_RTPS = 0x01, OP_CP2_NCLIP = 0x06, @@ -523,6 +525,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; @@ -621,6 +625,8 @@ static void lightrec_plugin_reset(void) regs->cp0[12] = 0x10900000; // COP0 enabled | BEV = 1 | TS = 1 regs->cp0[15] = 0x00000002; // PRevID = Revision ID, same as R3000A + + lightrec_set_unsafe_opt_flags(lightrec_state, lightrec_hacks); } static void lightrec_plugin_sync_regs_from_pcsx(bool need_cp2)