feat(libSceNpTus): run the remaining multi-slot variable calls offline #8805
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8805"
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 boykopovar/AnyPS5. Originally posted by ags-arnab on 2026-10-21T01:29:49Z.
What
sceNpTusWaitAsyncand the 17 remaining multi-slot variable calls threwnot implemented. They now use the offline model of the existing*AAsynccalls: the arguments are checked, and a started request finishes withSCE_NP_ERROR_SIGNED_OUT(0x80550006), orABORTEDaftersceNpTusAbortRequest.sceNpTusGetMultiSlotVariableAsync,sceNpTusSetMultiSlotVariableAsyncandsceNpTusDeleteMultiSlotVariableAsync(NpId), theirVUserAsyncforms,sceNpTusGetMultiSlotVariableAVUserAsync,sceNpTusGetMultiSlotVariableForCrossSaveAsyncandsceNpTusGetMultiSlotVariableForCrossSaveVUserAsync.sceNpTusGetMultiSlotVariableA,...AVUser,...ForCrossSave,...ForCrossSaveVUser,sceNpTusSetMultiSlotVariableA,sceNpTusDeleteMultiSlotVariable,...Aand...VUserrun the async call and return its error, the wait error or the request result, as in shadPS4.sceNpTusWaitAsyncreports the result of a started request; an unknown id isINVALID_ID, a request that was never startedINVALID_ARGUMENT.Signatures and argument checks follow shadPS4 function by function, including where its functions differ from each other (recorded in the debt entry). fpPS4 and SharpProspero do not declare these calls. RPCS3's PS3 module differs for an empty array, a null target, an empty virtual user ID and a wait on a request that was never started; the debt entries record the differences. The virtual user ID is taken as
NpOnlineId, since shadPS4'sOrbisNpTusVirtualUserIdhas the layout ofOrbisNpOnlineIdand RPCS3 declaresSceNpTusVirtualUserIdasSceNpOnlineId; only its first byte is read. As in the*AAsynccalls, the array size is not checked and no output is written, because the variable layouts are not verified; the test checks that the output buffer stays untouched.The
sceNpTusPollAsyncdebt entry said "the four*Asynccalls" and now covers every implemented*Asynccall, the blocking calls andsceNpTusWaitAsync. It also records that an abort stays set for every later operation on the request, which the existing code already did and the blocking calls inherit; in shadPS4 an abort only ends the operation in progress.tools/progress.py --compare: +18 implemented functions, libSceNpTus only.tools/pr_overlap.py --branchlists only #6977, which addscore/libs/prx/libSceNpTus/Export.cppas a new file of throwing stubs from a base older than the library, and already conflicts withmain.Tested
guest_np_tuspasses on this branch and onmain. The host is Apple silicon and Rosetta has no AVX2, which the libraries require, so the test binary ran underqemu-x86_64 -cpu max(QEMU 10.2.1).libSceNpTus.prxbuilds and exports the same NIDs as onmain.-fsyntax-only -Wall -Wextrawithout warnings.python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-21T01:29:56Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T01:53:23Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceNpTus/Export.cppImported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-21T03:19:04Z.
I compared all 18 functions with shadPS4's
np_tus.cppat the cited commit (c1b2655) and found nothing to change. I checked:arrayLen < 1isINSUFFICIENT_ARGUMENTin the NpId and virtual-user delete calls and insceNpTusGetMultiSlotVariableVUserAsync; a null NpId is accepted except in delete);ResolveTusdoes;To avoid duplicate work: shadPS4 has the same kind of logic for 93 of the stubs this PR leaves. They are the data get/set calls, the data status calls (multi-slot, multi-user, friends), add-and-get, try-and-set, the friends and multi-user variable reads, the multi-slot data deletes and the Tss calls. I've started porting those onto this PR's helpers (
StartOffline,WaitOffline,Complete) on a branch stacked on this head, and I won't open it before this PR is merged. If you're already working on any of those families, tell me which and I'll leave them out.Imported from boykopovar/AnyPS5. Originally posted by pipe1os on 2026-10-21T06:27:07Z.
Built and ran this on Windows, since the PR says it wasn't.
Windows 11 Pro 26300, WinLibs GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ON.a7d5b6a89merged onto maina07e985c8fwithout conflicts.ctest --test-dir build -R '^guest_np_tus$'passes (0.28 s).core/libs/prx/libSceNpTus/Export.cppto main and keeping the new test, it fails with0xc0000409andsceNpTusWaitAsync not implemented, so the test covers the change.libSceNpTus.prxexports the same 136 NIDs as main's.I also checked the 18 functions against shadPS4 c1b2655: signatures, check order and error codes match. The only difference I found is the one already in the debt entry (no
variableArraySize/INVALID_ALIGNMENTcheck).Imported from boykopovar/AnyPS5. Originally posted by ags-arnab on 2026-10-21T10:26:58Z.
Thanks @nikowolf123 for checking all 18 against shadPS4. I am not working on any of those families, so go ahead and take all 93.
@pipe1os thanks for running it on Windows, that was the one part I could not test on my side. Good to know the test actually fails without the implementation.