feat(xgameruntime): implement XSystemGetConsoleId #12

Closed
github-bot wants to merge 1 commit from gh-pr/12/head into gh-pr/12/base
Owner

@⁠Callimann8 on GitHub · 2026-11-21 12:06 UTC · original
Callimann8:claude/project-thread-fz4yux → main · +42 −3 · 9 files · 1 commits · closed without merging

What

Implements XSystemGetConsoleId in xgameruntime with its GDK signature. It always returns 00000000.00000000.00000000.00000000.00, which the GDK documentation gives as the value on PC and in the retail sandbox. A buffer smaller than XSystemConsoleIdBytes (39) returns HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); consoleIdUsed is optional and receives 39 (terminator included). A null consoleId stops with AbxUnsupported. Adds an e2e_console_id scenario and a debt fragment for the parts not checked on a console.

Tested

Cross-built ab_xgameruntime.dll, fake_title.exe and the relinker with MinGW-w64 on Linux. The new e2e_console_id test was not run (no Windows host); CI's Windows job runs it. check_conventions.py and debt_fold.py --check pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • python tools/check_conventions.py passes (no comments in code, one declaration per export, Conventional Commit subjects)
  • Unimplemented paths stop (AbxNotImplemented / AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragment
  • Known gaps added, changed or removed through docs/dev/debt/changes/<branch>.md
  • Generic behaviour, not specific to one title
  • No game files, keys, notes or logs added to the repository
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • Source of behaviour: public documentation, https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetconsoleid ; XSystemConsoleIdBytes = 39 from the public microsoft/XBOX-GDK-dotnet interop constants
  • AI-assisted: yes
**@⁠Callimann8** on GitHub · 2026-11-21 12:06 UTC · [original](https://github.com/Dark3581/AnyBox/pull/12) `Callimann8:claude/project-thread-fz4yux` → `main` · +42 −3 · 9 files · 1 commits · closed without merging ### What Implements `XSystemGetConsoleId` in xgameruntime with its GDK signature. It always returns `00000000.00000000.00000000.00000000.00`, which the GDK documentation gives as the value on PC and in the retail sandbox. A buffer smaller than `XSystemConsoleIdBytes` (39) returns `HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)`; `consoleIdUsed` is optional and receives 39 (terminator included). A null `consoleId` stops with `AbxUnsupported`. Adds an `e2e_console_id` scenario and a debt fragment for the parts not checked on a console. ### Tested <!-- OS, title or test, what was checked. "Not tested" is a valid answer. --> Cross-built `ab_xgameruntime.dll`, `fake_title.exe` and the relinker with MinGW-w64 on Linux. The new `e2e_console_id` test was not run (no Windows host); CI's Windows job runs it. `check_conventions.py` and `debt_fold.py --check` pass. ### Checklist <!-- Rules behind each item: CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] `python tools/check_conventions.py` passes (no comments in code, one declaration per export, Conventional Commit subjects) - [x] Unimplemented paths stop (`AbxNotImplemented` / `AbxUnsupported`); silent stubs are listed under Silent stubs through a debt fragment - [x] Known gaps added, changed or removed through `docs/dev/debt/changes/<branch>.md` - [x] Generic behaviour, not specific to one title - [x] No game files, keys, notes or logs added to the repository - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] Source of behaviour: public documentation, https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetconsoleid ; `XSystemConsoleIdBytes` = 39 from the public microsoft/XBOX-GDK-dotnet interop constants - [x] AI-assisted: yes
Return the all-zero console ID that the GDK documentation gives for PC
and for the retail sandbox, with the documented insufficient-buffer
error below XSystemConsoleIdBytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YZ2PrB75JCkyJJYyvjZT6o
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:13:54 +00:00
github-bot closed this pull request 2026-11-26 19:13:54 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-21 12:07 UTC · original

Progress report (5327b75 → cc0491c)

📈 Libraries: 15.62% (+0.2232%, +1 implemented function)

✅ 1 implemented
Library Name
xgameruntime XSystemGetConsoleId

Changed libraries

Library Before After Change
xgameruntime 23/391 (5.88%) 24/391 (6.14%) +0.26%
**@⁠github-actions[bot]** on GitHub · 2026-11-21 12:07 UTC · [original](https://github.com/Dark3581/AnyBox/pull/12#issuecomment-7062342425) <!-- progress-report --> ### Progress report (5327b75 → cc0491c) 📈 **Libraries**: 15.62% (+0.2232%, +1 implemented function) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | xgameruntime | `XSystemGetConsoleId` | </details> #### Changed libraries | Library | Before | After | Change | | - | - | - | - | | xgameruntime | 23/391 (5.88%) | 24/391 (6.14%) | +0.26% |
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 12:30 UTC · original · approved these changes

Reviewed — looks good

Landed as it is. The branch conflicted with main after the XThread commit and #14, so I rebased it myself and committed it on main as c8b782d, with you as author.

What I ran

Head cc0491c, then the same change rebased on main (b9fdd5d, after #14). MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10, clean build directory for both.

Results

Check Result Note
MinGW full build passed no warnings, at the PR head and after the rebase
CTest passed 36/36 at the PR head, 40/40 after the rebase
e2e_console_id, repeated passed 30/30, which is also its first run on Windows outside CI
tools/check_conventions.py, tools/debt_fold.py --check passed 9 fragments apply cleanly after the rebase
CI passed Windows, relinker on Linux and macOS, conventions, progress

The rebase only merged the lists both sides append to (test scenarios, the stand-in DLL, Types.hpp) and dropped the Inventory.cpp and Exports.hpp stub lines that #14 had already removed. Your code is unchanged.

Findings

Blocking

None.

Non-blocking

None.

Not verified

Behaviour on a console, and the consoleIdUsed value after a short buffer, as recorded in debt.

Thanks, a tidy and well-sourced change.

**@⁠Dark3581** on GitHub · 2026-11-21 12:30 UTC · [original](https://github.com/Dark3581/AnyBox/pull/12#pullrequestreview-6005192141) · **approved these changes** # Reviewed — looks good Landed as it is. The branch conflicted with `main` after the XThread commit and #14, so I rebased it myself and committed it on `main` as `c8b782d`, with you as author. ## What I ran Head `cc0491c`, then the same change rebased on `main` (`b9fdd5d`, after #14). MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10, clean build directory for both. ## Results | Check | Result | Note | | - | - | - | | MinGW full build | passed | no warnings, at the PR head and after the rebase | | CTest | passed | 36/36 at the PR head, 40/40 after the rebase | | `e2e_console_id`, repeated | passed | 30/30, which is also its first run on Windows outside CI | | `tools/check_conventions.py`, `tools/debt_fold.py --check` | passed | 9 fragments apply cleanly after the rebase | | CI | passed | Windows, relinker on Linux and macOS, conventions, progress | The rebase only merged the lists both sides append to (test scenarios, the stand-in DLL, `Types.hpp`) and dropped the `Inventory.cpp` and `Exports.hpp` stub lines that #14 had already removed. Your code is unchanged. ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Behaviour on a console, and the `consoleIdUsed` value after a short buffer, as recorded in debt. Thanks, a tidy and well-sourced change.
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 12:30 UTC · original

Landed on main as c8b782d (rebased on #14, you as author). Closing, since the commit went in directly rather than through the merge button. Thanks again.

**@⁠Dark3581** on GitHub · 2026-11-21 12:30 UTC · [original](https://github.com/Dark3581/AnyBox/pull/12#issuecomment-7062618110) Landed on `main` as c8b782d (rebased on #14, you as author). Closing, since the commit went in directly rather than through the merge button. Thanks again.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.