PPSSPP iOS Port
|
03-04-2013, 06:28 AM
Post: #211
|
|||
|
|||
RE: PPSSPP iOS Port
Amen!.
|
|||
03-04-2013, 12:56 PM
Post: #212
|
|||
|
|||
RE: PPSSPP iOS Port
(03-03-2013 06:03 PM)the avenger Wrote: sys_icache_invalidate()This is what PPSSPP is currently using though. It's a case of sys_cache_control(). That is, they are the same function. When you replace it, nothing changes. The crash is not from cache like I said, it's from PROT_EXEC. Simply lacking privileges to execute from memory. |
|||
03-04-2013, 02:03 PM
Post: #213
|
|||
|
|||
RE: PPSSPP iOS Port
Maybe jit crashing happens because use mmap for allocating memory? This example working for me, also when set (PROT_READ | PROT_EXEC | PROT_WRITE) in mprotect.
Although even allocation through malloc still crash.. |
|||
03-04-2013, 02:15 PM
(This post was last modified: 03-04-2013 02:56 PM by the avenger.)
Post: #214
|
|||
|
|||
RE: PPSSPP iOS Port
(03-04-2013 02:03 PM)rock88 Wrote: Maybe jit crashing happens because use mmap for allocating memory? This example working for me, also when set (PROT_READ | PROT_EXEC | PROT_WRITE) in mprotect.this might save the day http://reverse.put.as/wp-content/uploads...igning.pdf jit startes from page 39 of this all the way down edit:also this is probably why giving it the dynamic-codesign entitlement didn't work taken from somewhere:whereby pages can either be read/write or read/execute. Unfortunately the majority of existing JIT engines expect RWX in order to patch executable pages without the need to change the state from rx » rw, patch code and then rw » rx. Critical in multi-threaded scenarios, as code could conceivably jump to a page that was being patched and fault due to the absence of the execute flag. |
|||
03-05-2013, 12:38 AM
Post: #215
|
|||
|
|||
RE: PPSSPP iOS Port
sorry for offtopic
someone can fix the no text appears in Lunar: Silver Star Harmony,the fonts aren't packaged in properly. |
|||
03-05-2013, 01:29 AM
(This post was last modified: 03-05-2013 01:34 AM by xsacha.)
Post: #216
|
|||
|
|||
RE: PPSSPP iOS Port
From that document it looks like we need to pass a MAP_JIT to mmap() call as well as adding dynamic_codesign to entitlements.
Can anyone quickly try? Also looks like if you use MAP_FILE instead of MAP_ANON, you could run JIT without jailbreak? In iOS 5.0 anyway, probably fixed now. |
|||
03-05-2013, 10:24 AM
Post: #217
|
|||
|
|||
RE: PPSSPP iOS Port
(03-05-2013 01:29 AM)xsacha Wrote: From that document it looks like we need to pass a MAP_JIT to mmap() call as well as adding dynamic_codesign to entitlements.just tell me what code to change and with what and in what file and i can test things instantly |
|||
03-05-2013, 01:06 PM
Post: #218
|
|||
|
|||
RE: PPSSPP iOS Port
I try it, now app crashing in ARMXEmitter::Write32..
It's had to be done only in the function AllocateExecutableMemory ? |
|||
03-05-2013, 01:13 PM
(This post was last modified: 03-05-2013 01:23 PM by the avenger.)
Post: #219
|
|||
|
|||
RE: PPSSPP iOS Port | |||
03-05-2013, 01:24 PM
(This post was last modified: 03-05-2013 01:25 PM by rock88.)
Post: #220
|
|||
|
|||
RE: PPSSPP iOS Port
I just replace "MAP_ANON | MAP_PRIVATE" in AllocateExecutableMemory from Common/MemoryUtil.cpp on a "MAP_ANON | MAP_PRIVATE | MAP_JIT", also try "MAP_FILE | MAP_PRIVATE | MAP_JIT", and add "dynamic-codesigning" flag to entitlements and set it to YES.
And i run it without root access.. |
|||
03-05-2013, 01:52 PM
Post: #221
|
|||
|
|||
RE: PPSSPP iOS Port
(03-05-2013 01:24 PM)rock88 Wrote: I just replace "MAP_ANON | MAP_PRIVATE" in AllocateExecutableMemory from Common/MemoryUtil.cpp on a "MAP_ANON | MAP_PRIVATE | MAP_JIT", also try "MAP_FILE | MAP_PRIVATE | MAP_JIT", and add "dynamic-codesigning" flag to entitlements and set it to YES.i am trying to build the latest code from the github with these changes and give it root access see what happens but i get this error any help? |
|||
03-05-2013, 02:32 PM
(This post was last modified: 03-05-2013 02:34 PM by [Unknown].)
Post: #222
|
|||
|
|||
RE: PPSSPP iOS Port
In addition to that change, you also need a valid fd.
Something like... at the top of the file: #include <fcntl.h> And then inside that func: int fd = open("/dev/zero", O_RDWR, 0); And then replace the param after the MAP_ flags (-1) with fd. It's probably crashing in the emitter because mmap() returned an invalid pointer and so it's crashing when writing to a bad ptr. (03-05-2013 01:52 PM)the avenger Wrote: i am trying to build the latest code from the github with these changes and give it root access see what happens but i get this error Hmm, xcode should be building the git-version.cpp file in the root. What do you have in that file? You may need to re-run cmake. -[Unknown] |
|||
03-05-2013, 03:01 PM
Post: #223
|
|||
|
|||
RE: PPSSPP iOS Port
(03-05-2013 02:32 PM)[Unknown] Wrote: In addition to that change, you also need a valid fd.re-run cmake on what?i already ran it on the ios toolchain, anyway if you can post the lines of code already edited with what you proposed i can paste it in and see how it works |
|||
03-06-2013, 03:50 AM
Post: #224
|
|||
|
|||
RE: PPSSPP iOS Port
no lucky,ios is to hard.
|
|||
03-06-2013, 01:11 PM
Post: #225
|
|||
|
|||
RE: PPSSPP iOS Port
(03-05-2013 03:01 PM)the avenger Wrote:it's like "make clean" what he meant, not just try again.(03-05-2013 02:32 PM)[Unknown] Wrote: In addition to that change, you also need a valid fd.re-run cmake on what?i already ran it on the ios toolchain, |
|||
« Next Oldest | Next Newest »
|