Repository navigation
Runtime: offline xgameruntime shim, part 1 (XGameRuntime, XSystem, XTaskQueue, XAsync) - #257
Closed
IAmNotSiob wants to merge 0 commit into
Closed
IAmNotSiob wants to merge 0 commit into
IAmNotSiob wants to merge 0 commit into
Conversation
This was referenced Nov 21, 2026
ItsNotRexed
added a commit
that referenced
this pull request
Nov 21, 2026
IAmNotSiob
force-pushed
the
gdk-runtime
branch
from
November 21, 2026 22:41
416a77a to
36bc120
Compare
Contributor
Author
|
Closing note: this was merged as 36bc120 (merge commit 345465a). A follow-up commit for the C4996 getenv warning landed on the branch around the same time and conflicted with 83d0637, which fixed the same line with GetEnvironmentVariableA. I dropped it from the branch, so nothing here is left unmerged. Part 2 is #279. |
This was referenced Nov 21, 2026
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of the offline
xgameruntimeshim claimed in #156 (a.k.a. the big beautiful pull request).What and why
Every GDK title calls
XGameRuntimeInitializebefore anything else and builds its async work onXTaskQueue/XAsync. If those imports are unimplemented, the executable stops long before it reaches D3D12.runtime/README.mdlisted "thexgameruntimesurface" as not done. This adds the part a title needs first, ahead of the executable.runtime/shims/xgameruntime.cpp: anxgameruntime.dllshim table withXGameRuntimeInitialize/XGameRuntimeUninitialize, reference countedXSystemGetDeviceType→XboxScarlettAnaconda(Series X).LEONIDA_DEVICE_TYPE=<0..8>overrides itXSystemGetConsoleId→ a fixed 39-byte placeholder (XSystemConsoleIdBytes)XTaskQueue*/XAsync*functionsthird_party/xtaskqueue/: Microsoft's MIT-licensed XTaskQueue/XAsync from microsoft/libHttpClientSource/Task, copied unmodified atc5007fd(byte-identical, checked withcmp), with its licence and a README. Only the task queue is copied, no HTTP stack. Files rather than a submodule, sosubmodule update --recursivedoesn't pull libHttpClient's own submodules.runtime/shims/xtaskqueue/pch.h: stands in for libHttpClient'spch.h(which includes the whole HTTP stack) with the few macros and error codesSource/Taskuses.runtime/test/xgameruntime_test.cpp(CTestxgameruntime): resolves every function throughrt::shims::find, like the loader binds imports, and runs a title-style boot. The steps are init, device and console queries, a queue with thread-pool work and completions dispatched by hand from the "game loop" thread, the process queue, a customXAsyncBeginprovider throughXAsyncSchedule/XAsyncComplete/XAsyncGetResult, and balanced uninitialize.docs/related_projects.mdentry (MIT, code use under a compatible licence), README Credits,runtime/README.mdcurrent limits.Nothing goes online. No game data.
Tested
Not built with MSVC yet. I don't have Visual Studio here, so the Windows CI job is the first MSVC build. Cross-built with MinGW-w64 GCC 13 and run under Wine 9.0:
xgameruntime_testpasses all 21 checks, repeated runs with no failures, and our files are warning-free at-Wall -Wextra.Open points
xgameruntime.dllis the PC GDK's. Until the console executable's import table is seen, it's an assumption. A different name means registering the same functions under it.XSystemDeviceTypevalues andXSystemConsoleIdBytes(39) come from Microsoft's public GDK documentation. Verify once the executable exists.XUser(one silent local offline user),XGameSave(a local folder),XPackage(the game folder).Checklist
docs/related_projects.md.