GTA VI 1.0.2.1 Scarlett: Wine bring-up notes #293

Open
opened 2026-11-26 06:17:35 +00:00 by github-bot · 2 comments
Owner

@⁠gringoestrangeiro on GitHub · 2026-11-23 16:25 UTC · original

Bring-up notes for a GTA VI 1.0.2.1 Scarlett dump under Wine 11.11 (staging, Linux), with this repo's compat DLLs cross-compiled for x86_64-pc-windows-gnu and vkd3d-proton 3.1.0 providing D3D12. The GNU target is not officially supported (see #126), so treat timing and FMA-sensitive results with suspicion; the runtime path itself has been usable for bring-up. No game files, assets, or binaries are included.

Run state

With local, uncommitted patches for the two IIDs below, the run reaches:

  • The title opens its "Americas" window (1932x1092 clamped to 1920x1080) and enters the renderer.
  • D3D12XboxCreateDevice returns S_OK; the host vkd3d-proton device is wrapped (SM 6.8 reported).
  • CreateCommandQueueX succeeds for one DIRECT queue and four type-2 queues.
  • DStorageGetFactory returns a factory and the title opens its archives.
  • The first command list is created and the DXC DLLs load into the process.
  • The run then ends with Unhandled page fault on execute access ... at 0000000000000000, before any PSO creation or shader_xlat compile is logged. That is the next blocker.

On current main, both DStorageGetFactory and CreateCommandListX fail earlier with E_NOINTERFACE.

Host-side shims needed

These live outside the repo today; the current setup assumes the Microsoft GDK runtime and a PC iphlpapi are available.

  1. xgameruntime.dll — Wine has no GDK runtime, and compat_common::gdk patches a runtime that is already loaded rather than providing one. A minimal cdylib built against compat-common is enough:

    • InitializeApiImpl, InitializeApiImplEx, InitializeApiImplEx2, XGameRuntimeInitialize call compat_common::gdk::install() and return 0.
    • QueryApiImpl(clsid, iid, out) calls compat_common::gdk::query_api_impl(...).
    • UninitializeApiImpl, XGameRuntimeUninitialize, XErrorReport return 0.

    Once loaded, the GDK import hook routes GetProcAddress(xgameruntime!QueryApiImpl) to the emulated dispatcher; XAsync/XUser/XNetworking/XDisplay all resolve. A title that loads xgameruntime.dll by name cannot start on Wine without such a stub. Is a first-class compat crate for this wanted?

  2. IPHLPAPI.dll — the title imports GetNetworkConnectivityHint, which Wine 11.11's builtin does not export. A one-export DLL that fills NL_NETWORK_CONNECTIVITY_HINT (InternetAccess, fixed cost, no approaching/over/roaming flags) gets past the loader. Long term this probably belongs in a compat crate, not as a replacement DLL that hides every other iphlpapi export.

  3. GameInput.dll — Microsoft's GameInput.dll from the Microsoft.GameInput 4.1.314 NuGet package (GameInputRedist.dll renamed). The repo's gamepad hook then wraps the real GameInputCreate and RegisterDeviceCallback works; no code change needed.

  4. dxcompiler.dll + dxil.dll — tombox_xshader::dxc::available() requires both and looks in %TOMBOX_DXC_DIR%, the title executable's directory, then C:\Program Files (x86)\Windows Kits\10\bin\<newest>\x64. Wine has no Windows SDK install, so without them any SM 6.x translation is refused with:
    shader needs profile ...; FXC compiles only shader model 5 and dxcompiler.dll/dxil.dll are not available.
    Dropping the Windows SDK / Microsoft.Direct3D.DXC pair beside the title satisfies the check; both DLLs load and are import-patched by os_host. The latest run did not reach a shader compile, so translation is still untested.

1. CreateCommandListX rejects the Xbox base command-list IID

The title passes c3827890-4024-474c-98cf-645b51dc4874 to device slot 73. That GUID shares d2/d3/d4 with the Xbox list v5 IID already in cmdlist_x.rs:

Xbox base   c3827890-4024-474c-98cf-645b51dc4874
Xbox v5     55050859-4024-474c-98cf-645b51dc4874
PC base     5b160d0f-ac1b-4185-8ba8-b3ae42a5a455
PC v5       55050859-4024-474c-87f5-6472eaee44ea

device_wrap.rs::create_command_list_x only rewrites the DMA IID; every other IID is forwarded unchanged to PC CreateCommandList (slot 12), which does not know the Xbox GUID and returns E_NOINTERFACE.

Proposed fix:

  • Add IID_XBOX_GRAPHICS_COMMAND_LIST_BASE and map it to IID_PC_GRAPHICS_COMMAND_LIST when calling the real slot 12 (same shape as the existing DMA path).
  • Answer the Xbox base IID in cmdlist_x.rs::query_interface_x: translate to the PC base IID for the real QI, then return the existing shim, as the PC-list branch already does. Without this, a title QueryInterface(base) on the returned list still gets E_NOINTERFACE.
  • The doc comment above create_command_list_x describes the params struct as {NodeMask@0, _@4, Type@8, _@0xC}, but the code reads {Type@0, _@4, NodeMask@8, _@0xC}. The log shows type=0 (DIRECT) and nodeMask=1, so the code is right and the comment is stale.

With a local patch doing the create-side mapping, slot 73 returns S_OK and the shim is installed. I have not sent this as a PR because it needs the QI half and a title-side check beyond creation.

2. DStorageGetFactory rejects the title's IDStorageFactoryX IID

The title asks for 62959d11-d45f-4884-a0a3-f7862ea243ae. xcrdapi accepts only fb3b54ac-bf82-463a-b777-73195837864d (plus IUnknown), so DStorageGetFactory returns E_NOINTERFACE and no factory is handed out.

A second factory IID is the smallest fix:

  • Add IID_FACTORY_X_V2 in crates/compat/xcrdapi/src/abi.rs.
  • Accept it in factory_qi alongside IID_FACTORY_X.
  • Add a test next to the existing DStorageGetFactory(IID_FACTORY_X) test.

The local alias returns S_OK from DStorageGetFactory, after which the title calls SetStagingBufferSize/OpenFile. I am not claiming the alias is verified beyond that: it is not tested against a console oracle, and the rest of the DStorage path is unverified. If the project prefers, I can send this as a one-change PR with a pending note in exports.txt.

  • #54 covers the mesh-shader root signature (FSSM) for this title; a different part of the pipeline.
**@⁠gringoestrangeiro** on GitHub · 2026-11-23 16:25 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/293) Bring-up notes for a **GTA VI 1.0.2.1** Scarlett dump under Wine 11.11 (staging, Linux), with this repo's compat DLLs cross-compiled for `x86_64-pc-windows-gnu` and vkd3d-proton 3.1.0 providing D3D12. The GNU target is not officially supported (see #126), so treat timing and FMA-sensitive results with suspicion; the runtime path itself has been usable for bring-up. No game files, assets, or binaries are included. ## Run state With local, uncommitted patches for the two IIDs below, the run reaches: - The title opens its `"Americas"` window (1932x1092 clamped to 1920x1080) and enters the renderer. - `D3D12XboxCreateDevice` returns `S_OK`; the host vkd3d-proton device is wrapped (SM 6.8 reported). - `CreateCommandQueueX` succeeds for one DIRECT queue and four type-2 queues. - `DStorageGetFactory` returns a factory and the title opens its archives. - The first command list is created and the DXC DLLs load into the process. - The run then ends with `Unhandled page fault on execute access ... at 0000000000000000`, before any PSO creation or `shader_xlat` compile is logged. That is the next blocker. On current `main`, both `DStorageGetFactory` and `CreateCommandListX` fail earlier with `E_NOINTERFACE`. ## Host-side shims needed These live outside the repo today; the current setup assumes the Microsoft GDK runtime and a PC `iphlpapi` are available. 1. **`xgameruntime.dll`** — Wine has no GDK runtime, and `compat_common::gdk` patches a runtime that is already loaded rather than providing one. A minimal `cdylib` built against `compat-common` is enough: - `InitializeApiImpl`, `InitializeApiImplEx`, `InitializeApiImplEx2`, `XGameRuntimeInitialize` call `compat_common::gdk::install()` and return 0. - `QueryApiImpl(clsid, iid, out)` calls `compat_common::gdk::query_api_impl(...)`. - `UninitializeApiImpl`, `XGameRuntimeUninitialize`, `XErrorReport` return 0. Once loaded, the GDK import hook routes `GetProcAddress(xgameruntime!QueryApiImpl)` to the emulated dispatcher; XAsync/XUser/XNetworking/XDisplay all resolve. A title that loads `xgameruntime.dll` by name cannot start on Wine without such a stub. Is a first-class compat crate for this wanted? 2. **`IPHLPAPI.dll`** — the title imports `GetNetworkConnectivityHint`, which Wine 11.11's builtin does not export. A one-export DLL that fills `NL_NETWORK_CONNECTIVITY_HINT` (InternetAccess, fixed cost, no approaching/over/roaming flags) gets past the loader. Long term this probably belongs in a compat crate, not as a replacement DLL that hides every other `iphlpapi` export. 3. **`GameInput.dll`** — Microsoft's `GameInput.dll` from the `Microsoft.GameInput` 4.1.314 NuGet package (`GameInputRedist.dll` renamed). The repo's gamepad hook then wraps the real `GameInputCreate` and `RegisterDeviceCallback` works; no code change needed. 4. **`dxcompiler.dll` + `dxil.dll`** — `tombox_xshader::dxc::available()` requires both and looks in `%TOMBOX_DXC_DIR%`, the title executable's directory, then `C:\Program Files (x86)\Windows Kits\10\bin\<newest>\x64`. Wine has no Windows SDK install, so without them any SM 6.x translation is refused with: `shader needs profile ...; FXC compiles only shader model 5 and dxcompiler.dll/dxil.dll are not available`. Dropping the Windows SDK / `Microsoft.Direct3D.DXC` pair beside the title satisfies the check; both DLLs load and are import-patched by `os_host`. The latest run did not reach a shader compile, so translation is still untested. ## 1. `CreateCommandListX` rejects the Xbox base command-list IID The title passes `c3827890-4024-474c-98cf-645b51dc4874` to device slot 73. That GUID shares `d2/d3/d4` with the Xbox list v5 IID already in `cmdlist_x.rs`: ``` Xbox base c3827890-4024-474c-98cf-645b51dc4874 Xbox v5 55050859-4024-474c-98cf-645b51dc4874 PC base 5b160d0f-ac1b-4185-8ba8-b3ae42a5a455 PC v5 55050859-4024-474c-87f5-6472eaee44ea ``` `device_wrap.rs::create_command_list_x` only rewrites the DMA IID; every other IID is forwarded unchanged to PC `CreateCommandList` (slot 12), which does not know the Xbox GUID and returns `E_NOINTERFACE`. Proposed fix: - Add `IID_XBOX_GRAPHICS_COMMAND_LIST_BASE` and map it to `IID_PC_GRAPHICS_COMMAND_LIST` when calling the real slot 12 (same shape as the existing DMA path). - Answer the Xbox base IID in `cmdlist_x.rs::query_interface_x`: translate to the PC base IID for the real QI, then return the existing shim, as the PC-list branch already does. Without this, a title `QueryInterface(base)` on the returned list still gets `E_NOINTERFACE`. - The doc comment above `create_command_list_x` describes the params struct as `{NodeMask@0, _@4, Type@8, _@0xC}`, but the code reads `{Type@0, _@4, NodeMask@8, _@0xC}`. The log shows `type=0` (DIRECT) and `nodeMask=1`, so the code is right and the comment is stale. With a local patch doing the create-side mapping, slot 73 returns `S_OK` and the shim is installed. I have not sent this as a PR because it needs the QI half and a title-side check beyond creation. ## 2. `DStorageGetFactory` rejects the title's `IDStorageFactoryX` IID The title asks for `62959d11-d45f-4884-a0a3-f7862ea243ae`. `xcrdapi` accepts only `fb3b54ac-bf82-463a-b777-73195837864d` (plus `IUnknown`), so `DStorageGetFactory` returns `E_NOINTERFACE` and no factory is handed out. A second factory IID is the smallest fix: - Add `IID_FACTORY_X_V2` in `crates/compat/xcrdapi/src/abi.rs`. - Accept it in `factory_qi` alongside `IID_FACTORY_X`. - Add a test next to the existing `DStorageGetFactory(IID_FACTORY_X)` test. The local alias returns `S_OK` from `DStorageGetFactory`, after which the title calls `SetStagingBufferSize`/`OpenFile`. I am **not** claiming the alias is verified beyond that: it is not tested against a console oracle, and the rest of the DStorage path is unverified. If the project prefers, I can send this as a one-change PR with a `pending` note in `exports.txt`. ## Related - #54 covers the mesh-shader root signature (FSSM) for this title; a different part of the pipeline.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:17:35 +00:00
Author
Owner

@⁠gringoestrangeiro on GitHub · 2026-11-23 16:40 UTC · original

Update after more bring-up: the title now opens its "Americas" window and reaches its own crash report at System Init / Frame 0 (Version: 930.048.020-vb_sub_story, TitleID 7952987a, Wanted Level 0). It then faults in vkd3d-proton (d3d12core+0x3F4F7, write 0x4D0) because the console display/swapchain init still fails.

The loader/IID gaps found since the first report are in PR #296:

  • newer Xbox command-list IID c3827890-... mapped to PC v5
  • command-list shim table raised to 256 slots (the title calls slots 131/132)
  • newer IDStorageFactoryX IID 62959d11-... accepted by xcrdapi

The remaining blocker is the console display/swapchain path, not these IIDs.

**@⁠gringoestrangeiro** on GitHub · 2026-11-23 16:40 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/293#issuecomment-7107499154) Update after more bring-up: the title now opens its "Americas" window and reaches its own crash report at System Init / Frame 0 (`Version: 930.048.020-vb_sub_story`, TitleID `7952987a`, Wanted Level 0). It then faults in vkd3d-proton (`d3d12core+0x3F4F7`, write `0x4D0`) because the console display/swapchain init still fails. The loader/IID gaps found since the first report are in PR #296: - newer Xbox command-list IID `c3827890-...` mapped to PC v5 - command-list shim table raised to 256 slots (the title calls slots 131/132) - newer `IDStorageFactoryX` IID `62959d11-...` accepted by `xcrdapi` The remaining blocker is the console display/swapchain path, not these IIDs.
Author
Owner

@⁠NinosTech on GitHub · 2026-11-24 09:14 UTC · original

Wine comparison for the first story transition

A patched XCL run on GE-Proton11-1 and an RTX 5060 Ti gives a later comparison point for this Wine thread. Original setup accepted DualSense input, the intro rendered and the first story prestream began. At least six seconds of game audio continued after fade while 198 consecutive sampled frames had no visible story image. Limiting simultaneous large compute pipeline builds from two to one still left a host D3D12 failure. This is an XCL result. It does not establish a cause for the earlier TomBox swapchain issue.

Full test record and revisions.

**@⁠NinosTech** on GitHub · 2026-11-24 09:14 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/293#issuecomment-7127147686) **Wine comparison for the first story transition** A patched XCL run on GE-Proton11-1 and an RTX 5060 Ti gives a later comparison point for this Wine thread. Original setup accepted DualSense input, the intro rendered and the first story prestream began. At least six seconds of game audio continued after fade while 198 consecutive sampled frames had no visible story image. Limiting simultaneous large compute pipeline builds from two to one still left a host D3D12 failure. This is an XCL result. It does not establish a cause for the earlier TomBox swapchain issue. [Full test record and revisions](https://github.com/ivall/xcl/issues/42#issuecomment-7127023007).
This discussion has been locked. Commenting is limited to contributors.
No description provided.