vita: another try
authornotaz <notasas@gmail.com>
Wed, 18 Dec 2024 21:47:00 +0000 (23:47 +0200)
committernotaz <notasas@gmail.com>
Wed, 18 Dec 2024 21:50:16 +0000 (23:50 +0200)
maybe the last
libretro/pcsx_rearmed#856

libpcsxcore/new_dynarec/emu_if.c
libpcsxcore/new_dynarec/new_dynarec.c

index a9122c8..5042bf5 100644 (file)
@@ -24,6 +24,9 @@
 #include "../../frontend/libretro-rthreads.h"
 #include "features/features_cpu.h"
 #include "retro_timers.h"
+#ifdef VITA
+#include <psp2/kernel/sysmem.h>
+#endif
 #endif
 #ifdef _3DS
 #include <3ds_utils.h>
@@ -446,6 +449,10 @@ static void ari64_compile_thread(void *unused)
        void *target;
        u32 addr;
 
+#ifdef VITA
+       int ret = sceKernelOpenVMDomain();
+       if (ret) SysPrintf("thread: sceKernelOpenVMDomain: %x\n", ret);
+#endif
        slock_lock(ndrc_g.thread.lock);
        while (!ndrc_g.thread.exit)
        {
index 10315b5..cc72e7a 100644 (file)
@@ -6334,9 +6334,11 @@ void new_dynarec_init(void)
   if (sceBlock <= 0)
     SysPrintf("getVMBlock failed: %x\n", sceBlock);
   int ret = sceKernelGetMemBlockBase(sceBlock, (void **)&ndrc);
-  if (ret < 0)
-    SysPrintf("sceKernelGetMemBlockBase failed: %x\n", ret);
-  sceKernelOpenVMDomain();
+  if (ret)
+    SysPrintf("sceKernelGetMemBlockBase: %x\n", ret);
+  ret = sceKernelOpenVMDomain();
+  if (ret)
+    SysPrintf("sceKernelOpenVMDomain: %x\n", ret);
   #elif defined(_MSC_VER)
   ndrc = VirtualAlloc(NULL, sizeof(*ndrc), MEM_COMMIT | MEM_RESERVE,
     PAGE_EXECUTE_READWRITE);