Repository navigation
libScePad: replace NotImplemented stubs and fix return-0 consistency - #5038
coptergui-ops wants to merge 2 commits into
Conversation
…TED returns Replace 17 NotImplemented_nid_no_patch calls in libScePad with DEVICE_NOT_CONNECTED (0x80920007), matching console behaviour where the host has no special controller at any port type. Changes: - scePadOpenExt: accept all port types, return DEVICE_NOT_CONNECTED instead of throwing on non-special ports - scePadReadExt, GetFeatureReport, SetFeatureReport, OutputReport: return DEVICE_NOT_CONNECTED (imported by PPSA01317) - All scePadVrController* functions: return DEVICE_NOT_CONNECTED (imported by PPSA99177 for PS VR2) - scePadUnknown_n3kSX62fgNo: return 0 (imported by PPSA01317) - scePadSetAngularVelocityBiasCorrectionState: accept enabled value without throwing (bias correction not modelled) Update docs/dev/debt/libScePad.md to reflect each function's new behaviour and cite the PPSA references. Signed-off-by: Sebastian <coptergui@gmail.com>
scePadReadState and scePadIsRemoteController returned bare 0 instead of PAD_OK, inconsistent with the rest of the library. Both now return PAD_OK explicitly. All other functions already use proper error/success codes.
Progress report (2a2a3dc → 3dadad7)📈 System libraries: 88.85% (+0.47%, +17 implemented functions) ✅ 17 implemented
⚪ 15 behaviourally empty (constant return or throw)
|
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the PR. Not mergeable as is, these need fixing:
- Conventions CI is red: title IDs (PPSA99177, PPSA01317, PPSA25971) appear in
core/libs/prx/libScePad/Export.cppcomments anddocs/dev/debt/libScePad.md. Implement the general behaviour; cite titles only where the check allows it. - "console returns
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.- No test covers any new behaviour. Add a registered guest test, with values taken from a reference.
- Code comments: the project doesn't use them; drop them from Export.cpp.
- The PR body lacks the template sections (
### What,### Tested,### Checklist).
Feel free to push the fixes to this PR.
|
There is now a console measurement for |
|
Tested on head Title evidence for
Test conditions
Limits
AI-assisted (Claude Code). |
|
Addendum to my Windows test above: this pull request now conflicts with #5676, which changes the same function ( AI-assisted (Claude Code). |
|
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.
|
|
Conflicts with main in |
|
Console data for the functions this PR answers with The console returns 0x80920007 in one case only: the three report calls on a VR controller calls. A port of type 3 or 4 counts as a VR controller. Each call checks its arguments first, then the handle:
A VR port that is open but disconnected (GT7 ✓, types 3 and 4 opened for GT7's user) returns 0 from everything above: rest records with the connected byte 0, eight zero trigger bytes, and 0 from the vibration setters.
The full notes are local; I can attach the measurement log if it helps. AI-assisted: yes (Claude Code) |
Verdictblocker Findings
Freshness envelope
Cross-PR ledger
|
|
@coptergui-ops the
|
MarcZX10
left a comment
There was a problem hiding this comment.
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 3dadad70c7417c50848ba2b231a0eaeb5f04ede1 from the prepared diff and the changed files at the pinned head. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code | passed | Both changed files read |
| Tests and conventions check | not run | No execution environment used |
| Console behavior claims | not verified | Based on description and comments |
Findings
Blocking
None.
Non-blocking
- The patch and docs state that several functions return the console’s
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
- No tests, build, or conventions check were run.
- Console behavior and the cited title references were not independently checked.
- Read:
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.
|
I am closing this for now. It has not moved since 13 Oct, and it now conflicts with main in libScePad/Export.cpp (main re-implemented the Pad paths) and in the debt doc. Our review also asked for the title IDs to come out of the code comments, the PR title to be fixed and the description filled in. Feel free to reopen or push a rebased branch at any time and we will look at it again. |
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