What I wrote with Claude is basically everything else: custom LLVM passes, a hand-written runtime that replaces the Windows calls, a Direct3D 11 to Metal layer and the shader translation! Plus fixing the crashes one by one by iterating and playing. All details are in the Pipeline section of the README if you're interested: https://github.com/adrbn/bo2-mac#pipeline
This is very confusing to read, though:
What I wrote with Claude: [...] a hand-written runtime
To me you have to pick one or the other. Claude has no hands.
If you want something simpler to begin with, look at N64Recomp (that's what gave us the PC ports of Zelda Majora's Mask) or XenonRecomp (Xbox 360, used for Sonic Unleashed), they're static recompilations too and way better documented than mine as of now haha. And to look inside an executable, Ghidra is free (made by the NSA, fun fact). A proper write-up might come at some point, but no promises on a date :)
Also, I had never done anything like this before either!
Almost every paragraph makes me want to ask: "so what?"
> There is no Wine and no JIT: the game runs as native code, in one process > the campaign runs at 51–60 frames per second
So what?
Is it a matter of running the game in itself? Was the game not running on Apple M-series in any way, so you're unlocking something that was impossible before?
Or does the game just ran faster (more FPS), load quicker, render better, what?
There's no comparison to how the game runs on x86, or how it runs on M-series with translation layers (IF it runs).
This is an exact manifestation of the AI slop problem. A lot of details. A lot of "how". A lot of "what". So little "why" - you need to read a lot and in the end your questions are never answered, and you don't understand if the project makes sense at all or is just something "we did it because we could". I'm perfectly happy to read AI generated text if it's properly and clearly written and answers the right questions.
Thanks for adding the Why in your readme, btw :-)
By the way, the why in the README is still unclear:
Your post says:
> see if I could make it work on my 2020 MacBook Pro
This seems to imply that it didn't work on the 2020 MacBook Pro (which I suppose is the M1)
> On Apple Silicon the usual way to play it is Wine or CrossOver on top of Rosetta 2, which translate the game while it runs
This is from the README. So, it was playable on M-series already? Just not natively? Then, what kind of benefits does your translator offer?
> so I can fix things and add stuff like split-screen, which the PC version never had
So THIS is the advantage? I'm not sure why this advantage would be limited to the ARM64 version BTW; cannot you patch the original?
That's the why I'm asking for, and that's where LLMs suck, and where you need to have your human brain & skills actually work.
The AI will still recreate a game that it can view and interact with.
Massive chance these recompilations just ruined gaming for everyone.
Like on your own- do whatever.
As soon as you share it - you actually harm players, not help them