XGameRuntime: one reading of the title id for both APIs and the start-up line #1851
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1851
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1851"
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?
@us3r40456 on GitHub · 2026-11-24 21:48 UTC · original
us3r40456:titleid-one-reading→main· +64 −5 · 2 files · 1 commits · draftXCL gives a title its title id through two XGameRuntime functions, and they read
title_idin two ways.XGameGetXboxTitleIdparses it as hex after stripping a lowercase0x, and gives 0 for anything else.XPackageEnumeratePackageshands over the raw text, upper-cased. So a malformed id reaches the title as 0 from one and as text from the other (XYZ123→ 0 and"XYZ123"). The start-up line also prints the manifest's value as if it were taken, and the warning says "no TitleId" when there is one it cannot read. This PR gives both functions and the start-up line one reading.What is in it
config::parse_title_id: hex, with or without0x/0X, spaces around it ignored. Empty, not hex (a+sign included), wider than 32 bits or 0 is no title id.Config::title_id_valueapplies it totitle_id.XGameGetXboxTitleIduses it. The warning stays "no TitleId …" when there is none, and names the value when there is one it cannot read (TitleId "XYZ123" (MicrosoftGame.Config / xcl.toml) is not a nonzero 32-bit hex title id → 0).XPackageEnumeratePackages'stitle_idis that number as 8 hex digits, or empty whereXGameGetXboxTitleIdgives 0.TitleId "XYZ123" (not a nonzero 32-bit hex title id: the title gets none).a_title_id_is_read_one_way: the parser on 12 inputs, the start-up line for a good and a bad id, and that xcl.toml's id wins over the manifest's.XSystemGetAppSpecificDeviceIdhash (api.rs:1265) still uses thetitle_idtext, so the id it gives a title does not change for anyone.Tested
main1d027e5:config::8 passed,hle::xgameruntime::73 passed, 0 failed.QueryApiImpl,XGameslot 3 andXPackageslot 39), with 13 variants (12 before the change) of itsMicrosoftGame.config<TitleId>and oftitle_idinxcl.toml. Each variant was run before the change, on the Mac test stack (main7f7e768+ #750 + #1329 + #1813 +pr/native-host-vtables, which takes the title to its end on a Mac), and after it, onmain1d027e5+ this PR. Three of them (XYZ123,0X1234ABCD,1234ABCD) were also run on plainmain1d027e5, with the same values as on the stack:<TitleId>/ xcl.tomlmain: slot 3 / slot 39""""1234ABCD,0x1234abcd, with spaces and line breaks0x1234abcd/"1234ABCD"0X1234ABCD"0X1234ABCD"0x1234abcd/"1234ABCD"XYZ123"XYZ123"""123456789"123456789"""""""00000000"00000000"""ABCD0x0000abcd/"ABCD"(read from the code, not run)0x0000abcd/"0000ABCD"CAFE0001(manifest1234ABCD)0xcafe0001/"CAFE0001"pasunid"PASUNID"""The title id changes nothing else in the test title: on the stack every variant ends with the same 47 PASS / 3 FAIL, and on plain
mainwith and without this PR every variant gets 31 PASS / 1 FAIL before plainmain's known D3DMetal crash (#258), which comes after the probe. The probe is not part of this PR.Regression run
This changes
crates/xcl/src, so it needsxcl-smokepairs. I have no title. A title with a valid hex<TitleId>gets the same values as before, except thatXPackageEnumeratePackagesnow always writes 8 digits (ABCD→0000ABCD). Draft until the pairs are here.main:
PR:
Not tested
XPackageDetails::titleId. I chose 8 digits, the way the console writes title ids. I have no title to check against.config::andhle::xgameruntime::.AI use
@DavidM1911 on GitHub · 2026-11-25 01:28 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.