notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2646cb4
)
initial hle support for lightrec
author
notaz
<notasas@gmail.com>
Sat, 2 Sep 2023 19:54:16 +0000
(22:54 +0300)
committer
notaz
<notasas@gmail.com>
Mon, 4 Sep 2023 21:04:28 +0000
(
00:04
+0300)
frontend/libretro.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/emu_if.c
patch
|
blob
|
blame
|
history
libpcsxcore/psxbios.c
patch
|
blob
|
blame
|
history
libpcsxcore/r3000a.h
patch
|
blob
|
blame
|
history
diff --git
a/frontend/libretro.c
b/frontend/libretro.c
index
a115fc6
..
b1af9f1
100644
(file)
--- a/
frontend/libretro.c
+++ b/
frontend/libretro.c
@@
-1948,18
+1948,13
@@
static void update_variables(bool in_flight)
{
R3000Acpu *prev_cpu = psxCpu;
{
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
#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;
Config.Cpu = CPU_INTERPRETER;
else if (strcmp(var.value, "enabled") == 0)
Config.Cpu = CPU_DYNAREC;
diff --git
a/libpcsxcore/new_dynarec/emu_if.c
b/libpcsxcore/new_dynarec/emu_if.c
index
f879ad8
..
e21003c
100644
(file)
--- a/
libpcsxcore/new_dynarec/emu_if.c
+++ b/
libpcsxcore/new_dynarec/emu_if.c
@@
-297,7
+297,8
@@
static void ari64_notify(enum R3000Anote note, void *data) {
case R3000ACPU_NOTIFY_BEFORE_SAVE:
break;
case R3000ACPU_NOTIFY_AFTER_LOAD:
case R3000ACPU_NOTIFY_BEFORE_SAVE:
break;
case R3000ACPU_NOTIFY_AFTER_LOAD:
- ari64_reset();
+ if (data == NULL)
+ ari64_reset();
psxInt.Notify(note, data);
break;
}
psxInt.Notify(note, data);
break;
}
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
dc726e4
..
fdac556
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-47,6
+47,8
@@
#define PSXBIOS_LOG(...)
#endif
#define PSXBIOS_LOG(...)
#endif
+#define PTR_1 (void *)(size_t)1
+
char *biosA0n[256] = {
// 0x00
"open", "lseek", "read", "write",
char *biosA0n[256] = {
// 0x00
"open", "lseek", "read", "write",
@@
-384,9
+386,13
@@
static inline void softCall(u32 pc) {
ra = 0x80001000;
psxRegs.CP0.n.SR &= ~0x404; // disable interrupts
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);
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;
if (lim == 1000000)
PSXBIOS_LOG("softCall @%x hit lim\n", pc);
ra = sra;
@@
-403,9
+409,13
@@
static inline void softCallInException(u32 pc) {
return;
ra = 0x80001000;
return;
ra = 0x80001000;
+ psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
+
while (!returned_from_exception() && pc0 != 0x80001000 && ++lim < 1000000)
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
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)
if (lim == 1000000)
PSXBIOS_LOG("softCallInException @%x hit lim\n", pc);
if (pc0 == 0x80001000)
diff --git
a/libpcsxcore/r3000a.h
b/libpcsxcore/r3000a.h
index
912a41f
..
fb5e1db
100644
(file)
--- a/
libpcsxcore/r3000a.h
+++ b/
libpcsxcore/r3000a.h
@@
-45,7
+45,7
@@
enum R3000Aexception {
enum R3000Anote {
R3000ACPU_NOTIFY_CACHE_ISOLATED = 0,
R3000ACPU_NOTIFY_CACHE_UNISOLATED = 1,
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,
};
R3000ACPU_NOTIFY_AFTER_LOAD,
};