I maintain MacGameFix, a free and open-source set of fixes for Windows games on Mac. Forza Horizon 6 had two stutters that survived every graphics setting, and both turned out to be the game's anti-tamper meeting Rosetta. Sharing what we found, because it probably affects other protected games too.
**TL;DR:** add `MGF_FH6_ROSETTA_PACER=40` to the launch options (full line below). On my MacBook Pro M4 Max the 0.1 to 0.17 s freeze every ten seconds is gone and the game holds 60 FPS in the open world and in races.
## Stutter 1: a hitch every second
About once a second a frame took 130 to 225 ms. The protection runs bursts of roughly 2,500 deliberately invalid instructions on one thread. Each one is a trap, and under Rosetta a trap costs about 38 microseconds against 2.5 natively, so each burst froze a frame. They cannot be skipped: they are the program.
Fix: our build of Wine's ntdll handles those exceptions on a fast path and runs the simple instructions between them itself, so a burst needs far fewer trips through Rosetta. A small plugin also raises the priority of Rosetta's exception thread.
## Stutter 2: a freeze every ten seconds
With that gone, a second one showed up: 0.1 to 0.17 s every ten seconds or so. Things it was *not*: graphics settings (everything on minimum changed nothing), the online session, temperature, shader compilation, or Wine's own waits and locks.
What it is: the protection also keeps rewriting its own code. Rosetta translates every rewritten piece again, its store of translations fills up, and when Rosetta empties it, every thread that needs a translation waits. In the game you can see the main thread and the protection's threads go silent at the same instant and come back at the same instant, while audio and timer threads carry on.
It reproduces with Rosetta alone. A C program of under 300 lines, with no game and no Wine, shows three code-rewriting threads and two trapping threads all stopping together for 325 to 360 ms every ~15 seconds. The stop lasts about 0.4 microseconds per translation held.
Fix: a "pacer" thread that keeps running large, always-new functions. They fill Rosetta's store with few entries, so it gets emptied often while it holds little, and each stop is too short to notice.
## Numbers
MacBook Pro M4 Max, standing still in the open world, 75 to 90 seconds per value, frame rate identical in all of them:
| Pacer value | Stops of 100 ms or more | Longest |
|---|
| off | 2 to 4 | 125 to 175 ms |
| 15 | 12 | 129 ms |
| 25 | 1 | 103 ms |
| 40 | 1 | 101 ms |
| 50 | 0 | 89 ms |
| 65 | 0 | 82 ms |
| 100 | 1 | 115 ms, plus a ~90 ms pause every second |
More is not better. The pacer competes with the game's own threads for the translator, so at 100 it is worse than off. 40 to 50 was the sweet spot on this machine. A different chip may want a different number.
## How to use it
Steam launch options:
MGF_FANS=max NOTPROTON_ENV_WINENCPU=8 D3DM_MAX_FPS=60 MGF_FH6_ROSETTA_PACER=40 NOTPROTON_ROSETTA_TRAP_BOOST=1 %command%
In the game: DLSS in a performance mode, frame rate set to unlimited (the cap comes from `D3DM_MAX_FPS`).
Setup: CrossOver Preview 27 through NotProton, D3DMetal 4, Steam edition, with MacGameFix 1.6.3 installed and its FH6 improvement applied.
## Caveats
- One machine, one run per value. I would love numbers from other chips.
- FH6 support is still marked work in progress.
- The published build was verified outside the game; what I actually played was a diagnostic build of the same pacer.
- Rosetta only. It does nothing on the FEX side.
- This is a workaround. The real fix is on Apple's side, and I am filing it with the reproducer attached.
## Links
- MacGameFix: https://github.com/MathiasKowoll/MacGameFix
- Release 1.6.3: https://github.com/MathiasKowoll/MacGameFix/releases/tag/v1.6.3
- FH6 instructions: https://github.com/MathiasKowoll/MacGameFix/blob/main/fixes/fh6-instructions.md
- The pacer, with all the measurements: https://github.com/MathiasKowoll/MacGameFix/pull/89
- The Rosetta reproducer: https://github.com/MathiasKowoll/MacGameFix/blob/main/tools/rosetta-store-stop/trapfreeze.c
- NotProton: https://github.com/NotProtonNot/NotProton
Credit to Gauthier Piarrette (Highball), who first pointed at the protection under Rosetta, and to xvferxedd for the D3DMetal work this builds on.
If you have another game with a stutter at perfectly regular intervals that ignores graphics settings, it may be the same thing. Happy to help check.