Script to Compile the latest github for retroarch+cores for iOS

Is it a Citra?! Really?

@xdccrlz nopeā€¦ Itā€™s a fishā€¦ A BIG fishā€¦ :joy:

My fault! It is Dolphin!

@xdccrlz Shhhh! :shushing_face: Donā€™t ruin the surpriseā€¦

Besides, we donā€™t know if it would be running games just yetā€¦ :upside_down_face:

Well, I did get dolphin compiled. However, currently, it just crashes when I load content. I will need to run it through the debugger.

My suspicion is that it has to do with the audio plugin. Awhile ago, dolphin moved to cubeb, which does not (currently) work with iOS. It used to, so I tried to use the old version of cubeb and hook it into dolphin, so I suspect that is the origin of the issue.

1 Like

If anyone wants to play around with this and plug it into a debugger and tell me what it says:

To compile, check this out, then cd into the directory and do the following:

mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../ios.cmake -DPLATFORM=OS64 -DENABLE_GENERIC=ON -DLIBRETRO=ON ..;
make
mv dolphin_libretro.dylib dolphin_libretro_ios.dylib

Then download https://github.com/libretro/dolphin/archive/master.zip and take the directory Data/Sys and put it in a directory called dolphin-emu. Put this dolphin-emu in Retroarch/System on your device (like you would a bios). So it should look like Retroarch/System/dolphin-emu/Sys.

Then take the dylib you created above (the rename in the final step is important) and treat it like any other module.

If you plug this into xcode and hook up your phone/iPad and click ā€˜run onā€™ that device while building retroarch, when you load content it will crash. Then debug information will appear on xcode. If you can provide that, I would greatly appreciate it.

@xdccrlz Great work! would you mind linking to the other tvOS compiled cores other than n64 and flycast? the recent 1.8.1 build doesnā€™t run any cores newer than SNES. Thanks so much!

Hey @jet082!

I just got an e-mail from some random guy on the internet, this is how the conversation went so far, I thought youā€™d like to knowā€¦


Le 20 nov. 2019 Ć  01:27, Ran Porath <[email protected]> a Ć©crit :

Hello

First of all Iā€™d like to say thank you for creating such a great repo with everyoneā€™s favorite emulators and especially for fixing cores on iOS! Flycast is amazing on it!

I was wondering if you could do the same magic for tvOS. I know some cores work but some donā€™t and itā€™s probably the same issue like it was on iOS - just need to properly compile for tvOS.

Are you willing to do this and maybe even create an IPA will all cores like you did on iOS?

Iā€™m willing to pay for your hard work. Nobody should work for free anyway.

Please let me know,

Thank you so much,

Ran

Hi Ran!

Iā€™m willing to do this if the AppleTV profile in my computer is still active, but I donā€™t actually own one, so I may have to find one first, or just go to an Apple store and try to connect to one firstā€¦

But, please contact @jet082 on the libretro forums (or on GitHubā€¦), as heā€™s the real magician hereā€¦ He was the one who actually made Flycast, Mupen64 and many others work on iOS 64-bits!

I will try to compile for tvOS, but if I canā€™t, I will take Yoshisugaā€™s already compiled version and put it on the repo, its cores on the buildbot, and its IPA version on my website, so you can install it on an AppleTV directly too!

It will take some testing, but I will try to get this up later today if you wantā€¦

Cheers!


If you want to be safe, you could create an anonymous PayPal or something, and BTW, I would like to send some money your way tooā€¦ :wink:

@Weedy_Weed_Smoker thatā€™s actually me, Iā€™m the random guy on the internet - trying to promote proper tvOS emulation on all fronts :slight_smile:

Thanks again for willing to help with this!

1 Like

@Nuxx Ran! Itā€™s you!

Ok, I still have the tvOS profile from a friendā€™s AppleTV on my laptop, and it compiled fine after I found a recent commit that broke compilation for iOS/tvOSā€¦

Right now, Iā€™m compiling all the cores for tvOS too!

(I may have to put the computer to sleep before itā€™s finished for now though, as the electricity went off at my placeā€¦ Iā€™ll try to get this up online later today!)

1 Like

@jet082 I just ran Dolphin with everything in place (dolphin-emu/Sys/ folder correctly placed, a GameCube game, and Xcode tethered to it), and opening a game exits the app with only this as an output in Xcode :

notify_list_pushed: old size should not be larger
1 Like

This is not the debug information. It should have crashed and highlighted some part of the current memory/running code (but not actually the source file, since itā€™s crashing at the module level) and given an error message there. The console can have useful information, but in this case it sounds like it didnā€™t.

I am PAINFULLY close to getting Gamecube working.

Wiiā€¦ Is an issue. But we can cross that bridge when we come to it.

1 Like

@jet082 Keep fingers crossed! @Nuxx As for tvOS cores: main amount of cores compiles normally with ./libretro-build-tvos-arm64.sh ā€œcore nameā€. flycast and mupen64plus-next require fixes similar to ios-arm64. Many working tvOS cores are inside http://buildbot.libretro.com/stable/1.8.1/apple/tvos/RetroArch-tvOS.ipa

1 Like

@xdccrlz thanks for replying. Yes I tested the stable release and finally many cores are working but nothing past 1997 does, so weā€™re missing the juicy consoles such as N64, Saturn, PSX, Dreamcast, MAME 2015 and PS2 (if that one ever gets to work). I saw your link to the N64 and Flycast cores above but I lack the knowledge on how to wrap it into the IPA. Hopefully @Weedy_Weed_Smoker can do some magic there :slight_smile:

2019-11-21 02:32:04.691236+0300 RetroArch[511:44064] Metal GPU Frame Capture Enabled 2019-11-21 02:32:04.691371+0300 RetroArch[511:44064] Metal API Validation Enabled notify_list_pushed: old size should not be larger ================================================================= Main Thread Checker: UI API called on a background thread: -[UIViewController setTitle:] PID: 511, TID: 44517, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 RetroArch 0x000000010078e62c -[RAMainMenu willReloadData] + 284 5 RetroArch 0x000000010078e01c -[RAMenuBase reloadData] + 28 6 RetroArch 0x00000001007900e8 -[RetroArch_iOS mainMenuRefresh] + 48 7 RetroArch 0x000000010087b158 task_database_handler + 1416 8 RetroArch 0x0000000100926b00 threaded_worker + 272 9 RetroArch 0x0000000100864e30 thread_wrap + 28 10 libsystem_pthread.dylib 0x00000001aaf09840 _pthread_start + 168 11 libsystem_pthread.dylib 0x00000001aaf119f4 thread_start + 8 2019-11-21 02:32:38.595582+0300 RetroArch[511:44517] [reports] Main Thread Checker: UI API called on a background thread: -[UIViewController setTitle:] PID: 511, TID: 44517, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 RetroArch 0x000000010078e62c -[RAMainMenu willReloadData] + 284 5 RetroArch 0x000000010078e01c -[RAMenuBase reloadData] + 28 6 RetroArch 0x00000001007900e8 -[RetroArch_iOS mainMenuRefresh] + 48 7 RetroArch 0x000000010087b158 task_database_handler + 1416 8 RetroArch 0x0000000100926b00 threaded_worker + 272 9 RetroArch 0x0000000100864e30 thread_wrap + 28 10 libsystem_pthread.dylib 0x00000001aaf09840 _pthread_start + 168 11 libsystem_pthread.dylib 0x00000001aaf119f4 thread_start + 8 ================================================================= Main Thread Checker: UI API called on a background thread: -[UITableViewController tableView] PID: 511, TID: 44517, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 RetroArch 0x000000010078e02c -[RAMenuBase reloadData] + 44 5 RetroArch 0x00000001007900e8 -[RetroArch_iOS mainMenuRefresh] + 48 6 RetroArch 0x000000010087b158 task_database_handler + 1416 7 RetroArch 0x0000000100926b00 threaded_worker + 272 8 RetroArch 0x0000000100864e30 thread_wrap + 28 9 libsystem_pthread.dylib 0x00000001aaf09840 _pthread_start + 168 10 libsystem_pthread.dylib 0x00000001aaf119f4 thread_start + 8 2019-11-21 02:32:47.756863+0300 RetroArch[511:44517] [reports] Main Thread Checker: UI API called on a background thread: -[UITableViewController tableView] PID: 511, TID: 44517, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 RetroArch 0x000000010078e02c -[RAMenuBase reloadData] + 44 5 RetroArch 0x00000001007900e8 -[RetroArch_iOS mainMenuRefresh] + 48 6 RetroArch 0x000000010087b158 task_database_handler + 1416 7 RetroArch 0x0000000100926b00 threaded_worker + 272 8 RetroArch 0x0000000100864e30 thread_wrap + 28 9 libsystem_pthread.dylib 0x00000001aaf09840 _pthread_start + 168 10 libsystem_pthread.dylib 0x00000001aaf119f4 thread_start + 8 libc++abi.dylib: terminating (lldb)

  1. Emuthread - Starting (1) Queue : com.apple.main-thread (serial) at retroarch.c string 27362 current_core.retro_run();
1 Like

I donā€™t know if it helps much, but this is the only Gamecube emulator for iOS that actually runs right now:

Maybe you guys could run it through xcode and see if anything in there helps you get the dolphin core working?

https://github.com/WilliamLCobb/GC4iOS need put LZMAExtractor.h in the GC4iOS directory. Compiled, crashed at JIT call. Maybe jet082 can use that.

lol I am aware of that repo. The more relevant one seems to be https://github.com/WilliamLCobb/dolphin-old/ which I have been referencing extensively.

This branch is the one from which the working ipa I posted above was created. Maybe youā€™ll have more luck with it?