skmp / reicast-emulator

Reicast was a multiplatform Sega Dreamcast emulator
https://reicast.emudev.org
Other
1.1k stars 345 forks source link

iOS port #24

Closed skmp closed 6 years ago

skmp commented 10 years ago

Requires rooted device. I also don't have a mac or iphone, but i'll probably be able to have access for porting usage at some point. Also, gb_away is working at it

AbandonedCart commented 10 years ago

I have an iPad, iPod, iPhone, a Mac, and an Apple Dev account. Are you still looking to do this?

skmp commented 10 years ago

Sure, can you try to make an xcode project and getting it running? You can take a look on the linux/86 or gcwz makefile for a very basic setup w/o jit

AbandonedCart commented 10 years ago

It'll be a fun experiment with Apple's layout for handling external files. At least there will be no configuring directories and such. You get one, deal LOL.

pipikaka111 commented 10 years ago

is there a build that we can test on ios ?

pipikaka111 commented 10 years ago

also , is there a way to port Onlive to ios ?

AbandonedCart commented 10 years ago

There probably will not be a build for a long time, but as far as OnLive, that is best left to OnLive

pipikaka111 commented 10 years ago

so there s no way to port unless you are a programmer...

pipikaka111 commented 10 years ago

nobody wants to port Onlive.....

AbandonedCart commented 10 years ago

Is it for Dreamcast?

pipikaka111 commented 10 years ago

No Onlive is a cloud gaming app for android. My main question is why is it long for REICAST to be ported for ios??

AbandonedCart commented 10 years ago

Nobody is actively working on it yet. I set up the project but don't have the time quite yet.

pipikaka111 commented 10 years ago

im anxious to see it running on ios..i dont havean android device and its one of the best emulator

AbandonedCart commented 10 years ago

@skmp if you want to add @angelXwind to the project, she can start pushing the iOS stuff in as she works on it. She can offer much more than whatever duct tape port I would come up with left to my lonesome.

skmp commented 10 years ago

Done. Also of interest is https://www.macincloud.com/features/tools/tools. I'll also have access to a rooted iPhone the coming weeks it seems.

AbandonedCart commented 10 years ago

Well considering her progress has been leaps and bounds, by then you'll be able to just run it haha.

skmp commented 10 years ago

@angelXwind, i rented meself a mac on the cloud, any steps on how i can build/test this? (Haven't had time yet to look at the commits, but will do from mon)

AbandonedCart commented 10 years ago

It still looked like there was a reference issue in one of the ASM files but that could be an Xcode setting I didn't update.

I dunno how the Mac in the cloud is, but lets hope the stupid provisioning garbage isn't an issue. Xcode is starting to require a real account to do anything. I think the iPhone emulator can still run, though.

akemin-dayo commented 10 years ago

Sorry for the late reply, I had something to do earlier.

@skmp, MacInCloud... is not optimal for a project like reicast. You lose the ability to conveniently sideload applications via USB, and also debug them (lldb, gdb, etc.). Of course, you can still sideload applications (process is explained below), but it's more work.

Also, the iOS Simulator will not run reicast iOS, because the iOS Simulator is just a simulator, not an emulator. Code must be compiled for x86 (well, x86_64), and reicast probably can't do that.

I guess you've already paid for MacInCloud, so you might as well use it, but using a VMware virtual machine, or actually installing OS X (dual-booting with your main OS) are better alternatives. I personally have an OS X install dual-booted with Windows 8.1, but also a VMware instance that reads directly from the OS X partition raw (when I'm too lazy to reboot).

That aside, the current state of the reicast iOS project is... incomplete. Very incomplete.

The frontend is not functional (the entire Settings page is not even connected to anything), the GLView hasn't been created, and there's an error that prevents the side-drawer (or "hamburger menu" for those who like that term) from actually compiling properly (fixed this locally, hasn't been pushed yet).

I've been busy the past few days, so I haven't contributed as much to the reicast iOS project as I would've liked to, but I'll have more time this week to do that.

Anyway, you'll need a jailbroken iOS device. This is because all code run in iOS must be codesigned, and JIT code will obviously not be codesigned.

Only interpreters will run properly on non-jailbroken iOS devices (as seen with my other projects, nds4ios, PPSSPP, GBA4iOS, etc.). That being said, an SH4 threaded interpreter sounds like it'll be painfully slow :P

Anyway, since you're working from MacInCloud, every time you build reicast, you'll need to get the "emulator.app" folder from the build directory, download it, and scp that folder to /Applications/ (basically iOS's /system/) on your device.

Then you'll need to run uicache as the user mobile (su mobile) on your device to refresh the SpringBoard launcher cache. (This is not required if you are using Xcode's native sideloading ability.)

xcodebuild -configuration Release or xcodebuild -configuration Debug will build the xcodeproj in the current directory as specified in the project configuration.

If you are not a licensed iOS developer (which I'm assuming you aren't), you'll want to grab iOSOpenDev here: http://iosopendev.com/download/

Remember to run iod-setup sdk in a Terminal instance on OS X after that finishes installing.

reicast iOS is pre-configured to play well with iOSOpenDev, I've set get-task-allow to true in the entitlements, and all codesigning options are turned off.

The major issue honestly lies with the emulator core. iOS/OS X do not use literal pools in the same way that the Android NDK does, so LOTS of #IFDEF __APPLE__ will be required in the ASM source.

I'm not very skilled with ASM in general (I've only dabbled with M68K ASM mainly due to my MegaDrive Sonic hacking roots), so I won't really be that helpful in this regard.

At least, I've figured out the following:

@LoungeKatt, The iOS Simulator will not be able to run reicast, unless if reicast has the ability to target x86 CPUs.

akemin-dayo commented 10 years ago

As of commit 370fa02b5c1d378c94d417f0235800949d5641bc, the issue with ngen_arm.S, the ARM JIT core is now fixed.

The next issue is now OGLES2.

iOSSOi commented 10 years ago

@angelXwind Hi, anything new on the iOS build?

skmp commented 9 years ago

https://www.youtube.com/watch?v=wjOtWBH_u0E ~ to keep everyone up to date

skmp commented 9 years ago

The iOS/OSX work has been merged into master (as of a9fc0f5aa804946ec38ee98f5b6efebe016e0e6b). We still lack a proper UI and input code for iOS. Eta is the jun hackcamp.

AbandonedCart commented 9 years ago

Everything is buildable with the recent updates to the project. It crashes instantly, though. I am trying to figure out if that is on my end or in the code.

pipikaka111 commented 9 years ago

Its been a long time since people have been trying to build reicast for iPhone

Sent from my iPhone

On Jul 24, 2015, at 11:45, TwistedUmbrella notifications@github.com wrote:

Everything is buildable with the recent updates to the project. It crashes instantly, though. I am trying to figure out if that is on my end or in the code.

— Reply to this email directly or view it on GitHub.

AbandonedCart commented 9 years ago

@pipikaka111 not sure what you mean. I build it alongside every Android build I test.

pipikaka111 commented 9 years ago

I'm talking about the iOS version. It never came out

Sent from my iPhone

On Jul 24, 2015, at 17:55, TwistedUmbrella notifications@github.com wrote:

@pipikaka111 not sure what you mean. I build it alongside every Android build I test.

— Reply to this email directly or view it on GitHub.

AbandonedCart commented 9 years ago

Didn't come out and not being built are two completely different things. It didn't come out because it isn't ready, or at least not enough for public release.

pipikaka111 commented 9 years ago

Ok thx for the heads up. Do you think I can beta test it a compiled build ? I don't have a Mac.

Sent from my iPhone

On Jul 24, 2015, at 19:25, TwistedUmbrella notifications@github.com wrote:

Didn't come out and not being built are two completely different things. It didn't come out because it isn't ready, or at least not enough for public release.

— Reply to this email directly or view it on GitHub.

AbandonedCart commented 6 years ago

An iOS version exists (at least in source), so we shouldn't need this issue about starting one.