Repository navigation
Conversation
…ameInputCreate import The retail executable imports GameInputCreate from GameInput.dll by ordinal 1. The loader looks ordinal imports up as "#1", which the shim table did not have, so the import bound to the host's GameInput.dll. On Windows the installed GameInput answers; under Wine it is the builtin stub, the call fails and the title stops on its result. The alias maps #1 to the same GameInputCreate, and gameinput_test checks it.
Review: gameinput: serve GameInput.dll's ordinal 1 (#7216)Verdict: approve. This is a two-line fix that is correct and matches how the loader already names ordinal imports. One optional follow-up on the test is below. What changed
Why it is soundThe loader's key matches. In Forwarders also work. The ordinal-to-function mapping is already documented. The D3D12 → Vulkan notes say " The failure it describes is real. Without the alias, the lookup misses the shim. Nothing named Same function, so no ABI or state concerns. The alias points at Notes (none blocking)
Test results (Windows 11, CPython 3.13, no game files)
For reference, the command that runs it: Project rules
AI-assisted. |
|
Independent native Windows check at |
|
Linux/Wine confirmation from our local test setup, with raw logs kept private. Arch Linux, Wine 11.18, clang-cl 23.1.6 + xwin SDK 10.0.26100, RelWithDebInfo, SDL3 enabled; RX 7900 XT / RADV Mesa 26.2.3. Pinned base: main
The negative arm was run by me and the positive arms by a cooperating local tester, with two dedicated Wine prefixes using the same installed Wine. I reviewed the positive run records and matching executable/PDB hashes. Both runners disable networking, keep the original package read-only, and bound startup to 30 seconds. No extra local implementation patches are present in the positive checkpoint. The cooperating tester's Observed next failure: access violation in the device slot-26 forwarder, symbolized with the matching host PDB. Its correspondence to the struct-return ABI issue at boot-chain stop 7 is an inference; the existing device fixes are the next separate integration test. No game bytes, raw traces, addresses or dumps attached. AI-assisted. |
|
Tested
The PR's binding report identifies GameInput ordinal 1 as the additional shim binding. Both runs mapped five modules, exited 0 and had empty stderr. The native virtual-controller test also passed on each revision (341 checks on the parent, 342 on the PR). This verifies import selection with the actual executable. The dry-run does not invoke the game's entry point or exercise physical controller input. GPU/driver not exercised. AI-assisted verification. |
|
checked: #7216 | with: clang-cl cross build via xwin (ccache, ninja) + gameinput_test, SDL3 3.4.20 fetched with -DLEONIDA_SDL3_FETCH=ON (the box had no SDL3 installed) | on: wine-9.0 (Ubuntu 9.0~repack-4build3), PRETTY_NAME="Ubuntu 24.04.2 LTS", NAME="Ubuntu", main@867d922f0 + #7216 (fast-forward, no conflicts) | result: gameinput_test: 342 checks, 0 failures, including the new "gameinput.dll!#1 (the ordinal import) is the same function". Negative control: with runtime/shims/gameinput.cpp put back to main's, the run gives 342 checks, 1 failure, exactly that check. The diff (one SHIM_TABLE line plus one check) is consistent with docs/gameinput.md and the way the loader looks up ordinals as "#N". No defect found. NOT tested: that the retail executable really imports GameInputCreate by ordinal 1 (I did not read the game files), and the Wine builtin GameInput.dll failure described in the comment; I only checked that the registry now resolves "#1". agent: yes |
|
checked: #721608c1aa6 | with: clean merge onto main@867d922f0, |
gameinput: serve GameInput.dll's ordinal 1, the retail executable's GameInputCreate import Fork integration. AI-assisted (Codex).
|
checked: #7216cdfa520 | with: AI-assisted (Claude Code). |
|
checked: #7216cdfa520 | with: the head is already a merge of current What I ran and saw:
Not run / limits:
|
|
checked: Wine 11.20, Arch-based Linux, hybrid Intel Arrow Lake iGPU + NVIDIA RTX 5070 Laptop (proprietary driver, 32-wide subgroups, Plain
Same
AI-assisted (Claude Code). No game files, bytes or addresses here. |
|
Native Windows verification: the source lacked ordinal #1 despite a working SDL3 named factory. Added the exact alias and its registry test on my private rt5 integration; GameInput CTest passes on Windows 11 / MSVC 19.44 / SDL 3.4.20. The standalone probe with LEONIDA_KEYBOARD_PAD=always attaches the virtual pad and reports real mouse/right-stick and trigger/button changes. The actual title binding/control check is next; no physical gamepad is connected here. |
|
@steyn2003 thanks, a Wine 11.21 data point for the same comparison:
So on 11.21 the fourth allocation does not hit AI-assisted (Claude Code). No game files, bytes or addresses here. |
|
Follow-up to my comment above: the Same binary (
AI-assisted (Claude Code). Outcomes and counts only. |
…l 1, the retail executable's GameInputCreate import Squashed from ItsNotRexed#7216 by gkissel, head 5e45c7d (security scan PASS).
|
Tested Built with clang-cl 19 and xwin SDK 10.0.26100, RelWithDebInfo,
With this PR the log shows Without SDL3 (no shim built) the import stays unimplemented whether or not this PR is applied. Linux builds need AI-assisted (Claude Code, Claude Opus 5.5). |
|
Game-copy check of this head ( The premise holds on a second copy of the executable. Reading its import table directly (names and ordinals only, nothing quoted from the image): 68 imported DLLs, 563 imports by name, 24 by ordinal — and The change does what it says, on the retail executable, not just in the test. Exactly one import moves host → shim (63→64, 432→431); every other column is identical, and the other four mapped modules are untouched. That is the ordinal miss being closed, measured on the real image rather than a synthetic one. And the test: Why Windows never noticed, which the PR's description says and I can confirm locally: the host DLL is installed ( One thing you may want to fold in while you are here. At Not yours, just noise: the diff also carries an unrelated No game data is quoted: counts, names, one RVA and one image size, all of which |
|
checked: #7216b7c320b | with: AI-assisted (Claude Code). agent: yes |
|
Follow-up, the next stop under Wine with this PR stacked. Base:
Why this matters for this PR: before it, the ordinal import bound to the in-box AI-assisted (Claude Code, Claude Opus 5.5). |
|
checked: b7c320b on Windows 10 Home 22H2 (19045), RTX 2060 (driver 621.01), VS 2022 Build Tools, RelWithDebInfo, SDL3 3.4.20 (pinned tarball), own 1.0.2.1 copy, LEONIDA_D3D12=vulkan, network blocked for gta6rt.exe. Control: main 5d74c27 built the same way. A Windows 10 data point, where the host GameInput is the inbox GameInput.dll (0.2309) with no GameInput service installed:
No game data, traces stay local. AI-assisted (Claude Code). |
|
checked: #7216b7c320b | with: VS 18 BuildTools generator ( Tested Built
Exactly one import moves, host to shim: Two limits of this check: on current Outcomes and counts only; no game data, values or excerpts. AI-assisted. |
Reviewed head: b7c320b Review: ItsNotRexed#7216 (comment) Board: ItsNotRexed#8919 AI-assisted integration.
Claimed in the coordination issue as: #8504 (comment)
What and why
The retail 1.0.2.1 executable imports
GameInputCreatefromGameInput.dllby ordinal 1, not by name.Loader::resolvelooks an ordinal import up in the shim table asgameinput.dll!#1, which wasn't registered, so the import fell through to the host'sGameInput.dll:fixme:ginput:GameInputCreate ... stub!). The call fails and the title stops on the result with its ownint3, beforeD3D12XboxCreateDevice.The change adds
{"gameinput.dll", "#1", &GameInputCreate}to the existingSHIM_TABLE(built only with SDL3, as before), plus one check ingameinput_testthat#1is the same function.Why ordinal 1 is
GameInputCreate: Wine'sgameinput.spechas it as the first and only export, the executable's call passes a single out-pointer and checks the HRESULT (theGameInputCreate(IGameInput**)shape), and with the alias the title goes on past this point.Tested
Linux, Wine 11.21, clang-cl + xwin cross build,
-DLEONIDA_SDL3_FETCH=ON, GTX 1650 Mobile, own copy of the retail executable (outcomes only):gameinput_testunder Wine: 342 checks, 0 failures (the new check included), on this branch based onmain08c1aa634.gta6rt --runwith Loader: the mapped game executable owns module TLS index 0 (RT-259) #4313, xmem: serve the seven missing imports (physical pages, default allocators, XMemIsToolsMemAvailable); XMemVirtualAlloc takes 2 MiB pages and placeholders #6919, xgameruntime: serve XErrorReport (rebase of #5312) #6582 and runtime: console DirectStorage (DStorageGetFactory) with file-to-memory reads #4348 merged locally (needed to reach this point on Wine), with and without this change:int3afterGameInputCreate; Wine logs its stub being called.D3D12XboxCreateDevicecreates the Vulkan-backed device, and the run goes on to device slot 26 (stop 7 indocs/retail_boot_chain.md).scripts/check_no_game_data.py: exit 0.Related, not changed here
make_game.py's Linux cross build doesn't pass-DLEONIDA_SDL3_FETCH=ON, and xwin has no SDL3. So the GameInput shim is never built for Wine users, and they hit this stop even with the alias. Passing the option frommake_game.pywould download the pinned, hash-checked SDL3 at configure time. The README says nothing is downloaded unless asked, so I left that choice to you; I can add it (or a flag for it) in a follow-up.AI-assisted (Claude Code). No game files, bytes or addresses in this PR.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)