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

Several things. All my changes have now either been made into pull requests if the PRs allow for working cores (or, in the case of parallel_n64, are minor changes but nonetheless broken cores) or forked repos (in the case of openlara and flycast).

What this means in practice is that changes can be merged very easily (indeed, some already have - dinothawr, mednafen_snes, and stonesoup).

It also means you no longer have to do the changes to build the cores yourself. You can just pull the PR/branch and compile ezpz.

Possibly(?) more exciting is that I actually got one of the most ‘troubled’ cores out there to work - Frodo! This means our ability to play Commodore 64 games has increased! This core has never worked on any system, like stonesoup, so this is not just an iOS debut!

1 Like

My changes to parallel_n64 and scummvm have been moved upstream.

Additionally, I have gotten thepowdertoy and TIC-80 compiled. Instructions above. The latter should be interesting to @Weedy_Weed_Smoker since I know someone in your thread really wanted that one at some point.

1 Like

Thank you @jet082!

I finally managed to compile everything that you fixed! Except for EasyRPG…

This will all be soon on the buildbot and inside IPA versions!

I can’t for the life of me figure out how to compile EasyRPG for iOS 64-bit, so I will use harakari’s version for now, but everything else compiled fine…


BTW, what do you think about the new vitaquake2 and vitaquake3 ? :wink:

So, the issue with vitaquake2 and vitaquake3 is they rely on vita specific libraries. I got them about as far as

client/cl_main.c:22:10: fatal error: 'vitasdk.h' file not found

before moving on. Now, this isn’t to say they aren’t possible - I literally worked on vitaquake2 less than five minutes (actually, I’m just guessing that vitaquake3 has the same problems - I haven’t tested it at all).

It is possible it might be a situation like TIC-80, which relied heavily on SDL stuff - but there was a nice little flag to disable all that. It is also possible (though, I think, very unlikely), that I could just bring in the vita sdk libraries and compile it for arm64 that way. But I suspect there are low-level optimizations in there that are vita specific and would crash when run, even if it compiled properly.

I will poke at them a little more, but my next project will probably be getting the Emux stuff and blastem to work. My guess is those will be pretty reasonable.

1 Like

@jet082 vitaquake2 has at least been compiled for OSX as I see in the buildbot : https://buildbot.libretro.com/nightly/apple/osx/x86_64/latest/vitaquake2_libretro.dylib.zip

No trace of vitaquake3 for Mac though, but it has been compiled for Windows : https://buildbot.libretro.com/nightly/windows/x86_64/latest/vitaquake3-oa_libretro.dll.zip https://buildbot.libretro.com/nightly/windows/x86_64/latest/vitaquake3_libretro.dll.zip

There are 2 versions of vitaquake3, maybe we can get one working on iOS too…

Oh that’s quite promising then. That suggests that there is probably a flag to disable the Vita specific stuff.

I’ll give it a closer look later to see how they compiled it for osx. Honestly, if there’s either an Android or an osx port, it’s typically not too bad to get it on iOS too. Exceptions made for cores that have JIT or use extensive graphics or something.

1 Like

LOL it took like 3 lines in the makefile and vitaquake2 compiled fine. Honestly, one of the easiest things I’ve had to do so far.

Gonna test it and see if I can get vitaquake3 as well.

1 Like

Welp, bad news.

I got both vitaquake2 and vitaquake3 to compile, but neither actually run. Incidentally, I could not get vitaquake3 to run on windows either - and when I ran vitaquake2, it did not produce any graphics, just sound.

So I think these cores are probably still very much ‘in development.’

But if you want to build them anyway, here you go.

1 Like

Damn! After reinstalling my System with GM Catalina, I am not able to build anything:

andi@Andis-iMac libretro-super % ./libretro-build-tvos-arm64.sh 2048

uname: illegal option – o

usage: uname [-amnprsv]

CC = cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk

CXX = c++ -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk

CXX11 = clang++ -std=c++11 -stdlib=libc++ -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk

CXX17 = clang++ -std=c++17 -stdlib=libc++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk

STRIP =

Compiler: CC=“cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk” CXX=“c++ -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk”

=== iOS ==

tvos-arm64

tvos-arm64

=== 2048

Building 2048…

cd “/Volumes/osX_DaTa/-=Benutzer=-/andi/Retroarch-Stuff/libretro-super/libretro-2048”

make -f Makefile.libretro platform=“tvos-arm64” -j7 clean

rm -f ./libretro.o ./game_noncairo.o ./game_shared.o 2048_libretro_tvos.dylib

make -f Makefile.libretro platform=“tvos-arm64” -j7 CC=“cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk” CXX=“c++ -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk”

cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk -isysroot -DGIT_VERSION="" b2b08a8"" -O2 -DNDEBUG -fPIC -c -olibretro.o libretro.c

cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk -isysroot -DGIT_VERSION="" b2b08a8"" -O2 -DNDEBUG -fPIC -c -ogame_noncairo.o game_noncairo.c

cc -arch arm64 -marm -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.0.sdk -isysroot -DGIT_VERSION="" b2b08a8"" -O2 -DNDEBUG -fPIC -c -ogame_shared.o game_shared.c

clang: warningclang: warning: : no such sysroot directory: ‘-DGIT_VERSION=" b2b08a8"’ [-Wmissing-sysroot]clangno such sysroot directory: ‘-DGIT_VERSION=" b2b08a8"’ [-Wmissing-sysroot]: warning: no such sysroot directory: ‘-DGIT_VERSION=" b2b08a8"’ [-Wmissing-sysroot]

clang: clangwarning: warningclang: warning: : argument unused during compilation: ‘-mno-thumb’ [-Wunused-command-line-argument]

argument unused during compilation: ‘-mno-thumb’ [-Wunused-command-line-argument]

: argument unused during compilation: ‘-mno-thumb’ [-Wunused-command-line-argument]

game_shared.c:2:10: fatal error: ‘stdlib.h’ file not found

#include <stdlib.h>

^~~~~~~~~~

libretro.c:4:10: fatal error: ‘string.h’ file not found

#include <string.h>

^~~~~~~~~~

game_noncairo.c:5:10: fatal error: ‘string.h’ file not found

#include <string.h>

^~~~~~~~~~

1 error generated.

11 error generated.

error generated.

make: *** [game_shared.o] Error 1

make: *** Waiting for unfinished jobs…

make: *** [libretro.o] Error 1

make: *** [game_noncairo.o] Error 1

cp “2048_libretro_tvos.dylib” “/Volumes/osX_DaTa/-=Benutzer=-/andi/Retroarch-Stuff/libretro-super/dist/tvos-arm64/2048_libretro_tvos.dylib”

cp: 2048_libretro_tvos.dylib: No such file or directory

1 core(s) failed:

2048

andi@Andis-iMac libretro-super %

xcode-select -p
/Applications/Xcode.app/Contents/Developer

Installed Xcode from the App store

Thanks!!!

BTW. is the N64 core working now??

N64 code compiles, but does not run yet. I actually have some thoughts on how to get it to run, but I haven’t had time to experiment with it yet. Perhaps later this week.

As for your problem - Try running this command:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

The file /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg does not exist.

What says your xcode-select -p?

Thanks

Are Flycast and OpenLara cores working now? Compiled only(

Flycast crashes at the memory card reading stage. A DC directory is created in the System directory with the files: dc_nvmem.bin, vmu_save_A1.bin, vmu_save_B1.bin, vmu_save_C1.bin, vmu_save_D1.bin and empty data directory.

Some interesting results:

Wait were you actually able to get it to work? What did you do exactly? Did you compile the version I posted in my GitHub? Or did you use something else?

I posted some fixes yesterday, but I hadn’t gotten a chance to test them. It’s possible I fixed the emulator though. Please tell me what you did!

I was compile your version. But only GDI rom (RE-CV) managed to run. And only to main screen (see picture). Save-load state, widescreen and other RetroArch options are working, but starting new game or choosing game options leading to crash. A similar situation occurs with the reicast core in the Provenance emulator for ios-arm64, but it works great for tvos, though with poor sound.

Another moment: I put in the RetroArch/system/dc own memory card file from Reicast with saved game, but loading it made crash too.

It is working. Tested on MK Gold gdi. Slow motion with dsp, and very fast - with dsp turned off. Need thinking how to improve compatibility. jet082, can you make flycast compiled for tvOS? I think compatibility will be more better.

That is very strange. Does RE still crash? I was able to get the Dreamcast splash screen to load briefly, but then it crashes on my unjailbroken iPad Pro.

When I hooked it up to a debugger, it seems to have something to do with memory management - which makes sense, since I had to comment out a few strange memory management lines to get it to compile.

I’ve been working to try and get a version with these lines uncommented, but it’s been very slow going.

RE still crash. But if on DC splash screen switch to options and make some actions: in result it loading to main menu. In MK Gold mentioned operation lead to fast gameplay without sound. And another thing: switching to real bios from hle bios lead to crash.