{
R3000Acpu *prev_cpu = psxCpu;
-#if defined(LIGHTREC)
- bool can_use_dynarec = found_bios;
-#else
- bool can_use_dynarec = 1;
-#endif
#ifdef _3DS
if (!__ctr_svchax)
Config.Cpu = CPU_INTERPRETER;
else
#endif
- if (strcmp(var.value, "disabled") == 0 || !can_use_dynarec)
+ if (strcmp(var.value, "disabled") == 0)
Config.Cpu = CPU_INTERPRETER;
else if (strcmp(var.value, "enabled") == 0)
Config.Cpu = CPU_DYNAREC;
case R3000ACPU_NOTIFY_BEFORE_SAVE:
break;
case R3000ACPU_NOTIFY_AFTER_LOAD:
- ari64_reset();
+ if (data == NULL)
+ ari64_reset();
psxInt.Notify(note, data);
break;
}
#define PSXBIOS_LOG(...)
#endif
+#define PTR_1 (void *)(size_t)1
+
char *biosA0n[256] = {
// 0x00
"open", "lseek", "read", "write",
ra = 0x80001000;
psxRegs.CP0.n.SR &= ~0x404; // disable interrupts
+ psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
+
while (pc0 != 0x80001000 && ++lim < 1000000)
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
+ psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, PTR_1);
+
if (lim == 1000000)
PSXBIOS_LOG("softCall @%x hit lim\n", pc);
ra = sra;
return;
ra = 0x80001000;
+ psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
+
while (!returned_from_exception() && pc0 != 0x80001000 && ++lim < 1000000)
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
+ psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, PTR_1);
+
if (lim == 1000000)
PSXBIOS_LOG("softCallInException @%x hit lim\n", pc);
if (pc0 == 0x80001000)
enum R3000Anote {
R3000ACPU_NOTIFY_CACHE_ISOLATED = 0,
R3000ACPU_NOTIFY_CACHE_UNISOLATED = 1,
- R3000ACPU_NOTIFY_BEFORE_SAVE,
+ R3000ACPU_NOTIFY_BEFORE_SAVE, // data arg - hle if non-null
R3000ACPU_NOTIFY_AFTER_LOAD,
};