diff options
| -rw-r--r-- | libpcsxcore/r3000a.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index 550a17bb..b1ffdc9a 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -110,11 +110,23 @@ void psxException(u32 code, u32 bd) { if (Config.HLE) psxBiosException(); } -void psxBranchTest() { +void psxBranchTest() {
+ if (psxHu32(0x1070) & psxHu32(0x1074)) {
+ if ((psxRegs.CP0.n.Status & 0x401) == 0x401) {
+#ifdef PSXCPU_LOG
+ PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074));
+#endif
+// SysPrintf("Interrupt (%x): %x %x\n", psxRegs.cycle, psxHu32(0x1070), psxHu32(0x1074));
+ psxException(0x400, 0);
+ }
+ }
+
+ // Give Vsync ~2-15+ cycles before exception eats it
if ((psxRegs.cycle - psxNextsCounter) >= psxNextCounter) psxRcntUpdate(); if (psxRegs.interrupt) {
+ //if (1) {
if ((psxRegs.interrupt & (1 << PSXINT_SIO)) && !Config.Sio) { // sio if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_SIO].sCycle) >= psxRegs.intCycle[PSXINT_SIO].cycle) { psxRegs.interrupt &= ~(1 << PSXINT_SIO); @@ -172,16 +184,6 @@ void psxBranchTest() { }
}
} - - if (psxHu32(0x1070) & psxHu32(0x1074)) { - if ((psxRegs.CP0.n.Status & 0x401) == 0x401) { -#ifdef PSXCPU_LOG - PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074)); -#endif -// SysPrintf("Interrupt (%x): %x %x\n", psxRegs.cycle, psxHu32(0x1070), psxHu32(0x1074)); - psxException(0x400, 0); - } - } } void psxJumpTest() { |
