PPSSPP iOS Port - Printable Version

+- (
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Builds, releases and ports (/forumdisplay.php?fid=4)
+---- Forum: iOS port (/forumdisplay.php?fid=26)
+---- Thread: PPSSPP iOS Port (/showthread.php?tid=200)

PPSSPP iOS Port - rock88 - 11-16-2012 04:12 PM

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.

RE: PPSSPP IOS Port - okoye313 - 11-16-2012 04:40 PM

dude u tried.i was reading ur post and i felt like i was reading some sort of spell(programming jargons)

RE: PPSSPP IOS Port - Henrik - 11-16-2012 11:00 PM

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...

RE: PPSSPP IOS Port - rock88 - 11-17-2012 02:00 PM

Big Grin

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.

RE: PPSSPP IOS Port - rock88 - 11-22-2012 03:15 PM

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.

RE: PPSSPP IOS Port - sashapont - 11-22-2012 03:50 PM

Good good!!! Very good!!!!

RE: PPSSPP IOS Port - Henrik - 11-22-2012 04:17 PM

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

RE: PPSSPP IOS Port - rock88 - 11-25-2012 10:40 AM

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 -

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.

RE: PPSSPP IOS Port - Henrik - 11-25-2012 10:56 AM

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!

RE: PPSSPP IOS Port - sashapont - 11-25-2012 02:04 PM

It is work!!!!!!!!!!!!

RE: PPSSPP IOS Port - xsacha - 11-26-2012 03:19 AM

I just pushed a commit that should make it much easier to port other platforms to PPSSPP.
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.

RE: PPSSPP IOS Port - PlayboyX - 11-30-2012 08:08 AM

I own a jailbroken device, so can anyone please upload their somewhere? I can't bother installing MAC OSX and waste hours setting it up along Xcode when some users have the app lying around.

RE: PPSSPP IOS Port - sashapont - 11-30-2012 10:25 AM

You must compile sources and choose you device. The ppsspp upload automatically

RE: PPSSPP IOS Port - PlayboyX - 12-01-2012 02:30 PM

That doesn't make any sense, the IOS port requires XCODE

RE: PPSSPP IOS Port - sashapont - 12-01-2012 02:55 PM

Yes of corse I use Xcode 4.5.2