runtime/README: AcpHal, chad, xapu and XCRDAPI have shims; DStorage decodes BCPack (DOC-RUNTIME-README-SHIMS) #1517
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1517"
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?
Imported from ubiquitarianism/leonida. Originally posted by Mike7581 on 2026-11-25T03:09:31Z.
Claimed in the coordination issue as: DOC-RUNTIME-README-SHIMS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7151462168)
What and why
runtime/README.mdhad two stale statements:LEONIDA_COMPAT_DIRsection said theAcpHal,chad,xapuandXCRDAPIconsole DLLs "have no shim here".shims/acphal.cpp,shims/chad.cpp,shims/xapu.cppandshims/dstorage.cpp(which servesxcrdapi.dll) exist now. The paragraph keeps the xbox-emulator crates as an example of drop-in DLLs, names the four shims, says a DLL in the folder replaces its module's shim, and marks the867d922measurement as taken before those shims.docs/directstorage.mdandshims/dstorage.cppdescribe the BCPack decoder insrc/bcpack.cpp(BC1/3/4/5/6H/7; BC2 isE_NOTIMPL), the optional macro-unshuffle and physical page numbers resolved throughxmem. The entry now says that.Docs only; no code changes.
Tested
python -I scripts/check_no_game_data.py runtime/README.md. Checked every statement against the currentmainsources anddocs/directstorage.md.GPUs tested: n/a
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)Imported from ubiquitarianism/leonida. Originally posted by ytsodacan on 2026-11-25T03:33:54Z.
[KEEP]
runtime/README.md(two paragraphs): names the now-existingacphal/chad/xapu/dstorageshims and updates the DirectStorage BCPack/swizzle/physical-page text; no duplicate PR found (#163 touches a different section).gh pr checks: none), so theno-game-datacheck and any doc-reading tests have not run.src/bcpack.cpp(BC2 returnsE_NOTIMPL) anddocs/directstorage.mdwere not re-verified here; a maintainer should confirm them against main before merging.Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-25T08:35:46Z.
Review: CHANGES_REQUESTED
Thanks for the docs update. I checked every claim against current
main(3f81d46). The BCPack, BC2E_NOTIMPL, swizzle andxmempage-list statements match the code, and the PR merges cleanly. One path is wrong, and one switch is worth a sentence. Line numbers refer to the PR head99c9874.Should-fix:
runtime/README.md:119names shim files the runtime no longer linksThe new paragraph points to
shims/chad.cppandshims/xapu.cpp. The runtime executable target linksshims/xapu_chad.cppfor both DLLs, and that file registers axapu.dlltable and achad.dlltable.runtime/CMakeLists.txtonmainsays so itself, in the comment abovexapu_test: the earliershims/xapu.cppandshims/chad.cppare no longer linked into the runtime, which serves both DLLs fromxapu_chad.cpp. Those two files are only built forxapu_testandchad_test.Suggested wording:
Nit:
runtime/README.md:280, mention the switch that turns the new paths offruntime/shims/dstorage.cpp:996returnsE_NOTIMPLfor BCPack, swizzle and physical-page requests whenLEONIDA_DSTORAGE_EXTENDED=0. Suggested sentence after the feature description:What was checked
Shim registrations on
main:acphal.cpp(AcpHal)xapu_chad.cpp(bothxapu.dllandchad.dll; it is the source the runtime target links)dstorage.cpp(xcrdapi.dll!DStorageGetFactory)src/bcpack.cpphandles BC1/3/4/5/6H/7 and BC2 is refused atdstorage.cpp:997. The macro-unshuffle and thexmempage-list path are indstorage.cpp.git merge-treewithmain: clean. Python tests run:test_bcpacktest_amd_swizzle*test_acphal_abitest_docs_env_varsAll pass.
Review done with AI assistance (Claude Code and GPT-6.2 Sol, cross-checked against each other). Every finding above was checked against the code.
Imported from ubiquitarianism/leonida. Originally posted by Mike7581 on 2026-11-25T17:38:22Z.
Thanks for checking every claim against
main. Both points are fixed:4ad6d3f: the shim list namesshims/xapu_chad.cppfor bothxapu.dllandchad.dll, matching what the runtime target links; added your sentence onLEONIDA_DSTORAGE_EXTENDED=0.1f8ccc6: sinceEnqueueRequestreturnsvoidandvalidate_requestruns on the queue worker, the text now says BC2 requests (and, withLEONIDA_DSTORAGE_EXTENDED=0, BCPack/swizzle/page-list requests) fail withE_NOTIMPLwhen processed, rather than "return" it.check_no_game_data.pyandtests/test_docs_env_vars.pypass.Imported from ubiquitarianism/leonida. Originally posted by nicoco23 on 2026-11-26T16:28:46Z.
Read through the diff (not built here). One line is out of date since #1144 merged (via #2350):
shims/xapu_chad.cppnow serves only chad.dll, and xapu.dll comes fromshims/xapu_queue.cpp— that is whatruntime/CMakeLists.txtlinks into gta6rt and what the cl.exe fallback list inscripts/build_runtime.ps1compiles. Suggest "(shims/acphal.cpp,shims/xapu_queue.cppforxapu.dll,shims/xapu_chad.cppforchad.dll, andshims/dstorage.cppforxcrdapi.dll)". The rest matches main as far as I can see. AI-assisted review (Claude Code).Imported from ubiquitarianism/leonida. Originally posted by Mike7581 on 2026-11-26T19:24:43Z.
@nicoco23 Thanks, you're right: since #2350,
xapu.dllcomes fromshims/xapu_queue.cppandxapu_chad.cppserves onlychad.dll. Fixed inc8fabf8with your wording (and the rest of the paragraph rewrapped).Written with AI assistance (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-27T05:05:24Z.
Review: APPROVED
Re-checked at
c8fabf8merged cleanly onto currentmain(d1dff7949).All earlier review items and the post-#2350 split are addressed accurately:
runtime/README.mdnow listsshims/acphal.cpp,shims/xapu_queue.cppforxapu.dll,shims/xapu_chad.cppforchad.dll, andshims/dstorage.cppforxcrdapi.dll— matching bothruntime/CMakeLists.txtandscripts/build_runtime.ps1.runtime/shims/dstorage.cpp(src/bcpack.cppBC1/3/4/5/6H/7, BC2 failing withE_NOTIMPL, optional macro-unshuffle andxmemphysical page lists on by default, andLEONIDA_DSTORAGE_EXTENDED=0failing those requests withE_NOTIMPLon queue processing).Verified locally:
git merge-treeagainstd1dff7949clean,scripts/check_no_game_data.pyexit 0, andtest_docs_links.py,test_docs_repo_paths.py,test_docs_table_ids.py,test_docs_env_vars.py,test_docs_cli_flags.py,test_docs_encoding.py, andtest_text_write_line_endings.pyall pass.AI-assisted review (Antigravity); every claim checked against
main.