X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;h=d8c23725d3ce032532b84d121e3a4b83b2cb1a5a;hb=73081f238a4d80891cf9df5aebeebe3d13c84144;hp=1618b0fae40f4fc6743cfc6e8e1f7b80bc96a014;hpb=1e212a25c55c298490867c2ded029c82db1d2b9d;p=pcsx_rearmed.git diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 1618b0fa..d8c23725 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<