ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.9k stars 287 forks source link

Unity games not loading on M1 #1413

Closed KnedlikMCPE closed 7 months ago

KnedlikMCPE commented 7 months ago

Seems that for some reason, no Unity games get past splash screen on my M1 machine. Something I noticed they have in common is a framebuffer request with 0hz, and the following error: Error: Global Symbol _ULx86_64_local_addr_space not found, cannot apply R_X86_64_GLOB_DAT @0x7fff02036410 ((nil)) in UnityPlayer.so

Some games get stuck at the splash screen, some don't have a splash screen and get stuck with a one-color framebuffer. Some throw a not-responding dialogue.

ptitSeb commented 7 months ago

The missing symbol might be related to a missing libunwind.so? For unity game, I'll test later on my machine, but that might be a side effect of the 16K-pagesize, that can break the C# JIT of Unity engine.

KnedlikMCPE commented 7 months ago

Just tested again on the latest master - While True: Learn work fine, EarthX gets past splash screen and hangs with a CTD shortly after

ptitSeb commented 7 months ago

Note that some Unity3D games might needs some BOX64_DYNAREC_STRONGMEM=1 or more to work (and box64 doesn't handle yet M1 special TSO mode yet).

KnedlikMCPE commented 7 months ago

BOX64_DYNAREC_STRONGMEM=1 Doesn't work, at least not as an environment variable set as BOX64_DYNAREC_STRONGMEM=1 ./earthx.x86_64 (box64 is configured for binfmt_misc)

ptitSeb commented 7 months ago

BOX64_DYNAREC_STRONGMEM=1 Doesn't work, at least not as an environment variable set as BOX64_DYNAREC_STRONGMEM=1 ./earthx.x86_64 (box64 is configured for binfmt_misc)

You mean, it doesn't fix the hanging of the game?

KnedlikMCPE commented 7 months ago

Indeed, the behavior is exactly the same as before

KnedlikMCPE commented 7 months ago

Any news on this?

ptitSeb commented 7 months ago

Well, yesterday, I tried some Unity3D Games on my M1 with Fedora remix on it. I could play A Short Hike without issue (played for like 30min on it). It runs at 60fps, fullscreen, all settings max out, on my MBP 13". So, no issue on my side (and yes, I also have that global symbol error, but that doesn't prevent the game from running).

Now, I think this ticket (Unity3D game nor starting on M1) should be closed. You might want to open another ticket, more precise with your issue.

KnedlikMCPE commented 7 months ago

Alright, before I close it and open another one, where can I get some logs?

ptitSeb commented 7 months ago

you can use BOX64_LOG=1 BOX64_SHOWSEGV=1 BOX64_TRACE_FILE=log.txt to have logs in "log.txt"

KnedlikMCPE commented 7 months ago

I have created #1456 and will now close this issue,