runtime: xapu.dll as a command queue with the console's layouts (RT-XAPU-CONNECT-LAYOUTS) #1144
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1144
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1144"
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?
@nicoco23 on GitHub · 2026-11-24 19:10 UTC · original
nicoco23:xapu-connect-layouts→main· +610 −160 · 6 files · 4 commits · merged 2026-11-26 14:41 UTCClaimed in the coordination issue as: RT-XAPU-CONNECT-LAYOUTS
xapu.dll moves out of xapu_chad.cpp into xapu.cpp and becomes a command queue with the console's layouts: the XApuConnect input and output, 24-byte command ids, 0x50-byte results, the 0x8AC81000+ error codes, and the frame count of an Opus packet's TOC byte (RFC 6716 section 3.1). The audio stays silent, nothing is decoded. chad.dll is unchanged.
This replaces the xapu half of #277 (piyonchu's draft, which needs a rebase); the chad half stays as it is. Credit to piyonchu for the original shim.
The layouts are facts from Marvisak/VIctory (GPL-3.0-or-later, crates/victory-hle/src/modules/apu.rs at ffe310e), no code is copied. See docs/related_projects.md.
Tested: xapu_chad_test via ctest on Windows 11, 100% success. No game files, no GPU.
AI-assisted: yes (Claude Code).
@abnalstlll-byte on GitHub · 2026-11-24 19:13 UTC · original · approved these changes
Reviewed and verified. Cleanly splits
xapu.dllinto dedicatedruntime/shims/xapu.cppimplementing command queue structures matching console layouts (XApuConnectinput/output shapes, 24-byte command IDs, 0x50-byte results, and RFC 6716 Opus TOC frame counts). Audio remains cleanly silent without game data. Verified viaxapu_chad_test(100% PASS). 100% clean-room compliant.@madhyn on GitHub · 2026-11-24 19:31 UTC · original
Tested
370e52b8con Arch Linux + Wine 11.22 (clang-cl + xwin cross-build):ctest --test-dir runtime/build/win -R "xapu" --output-on-failure:xapu_chadPassed (5.35 s)AI-assisted: yes
@Deedlyy on GitHub · 2026-11-24 20:13 UTC · original
Recommendation: [MERGE]
Reasoning: Moves
xapu.dllout ofxapu_chad.cppinto its own shim modelled as a command queue with the console's layouts (XApuConnect I/O, command ids, result size, error codes, Opus TOC frame count). Audio stays silent. The layouts are credited to a GPL-3.0-or-later project, which is compatible with this repo's GPL-3.0 licence. A moderate refactor (+608/-159) with an extended test, verified on Wine (xapu_chadpasses). Once merged, the xapu half of #277 should be dropped. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict withmain. Merge once the queued checks are green.Impact level: 5/10
@espaciointoficial-sys on GitHub · 2026-11-24 21:22 UTC · original · reviewed
Read through the diff (not built or run here).
shims/xapu.cppis added to CMake'sadd_executable(gta6rt ...)but not to the cl.exe fallback list inscripts/build_runtime.ps1(line 89, next to"shims\xapu_chad.cpp"). The fallback build would lose all fivexapu.dllexports, andtests/test_build_runtime_fallback.py(test_the_launcher_compiles_every_source_cmake_gives_gta6rt) should flagshims\xapu.cppas missing.opus_packet_frames()matches RFC 6716 §3.1.kMaxStreams = 500andkMaxCommandsPerStream = 16come from? If the title asks for more,XApuConnectnow fails withE_INVALIDARGwhere the old shim succeeded.xapu_chad.cppleaves open…" sentence are out of date.The failing
labelcheck is the repository's needs-rebase labeler (#1250), not this PR. AI-assisted review (Claude Code).@nicoco23 on GitHub · 2026-11-24 21:30 UTC · original
Thanks, both points are fair.
Fixed in
19559fec6: shims\xapu.cpp is now in the cl.exe fallback list in scripts/build_runtime.ps1 (before xapu_chad.cpp). test_the_launcher_compiles_every_source_cmake_gives_gta6rt failed on it before and python -I tests/test_build_runtime_fallback.py now passes. I ran that test, not the cl.exe fallback build itself.On kMaxStreams = 500 and kMaxCommandsPerStream = 16: they are the validation bounds of VIctory's apu.rs (ffe310e), which runs the retail executable through these calls, so the title stays inside them there. I have not measured the retail call site for them myself, and the previous shim accepted any values. If a run shows the title asking for more, these two constants are the only thing to raise.
Noted on the order: once this merges, the registry comment in #1206 and the "xapu_chad.cpp leaves open" sentence in #1078 need a one-line update. I will do both right after.
@BubsMcgee on GitHub · 2026-11-25 19:16 UTC · original
@nicoco23 FYI: #2044 (RT-XAPU-OPUS-DECODE) is now stacked on this branch and only adds
runtime/opus_decoderplus the decode insidefill_silence()/fill(); no layout or queue changes. I mergedmaininto the stack because this head predates the slot-133kernel_writesfix (title_page_watch.h:662) and the retail boot crashed early on the old base; with the merge the boot runs 121 s, sessiond, no faults, and decodes 256 streams. If you would rather fold the decoder into this PR, the crate +fillpatch is ready to hand over.@aslan2142 on GitHub · 2026-11-26 14:42 UTC · original
Thank you, @nicoco23. Your xapu command queue went into
mainthrough #2350 (RT-LINUX-AMD-WORLD), as part of #2044, which was built on your head6ee7ef89b. Your commits and authorship are kept. GitHub shows this PR as merged for that reason, so nothing needs closing.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)