fix(libScePad): return an error for unsupported port probes #10935
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10935"
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 mashingaan on 2026-10-25T11:04:05Z.
What
Restore the pre-#10361 error path for
scePadOpenport types 3 and 4. They were previously rejected withINVALID_ARG, but the measured validation change made them throwNotImplemented_nid_no_patchafter user validation. This aborts titles that probe these port types and handle a negative return.The measured invalid-user result for user -1 is unchanged.
INVALID_ARGis returned only for the two unsupported types with a valid user.GuestPadcovers both probes. This remains a temporary compatibility fallback: console evidence indicates that the VR-port gate can reject types 3 and 4 before user validation, while an open gate can return a VR handle. This change does not model those attribute-dependent regimes.Issue #10904 reports PPSA02530 stopping at
scePadOpenafter #10361 and running past the same point before that change. A maintainer also reported Monster Hunter Wilds (PPSA24191) stopping at this call on main and passing it with this change, then reaching a separate unimplemented converted-float image path tracked by #11580. These reports support the startup compatibility regression, while the VR gate and successful VR handles remain unimplemented.Implementation constraint: current main exposes param.json attribute3 through GetAppAttribute3_nid_no_patch, but sceKernelGetAppInfo only writes the app ID and title ID, not the observed fields at offsets 0x2c and 0x4c. The single-title observation does not yet establish that its 0x4c value can be derived from attribute3 for all titles. A complete gate needs that mapping and the successful VR-handle behavior verified separately.
Tested
git diff --checkguest_padCTest passed on PR head895e0341d9cfa7b7f97f7b108344f533fc1fa8de: https://github.com/boykopovar/AnyPS5/actions/runs/41285013727Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); the unsupportedscePadOpenprobes return the compatibility error documented in technical debt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T11:22:25Z.
Review: APPROVED
Reviewed exact head fc3a292. The unsupported types 3/4 still follow user validation first, then return INVALID_ARG for a valid user, matching the newly documented compatibility fallback and the reported title regression. The regression covers both types and preserves invalid-user precedence. Local diff and conventions checks passed. Hosted checks report conventions and labels successful; no local build was run, consistent with the author’s report.
Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-10-25T11:51:37Z.
Review: COMMENTED
Reviewed head
fc3a292merged onto maina5a780e(clean merge). WSL2 Ubuntu 24.04, GCC 13.3, Release.What I ran:
guest_pad_tests. As far as I can tell this is the first build of this head; hosted CI only ranconventionsandlabels.ctest -R '^guest_pad$'on the merge: passes, 3 of 3 repeats.guest_pad_vibration_modepasses too.Export.cppwith this PR's test line.guest_padaborts withscePadOpen_nid_postfix not implemented, the same message as #10904. So the new line does catch the regression.tools/check_conventions.py --base origin/main: passes.tools/pr_overlap.py --branch: only #5038 shows up, and it doesn't touch thescePadOpentype 3/4 line.The code reads right. The type and user checks still run first, so user -1 keeps 0x809b0001 on types 0, 2, 3 and 4.
scePadOpennow also agrees withscePadGetHandleandscePadOpenExt, which already reject 3 and 4 throughValidPort.One thing for a maintainer to decide, not a code bug: #10361 chose the throw on purpose ("a title that probes them will stop here instead of getting a made-up error"). CONTRIBUTING and REVERSE_ENGINEERING.md also say an unknown result throws. In the 13.60 payload run, every measured
INVALID_ARGcomes from the type check, and 3 and 4 get past it, so the measurement doesn't back this value. If it's fine as a stopgap for PPSA02530, a maintainer OK linked from the debt entry would help it hold up later. The Ngs2 Delay entry does this with its "agreed compatibility path" link (#9337).