Commit Graph

7 Commits

Author SHA1 Message Date
c030bfd2ed xgameruntime: gifting UI completes its block, speech without used, MountWithUi and TitleId gaps (RT-OFFLINE-GDK-SHIM-GAPS)
Four offline GDK shim gaps from kevincommits' finding on #1608:

- XStoreShowGiftingUIAsync (store slot 82) is offline_failure_async<82, 5>
  like the other offline *Async slots, so a caller waiting on its block gets
  an answer. The block is the 5th argument (storeContextHandle, storeId,
  name, extendedJsonData, async), as in microsoft/XBOX-GDK-dotnet.
- XSpeechSynthesizerGetStreamData forwards a host stream
  (LEONIDA_LOCAL_SPEECH=1) also when `used` is null; it is _Out_opt_. The
  host provider is made once into a namespace-scope atomic instead of a
  block-scope static on a title thread (the Wine guard issue this file
  already avoids elsewhere). A test hook sets a fake host.
- XPackageMountWithUiAsync completes with E_ACCESSDENIED for the game's
  own package, as XPackageMount refuses it, instead of
  E_GAMEPACKAGE_NO_PACKAGE_IDENTIFIER. A block used again before its result
  was read closes the earlier mount's handle; if the new run does not
  start, the earlier mount keeps its place.
- XGameGetXboxTitleId skips a <TitleId> inside an XML comment, as
  package_locales already does (the comment stripping is now shared).

New checks in xgameruntime_test, xgameruntime_store_test and
xgameruntime_offline_test: 5 fail with main's logic, all pass with the fix.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:22:59 -06:00
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
b87abdef57 Merge mandy's main into port/d3d12-nvidia
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.

Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.

Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:50:37 -05:00
8e04987953 xgameruntime: XStore durables licenses complete, not valid
Port VIctory's xstore.rs (GPL-3.0-or-later) license_for_durables_async:
XStoreAcquireLicenseForDurablesAsync/Result (slots 71/72) now complete with
a license handle XStoreIsLicenseValid answers false for (the user owns no
durables), instead of failing before starting as a store-service call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 01:00:14 -05:00
1c69700851 store: offline *Async slots start and complete their XAsyncBlock with E_FAIL (M11)
The offline XStore table returned E_FAIL synchronously without ever starting the caller's XAsyncBlock, so a title that waits on the block (XAsyncGetStatus wait=true) or on its completion callback hung forever. Each *Async slot now locates its block by argument position and runs it through XAsyncRun, failing with E_FAIL; the Result partners keep returning E_FAIL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:38:18 -08:00
a365b5c85c xgameruntime_store: measure XStoreGameLicense's 104-byte layout from the retail executable (#6884)
Squash-merged after diff review of PR #6884 - xgameruntime_store: measure XStoreGameLicense's 104-byte layout from the retail executable
2026-11-23 09:35:34 -06:00
594f3485ee Runtime: offline XStoreImpl (the game license, package licenses, empty queries)
A GDK title checks its license at boot. QueryApiImpl now serves XStoreImpl
(IXStoreImpl..6, 84 slots from xgameruntime-docs' layout; signatures from
the public GDK reference): the game license is active and not a trial,
package licenses are acquirable and valid, no add-ons, no products, no
package updates; license-changed/lost registrations hand out tokens and
never fire. Purchases, consumables, tokens, downloads and store UIs fail
before starting (E_FAIL, logged once); the undocumented slots answer
E_NOTIMPL.

UNVERIFIED: STORE_SKU_ID_SIZE 18, SKU_ID_SIZE 5, TRIAL_UNIQUE_ID_MAX_SIZE
64 (XStoreGameLicense 104 bytes) - the public pages give no values; to be
confirmed against the executable before a boot relies on them.

xgameruntime_store_test: 22 checks. ctest 161/161.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:45:20 -05:00