Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

Engine r7: a 32-bit NVAPI stub, and legacy CS:GO plays on macOS 26

Gauthier Piarrette0746cd048932
diff --git a/spike/engines/x64-crossover26.3-r7.json b/spike/engines/x64-crossover26.3-r7.json
new file mode 100644
index 0000000..5a9238e
--- /dev/null
+++ b/spike/engines/x64-crossover26.3-r7.json
@@ -0,0 +1,126 @@
+{
+ "$schema": "https://highball.app/schemas/engine-manifest/v0",
+ "arch": "x86_64",
+ "baseEnv": {
+ "DYLD_FALLBACK_FRAMEWORK_PATH": "${frameworks}",
+ "DYLD_FALLBACK_LIBRARY_PATH": "${frameworks}:${frameworks}/GStreamer.framework/Versions/1.0/lib",
+ "GST_PLUGIN_PATH": "${frameworks}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0",
+ "WINEDEBUG": "fixme-all"
+ },
+ "components": {
+ "d3dmetal-tsshim": {
+ "extract": {
+ "into": "renderers/d3dmetal-tsshim/wine",
+ "subpath": "renderers/d3dmetal-tsshim/wine"
+ },
+ "kind": "renderer",
+ "layout": [
+ "x86_64-windows/d3d12.dll"
+ ],
+ "license": "MIT",
+ "note": "D3DMetal timestamp shim, same component as the default engine's r2.",
+ "order": 1,
+ "sha256": "1ac868e6a4a9f713cd4ed22b8b53b2b7dde2e702a39aa23aa19a58448dd4e731",
+ "size": 46096,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d3dmetal-tsshim-20260907/d3dmetal-tsshim-20260907.tar.xz",
+ "version": "20260907"
+ },
+ "dxmt": {
+ "extract": {
+ "into": "renderers/dxmt/wine",
+ "subpath": "highball"
+ },
+ "kind": "renderer",
+ "license": "MIT (Highball branch of DXMT: SwapDeviceContextState, cross-process opt-in)",
+ "sha256": "0b86f0c793e99ae88bb4ff5f8575403ad138598a44a90248c71d6bc3ec18923b",
+ "size": 18922634,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-20260904T194518Z-7421db2/dxmt-highball-20260904T194518Z-7421db2.tar.gz"
+ },
+ "moltenvk": {
+ "extract": {
+ "into": "frameworks/libMoltenVK.dylib",
+ "subpath": "libMoltenVK.dylib"
+ },
+ "kind": "runtime",
+ "license": "Apache-2.0",
+ "note": "MoltenVK 1.4.1 rebuilt with two Highball patches (spike/patches/moltenvk-shadow-import.patch and moltenvk-linear-fallback.patch, Scripts/build-moltenvk.sh). Shadow import is off unless a launch sets MVK_SHADOW_IMPORT=1 (32-bit native-Vulkan games such as The Sims Legacy Collection). Linear fallback is always on: a linear-tiled image that Metal cannot back with linear memory (3D, mipmapped or array images) is created with optimal tiling instead of failing vkCreateImage, which is what takes Red Dead Redemption 2 from an exit at 98 per cent to the main menu and the story.",
+ "order": 1,
+ "sha256": "858c9a6229662cbff8afda795424317086e377e06765c24f83732385d3047dfd",
+ "size": 1675221,
+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/moltenvk-1.4.1-shadow-import-1-linear-fallback-1-x86_64.tar.gz",
+ "version": "1.4.1+shadow-import-1+linear-fallback-1"
+ },
+ "runtime": {
+ "extract": {
+ "into": "frameworks",
+ "subpath": "Template-1.0.11.app/Contents/Frameworks"
+ },
+ "kind": "frameworks",
+ "license": "mixed (LGPL-2.1 GStreamer, Apache-2.0 MoltenVK, LGPL gnutls, ...)",
+ "sha256": "9fa15479e7ff6abd99c1d07be285fb95f41fc6991586502427152b1f7d6ccb8a",
+ "size": 84533420,
+ "url": "https://github.com/Sikarugir-App/Wrapper/releases/download/v1.0/Template-1.0.11.tar.xz"
+ },
+ "wine": {
+ "extract": {
+ "into": "engine",
+ "subpath": "engine"
+ },
+ "kind": "engine",
+ "license": "LGPL-2.1+",
+ "note": "Built from CodeWeavers' crossover-sources-26.3.0.tar.gz (sha pinned in highball-engine/inputs.json) by highball-engine's build workflow, run 34352802492, with patches 0001, 0002, 0003, 0005, 0006, 0007 and 0008. 0008 mirrors TEB->Tib.FiberData into the macOS %gs block: on macOS that block is the host thread block rather than the TEB, and the field was never mirrored, so GetCurrentFiber(), an intrinsic that reads the slot directly and cannot be intercepted, returned a host value that games with a fiber job system passed back to SwitchToFiber. Stripped; Wine Mono 10.4.1 and Gecko 2.47.4 included.",
+ "sha256": "ed8a426452f8f4caa0c84fd88c35fbf9b53ea203ac7f3d11007cb05100d01a4e",
+ "size": 334866734,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/engine-wine-11.0-20260909T125736Z-fiberdata-mirror-0008b/engine-wine-11.0-20260909T125736Z-fiberdata-mirror-0008b.tar.gz",
+ "version": "wine-11.0 (CrossOver 26.3 tree) Highball build 2026-09-09, fiber mirror"
+ },
+ "winetricks": {
+ "kind": "tool",
+ "license": "LGPL-2.1",
+ "note": "Pinned to upstream commit 5a59ea07 (20260125+dev, 2026-08-07) — the exact bytes 0.7.x verified with dotnet48. The old branch URL drifted and broke every fresh engine install (issues #27/#28); URLs here must be immutable.",
+ "sha256": "f35c29737ca08a583569e6a3752d52fbe23333c5acfad5f16c4177d25eaf3f4b",
+ "url": "https://raw.githubusercontent.com/Winetricks/winetricks/5a59ea07513b24093bd90fad943ecf9543cf05bc/src/winetricks"
+ },
+ "nvapi-stub": {
+ "extract": {
+ "into": "engine/lib/wine/i386-windows/nvapi.dll",
+ "subpath": "nvapi.dll"
+ },
+ "kind": "runtime",
+ "license": "MIT (Highball)",
+ "order": 1,
+ "note": "A 32-bit nvapi.dll stub (spike/nvapi-stub, 40 lines of C) placed in the engine's i386 DLL directory with Wine's builtin marker. Games that see an NVIDIA adapter insist on NVIDIA's driver library and load it from the system directory only, so a stub beside the game does nothing; this one answers NvAPI_Initialize with OK and everything else with 'not implemented'. It only matters for a bottle or application given an NVIDIA identity (Highball's default is AMD), which is what lets legacy CS:GO pass its shadow-map check on wined3d.",
+ "sha256": "cbda8aeee87e84ecf98c06759d2123b073dc99a7aa1c639480fade33383d18a2",
+ "size": 1759,
+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/nvapi-stub-2-i386.tar.gz",
+ "version": "2"
+ }
+ },
+ "displayName": "Wine 11.0 (CrossOver 26.3 tree, Highball build) + DXMT (Highball branch) + D3DMetal 3.0 + MoltenVK 1.4.1",
+ "id": "x64-crossover26.3-r7",
+ "licenses": {
+ "apple-gptk-license-2023-08-17": {
+ "applies": [
+ "renderers/d3dmetal (bundled in the Sikarugir Template: D3DMetal.framework sha1 1405e5c6… identical to GPTK 3.0-3)"
+ ],
+ "summary": "Apple Game Porting Toolkit license: non-commercial use/distribution only; no modification; use scoped to developing, testing or evaluating games on Apple hardware.",
+ "text": "spike/d3dmetal-license.txt"
+ }
+ },
+ "minMacOS": "14.0",
+ "notes": [
+ "r7 (2026-09-11): r6 plus a 32-bit NVAPI stub in the engine. With it, legacy CS:GO plays on macOS 26 through wined3d with an NVIDIA identity scoped to csgo.exe (the csgo-legacy recipe), the route CrossOver users take: DXVK's D3D9 on this Mac either loses the device on Source's HDR pass or stalls after the map load, and wined3d needs the NVIDIA shadow-map path, which needs NVAPI to answer. Nothing else changed from r6.",
+ "r6 (2026-09-11): r5 plus the MoltenVK linear-fallback patch. Red Dead Redemption 2 loads, reaches its main menu and starts the story on this engine (M1 Pro, macOS 26.6.2, 1280x720 windowed, about 60 fps in menus); every earlier engine exits at 98 per cent of the first load because MoltenVK refuses the game's linear 3D, mipmapped and array images. Nothing else changed from r5.",
+ "r5 (2026-09-09): r4 plus patch 0008, the fiber mirror. Marvel's Guardians of the Galaxy reaches gameplay on this engine and crashes on Play Game on every earlier one, verified twice from a clean start on an M1 Pro, macOS 26.6.2, at 27.5 fps in the opening scene. A reproducer that needs no game (private/notes/fibertest4.c) faults identically to the game on r4 and runs clean here.",
+ "Cost of 0008, measured: offset 0x20 holds the thread's pthread QoS class on macOS, so a thread that uses fibers loses that scheduling hint. Windows and macOS both fix that offset, so a correct GetCurrentFiber() and an intact QoS cache cannot coexist. Confined to threads that call the fiber APIs, and a stress run of 8 threads and 6.4M switches showed TLS and thread creation unaffected (320000 wrong fiber values on r4, 0 here).",
+ "Optional engine (2026-09-07): Highball's own build of the CrossOver 26.3 Wine tree (Wine 11.0) with the same DXMT, D3DMetal, MoltenVK and Template runtime as the default engine. Not the default: a bottle moves to it from its Advanced settings, or Highball offers it when a launcher's recipe names it (the EA app). Verified here: EA app install and sign-in, The Sims 4 through it (DXMT, 128 fps on an M1 Pro), Steam with GTA V install, Rockstar launcher sign-in window, Ubisoft Connect window.",
+ "Games were not re-verified on this engine (CS:GO's cascaded shadow maps are known to differ), which is why it is offered for the launchers that need it, one environment at a time, and never becomes the default on its own. Steam's own client renders here (CEF), as do the Rockstar and Ubisoft sign-in windows; their account services were the wall in testing, not the engine.",
+ "Why it exists: Wine 10 (the default engine) cannot start the EA app's vital background service or run its .NET setup steps, and its winemac lacks the cross-process remote-layer route that the Rockstar and Ubisoft launchers' browsers need (highball#15, #56, #60). This tree carries Highball's patches for both.",
+ "Three patches make the tree behave like the default engine: the Windows user follows the macOS user (CrossOver hack 12735 reverted), WINEDLLPATH_PREPEND is honoured so the renderer overlays apply, and wined3d's automatic renderer is OpenGL first as upstream. winemac.so exports macdrv_functions, so the DXMT and D3DMetal bridges work. This engine ships no winemetal.dll of its own; the DXMT overlay carries it. Wine Mono and Gecko are included.",
+ "DXMT here is Highball's branch (cross-process swapchains, DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN=1), needed by the EA client. D3DMetal is the Template's 3.0 with the timestamp shim in front, as on the default engine. Accepted licences carry over when a bottle moves.",
+ "Moving a bottle here re-runs the Windows setup (different Wine build); moving back is the same step. Nothing installed in the bottle is removed either way."
+ ],
+ "requires": [
+ "rosetta2"
+ ]
+}
diff --git a/spike/nvapi-stub/build.sh b/spike/nvapi-stub/build.sh
new file mode 100755
index 0000000..a3faccc
--- /dev/null
+++ b/spike/nvapi-stub/build.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Builds the 32-bit NVAPI stub as an engine component (one file, extracted to engine/lib/wine/i386-windows/nvapi.dll),
+# stamped with Wine's builtin marker so the loader hands it to a 32-bit game that asks the
+# system directory for nvapi.dll (NVIDIA's SDK loads it from there, never from the game folder).
+# Needs Homebrew mingw-w64. Usage: spike/nvapi-stub/build.sh [out-dir]
+set -euo pipefail
+HERE="$(cd "$(dirname "$0")" && pwd)"; ROOT="$(cd "$HERE/../.." && pwd)"
+OUT="${1:-$(pwd)/build-nvapi-stub}"; mkdir -p "$OUT/pkg"
+CC=/opt/homebrew/bin/i686-w64-mingw32-gcc
+"$CC" -shared -O2 -nostdlib -o "$OUT/pkg/nvapi.dll" "$HERE/nvapi.c" "$HERE/nvapi.def" -Wl,--kill-at -Wl,-e,_DllMain@12 -lkernel32
+python3 "$ROOT/Scripts/mark-builtin.py" "$OUT/pkg/nvapi.dll"
+grep -a -q "HIGHBALL NVAPI stub" "$OUT/pkg/nvapi.dll"
+NAME="nvapi-stub-2-i386.tar.gz"
+tar -czf "$OUT/$NAME" -C "$OUT/pkg" nvapi.dll
+echo "[nvapi-stub] $OUT/$NAME"; echo " sha256: $(shasum -a 256 "$OUT/$NAME" | awk '{print $1}')"; echo " size: $(stat -f %z "$OUT/$NAME")"
diff --git a/spike/nvapi-stub/nvapi.c b/spike/nvapi-stub/nvapi.c
new file mode 100644
index 0000000..e832b4e
--- /dev/null
+++ b/spike/nvapi-stub/nvapi.c
@@ -0,0 +1,35 @@
+/* Minimal NVAPI stub for a 32-bit Direct3D 9 game that refuses to run without NVIDIA's
+ * driver library when the adapter says NVIDIA. nvapi_QueryInterface hands out
+ * NvAPI_Initialize (OK), NvAPI_Unload (OK), NvAPI_GetErrorMessage and
+ * NvAPI_GetInterfaceVersionString (fixed strings); everything else answers
+ * NVAPI_NO_IMPLEMENTATION so a caller that probes optional features moves on. */
+#include <windows.h>
+
+typedef int NvAPI_Status;
+#define NVAPI_OK 0
+#define NVAPI_NO_IMPLEMENTATION (-3)
+
+static NvAPI_Status __cdecl stub_Initialize(void) { return NVAPI_OK; }
+static NvAPI_Status __cdecl stub_Unload(void) { return NVAPI_OK; }
+static NvAPI_Status __cdecl stub_NoImpl(void) { return NVAPI_NO_IMPLEMENTATION; }
+static void copy64(char *dst, const char *src) { int i = 0; if (!dst) return; while (i < 63 && src[i]) { dst[i] = src[i]; i++; } dst[i] = 0; }
+static NvAPI_Status __cdecl stub_GetErrorMessage(NvAPI_Status s, char msg[64]) {
+ copy64(msg, s == NVAPI_OK ? "NVAPI_OK" : "NVAPI_NO_IMPLEMENTATION");
+ return NVAPI_OK;
+}
+static NvAPI_Status __cdecl stub_GetInterfaceVersionString(char ver[64]) {
+ copy64(ver, "HIGHBALL NVAPI stub R470");
+ return NVAPI_OK;
+}
+
+__declspec(dllexport) void * __cdecl nvapi_QueryInterface(unsigned int id) {
+ switch (id) {
+ case 0x0150E828: return (void *)stub_Initialize; /* NvAPI_Initialize */
+ case 0xD22BDD7E: return (void *)stub_Unload; /* NvAPI_Unload */
+ case 0x6C2D048C: return (void *)stub_GetErrorMessage; /* NvAPI_GetErrorMessage */
+ case 0x01053FA5: return (void *)stub_GetInterfaceVersionString;
+ default: return (void *)stub_NoImpl;
+ }
+}
+
+BOOL WINAPI DllMain(HINSTANCE h, DWORD reason, LPVOID r) { (void)h; (void)r; return TRUE; }
diff --git a/spike/nvapi-stub/nvapi.def b/spike/nvapi-stub/nvapi.def
new file mode 100644
index 0000000..59f14e8
--- /dev/null
+++ b/spike/nvapi-stub/nvapi.def
@@ -0,0 +1,3 @@
+LIBRARY nvapi.dll
+EXPORTS
+ nvapi_QueryInterface