Thread Closed 
 
Thread Rating:
  • 14 Votes - 4.07 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PPSSPP iOS Port
11-16-2012, 04:12 PM (This post was last modified: 02-21-2013 03:06 PM by Henrik.)
Post: #1
PPSSPP iOS Port
Hi everybody!
Recently I have started to port PPSSPP on IOS Devices. After a couple of nights have run the first build on a iPhone 4s.





Since impossible to work on IOS with memory by ASHMEM, I always get a message "MemoryMap_Setup: Failed finding a memory base." And code in MemArena.c slightly changed, I took the code from Dolphin and allocated by mmap 64Mb memory.

Demo with cube work perfect. Puzzle Bobble show title "Please wait ..." and very often the screen flickers.

I think this is because that the main emu loop occurs during image rendering (mipsr4k.RunLoopUntil (nowTicks + frameTicks)). Are there any ways to run emu loop in background thread? I tried to run it in the background, but the result was the image flickers and no signs that the emulation is work not.

In the PPSSPP for Android video the Puzzle Bobble started very fast and works just as well as you might think, which is why in the IOS with this such a problem? May need to allocate more memory or, more importantly, as a default C++ compiler is not a GCC?

Testing device - iphone 4s, IOS 6.0.1, without Jail.
Visit this user's website Find all posts by this user
11-16-2012, 04:40 PM
Post: #2
RE: PPSSPP IOS Port
dude u tried.i was reading ur post and i felt like i was reading some sort of spell(programming jargons)
Find all posts by this user
11-16-2012, 11:00 PM
Post: #3
RE: PPSSPP IOS Port
Nice work! Be sure to commit your changes to the project later Smile

The main loop handling is a bit iffy and needs some rethinking. On Android you can't really have a native thread going full blast drawing the screen, you can only render on demand - but you can have real native thread in the background, so I'm thinking about running the CPU emulation on that and delegating only the drawing to the front thread.

As for your hang, I really have no idea why that would happen but it's probably not related to the weird mainloop. I guess you're building with clang? If there's a flag that turns off strict aliasing you might want to turn that off as PPSSPP is far from pointer-aliasing-pure...
Find all posts by this user
11-17-2012, 02:00 PM
Post: #4
RE: PPSSPP IOS Port
okoye313,
Big Grin

Henrik,
I tried to add the flag -fno-strict-aliasing, but nothing has changed. I'm using xcode 4.5 and I can only select the GNU LLVM (which for some reason does not compile obj-c code) and Apple LLVM.
I still have this idea - build a core of the PPSSPP separately (as a library), using GNU LLVM or GCC (for this will need to install some kind older version of xcode, there must be GCC 4.2). And then link it to the frontend.
Or just build the project in the old version xcode.
Visit this user's website Find all posts by this user
11-22-2012, 03:15 PM
Post: #5
RE: PPSSPP IOS Port
I build version 0.31 and it works much better, Puzzle Bobble is working fine!





In Ridge Racer 2, when the race begins, the screen goes black, visible only HUD. And games like Sheep Defense and Pile Up Bakery reach the screen with the title "Press L, R or Start" and the emulator just closes without any error messages.

Nevertheless, I am very pleased that the case has finally moved forward and some games you can play.
In the source code I have so far is a mess, the weekend will try to tidy them and commit project on a github.
Visit this user's website Find all posts by this user
11-22-2012, 03:50 PM
Post: #6
RE: PPSSPP IOS Port
Good good!!! Very good!!!!
Find all posts by this user
11-22-2012, 04:17 PM
Post: #7
RE: PPSSPP IOS Port
Great work rock88!

Try to commit as much platform-specific stuff into the "native" submodule as possible, but if that's too messy please feel free to just dump it all directly in ppsspp, as long as it builds. Also, please add a little text file with build instructions (I guess you build with XCode?)

BTW, how do you transfer the ISO files to the iPhone? (I don't know much about iOS). Or are you running this on a jailbroken one? Smile
Find all posts by this user
11-25-2012, 10:40 AM
Post: #8
RE: PPSSPP IOS Port
Henrik,
I not use jailbreak (for IOS 6 available only for old devices). ISO images possible copy to Documents folder via iFunbox or copy it to Xcode project.

Today I commit ios port, links -
http://github.com/rock88/native
http://github.com/rock88/ppsspp

Also i added to Readme build instruction.
How I see in the "native" project has changed, and I do not have time to make the necessary changes. I will try to make them one of these days.
Visit this user's website Find all posts by this user
11-25-2012, 10:56 AM
Post: #9
RE: PPSSPP IOS Port
Hm, your port needs some cleanup - would be great if you could get rid of all the file mode changes and do a git rebase against the newest version. But it's a good start!
Find all posts by this user
11-25-2012, 02:04 PM
Post: #10
RE: PPSSPP IOS Port
It is work!!!!!!!!!!!!
Find all posts by this user
11-26-2012, 03:19 AM (This post was last modified: 11-26-2012 03:29 AM by xsacha.)
Post: #11
RE: PPSSPP IOS Port
I just pushed a commit that should make it much easier to port other platforms to PPSSPP.
https://github.com/hrydgard/ppsspp/pull/94
I personally don't own any iOS device but you shouldn't need to change any code in PPSSPP to get it to work on iOS now.

Just add the iOS toolchain and mess with CMakeLists a little bit to get it to generate an xcode project and it should compile Smile

That will be a much nicer patch to merge too Smile

Right now your patches:
1. Revert a lot of the newer patches on github
2. Reimplement stuff that is already implemented (eg. Android's UI is a big one)
3. Include project files that aren't needed.
4. Change file mode from 644 to 755 for most files

Patch to get iOS working should probably be no more than 100 additions + the toolchain file at this stage. The one on your fork is 4725 additions.
Find all posts by this user
11-30-2012, 08:08 AM
Post: #12
RE: PPSSPP IOS Port
I own a jailbroken device, so can anyone please upload their ppsspp.app somewhere? I can't bother installing MAC OSX and waste hours setting it up along Xcode when some users have the app lying around.
Find all posts by this user
11-30-2012, 10:25 AM
Post: #13
RE: PPSSPP IOS Port
You must compile sources and choose you device. The ppsspp upload automatically
Find all posts by this user
12-01-2012, 02:30 PM
Post: #14
RE: PPSSPP IOS Port
That doesn't make any sense, the IOS port requires XCODE
Find all posts by this user
12-01-2012, 02:55 PM
Post: #15
RE: PPSSPP IOS Port
Yes of corse I use Xcode 4.5.2
Find all posts by this user
Thread Closed 


Forum Jump: