Skip to content

MacRunner 1.0.9 — development preview

Pre-release
Pre-release

Choose a tag to compare

@t0b1kent t0b1kent released this 07 Oct 02:27
· 30 commits to main since this release

MacRunner 1.0.9 — development preview (speed release). A native Mac app for running Windows games and apps on Apple Silicon: Wine for Windows APIs, HyperBridge for x86 → ARM64 CPU translation, DXMT and Metal for Direct3D 10/11 graphics.

This release changes only the 64-bit CPU translator. Wine, graphics, the 32-bit translator and the signed 32-bit loader are the same as in 1.0.8.

What changed since 1.0.8

  • Integer division takes a shorter path. The common cases of div and idiv now use the processor's own division directly; the rare cases that must raise a divide error (division by zero, quotient overflow) are handled on a separate cold path and still raise the same Windows exception as on a real processor.
  • Unaligned lock operations are exact. In 1.0.8 two threads updating the same unaligned memory cell with lock-prefixed instructions could lose updates: our stress test failed in 5–8 runs out of 10. It now passes 10 out of 10.
  • Shorter code for read-modify-write instructions. For instructions like add [mem], reg the flags are now computed after the store, which removes host instructions from one of the most frequent x86 forms.
  • Scalar SSE arithmetic in one host instruction. In the processor's x86-compatible mode addss/subss/mulss/divss (and the sd forms) keep the upper part of the register the way x86 does, so the translator no longer adds a separate merge step.
  • Cheaper calls from translated code into the system. The floating-point control register is no longer rewritten on every transition when it already holds the right value.
  • A faster x87 path is included but still off. It is disabled by default until its results agree with real hardware in every tested case.

Thirty-two translator changes went into this build. They are published as source in the HyperBridge repository together with the engine files of this release (engine-0227).

How it was checked

This build was accepted on test stands rather than by replaying games by hand:

  • CPU stand: 500,595 recorded processor states, no new differences against 1.0.8.
  • Hardware-mode stands on the signed build: 812,402 flag states with no new differences; 919,405 SIMD states pass, with 18,968 already-known differences from the hardware reference still listed.
  • Games stand: the recorded translations of eight games compile without errors — 278,047 records with the new defaults off and the same number with them on.
  • 32-bit application stand: 21 of 21 cells through the app itself (message boxes, DirectDraw, Direct3D 7, full-screen window geometry, and audio decoding whose output is byte-identical to Windows). No games are involved.
  • Package: signed with Developer ID, notarized by Apple, no personal paths inside.

Measured on this package (October 7; 21 micro-loops, five alternating runs of the 1.0.8 and 1.0.9 packages on an M1 Pro, fastest run of each): xor edx,edx; div ecx takes 0.92 ns per iteration instead of 2.09 ns, cqo; idiv rcx 0.81 ns instead of 1.96 ns, and a chain of addss 0.94 ns instead of 1.57 ns. The other 18 loops are unchanged within 1 %; rep movsb came out 3 % faster, which is inside the run-to-run spread. These are micro-loops, not game frame rates, and the Mac was in use during the session. The full table is on the HyperBridge page: https://github.com/t0b1kent/hyperbridge

This build was compiled on our own Mac. Rebuilding it from the public repositories on a clean cloud machine is in progress and is not finished: the 32-bit translator already builds there, the 64-bit translator, Wine and the helper tools do not yet.

Known limits

  • No Direct3D 12 in this build, so games that need it (for example Elden Ring) cannot be started from it. Elden Ring is the target of the next version.
  • 32-bit support is experimental, and x87 floating-point code, common in 32-bit games, is still slow.
  • The first launch after updating takes about a minute: the app updates each bottle for the new engine before starting the game (55–57 s in our measurement on a busy Mac). Removing this wait is planned for the next version.
  • Still failing in our regression suite: running code through a second mapping of the same memory without a cache flush, in programs other than .NET; floating-point exception flags and NaN sign in some SSE operations; shared PE sections across processes.
  • Rebuilding Wine from the published sources still differs from the shipped binary in 37 functions; this is inherited from 1.0.8 and remains open.
  • Indiana Jones and the Great Circle is not part of this build — it has a separate experimental preview: v1.0.6-indiana.

Files

  • MacRunner-1.0.9-arm64.zip — the app (Apple Silicon), notarized
  • MacRunner-1.0.9-sources.tar.gz — corresponding sources, licenses and rebuild instructions
  • SHA256SUMS

Support the project: https://macrunner.app/support/