X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Femu_if.c;h=e21003c021429be2cb85e2385f3757a3b257dba2;hb=11d23573173ec4b5074eb35665c6012a46034d5c;hp=2590b3ab2d3c35a4799a69c27c98a3e7b1d7bec3;hpb=ecca05e3f098c65ba617f1a7dd2a31b2bce7e4ab;p=pcsx_rearmed.git diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index 2590b3ab..e21003c0 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -28,7 +28,9 @@ void pcsx_mtc0(u32 reg, u32 val) evprintf("MTC0 %d #%x @%08x %u\n", reg, val, psxRegs.pc, psxRegs.cycle); MTC0(&psxRegs, reg, val); gen_interupt(&psxRegs.CP0); - if (psxRegs.CP0.n.Cause & psxRegs.CP0.n.SR & 0x0300) // possible sw irq + + //if (psxRegs.CP0.n.Cause & psxRegs.CP0.n.SR & 0x0300) // possible sw irq + if ((psxRegs.pc & 0x803ffeff) == 0x80000080) pending_exception = 1; } @@ -246,8 +248,6 @@ static void ari64_reset() // (HLE softcall exit and BIOS fastboot end) static void ari64_execute_until() { - schedule_timeslice(); - evprintf("ari64_execute %08x, %u->%u (%d)\n", psxRegs.pc, psxRegs.cycle, next_interupt, next_interupt - psxRegs.cycle); @@ -260,6 +260,7 @@ static void ari64_execute_until() static void ari64_execute() { while (!stop) { + schedule_timeslice(); ari64_execute_until(); evprintf("drc left @%08x\n", psxRegs.pc); } @@ -270,6 +271,7 @@ static void ari64_execute_block(enum blockExecCaller caller) if (caller == EXEC_CALLER_BOOT) stop++; + next_interupt = psxRegs.cycle + 1; ari64_execute_until(); if (caller == EXEC_CALLER_BOOT) @@ -295,7 +297,9 @@ static void ari64_notify(enum R3000Anote note, void *data) { case R3000ACPU_NOTIFY_BEFORE_SAVE: break; case R3000ACPU_NOTIFY_AFTER_LOAD: - ari64_reset(); + if (data == NULL) + ari64_reset(); + psxInt.Notify(note, data); break; } }