From 0aeb0cb9d5aee3004954bd18ef5b7ea1f69a0378 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 14 Dec 2021 21:03:25 +0200 Subject: [PATCH] drc: reapply some libretro changes --- libpcsxcore/new_dynarec/new_dynarec.c | 10 +++++++++- libpcsxcore/new_dynarec/new_dynarec_config.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 27d9d469..15b93836 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -6841,14 +6841,22 @@ void new_dynarec_init(void) { SysPrintf("Init new dynarec\n"); +#ifdef _3DS + check_rosalina(); +#endif #ifdef BASE_ADDR_DYNAMIC #ifdef VITA - sceBlock = sceKernelAllocMemBlockForVM("code", 1 << TARGET_SIZE_2); + sceBlock = getVMBlock(); //sceKernelAllocMemBlockForVM("code", sizeof(*ndrc)); if (sceBlock < 0) SysPrintf("sceKernelAllocMemBlockForVM failed\n"); int ret = sceKernelGetMemBlockBase(sceBlock, (void **)&ndrc); if (ret < 0) SysPrintf("sceKernelGetMemBlockBase failed\n"); + sceKernelOpenVMDomain(); + sceClibPrintf("translation_cache = 0x%08lx\n ", (long)ndrc->translation_cache); + #elif defined(_MSC_VER) + ndrc = VirtualAlloc(NULL, sizeof(*ndrc), MEM_COMMIT | MEM_RESERVE, + PAGE_EXECUTE_READWRITE); #else uintptr_t desired_addr = 0; #ifdef __ELF__ diff --git a/libpcsxcore/new_dynarec/new_dynarec_config.h b/libpcsxcore/new_dynarec/new_dynarec_config.h index 321bfbf3..f93613ff 100644 --- a/libpcsxcore/new_dynarec/new_dynarec_config.h +++ b/libpcsxcore/new_dynarec/new_dynarec_config.h @@ -6,7 +6,7 @@ #define USE_MINI_HT 1 //#define REG_PREFETCH 1 -#if defined(__MACH__) || defined(VITA) +#if defined(__MACH__) #define NO_WRITE_EXEC 1 #endif #ifdef VITA -- 2.39.5