X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Femu_if.c;h=9d8df341eac083a4082596eff286a23fce8e7c4c;hb=de74f59932e94887debf30e5ec437d7f63591f74;hp=06612dbf9a4cf88314081b3ee9e003fea7ca7839;hpb=90f98e7cf5ed4fdabf6b6ff16d6886fef9dc7bbc;p=pcsx_rearmed.git diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index 06612dbf..9d8df341 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -12,6 +12,7 @@ #include "events.h" #include "../psxhle.h" #include "../psxinterpreter.h" +#include "../psxcounters.h" #include "../r3000a.h" #include "../gte_arm.h" #include "../gte_neon.h" @@ -248,8 +249,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); @@ -262,6 +261,7 @@ static void ari64_execute_until() static void ari64_execute() { while (!stop) { + schedule_timeslice(); ari64_execute_until(); evprintf("drc left @%08x\n", psxRegs.pc); } @@ -272,6 +272,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) @@ -297,7 +298,8 @@ 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; }