lightrec: Emulate BREAK
authorPaul Cercueil <paul@crapouillou.net>
Mon, 18 Sep 2023 16:39:40 +0000 (18:39 +0200)
committernotaz <notasas@gmail.com>
Mon, 18 Sep 2023 21:02:49 +0000 (00:02 +0300)
Some games (F1 2000, maybe others) require BREAK to be emulated
properly.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
libpcsxcore/lightrec/plugin.c

index e87396d..1fe04f6 100644 (file)
@@ -525,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;