From 73081f238a4d80891cf9df5aebeebe3d13c84144 Mon Sep 17 00:00:00 2001 From: Francisco José García García Date: Mon, 26 Sep 2016 01:03:14 +0200 Subject: (VITA) Dynarec working --- libpcsxcore/new_dynarec/new_dynarec.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libpcsxcore/new_dynarec') diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 1618b0f..d8c2372 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -32,6 +32,7 @@ #ifdef VITA #include static int sceBlock; +int getVMBlock(); #endif #include "new_dynarec_config.h" @@ -53,6 +54,10 @@ static int sceBlock; #include "assem_arm.h" #endif +#ifdef VITA +int _newlib_vm_size_user = 1 << TARGET_SIZE_2; +#endif + #define MAXBLOCK 4096 #define MAX_OUTPUT_BLOCK_SIZE 262144 @@ -7054,12 +7059,13 @@ void new_dynarec_init() } #elif defined(BASE_ADDR_DYNAMIC) #ifdef VITA - sceBlock = sceKernelAllocMemBlockForVM("code", 1 << TARGET_SIZE_2); + sceBlock = getVMBlock();//sceKernelAllocMemBlockForVM("code", 1 << TARGET_SIZE_2); if (sceBlock < 0) SysPrintf("sceKernelAllocMemBlockForVM failed\n"); int ret = sceKernelGetMemBlockBase(sceBlock, (void **)&translation_cache); if (ret < 0) SysPrintf("sceKernelGetMemBlockBase failed\n"); + sceClibPrintf("translation_cache = 0x%08X \n ", translation_cache); #else translation_cache = mmap (NULL, 1 << TARGET_SIZE_2, PROT_READ | PROT_WRITE | PROT_EXEC, @@ -7097,8 +7103,8 @@ void new_dynarec_cleanup() int n; #if defined(BASE_ADDR_FIXED) || defined(BASE_ADDR_DYNAMIC) #ifdef VITA - sceKernelFreeMemBlock(sceBlock); - sceBlock = -1; + //sceKernelFreeMemBlock(sceBlock); + //sceBlock = -1; #else if (munmap ((void *)BASE_ADDR, 1<