notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update libretro.c
[pcsx_rearmed.git]
/
frontend
/
libretro.c
diff --git
a/frontend/libretro.c
b/frontend/libretro.c
index
444719a
..
17b57d9
100644
(file)
--- a/
frontend/libretro.c
+++ b/
frontend/libretro.c
@@
-10,6
+10,10
@@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
+#ifdef __MACH__
+#include <unistd.h>
+#include <sys/syscall.h>
+#endif
#include "../libpcsxcore/misc.h"
#include "../libpcsxcore/psxcounters.h"
#include "../libpcsxcore/misc.h"
#include "../libpcsxcore/psxcounters.h"
@@
-290,7
+294,7
@@
void* pl_vita_mmap(unsigned long addr, size_t size, int is_fixed,
char blockname[32];
sprintf(blockname, "CODE 0x%08X",tag);
char blockname[32];
sprintf(blockname, "CODE 0x%08X",tag);
- block = sceKernelAllocMemBlock(blockname,
size + 0x100
0);
+ block = sceKernelAllocMemBlock(blockname,
0x0c20d060, size + 0x1000,
0);
if(block<=0){
sceClibPrintf("could not alloc mem block @0x%08X 0x%08X \n", block, tag);
exit(1);
if(block<=0){
sceClibPrintf("could not alloc mem block @0x%08X 0x%08X \n", block, tag);
exit(1);
@@
-1550,6
+1554,11
@@
void retro_init(void)
int i, ret;
bool found_bios = false;
int i, ret;
bool found_bios = false;
+#ifdef __MACH__
+ // magic sauce to make the dynarec work on iOS
+ syscall(SYS_ptrace, 0 /*PTRACE_TRACEME*/, 0, 0, 0);
+#endif
+
#ifdef _3DS
psxMapHook = pl_3ds_mmap;
psxUnmapHook = pl_3ds_munmap;
#ifdef _3DS
psxMapHook = pl_3ds_mmap;
psxUnmapHook = pl_3ds_munmap;