Commit Graph

8 Commits

Author SHA1 Message Date
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
f8275ef4ba xgameruntime: XUserImpl slot 15 is the older XUserGetGamertag
VIctory's xuser.rs (GPL-3.0-or-later) serves the title's slot 0x78 as the
older gamertag getter, with the gamertag interface's arguments; Leonida
answered E_NOTIMPL there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 01:00:14 -05:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00
51d010100d xgameruntime notes: settle the assumptions the executable's thunk list answers (RT-5 follow-up) (#6865)
Squash-merged after diff review of PR #6865 - RT-5 follow-up: settle the xgameruntime assumptions the executable's thunk list answers
2026-11-23 09:35:55 -06:00
64b45d07ac Runtime: offline XDisplayImpl (HDR off, LEONIDA_HDR=1 on) and XUserDeviceImpl
XDisplayTryEnableHdrMode answers Disabled for the SDR host output, or Enabled
with the documented default tone-map luminances under LEONIDA_HDR=1. Every
device belongs to the offline user (XUserFindForDevice hands out a real
XUserHandle via xgameruntime_user.cpp); association and audio-endpoint
registrations hand out tokens; no audio endpoint of the user's own; finding a
controller shows no UI and gives an all-zero id, as on desktop.

ctest 163/163 (xgameruntime_offline twice: SDR and LEONIDA_HDR=1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:56:45 -05:00
b6213c91dc xgameruntime_user: review fixes (unregister, IsStoreUser, slot 15, handles)
From @CharlyRien's review of 056661d:
- XUserUnregisterForChangeEvent returns true for every token: false means
  "still pending", which never happens offline, so a title polling with
  wait = false spun on an unknown or repeated token.
- XUserIsStoreUser is true, also for a null handle (_In_opt_; documented
  as always true on console).
- Slot 15 (no public signature) answers E_NOTIMPL instead of S_OK with
  nothing written. XUserIsSignOutPresent (47) stays 0: it is read as a
  bool, and E_NOTIMPL's low byte would mean true.
- Handles are validated by lookup in a live set rather than by reading a
  magic in memory that may already be freed; a double close is a no-op.
- LEONIDA_GAMERTAG of any length reaches the "longer than 15" message
  (the length is queried first; 64+ characters fell back silently).

Tests: 42 checks; a new ctest run with a 70-character gamertag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:59:07 +01:00
056661d125 xgameruntime: serve XUserImpl (offline local user) through QueryApiImpl
A GDK title links the XUser* functions statically (xgameruntime.lib); each
thunk asks QueryApiImpl for XUserImpl and calls one slot with the function's
arguments after `this` (docs/runtime_imports.md). QueryApiImpl refused the
class, so XUserAddAsync, the call a title makes at boot before nearly
anything else, could not succeed.

runtime/shims/xgameruntime_user.cpp serves it, in its own file so the other
class PRs touching xgameruntime.cpp only meet it at one line:

- ids and slot order from xgameruntime-docs (facts only), signatures, enum
  values and E_GAMEUSER_* codes from the public GDK reference;
- IXUserImpl..IXUserImpl6 answer with one 50-slot vtable, IXUserGamertagImpl
  (XUserGetGamertag) with a second;
- one offline user, always signed in: XUserAddAsync (silent or not;
  AllowGuests with AddDefaultUserSilently is E_INVALIDARG), fixed ids,
  FindUserById/ByLocalId, Duplicate/Close/Compare, not a guest, adult, every
  privilege, ResolvePrivilegeWithUi, AddByIdWithUi, IsStoreUser, change-event
  tokens; gamertag from LEONIDA_GAMERTAG, "Player" otherwise;
- tokens, gamer picture, MSA tokens and resolve-issue fail synchronously
  before starting; no sign-out deferral; private and PC-only slots log once.

xgameruntime_user_test (40 checks) drives every served slot; a second ctest
run checks LEONIDA_GAMERTAG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:21:21 +01:00