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

I test it on iPad Pro iOS 12.4.1 - it is working. In Xcode debug run after compiling retroarch it freezings. But after stop running Xcode and pure start on iPad - it is working with default settings.

@jet082 Should we use this flycast version for now or the other one ? Is the other one more broken ?

We talking about this version (more broken but little better) that give possible load MK Gold with textures and video.

@xdccrlz yeah, this oneā€¦ I think itā€™s an older version but if a recent change broke something, maybe itā€™s better to use it until the bug is fixed or a commit or two are revertedā€¦

Any insight on this would be appreciatedā€¦ @jet082 ? :wink:

I would use the one linked in the op until I can figure out this texture problem. Put many hours into it already.

Make sure you are compiling the right branch for mupen64

1 Like

It only crashes on xcode debug? Fascinatingā€¦ Let me experiment more then. Thatā€™s extremely useful information, I think.

Okay, I believe the current version on my github (as of this post) fixes the texture problem for the most part. Please test it to see.

1 Like

@jet082 This version breaks Soul Calibur on my iPad Pro 2 jailbroken iOS 12.4ā€¦

Doesnā€™t go past the BIOS when the HLE one is not used, and doesnā€™t go after character selection if HLE BIOS is usedā€¦

It is very possible some games wonā€™t work or will crash. Does the other version work?

@jet082 Yes, the one still on my buildbot works in both cases with Soul Calibur, and is compiled from https://github.com/jet082/flycast/tree/7c707c270c81d302d45774a16ad92fe84d1648ec

Current version 0.1 b056613e (through git pull) freezings RECV, Soul Calibur, Sonic Adventure 2 and Retroarch. MK Gold and Virtua Fighter working good.

I canā€™t work on this right now, but Iā€™ll give it a closer look later.

Ok. Always ready to help.

If you want to play with this yourself - look at the ios-arm64 section of the Makefile and add/remove/change flags. NO_EXCEPTIONS, NO_REC, WITH_DYNAREC, and HOST_CPU_FLAGS are the most relevant. With NO_EXCEPTIONS being the most relevant, I think (set it to 1 and you basically get the difference between the two versions).

You may also experiment removing || defined(IOS) from #elif HOST_CPU == CPU_ARM64 || defined(IOS) in core/hw/sh4/sh4_core_regs.cpp.

I wonā€™t be able to toy with this until much later today. So the more experimentation you get, the more data I have. And I really do appreciate this data.

1 Like

@jet082 NO_EXCEPTIONS = 1 fixes Soul Calibur, but removing it seems to fix other stuffā€¦

Should I keep both versions on the buildbot ? (and create an appropriate .info file like ā€œflycast_no_exceptionsā€)ā€¦

Iā€™ve recently gotten some useful feedback on my PR. So, Iā€™m going to hopefully get one working that does all the things it needs to do. Some of the PR feedback has been somewhat sylistic, butā€¦ Because I did things in an odd way, it is possible it had a cascading effect elsewhere. Iā€™d like to poke around and see if I canā€™t get a better working version. For now, just keep the current github one. It doesnā€™t work with Soul Calibur, but it works for most other games Iā€™ve tested.

1 Like

After a long exercise with the proposed parameters, the results are as follows: no_exceptions is the determinant; changing the other parameters affects slightly or gives a compilation error. Further, NO_EXCEPTIONS = 0 allows you to display content as correctly as possible: logos, backgrounds, videos, textures, but leads to a hang in many games when changing the game screen or location (in my tests in all games except MK gold and Virtua Fighter) and does not work with real bios. NO_EXCEPTIONS = 1 allows to work without freezes everywhere, support real bios, but incorrectly displays content in all games in different severity. Tests were performed based on the current version of flycast, the directory was re-created each time, all parameters were changed one by one for different values of no_exceptions. The tests involved US GDI roms: Resident Evil: Code Veronica, Mortal Kombat Gold, Soul Calibur, Sonic Adventure 2, Virtua Fighter 3, Shenmue. Many thanks to jet082 for his work!

Hey @harakari2, how are you getting bsnes_hd to compile? When I run a ./libretro-build-ios-arm64.sh bsnes_hd with the current libretro_super, I get a failure like the following:

Compiling sfc/controller/controller.cpp ...
clangclang: clangerror: : : errorthe clang compiler does not support '-march=native': clangthe clang compiler does not support '-march=native': error: the clang compiler does not support '-march=native'


error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-march=native'
clangclangclang: clangerror: : errorunsupported option '-fopenmp': 
unsupported option '-fopenmp'
: error: unsupported option '-fopenmp'
: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
make: *** [obj/sfc-system.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [obj/sfc-interface.o] Error 1
make: *** [obj/lzma.o] Error 1
make: *** [obj/emulator.o] Error 1
make: *** [obj/filter.o] Error 1
make: *** [obj/libco.o] Error 1
make: *** [obj/libretro.o] Error 1
cp "out/bsnes_hd_libretro_ios.dylib" "/Volumes/Storage/RetroArch/libretro-super/dist/ios-arm64/bsnes_hd_libretro_ios.dylib"
cp: out/bsnes_hd_libretro_ios.dylib: No such file or directory
1 core(s) failed:
bsnes_hd

OSX 10.15, Xcode 11.2 Beta 2 (also tried 11.1). And to be clear, I know I can pull the fopenmp and march=native stuff out manually to get it to go. Iā€™m more confused as to how @jet082 and @harakari2 have both mentioned that bsnes_hd has been removed from the do not compile list because they just work by default now, when that is most definitely not my experience.

Itā€™s possible a recent push broke things. I will be able to check in a few days, until the end of the week I am dealing with exams. However, if someone else is able to check (@Weedy_Weed_Smoker? @xdccrlz?) you might get some help before then.

@jet082 For bsnes_hd, I think I tried to compile it from cmake and didnā€™t succeed at first, but it eventually compiled after trying the ./libretro-build-ios-arm64.sh script or something without cleaning firstā€¦

It may have been the other way around, and I may have modified some files too which I donā€™t remember if that changed anything for the end resultā€¦


I think I will try to compile it again and list the exact instructions to get it to compileā€¦ bsnes on the other hand (the master branch on the bsnes_hdā€™s repoā€¦) I didnā€™t get to compile, and itā€™s kind of important as itā€™s the new replacement for the obsolete and now removed bsnes_accuracy, bsnes_balanced and bsnes_performanceā€¦

@harakari2 didnā€™t compile it correctly for the official repo neitherā€¦