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 |
|
@coptergui-ops This PR now conflicts with main in |
…ith proper DEVICE_NOT_CONNECTED returns Took the PR's DEVICE_NOT_CONNECTED for the six still-throwing exports (GetFeatureReport, SetFeatureReport, VrControllerGetDeviceInformation, ReadCombinedState, SetTriggerEffects, GetTriggerEffectStates) on our recovered signatures and the PAD_OK returns; kept our OpenExt, ReadExt, OutputReport, VR handle checks, bias correction and n3kSX62fgNo; dropped the PR's code comments and two stale duplicate debt bullets. (cherry picked from commit a468aea36e8848705b9e2d77bde904962b5eb28e)
|
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
|
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