diff options
author | Francisco José García García | 2016-09-26 01:03:14 +0200 |
---|---|---|
committer | Francisco José García García | 2016-09-26 01:03:14 +0200 |
commit | 73081f238a4d80891cf9df5aebeebe3d13c84144 (patch) | |
tree | d5aeb7e3c9e1206f88ce2f6d59afacd7a023e0ea /libpcsxcore/new_dynarec | |
parent | 8c57409c2962a24b7d888000d77f0ec462487c56 (diff) | |
download | pcsx_rearmed-73081f238a4d80891cf9df5aebeebe3d13c84144.tar.gz pcsx_rearmed-73081f238a4d80891cf9df5aebeebe3d13c84144.tar.bz2 pcsx_rearmed-73081f238a4d80891cf9df5aebeebe3d13c84144.zip |
(VITA) Dynarec working
Diffstat (limited to 'libpcsxcore/new_dynarec')
-rw-r--r-- | libpcsxcore/new_dynarec/new_dynarec.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 <psp2/kernel/sysmem.h> 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<<TARGET_SIZE_2) < 0) SysPrintf("munmap() failed\n"); |