HLE: the retail console ID has the documented dotted form #1716

Open
davutsimsekk wants to merge 1 commit from upstream-pr/1717 into main
davutsimsekk commented 2026-11-24 21:14:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by davutsimsekk on 2026-11-24T21:14:05Z.


XSystemGetConsoleId reported 00000000000000000000000000000000000001, but the GDK documents the retail value as 00000000.00000000.00000000.00000000.00: "In RETAIL, this function will always return" that dotted value. The HLE reports SANDBOX = "RETAIL", so the undotted string was both the wrong value and the wrong format for a title that parses the documented groups.

The length is unchanged (38 characters, 39 bytes with the NUL), so only the constant changes. A test checks the exact bytes and that a 38-byte buffer still fails with E_NOT_SUFFICIENT_BUFFER.

Reference: https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetconsoleid

Test

the_console_id_is_the_documented_retail_value in xsystem::tests.

  • cargo test -p victory-hle --lib: 95 passed, 0 failed
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean
  • rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs: clean
  • The title was not run.
<!-- greyfinch-sync:Marvisak/VIctory:issue:5480442637 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1717). Originally posted by [davutsimsekk](https://github.com/davutsimsekk) on 2026-11-24T21:14:05Z. --- `XSystemGetConsoleId` reported `00000000000000000000000000000000000001`, but the GDK documents the retail value as `00000000.00000000.00000000.00000000.00`: "In RETAIL, this function will always return" that dotted value. The HLE reports `SANDBOX = "RETAIL"`, so the undotted string was both the wrong value and the wrong format for a title that parses the documented groups. The length is unchanged (38 characters, 39 bytes with the NUL), so only the constant changes. A test checks the exact bytes and that a 38-byte buffer still fails with `E_NOT_SUFFICIENT_BUFFER`. Reference: https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetconsoleid ## Test `the_console_id_is_the_documented_retail_value` in `xsystem::tests`. - `cargo test -p victory-hle --lib`: 95 passed, 0 failed - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings`: clean - `rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs`: clean - The title was not run.
DenRakEiw commented 2026-11-24 21:26:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T21:26:30Z.

Review: APPROVED


Verified locally merged onto origin/main (Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-hle --lib xsystem:: — 5 passed, 0 failed (including the_console_id_is_the_documented_retail_value)
  • cargo clippy -p victory-hle --all-targets — 0 warnings
  • cargo xtask policy — ok

Clean fix formatting the retail console ID in the documented dotted form with unit test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6047683804 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1717#pullrequestreview-6047683804). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T21:26:30Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-hle --lib xsystem::` — 5 passed, 0 failed (including `the_console_id_is_the_documented_retail_value`) - `cargo clippy -p victory-hle --all-targets` — 0 warnings - `cargo xtask policy` — ok Clean fix formatting the retail console ID in the documented dotted form with unit test coverage. Looks good. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-24 22:20:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T22:20:06Z.

Review: COMMENTED


Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.

Retail console ID has the documented dotted form in XSystem (xsystem.rs, 1.8K). One-line-class fix matching the documented XSystem format.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048313980 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1717#pullrequestreview-6048313980). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T22:20:06Z. **Review:** COMMENTED --- Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff. Retail console ID has the documented dotted form in XSystem (xsystem.rs, 1.8K). One-line-class fix matching the documented XSystem format.
kais7654 commented 2026-11-24 23:05:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kais7654 on 2026-11-24T22:38:10Z.


Reviewed and verified: the dotted form keeps the documented 39 bytes
with the NUL (the new test checks size, content, and the short-buffer
refusal), and nothing else in the tree depended on the old string. Test
passes on Windows.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146465869 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1717#issuecomment-7146465869). Originally posted by [kais7654](https://github.com/kais7654) on 2026-11-24T22:38:10Z. --- Reviewed and verified: the dotted form keeps the documented 39 bytes with the NUL (the new test checks size, content, and the short-buffer refusal), and nothing else in the tree depended on the old string. Test passes on Windows.
Marvisak commented 2026-11-25 04:06:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T03:35:38Z.


Automated triage for the maintainers.

Merge candidate. The new head 7b5e855 makes the one change the previous review asked for. The assertion message in the_console_id_is_the_documented_retail_value (crates/victory-hle/src/modules/xsystem.rs) now reads "the console ID is 39 bytes, NUL included", so the diff no longer carries an identifier from the SDK's headers.

The rest is unchanged. CONSOLE_ID becomes the publicly documented retail value 00000000.00000000.00000000.00000000.00, with the same 38 characters and 39 bytes with the NUL. The test checks the exact bytes, the reported size, and that a 38-byte buffer still gets E_NOT_SUFFICIENT_BUFFER. The practical effect is small, since main notes that the titles seen don't call this slot.

CI: passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152058923 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1717#issuecomment-7152058923). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T03:35:38Z. --- <!-- victory-triage v1 head=7b5e85512bc61ff2c5730a3bc97664be900b0e3b verdict=merge-candidate at=2026-11-25T20:22:45Z --> Automated triage for the maintainers. **Merge candidate.** The new head `7b5e855` makes the one change the previous review asked for. The assertion message in `the_console_id_is_the_documented_retail_value` (`crates/victory-hle/src/modules/xsystem.rs`) now reads "the console ID is 39 bytes, NUL included", so the diff no longer carries an identifier from the SDK's headers. The rest is unchanged. `CONSOLE_ID` becomes the publicly documented retail value `00000000.00000000.00000000.00000000.00`, with the same 38 characters and 39 bytes with the NUL. The test checks the exact bytes, the reported size, and that a 38-byte buffer still gets `E_NOT_SUFFICIENT_BUFFER`. The practical effect is small, since `main` notes that the titles seen don't call this slot. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
fuzeofficlal commented 2026-11-26 19:29:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T19:29:51Z.

Review: APPROVED


Verified locally merged onto origin/main (63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test --locked -p victory-hle --lib modules::xsystem:: — 5 passed, 0 failed (including the_console_id_is_the_documented_retail_value)
  • cargo clippy --locked -p victory-hle --all-targets -- -D warnings (default and --all-features) — 0 warnings
  • rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs — clean
  • cargo xtask policy — ok (191 files ok)

Review notes

  • Verified against Microsoft GDK XSystemGetConsoleId / XSystemConsoleIdBytes (39 bytes): "00000000.00000000.00000000.00000000.00" is 38 ASCII characters plus NUL (39 bytes), and the new test confirms S_OK + used == 39 at 39 bytes and E_NOT_SUFFICIENT_BUFFER at 38 bytes.
<!-- greyfinch-sync:Marvisak/VIctory:review:6079553404 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1717#pullrequestreview-6079553404). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T19:29:51Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`63bcca43`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test --locked -p victory-hle --lib modules::xsystem::` — **5 passed, 0 failed** (including `the_console_id_is_the_documented_retail_value`) - `cargo clippy --locked -p victory-hle --all-targets -- -D warnings` (default and `--all-features`) — 0 warnings - `rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs` — clean - `cargo xtask policy` — ok (`191 files ok`) ### Review notes - Verified against Microsoft GDK `XSystemGetConsoleId` / `XSystemConsoleIdBytes` (39 bytes): `"00000000.00000000.00000000.00000000.00"` is 38 ASCII characters plus NUL (39 bytes), and the new test confirms `S_OK` + `used == 39` at 39 bytes and `E_NOT_SUFFICIENT_BUFFER` at 38 bytes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1717:upstream-pr/1717'
git switch 'upstream-pr/1717'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1717'
git switch 'upstream-pr/1717'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1717'
git switch 'upstream-pr/1717'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1717'
git switch 'main'
git merge --squash 'upstream-pr/1717'
git switch 'main'
git merge --ff-only 'upstream-pr/1717'
git switch 'main'
git merge 'upstream-pr/1717'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1716
No description provided.