fgsfdsfgs / perfect_dark

work in progress port of n64decomp/perfect_dark to modern platforms
MIT License
1.13k stars 70 forks source link

Apple Silicon support #225

Open erikmartinessanches opened 8 months ago

erikmartinessanches commented 8 months ago

Would be fun if this supported Apple Silicon. Alternatively DirectX (11 or 12?) support since OpenGL 2.1 is not supported in Windows 11 ARM in a VM.

fgsfdsfgs commented 8 months ago

What GL version is supported there? You can run this with pretty much any GL version higher than 2.1. On older Macs this would usually be 3.2 Core. Other than that, I don't know if Silicon can run 32-bit ARM code. I also don't have any Apple devices to test it on.

throwaway29292 commented 8 months ago

No modern macs (no matter if they are Apple SIlicon or Intel) can compile or run 32-bit applications so the 64-bit support will first need to be added.

I tried to compile it on my Ventura hackintosh. I got so far as ld saying it cannot find any symbols for i386 (almost definitely because the support was removed.)

If the 64-bit support ever gets added, i'll certainly test it on Intel macOS.

erikmartinessanches commented 8 months ago

What GL version is supported there? You can run this with pretty much any GL version higher than 2.1. On older Macs this would usually be 3.2 Core. Other than that, I don't know if Silicon can run 32-bit ARM code. I also don't have any Apple devices to test it on.

If you mean which OpenGL is supported on Apple Silicon (M1), then it appears to be 4.1.

Interestingly, Windows 11 or Arm that runs on Apple M1 Mac is capable of running thousands of 32-bit Windows applications that were initially developed for Intel-based systems. I'm running Windows 11 arm inside UTM which doesn't support graphics acceleration, although the OpenGL Extensions Viewer does say OpenGL 1.1 and Direct X 11.4, 12.1, but probably not for real. I was unable to start Perfect Dark due to insufficient openGL version. Parallels is another virtualisation software that does support OpenGL 4.1, but I don't use that.

No modern macs (no matter if they are Apple SIlicon or Intel) can compile or run 32-bit applications so the 64-bit support will first need to be added.

I think these guys somehow managed.

throwaway29292 commented 8 months ago

Yeah that's x86 emulation that doesn't make sense on my Hackintosh where i can just reboot into windows and use that

Dne po 6. 11. 2023 21:56 uživatel Erik Martines Sanches < @.***> napsal:

No modern macs (no matter if they are Apple SIlicon or Intel) can compile or run 32-bit applications so the 64-bit support will first need to be added.

I think these guys https://www.codeweavers.com/blog/jwhite/2020/11/18/okay-im-on-the-bandwagon-apple-silicon-is-officially-cool somehow managed.

— Reply to this email directly, view it on GitHub https://github.com/fgsfdsfgs/perfect_dark/issues/225#issuecomment-1796420847, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSGKOLD7F7H3YSVSYZKLY3YDFFIZAVCNFSM6AAAAAA653GYD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJWGQZDAOBUG4 . You are receiving this because you commented.Message ID: @.***>

fgsfdsfgs commented 8 months ago

OpenGL Extensions Viewer does say OpenGL 1.1

That's almost certainly the Microsoft software fallback GL driver. For that matter, the DX11 implementation might also be software, though I doubt it since you also have DX12 in there. GL4.1 (core or compat profile) is fine, but you might have to specify it by hand using --gl-version 4.1 or --gl-version 4.1core. You'll likely need to figure out some Wine fuckery to run the game until 64-bit compatibility is in.

palmerj commented 8 months ago

Note for the moment you can get it working under parallels using Windows 11 ARM.

pd_parallels
Thomasluigi07 commented 8 months ago

Also to add on to palmerj's note, it doesn't work in UTM using Windows 11 ARM.

Screenshot 2023-11-08 at 17 26 19

However, you can use Mesa3D to run the game, but at a unplayable framerate.

Screenshot 2023-11-08 at 17 27 00