runtime: add XSystem and XGame contracts #1168
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1175"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T02:30:09Z.
Change
Add the synthetic XSystem and XGame identity contracts to the XGameRuntime fixture.
XSystemGetConsoleIdreturns the fixed 38-character identity58325731.00000000.00000000.00000000.01; the required buffer is 39 bytes including theterminator. A short buffer returns
ERROR_INSUFFICIENT_BUFFER, a null pathE_POINTER,and the used-size output remains optional.
XSystemGetDeviceTypereturns the documented PC value0x01; the table gains animplemented_valuestate that recordsS_OK.XGameGetXboxTitleIdreturns the fixed synthetic TitleID0x58325731andE_POINTERfora null output. Repeated calls are stable.
and 5 stubs. XUser, XGameSave, PLS, XPackage and the async stubs are unchanged.
XSystemGetConsoleTypeandXGameGetXboxTitleIdExare not present in the public GDK listsconsulted; they are not invented.
Verification
cmake --build --preset dev --target xgameruntime_shim xgameruntime_shim_check xgameruntime_contracts_check xgameruntime_pls_xpackage_check xgameruntime_identity_check xgameruntime_preflight_exectest --preset dev --no-tests=error -R '^xgameruntime_' -Vconsole=58325731.00000000.00000000.00000000.01 device=pc title=0x58325731 stable=ok short=ERROR_INSUFFICIENT_BUFFER null=E_POINTER user-async=E_NOTIMPL calls=11 PASS.python -B tests/xgameruntime_table_check.pyexports=28 ... states=implemented_hr=17,implemented_value=1,implemented_void=5,stub=5 duplicate_control=detected PASS.docs_links_check.py:Self-test passed.,Checked 15 Markdown files and 256 links..git diff --check origin/main...HEAD: clean.Evidence and follow-up
runtime/xsystem-xgame, head4a1bccf, based onf05369ec(contains XCL-06).XSystemGetDeviceType,
XSystemDeviceType,
XGameGetXboxTitleId.
XSystemConsoleIdBytes = 39is the documented 38-character identity plus terminator;corroborated by public Microsoft interoperability constants.
ERROR_INSUFFICIENT_BUFFERwith used zero, nullconsole buffer
E_POINTER, null TitleID outputE_POINTER, and XUser/XPackage async callsremain
E_NOTIMPL.an absent-title
ERROR_NOT_FOUND.dumps, shader bytes, title paths or secrets.
Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:40:19Z.
Review: COMMENTED
Reviewed at commit
4a1bccf2f89d64ec2cfcb8687d7e294f26108481.src/xgameruntime_shim.cppcleanly extends the thunk table withimplemented_valueforXSystemGetDeviceTypeand implementsXSystemGetConsoleId(39-byteXSystemConsoleIdBytescheck,ERROR_INSUFFICIENT_BUFFER,E_POINTER) andXGameGetXboxTitleId(0x58325731,E_POINTER), whiletests/xgameruntime_identity_check.cppcovers stability, error paths, and theXUserAddAsyncstub control. Existing stub-expectation tests andtests/xgameruntime_table_check.pyare updated to match.python3 tests/docs_links_check.py(256 links across 15 Markdown files)python3 tests/bidi_controls_check.py(957 files)python3 tests/gpu_report_format_check.py(10 tests)python3 tests/xgameruntime_table_check.py(28 exports, 6 implemented classes, 5 stubs,duplicate_control=detected PASS)xgameruntime_*CTest runs (4 Windows CI checks currently pending).