Skip to content

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

Wine 11 engines r28 and r29: the D3DMetal shim writes out input layout offsets given as D3D12_APPEND_ALIGNED_ELEMENT, which D3DMetal 4.0 beta 2 and beta 3 place wrongly, so a vertex shader read another attribute's bytes. Forza Horizon 6 draws its livery vinyls from a slot of nine appended elements of which the vertex shader reads TEXCOORD0 and COLOR0: the meshes carry COLOR alpha 255 at every vertex, yet the shapes came out as gradients, the finished livery had alpha 0.25 to 0.7 inside solid shapes and a liveried car showed mostly its base paint (highball#290, highball-db#449); the vinyl picker's shape thumbnails were gradients, factory paint had blotchy, faceted reflections from shifted normals and tangents, and the trees' wind data was misread. The shim now hands D3DMetal every graphics pipeline with those offsets resolved by D3D12's rules (directly after the previous element of the same slot, aligned to the smaller of 4 bytes and the element's size): CreateGraphicsPipelineState, pipeline state streams (input layout subobject rewritten, a stream with an unknown subobject type passed through) and pipeline library loads, so a stored pipeline is found again. HB_TSSHIM_APPEND_OFFSETS=0 passes layouts through. With HB_TSSHIM_DEBUG the shim also logs each pipeline under the number D3DMetal gives it, which ties D3DMetal's "marking PSO(N) as no-op" errors to their shaders.

tdrkDeva69c7cfe7d02
diff --git a/Tests/HighballKitTests/BundledEngineTests.swift b/Tests/HighballKitTests/BundledEngineTests.swift
index 995ef5a..d01df59 100644
--- a/Tests/HighballKitTests/BundledEngineTests.swift
+++ b/Tests/HighballKitTests/BundledEngineTests.swift
@@ -99,19 +99,19 @@ final class BundledEngineTests: XCTestCase {
}
XCTAssertEqual(try one("x64-crossover26.3-r20").components["wine"]?.sha256, try one("x64-crossover26.3-r21").components["wine"]?.sha256,
"one Wine build behind both, downloaded once")
- // Every older plain Wine 11 pin is offered the newest plain revision on macOS 27 (r27 since
- // D3DMetal 4.0 beta 3 came in r26, below), never a D3DMetal 4 one.
+ // Every older plain Wine 11 pin is offered the newest plain revision on macOS 27 (r29 since
+ // the D3DMetal 4 line moved to r28, below), never a D3DMetal 4 one.
for pin in ["x64-crossover26.3-r5", "x64-crossover26.3-r7", "x64-crossover26.3-r8", "x64-crossover26.3-r9", "x64-crossover26.3-r15", "x64-crossover26.3-r19",
- "x64-crossover26.3-r21", "x64-crossover26.3-r23", "x64-crossover26.3-r25"] {
+ "x64-crossover26.3-r21", "x64-crossover26.3-r23", "x64-crossover26.3-r25", "x64-crossover26.3-r27"] {
let wanted = try one(pin)
let offered = all.filter { EngineManifest.satisfies(current: $0, wanted: wanted) && $0.runs(onMacOS: "27.0") }
.max { (EngineManifest.revision(of: $0.id) ?? 0) < (EngineManifest.revision(of: $1.id) ?? 0) }
- XCTAssertEqual(offered?.id, "x64-crossover26.3-r27", "a pin on \(pin) must get the newest D3DMetal 3 revision")
+ XCTAssertEqual(offered?.id, "x64-crossover26.3-r29", "a pin on \(pin) must get the newest D3DMetal 3 revision")
}
let forzaPin = try one("x64-crossover26.3-r18")
let forOffer = all.filter { EngineManifest.satisfies(current: $0, wanted: forzaPin) && $0.runs(onMacOS: "27.0") }
.max { (EngineManifest.revision(of: $0.id) ?? 0) < (EngineManifest.revision(of: $1.id) ?? 0) }
- XCTAssertEqual(forOffer?.id, "x64-crossover26.3-r26", "Forza Horizon 6's pin gets the newest D3DMetal 4 revision")
+ XCTAssertEqual(forOffer?.id, "x64-crossover26.3-r28", "Forza Horizon 6's pin gets the newest D3DMetal 4 revision")
XCTAssertFalse(EngineManifest.satisfies(current: try one("x64-crossover26.3-r21"), wanted: forzaPin), "r21 lacks D3DMetal 4")
}
@@ -202,6 +202,38 @@ final class BundledEngineTests: XCTestCase {
XCTAssertFalse(EngineManifest.satisfies(current: r27, wanted: try one("x64-crossover26.3-r18")), "r27 lacks D3DMetal 4")
}
+ /// r28 is r26 with the D3DMetal shim rebuilt to write out input layout offsets given as
+ /// D3D12_APPEND_ALIGNED_ELEMENT, which D3DMetal 4.0 beta 2 and beta 3 place wrongly (Forza Horizon 6's
+ /// liveries, highball#290). r29 is r27 under a new number, every archive the same, so plain pins keep
+ /// landing on a D3DMetal 3 revision above the D3DMetal 4 one.
+ func testR28IsR26WithTheInputLayoutShimAndR29IsR27Renumbered() throws {
+ let all = try manifests()
+ func one(_ id: String) throws -> EngineManifest { try XCTUnwrap(all.first { $0.id == id }, "\(id) missing") }
+ let r26 = try one("x64-crossover26.3-r26"), r27 = try one("x64-crossover26.3-r27")
+ let r28 = try one("x64-crossover26.3-r28"), r29 = try one("x64-crossover26.3-r29")
+ XCTAssertEqual(Set(r28.components.keys), Set(r26.components.keys))
+ for (name, c) in r26.components {
+ if name == "d3dmetal-tsshim" {
+ XCTAssertNotEqual(r28.components[name]?.sha256, c.sha256, "r28/\(name) is new")
+ XCTAssertEqual(r28.components[name]?.extract?.into, c.extract?.into, "r28/\(name) unpacks where r26's did")
+ } else {
+ XCTAssertEqual(r28.components[name]?.sha256, c.sha256, "r28/\(name) must be r26's")
+ }
+ }
+ let shim = try XCTUnwrap(r28.components["d3dmetal-tsshim"])
+ XCTAssertTrue(shim.url.absoluteString.hasSuffix("/d3dmetal-tsshim-20261020/d3dmetal-tsshim-20261020.tar.xz"))
+ XCTAssertEqual(r28.minMacOS, r26.minMacOS)
+ XCTAssertEqual(r28.baseEnv, r26.baseEnv)
+ XCTAssertFalse(EngineManifest.needsPrefixRefresh(from: r26, to: r28), "same Wine: moving over skips the Windows setup")
+ XCTAssertTrue(EngineManifest.satisfies(current: r28, wanted: try one("x64-crossover26.3-r18")), "r28 carries D3DMetal 4")
+ XCTAssertEqual(Set(r29.components.keys), Set(r27.components.keys))
+ for (name, c) in r27.components { XCTAssertEqual(r29.components[name]?.sha256, c.sha256, "r29/\(name) must be r27's") }
+ XCTAssertEqual(r29.minMacOS, r27.minMacOS)
+ XCTAssertEqual(r29.baseEnv, r27.baseEnv)
+ XCTAssertFalse(EngineManifest.needsPrefixRefresh(from: r27, to: r29))
+ XCTAssertFalse(EngineManifest.satisfies(current: r29, wanted: try one("x64-crossover26.3-r18")), "r29 lacks D3DMetal 4")
+ }
+
/// Frame generation left Highball on 2026-09-27 at its author's request (itsOwen's lsfg-metal,
/// highball#171): no engine may ship the component any more. The revisions since are their
/// bases (r5 on the main line, r6 on the GPTK 4 line) with DXMT swapped and one file added.
diff --git a/spike/engines/x64-crossover26.3-r28.json b/spike/engines/x64-crossover26.3-r28.json
new file mode 100644
index 0000000..1b7b301
--- /dev/null
+++ b/spike/engines/x64-crossover26.3-r28.json
@@ -0,0 +1,191 @@
+{
+ "$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",
+ "DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN": "1",
+ "D3DM_MTL4": "0"
+ },
+ "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": "A d3d12.dll in front of D3DMetal's that serves DirectX 12 timestamp queries (D3DMetal 3.0 resolves them to zero at a reported 60 Hz). Exports carry the ordinals D3DMetal 4.0 beta 3 uses (D3D12CreateDevice at 101, D3D12GetInterface at 109, the two Serialize calls at 110 and 111), so games that bind d3d12 imports by ordinal load through it. Kill switch HB_D3D12_TSSHIM=0 idles the patches; the DLL stays in front. HB_TSSHIM_ATOMIC64=1 in a game's variables answers yes to OPTIONS11's 64-bit atomics on descriptor heap resources, which D3DMetal 3 answers no to and Capcom's RE Engine requires (opt-in, for a game's fix to set). Input layouts that place elements with D3D12_APPEND_ALIGNED_ELEMENT reach D3DMetal with those offsets written out, which D3DMetal 4.0 beta 2 and beta 3 get wrong (HB_TSSHIM_APPEND_OFFSETS=0 passes them through). D3D12GetInterface is passed through, and a device factory it returns gets its CreateDevice wrapped so those devices are patched too. Built for beta 3 only: older D3DMetal numbers the Serialize calls 109 and 110. Source: spike/tsshim, Scripts/build-tsshim.sh.",
+ "order": 1,
+ "sha256": "257829fc29da638bd4d8a10a0ad2e569f6c083c3d9825a13a7d4ed74098c81f4",
+ "size": 52516,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d3dmetal-tsshim-20261020/d3dmetal-tsshim-20261020.tar.xz",
+ "version": "20261020"
+ },
+ "dxmt": {
+ "extract": {
+ "into": "renderers/dxmt/wine",
+ "subpath": "highball"
+ },
+ "kind": "renderer",
+ "license": "MIT (Highball branch of DXMT: SwapDeviceContextState, cross-process opt-in)",
+ "sha256": "96feaf5d98d3c6cdc3edea9503e2891d435df8d5bfdf7d3f6998a56ec62bbd58",
+ "size": 18923969,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-20260930T161516Z-a444716/dxmt-highball-20260930T161516Z-a444716.tar.gz",
+ "note": "DXMT from Highball's fork (gauthierpiarrette/dxmt, branch highball-20260928 at 5c50790): upstream main of 2026-09-16 (v0.80 plus five months of upstream work, among it keyed-mutex and shared-resource support and DXGI functions Steam's overlay can hook) plus four Highball changes: cross-process swapchains behind DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN (off by default), SwapDeviceContextState implemented instead of aborting, 2D textures answering IDXGISurface, and the one that matters on this Wine: a shared texture with no D3DKMT device behind it is created as a private one, with one error line, instead of failing the game. On this Wine the driver assigns GPU LUIDs of its own, so DXMT's lookup of its adapter fails (the build also tries the primary display's name, which fails here too) and there is never a D3DKMT device; before this build every shared texture then died at creation. This revision's DXMT is that branch plus a444716 (branch highball-20260930): the encoding context's Metal device is declared before the command helpers whose constructors build pipelines through it. Declared after them it was still uninitialised memory there, and a game could die at start in newComputePipelineStateWithDescriptor sent to a garbage object: Among Us's 64-bit build did in 8 of 12 launches on r13, and in none of 12 with this build. The bug is in upstream DXMT too."
+ },
+ "moltenvk": {
+ "extract": {
+ "into": "frameworks/libMoltenVK.dylib",
+ "subpath": "libMoltenVK.dylib"
+ },
+ "kind": "runtime",
+ "license": "Apache-2.0",
+ "note": "MoltenVK 1.4.2 rebuilt with three Highball patches (spike/patches/moltenvk-shadow-import.patch, moltenvk-linear-fallback.patch and moltenvk-shadow-readback.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. Shadow readback (highball#283) copies what the GPU writes into shadowed memory back to the game's pages when a submission completes, so a 32-bit game's readbacks under MVK_SHADOW_IMPORT=1 stop being stale (The Sims' thumbnails); without the variable it does nothing.",
+ "order": 1,
+ "sha256": "7c84c592c023e761994cf4a0f5fb2e0a8a22bac8dfe3f787c4135a735f873e90",
+ "size": 1733593,
+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/moltenvk-1.4.2-shadow-import-1-linear-fallback-1-shadow-readback-1-x86_64.tar.gz",
+ "version": "1.4.2+shadow-import-1+linear-fallback-1+shadow-readback-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 with patches 0001-0003, 0005-0012, 0014, 0015 and 0016, from the audio-trial branch (main without the held 0013). 0009 swaps %gs:0x20 between Tib.FiberData (what PE code reads as GetCurrentFiber()) and the pthread QoS class (what macOS's libdispatch and pthread read) at every crossing between PE and unix code, so a fiber-based game no longer corrupts the scheduling slot: with 0008 alone Metaphor: ReFantazio opened a black window and hung in libdispatch. Stripped; Wine Mono 10.4.1 and Gecko 2.47.4 included.",
+ "sha256": "1d1a130c0108a4bbb88cd289c3c313292868c3b84010eb315801eba43026e3e8",
+ "size": 334884359,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/engine-wine-11.0-20261014T003801Z-0024-app-packages-0023-spatial-mixer/engine-wine-11.0-20261014T003801Z-0024-app-packages-0023-spatial-mixer.tar.gz",
+ "version": "wine-11.0 (CrossOver 26.3 tree) Highball build 2026-10-14, patches 0001-0024 (0022 and 0023, Tx's: spatial audio static objects in WAVEFORMATEXTENSIBLE channel order, and a float bed with more channels than the device rendered by AUSpatialMixer; 0024: GetPackagesByPackageFamily, GetPackagePath and PackageFullNameFromId answer from the registry, where wine.inf now lists the VCLibs framework packages)"
+ },
+ "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",
+ "refreshesPrefix": true
+ },
+ "d3dmetal": {
+ "kind": "renderer",
+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/d3dmetal-4.0b3-gptk4.tar.xz",
+ "sha256": "bdc8df8cab9e3caf4bafb8e436aa9f72449bca369fe87b2df4d72ba92f765915",
+ "size": 16553892,
+ "license": "apple-gptk-license-2023-08-17",
+ "version": "D3DMetal-4.0b3 (Game Porting Toolkit 4.0 beta 3, redist/lib; Apple Software Signing chain verified 2026-10-15)",
+ "order": 1,
+ "extract": {
+ "subpath": "renderers/d3dmetal",
+ "into": "renderers/d3dmetal"
+ },
+ "layout": [
+ "external/D3DMetal.framework",
+ "external/libd3dshared.dylib",
+ "wine/x86_64-windows/{d3d10,d3d11,d3d12,d3d12core,dxgi,nvapi64,nvngx-on-metalfx}.dll",
+ "wine/x86_64-unix/*.so -> ../../external/libd3dshared.dylib"
+ ],
+ "note": "Apple's D3DMetal from GPTK 4 beta 3 (Metal 4), laid over the Template's GPTK 3 copy: rendererDir prefers renderers/d3dmetal. New in beta 3: d3d12core.dll and D3D12GetInterface (the Agility SDK entry point; the SDK configuration works, the device factory is not implemented), shader model 6.7, and SampleCmpLevel. Same Apple licence text as GPTK 3 and 4 beta 2 (identical, 2026-10-15), so the same licence id and acceptance apply. The framework's own minimum is macOS 14, but it is offered on 27 or newer only, where it was measured."
+ },
+ "audiobuf": {
+ "kind": "runtime",
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/audiobuf-20261008/audiobuf-20261008.tar.xz",
+ "sha256": "8b84fa43f7394a3865eef99f4afc97875f155872930cc9f69438ee4a918f17e5",
+ "size": 5700,
+ "license": "MIT (Highball's own, source spike/audiobuf/audiobuf.c)",
+ "version": "20261008",
+ "order": 1,
+ "extract": {
+ "subpath": "libhbaudiobuf.dylib",
+ "into": "frameworks/libhbaudiobuf.dylib"
+ },
+ "note": "Highball's audio library, built by Scripts/build-audiobuf.sh. Bottle.environment inserts it into Wine's processes with DYLD_INSERT_LIBRARIES. It caps an output audio unit's I/O buffer at 5 ms before Wine starts it, so a game that keeps one 10 ms period queued no longer drops audio at 48 kHz (highball#127), and it limits float output like the last stage of Windows' audio engine, so a game whose mix goes over full scale is turned down instead of clipped at the speakers (highball-db#349). HB_AUDIOBUF=0 in an environment's variables leaves the library out, HB_AUDIOLIMIT=0 keeps it without the limiter."
+ }
+ },
+ "displayName": "Wine 11.0 (CrossOver 26.3) r28, D3DMetal 4.0 beta 3",
+ "id": "x64-crossover26.3-r28",
+ "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)",
+ "renderers/d3dmetal (GPTK 4.0 beta 2 redist: D3DMetal-4.0b2)"
+ ],
+ "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": "27.0",
+ "notes": [
+ "r28 (2026-10-20): r26 with the D3DMetal shim rebuilt; D3DMetal, the Wine and every other file are r26's, so only the 53 KB shim downloads. D3DMetal 4.0 beta 2 and beta 3 place input layout elements given as D3D12_APPEND_ALIGNED_ELEMENT at the wrong offsets, so a vertex shader reads another attribute's bytes. In Forza Horizon 6 the livery vinyls' coverage alpha came from texcoord bytes: solid shapes drew as gradients, a finished livery had alpha 0.25 to 0.7, and a liveried car showed mostly its base paint (highball#290, highball-db#449); shifted normals and tangents gave factory paint blotchy, faceted reflections, and the trees' wind data was misread. The shim now hands D3DMetal every pipeline with those offsets written out as D3D12's rules give them (CreateGraphicsPipelineState, pipeline state streams and pipeline library loads); HB_TSSHIM_APPEND_OFFSETS=0 passes the layouts through. Measured 2026-10-20 on an M4 Max, macOS 27.0.1: the livery texture reaches alpha 1 where it is covered, and the liveried car, the vinyl picker's shape thumbnails, reflections and trees draw right.",
+ "r26 (2026-10-15): r24 with Apple's D3DMetal from Game Porting Toolkit 4.0 beta 3 and the D3DMetal shim built for it; the Wine and every other file are r24's. Beta 3 adds the Agility SDK entry point D3D12GetInterface with a d3d12core.dll: a game can set its SDK version through it, which beta 2 refused because the export was missing. Its device factory is not implemented yet (E_NOINTERFACE). It reports shader model 6.7 instead of 6.6, and SampleCmpLevel now works; QuadAny and QuadAll run but group a 4x4 compute group's lanes as rows of four rather than 2x2, GatherRaw and writes to multisampled textures still do nothing, and the 64-bit atomics answer on an M1 Pro is still no (the shim's HB_TSSHIM_ATOMIC64=1 still answers yes). The shim exports D3D12GetInterface at beta 3's ordinal and patches devices made through a device factory. Measured 2026-10-15: M1 Pro with a test program and the shader model 6.6 to 6.9 probes against beta 2; M4, macOS 27.0: Forza Horizon 6 through Steam with its recipe reaches its title screen at 57 fps (55 on r24), loads D3DMetal's own d3d12core.dll rather than the game's Agility SDK copy, and runs for five minutes, as on r24. D3DM_MTL4=0 stays in the base environment.",
+ "r24 (2026-10-14): r22 (D3DMetal 4, macOS 27) with the same three components rebuilt as r25. Wine gains patches 0022 to 0024. 0022 and 0023 are Tx's (highball PR #313): Windows spatial audio gave its static objects channels in list order, which swapped the side and back channels of a 7.1 or 7.1.4 bed, and the Mac driver could not give a two-channel output a stream with more channels, so only front left and right played and Forza Horizon 6 lost its dialogue, its navigator and most of its engine sound on any Mac speakers or headphones. A float stream with more channels than the device now goes through Apple's AUSpatialMixer, rendered for the Mac's speakers or for headphones (HB_SPATIAL=speakers, headphones or external overrides the guess, HB_SPATIAL=0 turns it off); stereo streams are untouched. 0024 (Proton's): GetPackagesByPackageFamily, GetPackagePath and PackageFullNameFromId answer from the registry, where wine.inf now lists the VCLibs 140 framework packages, which Forza Horizon 4 waits for before it opens a window (highball#268). The D3DMetal shim answers yes to OPTIONS11's 64-bit atomics on descriptor heap resources when a game's variables set HB_TSSHIM_ATOMIC64=1 (Capcom's RE Engine refuses the adapter without it on M1 and M2 chips, highball-db#450); without the variable nothing changes. MoltenVK gains the shadow readback the Wine 10 engines have carried since their r24 (highball#283), which only runs under MVK_SHADOW_IMPORT=1. Every other file is byte-identical, and r24 and r25 share these three archives. Measured 2026-10-14 on an M4 and an M1 Pro, macOS 27.0, against r23: what the Mac plays (ScreenCaptureKit, left channel, a 0.5 tone per channel) is identical for 16-bit and float stereo; a 5.1, 7.1 or 7.1.4 float stream and a 7.1.4 spatial audio bed gave front left only on r23 and now every channel, the centre at -3 dB, the LFE folded in at -6 dB, side and back objects on the same speakers as the 7.1 stream's side and back channels. A test program finds the two VCLibs packages (x64 in system32, x86 in syswow64) in a new environment and in an r23 environment moved here, and none on r23. The shim reports the atomics 0 without the variable and 1 with it on the M1 Pro (D3DMetal answers yes on the M4 either way). The LastError probe, DXVK frame pacing, the Direct3D 9 lock stall test and the MoltenVK readback test give r23's results. Forza Horizon 6 through Steam with its recipe's settings draws at 56 fps on the Xbox sign-in screen, its 12-channel spatial bed and an 8-channel stream go through AUSpatialMixer, and its sound plays. 14 Steam games on r25, the same Wine, reach the same screens at the same frame rates (Among Us 59, Five Nights at Freddy's on DXVK and on Wine's Direct3D, Umamusume 30, Heartopia, Vindictus, Portal 60, Big Walk 60, PEAK 44, the Resident Evil 6 benchmark, the Half-Life 2 demo 89, The Last Flame 59, Red Dead Redemption 2's main menu 57, GTA V's calibration 31). The first one or two Steam starts on a new engine build are slower (Steam's browser probes the GPU while macOS rebuilds Metal caches for the new Wine binaries), then as before.",
+ "r22 (2026-10-08): r20 (D3DMetal 4, macOS 27) plus Highball's audio library, which the Wine 10 engines have shipped since r19. Its buffer cap does nothing here, patch 0015 already sets the buffer. It adds the limiter: a game whose float mix goes over full scale is turned down like Windows' audio engine does, instead of clipped at the speakers (Paperback, highball-db#349, runs on this line). Only the 6 KB archive is new, the Wine is the same. Measured on an M4, macOS 27.0 (2026-10-08), with this archive's library inserted into Wine 10 r21 and Wine 11 r17 environments: a WASAPI test tone recorded through ScreenCaptureKit passes sound under full scale unchanged (0.5 stays 0.5000, rms 0.3536) and holds a tone at 1.4 times full scale to 0.9923 with no sample over full scale, where HB_AUDIOLIMIT=0 lets 47,376 samples over through. No dropouts or clicks. The same code built as a prototype: Paperback's title music has nothing over full scale (2,586 samples in 30 s without) and is 0.4 dB quieter, Five Nights at Freddy's has nothing over (70 without).",
+ "r20 (2026-10-06): r18 (D3DMetal 4, macOS 27) rebuilt with patch 0020 and the refreshed 0012. 0020 (athei/wine fa43d6db2): in retina mode the Mac driver reported HORZRES and VERTRES twice the screen size that GetSystemMetrics, EnumDisplaySettings and DESKTOPHORZRES report (7680x4320 against 3840x2160 on an M4's 1920x1080 display, measured on r17), so a game sizing its window or fullscreen picture from them got it twice too large; Red Dead Redemption 2's 1080p fullscreen came out cropped for a player with Retina on (highball#261). With retina off nothing changes. 0012 follows athei's 335ebe1c46: the x87 sidecar handshake checks the reply's id and size and says when the sidecar did not attach; it stays dormant until a sidecar is configured. Built by highball-engine's workflow on main (both patches built green on a branch first). Every other component is unchanged. The same build carries 0021: macOS lists GL_ARB_ES2_compatibility only in 4.1 core contexts, so in a legacy 2.1 context opengl32 returned nothing for glClearDepthf, glDepthRangef, glGetShaderPrecisionFormat, glReleaseShaderCompiler and glShaderBinary, and a program written against OpenGL ES 2 called the empty pointer; they now answer through glClearDepth and glDepthRange or do nothing. Paperback: The Game (Loom engine) crashed at address 0 on every engine and reaches its title menu on this one, both builds (M4, macOS 27.0, highball-db#349).",
+ "r18 (2026-10-05): r17 with a rebuilt Wine with patches 0017 to 0019 and a new D3DMetal shim. 0017 adds kernelbase's GetIntegratedDisplaySize (upstream Wine c68ed23672), which Forza Horizon 6 calls once its window is up and died on. 0018 reports a process's commit charge (PagefileUsage, PrivateUsage) from the Mach task's footprint instead of its address space: a 9 MB program read 41,987 MB on an M4, and Forza Horizon 6 warned about low memory at 87 GB of 32. 0019 stops CredEnumerate failing when the macOS Keychain has no match for the filter, which threw away matching registry credentials: the Xbox Live sign-in library looks its device key and tokens up that way and asked for a new sign-in on every launch. The shim (d3dmetal-tsshim-20261005) answers a DirectX 12 shader model query D3DMetal does not know with the highest model it supports, and drops ResolveSubresource from a multisampled depth texture into a colour texture, which aborts D3DMetal 3.0 and 4.0b2 alike. It also carries Apple's D3DMetal 4.0 beta 2 (the Wine 10 line's r20 component), on macOS 27 only with the Metal 4 backend off (D3DM_MTL4=0), for Forza Horizon 6: its copy protection opens its own files through \\\\.\\GLOBALROOT paths that only the Wine 11 tree handles, and it refuses D3DMetal 3.0 as an unsupported graphics card (FH205) because only 4.0b2 reports enhanced barriers. The Metal 4 backend measured the same frame rate with Forza (50 against 49 fps in one scene on an M4). It is numbered below r19 on purpose, like r20 under r21 on the Wine 10 line: a recipe that pins an earlier Wine 11 revision is offered the newest revision carrying its pin, and that must stay a D3DMetal 3 one (r19), so Helldivers 2, Guardians of the Galaxy, Persona 5 Royal and Planet Coaster 2 do not change D3DMetal under their verified rows.",
+ "r17 (2026-10-03): r16 plus patch 0013 (athei's 539aa62). Wine turned data execution prevention off for the whole process as soon as any loaded module lacked IMAGE_DLLCHARACTERISTICS_NX_COMPAT, which most 32-bit games from before 2010 do. With it off every readable mapping gets PROT_EXEC, and under Rosetta a writable and executable page costs a Mach round trip on first touch, so a Direct3D 9 game streaming vertices through DXVK paid for every buffer write (highball#165). Now DEP follows the main executable and stays permanently on under Rosetta, as Windows's AlwaysOn policy does: ProcessExecuteFlags reports it permanent and a request to turn it off gets STATUS_ACCESS_DENIED; WINE_DISABLE_NX_COMPAT=0 in a game's variables restores the old behaviour for a program that writes code into data pages. Measured on an M4, macOS 27.0, with athei's d3d9stall (noover 2816 1500, DXVK d3d9, five runs each on r16): r16 spent 31 to 49 s in Lock+write per 1500 frames with two or three stalls over a second, this build 0.9 to 1.4 s with none. Every other component is byte-identical to r16.",
+ "r16 (2026-10-03): r15 with the DXMT build the default engine has shipped since 0.10.1 (dxmt-highball-20260930T161516Z-a444716) in place of the 4 September build. In the older build the encoding context's Metal device field was declared after the command helpers whose constructors build compute pipelines through it, so a game could die at start or minutes in with newComputePipelineStateWithDescriptor sent to a garbage object (NSInvalidArgumentException, unrecognised selector on an NSIndirectTaggedPointerString or whatever the memory held). Where Winds Meet crashed that way five times on r12 (highball#240), and Among Us's 64-bit build did in 8 of 12 launches on the default engine's r13 before the same fix. Every other component, the Wine build included, is byte-identical to r15, so only the 19 MB DXMT archive is new.",
+ "r14 (2026-10-01): r13 plus patch 0015. Wine's audio driver let the Mac pull its whole buffer at once, 10.7 ms at 48 kHz, more than a game that keeps one 10 ms period queued has, and played the shortfall as silence (highball#127). The driver now sets the audio unit's buffer to half its period before starting it. Measured on an M4 with macOS 27.0: Counter-Strike 2's menu music over the same 95 s had 20 dropouts on r12 and none with this build's driver. Every other component is byte-identical to r13.",
+ "r13 (2026-10-01): r12 plus patch 0014. A wait on several objects under msync that returned early left the thread registered in the wineserver, and nothing ever removed it, so a long session filled msync's node pool (\"msync: warn: node memory pool exhausted\", 242 million lines in one My Summer Car log) and the wineserver grew until the game stalled (highball#224). Measured on an M4 with macOS 27.0 with a reproducer: r12's wineserver went from 30 MB to 77 MB in 30 s, r13's stayed at 39 MB for 2 minutes with no warning, waits no slower. Heartopia ran 90 s under msync on it with a steady wineserver. Every other component is byte-identical to r12.",
+ "r12 (2026-09-24): r11 plus patch 0012, athei's x87sidecar cooperative attach with a loader check. The check alone changes every 32-bit launch: get_alternate_wineloader() used to name an i386-unix loader that does not exist in this wow64-only build, and env.c then relaunched the program through start.exe /exec, so every 32-bit game ran as a child of a detached start.exe. Measured 2026-09-24: two processes on r11, one on this build. With ROSETTA_X87_PATH pointing at athei's x87sidecar (not shipped yet) an i386 program is accelerated: Half-Life 2 timedemo 131 to 174 fps on wined3d, M1 Pro, macOS 27.0, measured on the 6788a14 trial build with WINEARCH=wow64; on this build the attach was verified with a test program only. Every other component is byte-identical to r11. Smoked 2026-09-24 on a clone of re-w11: The Last Flame (DXMT) and Five Nights at Freddy's (Wine's own Direct3D) draw, the 32-bit game runs as one process.",
+ "Known on r11 and r12 (highball#198, 2026-09-24, cause found 2026-09-25): a Direct3D 9 game on the DXVK mode gets a window that never draws and every memory mapping fails with VK_ERROR_OUT_OF_HOST_MEMORY when the environment carries MVK_SHADOW_IMPORT=1, which the Sims recipe set for the whole environment; Highball 0.9.38 scopes a game recipe's variables to that game. Until then remove that line from the environment's variables when not playing the Sims there, or use Wine's own Direct3D for the game, which is also the faster mode on these engines (Five Nights at Freddy's 40 fps on DXVK against 76 on the default engine's).",
+ "r11 (2026-09-20): r10 with patches 0010 and 0011. 0010 (Proton 164af86d): the Media Foundation source reader lets the video processor's allocator create sample textures, so a game's media player gets a real shared handle from DXMT instead of null (The Last Flame's menu video now plays, highball#99; 3Shain/dxmt#135). 0011: on macOS %gs:0x68, where MSVC-built code such as Unity's Mono reads GetLastError() directly, is kept in step with TEB->LastErrorValue, so a Unity game's error paths no longer see garbage (The Last Flame's Start threw IOException Unknown error on a missing save). DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN=1 is in the base environment: CEF launcher windows paint on Wine 11 with it. Known: winedmo.so still links a Homebrew FFmpeg 9 the engine does not ship, so Wine's MF sources fall back to GStreamer; unchanged from r10.",
+ "r10 (2026-09-15): r9 with MoltenVK 1.4.2 (July 2026) in place of 1.4.1, same two Highball patches. 1.4.2 fixes heap placement checks, imported texture residency, cached texture invalidation and an occlusion query crash, all candidates for Red Dead Redemption 2's trees popping in and out on Apple Silicon (highball#93). A candidate engine, not the default: pick it under Advanced. Everything else is byte-identical to r9.",
+ "r9 (2026-09-15): r8 with the d3dmetal-tsshim component rebuilt so its exports carry Microsoft's d3d12 ordinals (D3D12CreateDevice at 101), which D3DMetal mirrors. The earlier shim numbered them from 1, so a game that binds d3d12 imports by ordinal (Path of Exile 2 delay-loads D3D12CreateDevice as ordinal 101) died at startup with 'ordinal 101 out of range' and Wine's exception 0xc06d007f (highball-db#53). The Wine build and every other component are byte-identical to r8, so existing downloads are reused; only the 46 KB shim tarball is new.",
+ "r8 (2026-09-12): r7 plus patch 0009, the fiber and QoS slot swap. On r5 to r7 a game whose job threads switch fibers and also drive the window could hang black at full CPU, because the fiber pointer the 0008 mirror keeps in the thread slot is what macOS reads there as the thread's QoS class (Metaphor: ReFantazio, highball#80, measured with its free demo). r8 gives the slot to whichever side is running. Nothing else changed from r7.",
+ "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.",
+ "r11, the base environment (2026-09-18): DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN=1 for every process. On the Wine 11 tree, browser UIs whose GPU process draws into another process's window need it or DXMT refuses the swapchain: Rockstar's sign-in then paints (verified 2026-09-05 and 2026-09-18), Battle.net's client stops crashing but its window stays black, and Steam's window comes into being where two cold starts without the flag created none, but it too stays black (measured on r10, 2026-09-18). So the flag is necessary on Wine 11 and not sufficient for Steam or Battle.net; the black browser is a separate Wine 11 problem still open.",
+ "Direct3D 9 on this engine (0.9.38): in the automatic modes, DXMT and D3DMetal, a Direct3D 9 game uses Wine's own Direct3D, because DXVK's d3d9 on this tree is the slow path (Half-Life 2 131 fps on wined3d against 17 on DXVK, Five Nights at Freddy's 40 fps on DXVK against 76 with the Wine 10 engine's DXVK, measured 2026-09-24/25, highball#198). The explicit DXVK mode still gets DXVK's d3d9.",
+ "r15 (2026-10-02): r14 plus patch 0016. Patch 0011 wrote PE's LastError into the TEB at every entry to unix code and again in user_mode_callback_return, which is only reached through a system call, so the second write copied libc's TSD slot, a heap pointer, into the TEB and the next return to PE code handed it to GetLastError(). Every window procedure and driver-load callback goes through that return, so the first display call of a process poisoned LastError on r11 to r14. The Rockstar Games Launcher installer reads it right after it measures the display and stops with 'make sure all instances of the Rockstar Games Launcher have been closed' (highball-db#272). Measured on an M4, macOS 27.0, with lasterr3.exe: 60687104 after GetSystemMetrics on r12 and r13, 0 on r7, and the expected value on this build."
+ ],
+ "requires": [
+ "rosetta2"
+ ],
+ "direct3D9": "wined3d",
+ "verified": {
+ "date": "2026-10-20",
+ "macos": "27.0.1",
+ "chip": "Apple M4 Max",
+ "result": "r26 with this shim in place of its own, file for file: Forza Horizon 6 through Steam with its recipe draws a downloaded livery on a Peel P50 in the garage and free roam, factory paint reflects cleanly and the trees move normally; with the DLSS switch on and the game's NVIDIA identity, DLSS Super Resolution runs through MetalFX (1200x750 to 1800x1125)."
+ }
+}
diff --git a/spike/engines/x64-crossover26.3-r29.json b/spike/engines/x64-crossover26.3-r29.json
new file mode 100644
index 0000000..4d5e5d7
--- /dev/null
+++ b/spike/engines/x64-crossover26.3-r29.json
@@ -0,0 +1,169 @@
+{
+ "$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",
+ "DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN": "1"
+ },
+ "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": "A d3d12.dll in front of D3DMetal's that serves DirectX 12 timestamp queries (D3DMetal 3.0 resolves them to zero at a reported 60 Hz). Exports carry Microsoft's d3d12 ordinals (D3D12CreateDevice at 101), which D3DMetal mirrors, so games that bind d3d12 imports by ordinal load through it. Kill switch HB_D3D12_TSSHIM=0 idles the patches; the DLL stays in front. HB_TSSHIM_ATOMIC64=1 in a game's variables answers yes to OPTIONS11's 64-bit atomics on descriptor heap resources, which D3DMetal 3 answers no to and Capcom's RE Engine requires (opt-in, for a game's fix to set). Source: spike/tsshim, Scripts/build-tsshim.sh.",
+ "order": 1,
+ "sha256": "5906fd46813e0cbe5e59909f77fd86344768ea8c07babe60cf4d8bbad1d0d00a",
+ "size": 50532,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d3dmetal-tsshim-20261014/d3dmetal-tsshim-20261014.tar.xz",
+ "version": "20261014"
+ },
+ "dxmt": {
+ "extract": {
+ "into": "renderers/dxmt/wine",
+ "subpath": "highball"
+ },
+ "kind": "renderer",
+ "license": "MIT (Highball branch of DXMT: SwapDeviceContextState, cross-process opt-in)",
+ "sha256": "96feaf5d98d3c6cdc3edea9503e2891d435df8d5bfdf7d3f6998a56ec62bbd58",
+ "size": 18923969,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-20260930T161516Z-a444716/dxmt-highball-20260930T161516Z-a444716.tar.gz",
+ "note": "DXMT from Highball's fork (gauthierpiarrette/dxmt, branch highball-20260928 at 5c50790): upstream main of 2026-09-16 (v0.80 plus five months of upstream work, among it keyed-mutex and shared-resource support and DXGI functions Steam's overlay can hook) plus four Highball changes: cross-process swapchains behind DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN (off by default), SwapDeviceContextState implemented instead of aborting, 2D textures answering IDXGISurface, and the one that matters on this Wine: a shared texture with no D3DKMT device behind it is created as a private one, with one error line, instead of failing the game. On this Wine the driver assigns GPU LUIDs of its own, so DXMT's lookup of its adapter fails (the build also tries the primary display's name, which fails here too) and there is never a D3DKMT device; before this build every shared texture then died at creation. This revision's DXMT is that branch plus a444716 (branch highball-20260930): the encoding context's Metal device is declared before the command helpers whose constructors build pipelines through it. Declared after them it was still uninitialised memory there, and a game could die at start in newComputePipelineStateWithDescriptor sent to a garbage object: Among Us's 64-bit build did in 8 of 12 launches on r13, and in none of 12 with this build. The bug is in upstream DXMT too."
+ },
+ "moltenvk": {
+ "extract": {
+ "into": "frameworks/libMoltenVK.dylib",
+ "subpath": "libMoltenVK.dylib"
+ },
+ "kind": "runtime",
+ "license": "Apache-2.0",
+ "note": "MoltenVK 1.4.2 rebuilt with three Highball patches (spike/patches/moltenvk-shadow-import.patch, moltenvk-linear-fallback.patch and moltenvk-shadow-readback.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. Shadow readback (highball#283) copies what the GPU writes into shadowed memory back to the game's pages when a submission completes, so a 32-bit game's readbacks under MVK_SHADOW_IMPORT=1 stop being stale (The Sims' thumbnails); without the variable it does nothing.",
+ "order": 1,
+ "sha256": "7c84c592c023e761994cf4a0f5fb2e0a8a22bac8dfe3f787c4135a735f873e90",
+ "size": 1733593,
+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/moltenvk-1.4.2-shadow-import-1-linear-fallback-1-shadow-readback-1-x86_64.tar.gz",
+ "version": "1.4.2+shadow-import-1+linear-fallback-1+shadow-readback-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 with patches 0001-0003, 0005-0012, 0014, 0015 and 0016, from the audio-trial branch (main without the held 0013). 0009 swaps %gs:0x20 between Tib.FiberData (what PE code reads as GetCurrentFiber()) and the pthread QoS class (what macOS's libdispatch and pthread read) at every crossing between PE and unix code, so a fiber-based game no longer corrupts the scheduling slot: with 0008 alone Metaphor: ReFantazio opened a black window and hung in libdispatch. Stripped; Wine Mono 10.4.1 and Gecko 2.47.4 included.",
+ "sha256": "1d1a130c0108a4bbb88cd289c3c313292868c3b84010eb315801eba43026e3e8",
+ "size": 334884359,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/engine-wine-11.0-20261014T003801Z-0024-app-packages-0023-spatial-mixer/engine-wine-11.0-20261014T003801Z-0024-app-packages-0023-spatial-mixer.tar.gz",
+ "version": "wine-11.0 (CrossOver 26.3 tree) Highball build 2026-10-14, patches 0001-0024 (0022 and 0023, Tx's: spatial audio static objects in WAVEFORMATEXTENSIBLE channel order, and a float bed with more channels than the device rendered by AUSpatialMixer; 0024: GetPackagesByPackageFamily, GetPackagePath and PackageFullNameFromId answer from the registry, where wine.inf now lists the VCLibs framework packages)"
+ },
+ "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",
+ "refreshesPrefix": true
+ },
+ "audiobuf": {
+ "kind": "runtime",
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/audiobuf-20261008/audiobuf-20261008.tar.xz",
+ "sha256": "8b84fa43f7394a3865eef99f4afc97875f155872930cc9f69438ee4a918f17e5",
+ "size": 5700,
+ "license": "MIT (Highball's own, source spike/audiobuf/audiobuf.c)",
+ "version": "20261008",
+ "order": 1,
+ "extract": {
+ "subpath": "libhbaudiobuf.dylib",
+ "into": "frameworks/libhbaudiobuf.dylib"
+ },
+ "note": "Highball's audio library, built by Scripts/build-audiobuf.sh. Bottle.environment inserts it into Wine's processes with DYLD_INSERT_LIBRARIES. It caps an output audio unit's I/O buffer at 5 ms before Wine starts it, so a game that keeps one 10 ms period queued no longer drops audio at 48 kHz (highball#127), and it limits float output like the last stage of Windows' audio engine, so a game whose mix goes over full scale is turned down instead of clipped at the speakers (highball-db#349). HB_AUDIOBUF=0 in an environment's variables leaves the library out, HB_AUDIOLIMIT=0 keeps it without the limiter."
+ }
+ },
+ "displayName": "Wine 11.0 (CrossOver 26.3) r29",
+ "id": "x64-crossover26.3-r29",
+ "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": [
+ "r29 (2026-10-20): r27 under a new number, every archive identical, so nothing downloads again. It keeps plain Wine 11 pins on D3DMetal 3 above r28, the D3DMetal 4 revision, as r27 did above r26.",
+ "r27 (2026-10-15): r25 under a new number, every archive identical, so nothing downloads again. It exists because r26, the D3DMetal 4 revision, would otherwise be the newest revision a plain Wine 11 pin is offered, and plain pins stay on D3DMetal 3, the same reason r23 sits above r22 and r25 above r24.",
+ "r25 (2026-10-14): r23 with three components rebuilt. Wine gains patches 0022 to 0024. 0022 and 0023 are Tx's (highball PR #313): Windows spatial audio gave its static objects channels in list order, which swapped the side and back channels of a 7.1 or 7.1.4 bed, and the Mac driver could not give a two-channel output a stream with more channels, so only front left and right played and Forza Horizon 6 lost its dialogue, its navigator and most of its engine sound on any Mac speakers or headphones. A float stream with more channels than the device now goes through Apple's AUSpatialMixer, rendered for the Mac's speakers or for headphones (HB_SPATIAL=speakers, headphones or external overrides the guess, HB_SPATIAL=0 turns it off); stereo streams are untouched. 0024 (Proton's): GetPackagesByPackageFamily, GetPackagePath and PackageFullNameFromId answer from the registry, where wine.inf now lists the VCLibs 140 framework packages, which Forza Horizon 4 waits for before it opens a window (highball#268). The D3DMetal shim answers yes to OPTIONS11's 64-bit atomics on descriptor heap resources when a game's variables set HB_TSSHIM_ATOMIC64=1 (Capcom's RE Engine refuses the adapter without it on M1 and M2 chips, highball-db#450); without the variable nothing changes. MoltenVK gains the shadow readback the Wine 10 engines have carried since their r24 (highball#283), which only runs under MVK_SHADOW_IMPORT=1. Every other file is byte-identical, and r24 and r25 share these three archives. Measured 2026-10-14 on an M4 and an M1 Pro, macOS 27.0, against r23: what the Mac plays (ScreenCaptureKit, left channel, a 0.5 tone per channel) is identical for 16-bit and float stereo; a 5.1, 7.1 or 7.1.4 float stream and a 7.1.4 spatial audio bed gave front left only on r23 and now every channel, the centre at -3 dB, the LFE folded in at -6 dB, side and back objects on the same speakers as the 7.1 stream's side and back channels. A test program finds the two VCLibs packages (x64 in system32, x86 in syswow64) in a new environment and in an r23 environment moved here, and none on r23. The shim reports the atomics 0 without the variable and 1 with it on the M1 Pro (D3DMetal answers yes on the M4 either way). The LastError probe, DXVK frame pacing, the Direct3D 9 lock stall test and the MoltenVK readback test give r23's results. 14 Steam games in one environment moved from r23 to r25 reach the same screens at the same frame rates (Among Us 59, Five Nights at Freddy's on DXVK and on Wine's Direct3D, Umamusume 30, Heartopia, Vindictus, Portal 60, Big Walk 60, PEAK 44, the Resident Evil 6 benchmark, the Half-Life 2 demo 89, The Last Flame 59, Red Dead Redemption 2's main menu 57, GTA V's calibration 31). The first one or two Steam starts on a new engine build are slower (Steam's browser probes the GPU while macOS rebuilds Metal caches for the new Wine binaries), then as before.",
+ "r23 (2026-10-08): r21 (the plain Wine 11 line) plus Highball's audio library, which the Wine 10 engines have shipped since r19. Its buffer cap does nothing here, patch 0015 already sets the buffer. It adds the limiter: a game whose float mix goes over full scale is turned down like Windows' audio engine does, instead of clipped at the speakers (Paperback, highball-db#349, runs on this line). Only the 6 KB archive is new, the Wine is the same. Measured on an M4, macOS 27.0 (2026-10-08), with this archive's library inserted into Wine 10 r21 and Wine 11 r17 environments: a WASAPI test tone recorded through ScreenCaptureKit passes sound under full scale unchanged (0.5 stays 0.5000, rms 0.3536) and holds a tone at 1.4 times full scale to 0.9923 with no sample over full scale, where HB_AUDIOLIMIT=0 lets 47,376 samples over through. No dropouts or clicks. The same code built as a prototype: Paperback's title music has nothing over full scale (2,586 samples in 30 s without) and is 0.4 dB quieter, Five Nights at Freddy's has nothing over (70 without).",
+ "r21 (2026-10-06): r19 rebuilt with patch 0020 and the refreshed 0012. 0020 (athei/wine fa43d6db2): in retina mode the Mac driver reported HORZRES and VERTRES twice the screen size that GetSystemMetrics, EnumDisplaySettings and DESKTOPHORZRES report (7680x4320 against 3840x2160 on an M4's 1920x1080 display, measured on r17), so a game sizing its window or fullscreen picture from them got it twice too large; Red Dead Redemption 2's 1080p fullscreen came out cropped for a player with Retina on (highball#261). With retina off nothing changes. 0012 follows athei's 335ebe1c46: the x87 sidecar handshake checks the reply's id and size and says when the sidecar did not attach; it stays dormant until a sidecar is configured. Built by highball-engine's workflow on main (both patches built green on a branch first). Every other component is unchanged. The same build carries 0021: macOS lists GL_ARB_ES2_compatibility only in 4.1 core contexts, so in a legacy 2.1 context opengl32 returned nothing for glClearDepthf, glDepthRangef, glGetShaderPrecisionFormat, glReleaseShaderCompiler and glShaderBinary, and a program written against OpenGL ES 2 called the empty pointer; they now answer through glClearDepth and glDepthRange or do nothing. Paperback: The Game (Loom engine) crashed at address 0 on every engine and reaches its title menu on this one, both builds (M4, macOS 27.0, highball-db#349).",
+ "r19 (2026-10-05): r17 with a rebuilt Wine with patches 0017 to 0019 and a new D3DMetal shim. 0017 adds kernelbase's GetIntegratedDisplaySize (upstream Wine c68ed23672), which Forza Horizon 6 calls once its window is up and died on. 0018 reports a process's commit charge (PagefileUsage, PrivateUsage) from the Mach task's footprint instead of its address space: a 9 MB program read 41,987 MB on an M4, and Forza Horizon 6 warned about low memory at 87 GB of 32. 0019 stops CredEnumerate failing when the macOS Keychain has no match for the filter, which threw away matching registry credentials: the Xbox Live sign-in library looks its device key and tokens up that way and asked for a new sign-in on every launch. The shim (d3dmetal-tsshim-20261005) answers a DirectX 12 shader model query D3DMetal does not know with the highest model it supports, and drops ResolveSubresource from a multisampled depth texture into a colour texture, which aborts D3DMetal 3.0 and 4.0b2 alike. Every file is byte-identical to r18 outside renderers/d3dmetal; r18 is the D3DMetal 4 variant for macOS 27, numbered below so recipes pinned to earlier Wine 11 revisions keep D3DMetal 3.",
+ "r17 (2026-10-03): r16 plus patch 0013 (athei's 539aa62). Wine turned data execution prevention off for the whole process as soon as any loaded module lacked IMAGE_DLLCHARACTERISTICS_NX_COMPAT, which most 32-bit games from before 2010 do. With it off every readable mapping gets PROT_EXEC, and under Rosetta a writable and executable page costs a Mach round trip on first touch, so a Direct3D 9 game streaming vertices through DXVK paid for every buffer write (highball#165). Now DEP follows the main executable and stays permanently on under Rosetta, as Windows's AlwaysOn policy does: ProcessExecuteFlags reports it permanent and a request to turn it off gets STATUS_ACCESS_DENIED; WINE_DISABLE_NX_COMPAT=0 in a game's variables restores the old behaviour for a program that writes code into data pages. Measured on an M4, macOS 27.0, with athei's d3d9stall (noover 2816 1500, DXVK d3d9, five runs each on r16): r16 spent 31 to 49 s in Lock+write per 1500 frames with two or three stalls over a second, this build 0.9 to 1.4 s with none. Every other component is byte-identical to r16.",
+ "r16 (2026-10-03): r15 with the DXMT build the default engine has shipped since 0.10.1 (dxmt-highball-20260930T161516Z-a444716) in place of the 4 September build. In the older build the encoding context's Metal device field was declared after the command helpers whose constructors build compute pipelines through it, so a game could die at start or minutes in with newComputePipelineStateWithDescriptor sent to a garbage object (NSInvalidArgumentException, unrecognised selector on an NSIndirectTaggedPointerString or whatever the memory held). Where Winds Meet crashed that way five times on r12 (highball#240), and Among Us's 64-bit build did in 8 of 12 launches on the default engine's r13 before the same fix. Every other component, the Wine build included, is byte-identical to r15, so only the 19 MB DXMT archive is new.",
+ "r14 (2026-10-01): r13 plus patch 0015. Wine's audio driver let the Mac pull its whole buffer at once, 10.7 ms at 48 kHz, more than a game that keeps one 10 ms period queued has, and played the shortfall as silence (highball#127). The driver now sets the audio unit's buffer to half its period before starting it. Measured on an M4 with macOS 27.0: Counter-Strike 2's menu music over the same 95 s had 20 dropouts on r12 and none with this build's driver. Every other component is byte-identical to r13.",
+ "r13 (2026-10-01): r12 plus patch 0014. A wait on several objects under msync that returned early left the thread registered in the wineserver, and nothing ever removed it, so a long session filled msync's node pool (\"msync: warn: node memory pool exhausted\", 242 million lines in one My Summer Car log) and the wineserver grew until the game stalled (highball#224). Measured on an M4 with macOS 27.0 with a reproducer: r12's wineserver went from 30 MB to 77 MB in 30 s, r13's stayed at 39 MB for 2 minutes with no warning, waits no slower. Heartopia ran 90 s under msync on it with a steady wineserver. Every other component is byte-identical to r12.",
+ "r12 (2026-09-24): r11 plus patch 0012, athei's x87sidecar cooperative attach with a loader check. The check alone changes every 32-bit launch: get_alternate_wineloader() used to name an i386-unix loader that does not exist in this wow64-only build, and env.c then relaunched the program through start.exe /exec, so every 32-bit game ran as a child of a detached start.exe. Measured 2026-09-24: two processes on r11, one on this build. With ROSETTA_X87_PATH pointing at athei's x87sidecar (not shipped yet) an i386 program is accelerated: Half-Life 2 timedemo 131 to 174 fps on wined3d, M1 Pro, macOS 27.0, measured on the 6788a14 trial build with WINEARCH=wow64; on this build the attach was verified with a test program only. Every other component is byte-identical to r11. Smoked 2026-09-24 on a clone of re-w11: The Last Flame (DXMT) and Five Nights at Freddy's (Wine's own Direct3D) draw, the 32-bit game runs as one process.",
+ "Known on r11 and r12 (highball#198, 2026-09-24, cause found 2026-09-25): a Direct3D 9 game on the DXVK mode gets a window that never draws and every memory mapping fails with VK_ERROR_OUT_OF_HOST_MEMORY when the environment carries MVK_SHADOW_IMPORT=1, which the Sims recipe set for the whole environment; Highball 0.9.38 scopes a game recipe's variables to that game. Until then remove that line from the environment's variables when not playing the Sims there, or use Wine's own Direct3D for the game, which is also the faster mode on these engines (Five Nights at Freddy's 40 fps on DXVK against 76 on the default engine's).",
+ "r11 (2026-09-20): r10 with patches 0010 and 0011. 0010 (Proton 164af86d): the Media Foundation source reader lets the video processor's allocator create sample textures, so a game's media player gets a real shared handle from DXMT instead of null (The Last Flame's menu video now plays, highball#99; 3Shain/dxmt#135). 0011: on macOS %gs:0x68, where MSVC-built code such as Unity's Mono reads GetLastError() directly, is kept in step with TEB->LastErrorValue, so a Unity game's error paths no longer see garbage (The Last Flame's Start threw IOException Unknown error on a missing save). DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN=1 is in the base environment: CEF launcher windows paint on Wine 11 with it. Known: winedmo.so still links a Homebrew FFmpeg 9 the engine does not ship, so Wine's MF sources fall back to GStreamer; unchanged from r10.",
+ "r10 (2026-09-15): r9 with MoltenVK 1.4.2 (July 2026) in place of 1.4.1, same two Highball patches. 1.4.2 fixes heap placement checks, imported texture residency, cached texture invalidation and an occlusion query crash, all candidates for Red Dead Redemption 2's trees popping in and out on Apple Silicon (highball#93). A candidate engine, not the default: pick it under Advanced. Everything else is byte-identical to r9.",
+ "r9 (2026-09-15): r8 with the d3dmetal-tsshim component rebuilt so its exports carry Microsoft's d3d12 ordinals (D3D12CreateDevice at 101), which D3DMetal mirrors. The earlier shim numbered them from 1, so a game that binds d3d12 imports by ordinal (Path of Exile 2 delay-loads D3D12CreateDevice as ordinal 101) died at startup with 'ordinal 101 out of range' and Wine's exception 0xc06d007f (highball-db#53). The Wine build and every other component are byte-identical to r8, so existing downloads are reused; only the 46 KB shim tarball is new.",
+ "r8 (2026-09-12): r7 plus patch 0009, the fiber and QoS slot swap. On r5 to r7 a game whose job threads switch fibers and also drive the window could hang black at full CPU, because the fiber pointer the 0008 mirror keeps in the thread slot is what macOS reads there as the thread's QoS class (Metaphor: ReFantazio, highball#80, measured with its free demo). r8 gives the slot to whichever side is running. Nothing else changed from r7.",
+ "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.",
+ "r11, the base environment (2026-09-18): DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN=1 for every process. On the Wine 11 tree, browser UIs whose GPU process draws into another process's window need it or DXMT refuses the swapchain: Rockstar's sign-in then paints (verified 2026-09-05 and 2026-09-18), Battle.net's client stops crashing but its window stays black, and Steam's window comes into being where two cold starts without the flag created none, but it too stays black (measured on r10, 2026-09-18). So the flag is necessary on Wine 11 and not sufficient for Steam or Battle.net; the black browser is a separate Wine 11 problem still open.",
+ "Direct3D 9 on this engine (0.9.38): in the automatic modes, DXMT and D3DMetal, a Direct3D 9 game uses Wine's own Direct3D, because DXVK's d3d9 on this tree is the slow path (Half-Life 2 131 fps on wined3d against 17 on DXVK, Five Nights at Freddy's 40 fps on DXVK against 76 with the Wine 10 engine's DXVK, measured 2026-09-24/25, highball#198). The explicit DXVK mode still gets DXVK's d3d9.",
+ "r15 (2026-10-02): r14 plus patch 0016. Patch 0011 wrote PE's LastError into the TEB at every entry to unix code and again in user_mode_callback_return, which is only reached through a system call, so the second write copied libc's TSD slot, a heap pointer, into the TEB and the next return to PE code handed it to GetLastError(). Every window procedure and driver-load callback goes through that return, so the first display call of a process poisoned LastError on r11 to r14. The Rockstar Games Launcher installer reads it right after it measures the display and stops with 'make sure all instances of the Rockstar Games Launcher have been closed' (highball-db#272). Measured on an M4, macOS 27.0, with lasterr3.exe: 60687104 after GetSystemMetrics on r12 and r13, 0 on r7, and the expected value on this build."
+ ],
+ "requires": [
+ "rosetta2"
+ ],
+ "direct3D9": "wined3d",
+ "verified": {
+ "date": "2026-10-14",
+ "macos": "27.0",
+ "chip": "Apple M4",
+ "result": "Identical archives to r25. Installed from this manifest into an empty Highball folder on an M1 Pro (macOS 27.0) with Highball's installer, and on an M4, where only the new Wine, shim and MoltenVK archives were fetched. 14 Steam games in one environment moved from r23 to r25 reach the same screens at the same frame rates (Among Us 59, Five Nights at Freddy's on DXVK and on Wine's Direct3D, Umamusume 30, Heartopia, Vindictus, Portal 60, Big Walk 60, PEAK 44, the Resident Evil 6 benchmark, the Half-Life 2 demo 89, The Last Flame 59, Red Dead Redemption 2's main menu 57, GTA V's calibration 31)."
+ }
+}
diff --git a/spike/tsshim/d3d12.c b/spike/tsshim/d3d12.c
index 36372aa..a120ddb 100644
--- a/spike/tsshim/d3d12.c
+++ b/spike/tsshim/d3d12.c
@@ -18,6 +18,12 @@
// assertion that aborts the thread. The hook drops the call (HB_TSSHIM_DEPTHRESOLVE=1 lets it
// through, for a D3DMetal that has learned to do it).
//
+// And one wrong result (D3DMetal 4.0b2 and 4.0b3, Forza Horizon 6, 2026-10-20):
+// - Input layouts that place elements with D3D12_APPEND_ALIGNED_ELEMENT get them at the wrong
+// offsets, so a vertex shader reads another attribute's bytes. Pipelines are handed to D3DMetal
+// with those offsets written out explicitly, as D3D12's rules give them (HB_TSSHIM_APPEND_OFFSETS=0
+// passes the layouts through as the game wrote them).
+//
// Build: x86_64-w64-mingw32-gcc -shared -O2 -Wall -static-libgcc -o d3d12.dll d3d12.c d3d12.def
// then stamp the "Wine builtin DLL" marker so WINEDLLPATH_PREPEND picks it up.
#define INITGUID
@@ -376,11 +382,223 @@ static void STDMETHODCALLTYPE hook_ResolveSubresource(ID3D12GraphicsCommandList
real_ResolveSubresource(list, dst, dst_sub, src, src_sub, format);
}
+// ---- input layouts ---------------------------------------------------------------------------
+
+// D3D12_APPEND_ALIGNED_ELEMENT puts an element directly after the previous element of the same input
+// slot, in declaration order, aligned to the smaller of 4 bytes and its own size. D3DMetal (4.0b2 and
+// 4.0b3) places such elements elsewhere. Forza Horizon 6 draws its livery vinyls with a slot of nine
+// appended elements (NORMAL R16G16_SNORM, TEXCOORD0-3 R16G16_UNORM, TANGENT0-2 R10G10B10A2_UNORM,
+// COLOR0 R8G8B8A8_UNORM, stride 36) of which the vertex shader reads TEXCOORD0 and COLOR0: the vinyl
+// meshes carry COLOR alpha 255 at every vertex, yet the shapes came out as gradients from 0 to 1 across
+// each quad, the finished livery had alpha 0.25 to 0.7 inside solid shapes, and a liveried car showed
+// mostly its base paint; the vinyl picker's shape thumbnails were gradients too. Other meshes read
+// shifted normals and tangents (blotchy, faceted reflections on factory paint) and the trees' wind
+// data. With the offsets written out the livery reaches alpha 1 and the car, the thumbnails, the
+// reflections and the trees draw right (M4 Max, macOS 27.0.1, D3DMetal 4.0b3). Equivalent by D3D12's
+// rules, so it is applied to every pipeline; HB_TSSHIM_APPEND_OFFSETS=0 turns it off.
+static int keep_append_offsets;
+static UINT vertex_format_size(DXGI_FORMAT f)
+{
+ if (f >= DXGI_FORMAT_R32G32B32A32_TYPELESS && f <= DXGI_FORMAT_R32G32B32A32_SINT) return 16;
+ if (f >= DXGI_FORMAT_R32G32B32_TYPELESS && f <= DXGI_FORMAT_R32G32B32_SINT) return 12;
+ if (f >= DXGI_FORMAT_R16G16B16A16_TYPELESS && f <= DXGI_FORMAT_X32_TYPELESS_G8X24_UINT) return 8;
+ if (f >= DXGI_FORMAT_R10G10B10A2_TYPELESS && f <= DXGI_FORMAT_X24_TYPELESS_G8_UINT) return 4;
+ if (f >= DXGI_FORMAT_R8G8_TYPELESS && f <= DXGI_FORMAT_R16_SINT) return 2;
+ if (f >= DXGI_FORMAT_R8_TYPELESS && f <= DXGI_FORMAT_A8_UNORM) return 1;
+ if (f == DXGI_FORMAT_B5G6R5_UNORM || f == DXGI_FORMAT_B5G5R5A1_UNORM || f == DXGI_FORMAT_B4G4R4A4_UNORM) return 2;
+ if (f >= DXGI_FORMAT_B8G8R8A8_UNORM && f <= DXGI_FORMAT_B8G8R8X8_UNORM_SRGB) return 4;
+ return 0;
+}
+// Writes the layout with every appended offset resolved into out (room for in->NumElements); returns
+// FALSE when nothing was appended or an element's format is one this table does not size.
+static BOOL resolve_append_offsets(const D3D12_INPUT_LAYOUT_DESC *in, D3D12_INPUT_ELEMENT_DESC *out)
+{
+ UINT end[D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT] = { 0 }, i; BOOL appended = FALSE;
+ if (keep_append_offsets || !in || !in->pInputElementDescs || !in->NumElements
+ || in->NumElements > D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT) return FALSE;
+ for (i = 0; i < in->NumElements; i++) {
+ D3D12_INPUT_ELEMENT_DESC e = in->pInputElementDescs[i]; UINT size = vertex_format_size(e.Format);
+ if (!size || e.InputSlot >= D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT) return FALSE;
+ if (e.AlignedByteOffset == D3D12_APPEND_ALIGNED_ELEMENT) {
+ UINT align = size < 4 ? size : 4;
+ e.AlignedByteOffset = (end[e.InputSlot] + align - 1) / align * align;
+ appended = TRUE;
+ }
+ end[e.InputSlot] = e.AlignedByteOffset + size;
+ out[i] = e;
+ }
+ if (appended) {
+ static LONG told;
+ if (!InterlockedExchange(&told, 1)) LOG("input layouts with appended elements are given explicit offsets");
+ }
+ return appended;
+}
+
+// A pipeline state stream is a run of subobjects, each a D3D12_PIPELINE_STATE_SUBOBJECT_TYPE followed by
+// its description at that description's alignment, the pair padded to pointer size. Only the input layout
+// is rewritten; a stream with a subobject type this table does not know is passed through untouched.
+static SIZE_T stream_inner_size(UINT type, SIZE_T *inner_align)
+{
+ static const struct { UINT size, align; } t[] = {
+ { 8, 8 }, // ROOT_SIGNATURE
+ { 16, 8 }, { 16, 8 }, { 16, 8 }, { 16, 8 }, { 16, 8 }, { 16, 8 }, // VS PS DS HS GS CS
+ { 32, 8 }, // STREAM_OUTPUT
+ { 328, 4 }, // BLEND
+ { 4, 4 }, // SAMPLE_MASK
+ { 44, 4 }, // RASTERIZER
+ { 52, 4 }, // DEPTH_STENCIL
+ { 16, 8 }, // INPUT_LAYOUT
+ { 4, 4 }, // IB_STRIP_CUT_VALUE
+ { 4, 4 }, // PRIMITIVE_TOPOLOGY
+ { 36, 4 }, // RENDER_TARGET_FORMATS
+ { 4, 4 }, // DEPTH_STENCIL_FORMAT
+ { 8, 4 }, // SAMPLE_DESC
+ { 4, 4 }, // NODE_MASK
+ { 16, 8 }, // CACHED_PSO
+ { 4, 4 }, // FLAGS
+ { 56, 4 }, // DEPTH_STENCIL1
+ { 24, 8 }, // VIEW_INSTANCING
+ { 0, 0 }, // 23 unused
+ { 16, 8 }, { 16, 8 }, // AS MS
+ { 60, 4 }, // DEPTH_STENCIL2
+ { 44, 4 }, // RASTERIZER1
+ { 40, 4 }, // RASTERIZER2
+ };
+ if (type >= sizeof t / sizeof *t || !t[type].size) return 0;
+ *inner_align = t[type].align;
+ return t[type].size;
+}
+static BOOL rewrite_stream(const D3D12_PIPELINE_STATE_STREAM_DESC *in, D3D12_PIPELINE_STATE_STREAM_DESC *out, void **copy, D3D12_INPUT_ELEMENT_DESC *elems)
+{
+ const UINT8 *s; SIZE_T o = 0, inner_at = 0;
+ if (keep_append_offsets || !in || !in->pPipelineStateSubobjectStream || !in->SizeInBytes) return FALSE;
+ s = in->pPipelineStateSubobjectStream;
+ while (o + sizeof(UINT) <= in->SizeInBytes) {
+ UINT type; SIZE_T align, size, at;
+ memcpy(&type, s + o, sizeof type);
+ if (!(size = stream_inner_size(type, &align))) return FALSE;
+ at = (o + sizeof(UINT) + align - 1) & ~(align - 1);
+ if (at + size > in->SizeInBytes) return FALSE;
+ if (type == D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT) inner_at = at;
+ o = (at + size + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
+ }
+ if (!inner_at) return FALSE;
+ {
+ D3D12_INPUT_LAYOUT_DESC layout; UINT8 *buf;
+ memcpy(&layout, s + inner_at, sizeof layout);
+ if (!resolve_append_offsets(&layout, elems) || !(buf = malloc(in->SizeInBytes))) return FALSE;
+ memcpy(buf, s, in->SizeInBytes);
+ layout.pInputElementDescs = elems;
+ memcpy(buf + inner_at, &layout, sizeof layout);
+ out->SizeInBytes = in->SizeInBytes; out->pPipelineStateSubobjectStream = buf; *copy = buf;
+ }
+ return TRUE;
+}
+
+// With HB_TSSHIM_DEBUG every graphics pipeline is logged under the number D3DMetal gives it (one counter
+// for graphics and compute pipelines, counted as they are created, so creation is serialised here while
+// debugging), which ties D3DMetal's "marking PSO(N) as no-op" errors to the shaders behind them.
+static CRITICAL_SECTION pso_lock; static unsigned pso_seq;
+static UINT64 bytecode_hash(D3D12_SHADER_BYTECODE b)
+{
+ UINT64 h = 0;
+ if (b.pShaderBytecode && b.BytecodeLength >= 32 && !memcmp(b.pShaderBytecode, "DXBC", 4)) memcpy(&h, (const UINT8 *)b.pShaderBytecode + 4, 8);
+ return h;
+}
+static HRESULT (STDMETHODCALLTYPE *real_CreateGraphicsPipelineState)(ID3D12Device *, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *, REFIID, void **);
+static HRESULT (STDMETHODCALLTYPE *real_CreateComputePipelineState)(ID3D12Device *, const D3D12_COMPUTE_PIPELINE_STATE_DESC *, REFIID, void **);
+static HRESULT STDMETHODCALLTYPE hook_CreateGraphicsPipelineState(ID3D12Device *dev, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *d, REFIID riid, void **out)
+{
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC copy; D3D12_INPUT_ELEMENT_DESC elems[D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT]; HRESULT hr; unsigned n;
+ if (d && resolve_append_offsets(&d->InputLayout, elems)) { copy = *d; copy.InputLayout.pInputElementDescs = elems; d = &copy; }
+ if (!dbg) return real_CreateGraphicsPipelineState(dev, d, riid, out);
+ EnterCriticalSection(&pso_lock);
+ hr = real_CreateGraphicsPipelineState(dev, d, riid, out);
+ n = pso_seq++;
+ LeaveCriticalSection(&pso_lock);
+ if (d) LOG("pipeline %u: vs %016llx ps %016llx ds %016llx hs %016llx gs %016llx, %u targets (format %u), %u samples, hr 0x%08lx", n,
+ (unsigned long long)bytecode_hash(d->VS), (unsigned long long)bytecode_hash(d->PS), (unsigned long long)bytecode_hash(d->DS),
+ (unsigned long long)bytecode_hash(d->HS), (unsigned long long)bytecode_hash(d->GS), d->NumRenderTargets, (unsigned)d->RTVFormats[0],
+ d->SampleDesc.Count, (unsigned long)hr);
+ return hr;
+}
+static HRESULT STDMETHODCALLTYPE hook_CreateComputePipelineState(ID3D12Device *dev, const D3D12_COMPUTE_PIPELINE_STATE_DESC *d, REFIID riid, void **out)
+{
+ HRESULT hr; unsigned n;
+ EnterCriticalSection(&pso_lock);
+ hr = real_CreateComputePipelineState(dev, d, riid, out);
+ n = pso_seq++;
+ LeaveCriticalSection(&pso_lock);
+ if (d) LOG("pipeline %u: cs %016llx, hr 0x%08lx", n, (unsigned long long)bytecode_hash(d->CS), (unsigned long)hr);
+ return hr;
+}
+static HRESULT (STDMETHODCALLTYPE *real_CreatePipelineState)(ID3D12Device2 *, const D3D12_PIPELINE_STATE_STREAM_DESC *, REFIID, void **);
+static HRESULT STDMETHODCALLTYPE hook_CreatePipelineState(ID3D12Device2 *dev, const D3D12_PIPELINE_STATE_STREAM_DESC *d, REFIID riid, void **out)
+{
+ D3D12_PIPELINE_STATE_STREAM_DESC copy; D3D12_INPUT_ELEMENT_DESC elems[D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT]; void *buf = NULL; HRESULT hr;
+ if (rewrite_stream(d, &copy, &buf, elems)) d = &copy;
+ hr = real_CreatePipelineState(dev, d, riid, out);
+ free(buf);
+ return hr;
+}
+// A pipeline library hands back a stored pipeline only for the description it was stored with, and the
+// stored one went to D3DMetal rewritten, so loads are rewritten the same way.
+static HRESULT (STDMETHODCALLTYPE *real_LoadGraphicsPipeline)(ID3D12PipelineLibrary *, LPCWSTR, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *, REFIID, void **);
+static HRESULT STDMETHODCALLTYPE hook_LoadGraphicsPipeline(ID3D12PipelineLibrary *lib, LPCWSTR name, const D3D12_GRAPHICS_PIPELINE_STATE_DESC *d, REFIID riid, void **out)
+{
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC copy; D3D12_INPUT_ELEMENT_DESC elems[D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT];
+ if (d && resolve_append_offsets(&d->InputLayout, elems)) { copy = *d; copy.InputLayout.pInputElementDescs = elems; d = &copy; }
+ return real_LoadGraphicsPipeline(lib, name, d, riid, out);
+}
+static HRESULT (STDMETHODCALLTYPE *real_LoadPipeline)(ID3D12PipelineLibrary1 *, LPCWSTR, const D3D12_PIPELINE_STATE_STREAM_DESC *, REFIID, void **);
+static HRESULT STDMETHODCALLTYPE hook_LoadPipeline(ID3D12PipelineLibrary1 *lib, LPCWSTR name, const D3D12_PIPELINE_STATE_STREAM_DESC *d, REFIID riid, void **out)
+{
+ D3D12_PIPELINE_STATE_STREAM_DESC copy; D3D12_INPUT_ELEMENT_DESC elems[D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT]; void *buf = NULL; HRESULT hr;
+ if (rewrite_stream(d, &copy, &buf, elems)) d = &copy;
+ hr = real_LoadPipeline(lib, name, d, riid, out);
+ free(buf);
+ return hr;
+}
+static HRESULT (STDMETHODCALLTYPE *real_CreatePipelineLibrary)(ID3D12Device1 *, const void *, SIZE_T, REFIID, void **);
+static HRESULT STDMETHODCALLTYPE hook_CreatePipelineLibrary(ID3D12Device1 *dev, const void *blob, SIZE_T len, REFIID riid, void **out)
+{
+ HRESULT hr = real_CreatePipelineLibrary(dev, blob, len, riid, out);
+ if (SUCCEEDED(hr) && out && *out) {
+ IUnknown *u = *out; ID3D12PipelineLibrary *lib = NULL; ID3D12PipelineLibrary1 *lib1 = NULL;
+ if (SUCCEEDED(u->lpVtbl->QueryInterface(u, &IID_ID3D12PipelineLibrary, (void **)&lib)) && lib) {
+ ID3D12PipelineLibraryVtbl *vt = (ID3D12PipelineLibraryVtbl *)lib->lpVtbl;
+ patch_slot((void **)&vt->LoadGraphicsPipeline, (void *)hook_LoadGraphicsPipeline, (void **)&real_LoadGraphicsPipeline);
+ lib->lpVtbl->Release(lib);
+ }
+ if (SUCCEEDED(u->lpVtbl->QueryInterface(u, &IID_ID3D12PipelineLibrary1, (void **)&lib1)) && lib1) {
+ ID3D12PipelineLibrary1Vtbl *vt = (ID3D12PipelineLibrary1Vtbl *)lib1->lpVtbl;
+ patch_slot((void **)&vt->LoadGraphicsPipeline, (void *)hook_LoadGraphicsPipeline, (void **)&real_LoadGraphicsPipeline);
+ patch_slot((void **)&vt->LoadPipeline, (void *)hook_LoadPipeline, (void **)&real_LoadPipeline);
+ lib1->lpVtbl->Release(lib1);
+ }
+ }
+ return hr;
+}
+// The two calls below exist only from ID3D12Device1 and ID3D12Device2 on, so they are patched only in
+// vtables reached through those interfaces.
+static void patch_device1_vtbl(void *iface)
+{
+ ID3D12Device1Vtbl *vt = *(ID3D12Device1Vtbl **)iface;
+ patch_slot((void **)&vt->CreatePipelineLibrary, (void *)hook_CreatePipelineLibrary, (void **)&real_CreatePipelineLibrary);
+}
+static void patch_device2_vtbl(void *iface)
+{
+ ID3D12Device2Vtbl *vt = *(ID3D12Device2Vtbl **)iface;
+ patch_slot((void **)&vt->CreatePipelineState, (void *)hook_CreatePipelineState, (void **)&real_CreatePipelineState);
+}
+
static void patch_device_vtbl(void *iface)
{
ID3D12DeviceVtbl *vt = *(ID3D12DeviceVtbl **)iface;
patch_slot((void **)&vt->CreateQueryHeap, (void *)hook_CreateQueryHeap, (void **)&real_CreateQueryHeap);
patch_slot((void **)&vt->CheckFeatureSupport, (void *)hook_CheckFeatureSupport, (void **)&real_CheckFeatureSupport);
+ patch_slot((void **)&vt->CreateGraphicsPipelineState, (void *)hook_CreateGraphicsPipelineState, (void **)&real_CreateGraphicsPipelineState);
+ if (dbg) patch_slot((void **)&vt->CreateComputePipelineState, (void *)hook_CreateComputePipelineState, (void **)&real_CreateComputePipelineState);
if (dbg) {
patch_slot((void **)&vt->CreateCommittedResource, (void *)hook_CreateCommittedResource, (void **)&real_CreateCommittedResource);
patch_slot((void **)&vt->CreatePlacedResource, (void *)hook_CreatePlacedResource, (void **)&real_CreatePlacedResource);
@@ -445,8 +663,15 @@ static void patch_device(ID3D12Device *dev)
#endif
};
static const D3D12_COMMAND_LIST_TYPE types[] = { D3D12_COMMAND_LIST_TYPE_DIRECT, D3D12_COMMAND_LIST_TYPE_COMPUTE, D3D12_COMMAND_LIST_TYPE_COPY };
- int t;
+ int t, i;
patch_all((IUnknown *)dev, dev_ids, sizeof dev_ids / sizeof *dev_ids, patch_device_vtbl);
+ for (i = 0; i < (int)(sizeof dev_ids / sizeof *dev_ids); i++) {
+ void *p = NULL;
+ if (FAILED(dev->lpVtbl->QueryInterface(dev, dev_ids[i], &p)) || !p) continue;
+ patch_device1_vtbl(p);
+ if (i >= 1) patch_device2_vtbl(p); // dev_ids[0] is ID3D12Device1, the rest are ID3D12Device2 and later
+ ((IUnknown *)p)->lpVtbl->Release((IUnknown *)p);
+ }
for (t = 0; t < 3; t++) {
ID3D12CommandAllocator *alloc = NULL; ID3D12GraphicsCommandList *list = NULL; ID3D12CommandQueue *queue = NULL;
D3D12_COMMAND_QUEUE_DESC qd = { types[t], 0, D3D12_COMMAND_QUEUE_FLAG_NONE, 0 };
@@ -530,11 +755,13 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
self = inst;
DisableThreadLibraryCalls(inst);
InitializeCriticalSection(&ring_lock);
+ InitializeCriticalSection(&pso_lock);
QueryPerformanceFrequency(&f); qpc_freq = (UINT64)f.QuadPart;
dbg = GetEnvironmentVariableA("HB_TSSHIM_DEBUG", NULL, 0) > 0;
{ char v[8]; idle = GetEnvironmentVariableA("HB_D3D12_TSSHIM", v, sizeof v) == 1 && v[0] == '0'; } // kill switch
{ char v[8]; pass_depth_resolve = GetEnvironmentVariableA("HB_TSSHIM_DEPTHRESOLVE", v, sizeof v) == 1 && v[0] == '1'; }
{ char v[8]; claim_atomic64 = GetEnvironmentVariableA("HB_TSSHIM_ATOMIC64", v, sizeof v) == 1 && v[0] == '1'; }
+ { char v[8]; keep_append_offsets = GetEnvironmentVariableA("HB_TSSHIM_APPEND_OFFSETS", v, sizeof v) == 1 && v[0] == '0'; }
if (!load_real()) return FALSE;
RESOLVE(D3D12CoreCreateLayeredDevice); RESOLVE(D3D12CoreGetLayeredDeviceSize); RESOLVE(D3D12CoreRegisterLayers);
RESOLVE(D3D12CreateRootSignatureDeserializer); RESOLVE(D3D12CreateVersionedRootSignatureDeserializer);