libScePad: replace NotImplemented stubs and fix return-0 consistency #5038
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5038"
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 coptergui-ops on 2026-10-13T09:08:33Z.
Replace all remaining NotImplemented_nid_no_patch stubs in libScePad with proper return values, and fix two functions returning bare 0 instead of PAD_OK.
Changes to core/libs/prx/libScePad/Export.cpp
17 NotImplemented stubs replaced with proper error codes:
Consistency fix:
Changes to docs/dev/debt/libScePad.md
Each function's new behaviour documented with PPSA references. "Other port types throw" changed to "all port types return DEVICE_NOT_CONNECTED". Added entries for each previously-thrown function.
State
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T09:10:48Z.
Progress report (
2a2a3dc→3dadad7)📈 System libraries: 88.85% (+0.47%, +17 implemented functions)
✅ 17 implemented
scePadGetFeatureReportscePadOpenExtscePadOutputReportscePadReadExtscePadSetAngularVelocityBiasCorrectionStatescePadSetFeatureReportscePadUnknown_n3kSX62fgNoscePadVrControllerGetDeviceInformationscePadVrControllerGetTriggerEffectStatescePadVrControllerGetTriggerEffectStatesscePadVrControllerReadscePadVrControllerReadCombinedStatescePadVrControllerReadStatescePadVrControllerSetTriggerEffectscePadVrControllerSetTriggerEffectsscePadVrControllerSetVibrationscePadVrControllerSetVibrationMode⚪ 15 behaviourally empty (constant return or throw)
scePadGetFeatureReportscePadOutputReportscePadReadExtscePadSetFeatureReportscePadUnknown_n3kSX62fgNoscePadVrControllerGetDeviceInformationscePadVrControllerGetTriggerEffectStatescePadVrControllerGetTriggerEffectStatesscePadVrControllerReadscePadVrControllerReadCombinedStatescePadVrControllerReadStatescePadVrControllerSetTriggerEffectscePadVrControllerSetTriggerEffectsscePadVrControllerSetVibrationscePadVrControllerSetVibrationModeImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T09:11:08Z.
Review: CHANGES_REQUESTED
Thanks for the PR. Not mergeable as is, these need fixing:
core/libs/prx/libScePad/Export.cppcomments anddocs/dev/debt/libScePad.md. Implement the general behaviour; cite titles only where the check allows it.DEVICE_NOT_CONNECTED" (Export.cpp:171, 176, 181, 186, 281-309, 334) has no source. For exports whose signature is unknown (scePadReadExt,scePadGetFeatureReport,scePadSetFeatureReport,scePadOutputReport,scePadVrController*), a plausible return value wheremainthrows hides the gap. Keep throwing unless you cite a reference (KytyPS5, shadPS4, prosper, SharpProspero) or a measurement.scePadSetAngularVelocityBiasCorrectionState(enabled=true)(Export.cpp:321-324) changes from throw to a silent no-op although bias correction isn't modelled. Mode/state writes must throw for what isn't modelled.scePadOpenExt(Export.cpp:163-167): the comment says "console behaviour" without a source; same forscePadUnknown_n3kSX62fgNo"returns 0 as the console does".docs/dev/debt/libScePad.md:6linkshttps://github.com/boykopovar/AnyPS5/discussions/25971, which returns 404, and claims a measurement on firmware 13.60. Remove it or give the real source.### What,### Tested,### Checklist).Feel free to push the fixes to this PR.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T00:10:17Z.
There is now a console measurement for
n3kSX62fgNo(firmware 13.60, https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6148413415): it returns0x80920005beforescePadInitand0x809200FFafter, in every case tried, never 0. Please use those values (with a guest test) instead of 0, or drop this function from the PR.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T07:51:27Z.
Tested on head
3dadad70c(the current head of this pull request on GitHub, same SHA).Title evidence for
scePadUnknown_n3kSX62fgNoreturning 0: PPSA13356 (Raiden III) stops on it, and with this pull request merged it gets past it.maine46c69505, 126core/libs/libs/*.prxandrelinker.exebuilt from that tree (relinker.exe2026-10-14 07:21:30, 128.prxfiles),app.exerelinked 07:42:01 withrelink_title.ps1 -Id PPSA13356 -ModuleDir @() -Repo <that tree>(relinker.exe --windows --registry). The run (PPSA13356_rH/run_085314.err, 35 lines) ends at line 4:what(): scePadUnknown_n3kSX62fgNo not implemented. The same stop appeared in an earlier run onmainf919033ac(PPSA13356_rB/run_070149.err, 35 lines, line 4).9afcf7dfb=maincd936f637+3dadad70c. The run (PPSA13356_rU/run_081948.err, 305 lines) contains noscePadUnknownline (0 of 305). It stops later, at line 8:what(): sceVideoOutSetFlipRate: VIDEO_OUT_ERROR_INVALID_VALUE(the title callssceVideoOutSetFlipRate(handle, 60); that stop is not related to this pull request). A second tree,main1e7272196+3dadad70c(merge6a4d76b8e), gives the same result: noscePadUnknownline in 353 lines, the title passesSetFlipRatewith an unrelated change applied and stops at line 29 onNGS2: invalid voice handle(PPSA13356_rV/run_083704.err).Test conditions
ninja -C build -j4 relinkerplus all 126core/libs/libs/*.prxof the merged tree (rU: finished 08:19:42 local time,libSceAgcDriver.prx08:19:34,libkernel.prx08:19:42;rV: finished 08:36:53,libSceAgcDriver.prx08:36:23,libkernel.prx08:36:52);relinker.exe2026-10-14 07:35:29. Relink:relink_title_trace.ps1 -Id PPSA13356 -Repo <tree>=relinker.exe --windows --registry --trace-imports in\eboot.elf app.exe, no-ModuleDir. Run:run_title.ps1 -Seconds 90.rH,rB) were made by another session on the same machine; their relink command and library build are recorded in that session's log, not rechecked by me beyond the file dates above.Limits
return 0shows that returning 0 is enough for the title to go on, not that it is the console's behaviour.main:git merge-treeof3dadad70cagainstmaina3aeaf884reports a content conflict indocs/dev/debt/libScePad.md(the merges above were made on the earliermainSHAs listed).AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-14T10:05:51Z.
Addendum to my Windows test above: this pull request now conflicts with #5676, which changes the same function (
scePadUnknown_n3kSX62fgNo) and returns statuses measured on a PS5 instead of0. PPSA13356 passes the pad call with either change: with #5676 (merge tree on currentmain, plus a local flip-rate change from #5691) there is noscePadUnknownline in 353 lines ofPPSA13356_rY1/run_115406.err, and the title stops at the same later place (NGS2: invalid voice handle) as with this pull request.git merge-treeof this head3dadad70cagainst currentmainalso reports a conflict indocs/dev/debt/libScePad.md.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T03:40:23Z.
Conflicts with main in
core/libs/prx/libScePad/Export.cpp: #5676 has since merged and makesscePadUnknown_n3kSX62fgNoreturn the console-measured statuses. Please rebase. Still open from 2026-10-14: drop that function from this PR (main now has the measured values) and keep the other stubs.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T03:07:27Z.
Review: COMMENTED
Reviewed — comments
The prepared diff makes the stated stub and return-code changes; I could not run checks or verify the reported console behavior.
What I ran
Reviewed head
3dadad70c7417c50848ba2b231a0eaeb5f04ede1from the prepared diff and the changed files at the pinned head. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
DEVICE_NOT_CONNECTEDresult, and thatscePadUnknown_n3kSX62fgNoreturns 0 as the console does. The implementation shows those return values, but I could not independently verify the console behavior. Keep these claims marked as observed or inferred unless supported by reproducible evidence.Not verified
core/libs/prx/libScePad/Export.cpp,docs/dev/debt/libScePad.md,review/description.md,review/commits.md,review/manifest.json, andreview/diff.patch. The bundle lists both changed files as included; no files were excluded by the manifest.review/files.jsonwas not available through the reader.To get this to a good state
Nothing is required. Optional: label unverified console return behavior as inferred, or add reproducible evidence for it.
Pull request closed