feat(libSceCamera): report that no camera is attached #8111

Merged
savvaniss merged 1 commit from upstream-pr/8111 into main 2026-10-23 06:27:20 +00:00
savvaniss commented 2026-10-19 22:06:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T22:06:10Z.


What

main has no libSceCamera. A PS4 title that imports the camera functions does not load, and Monopoly Plus from CUSA03312 (Hasbro Family Fun Pack) asks sceCameraIsAttached at startup.

This adds the library with the camera answer the host can give: no camera is ever attached.

  • sceCameraIsAttached(0) returns 0 (not attached). Any other index returns SCE_CAMERA_ERROR_PARAM (0x802E0000), as shadPS4 does when no camera is configured.
  • The ten other camera functions such titles import are declared and throw: sceCameraOpen, Close, Start, Stop, GetConfig, SetConfig, SetAttribute, GetDeviceInfo, GetFrameData and IsValidFrameData. What the console returns from them with no camera attached is not known, and a title that checks sceCameraIsAttached first does not reach them.

docs/dev/debt/libSceCamera.md records both.

#7416 also creates libSceCamera/Export.cpp and the debt file, with the PS5 sceCamera2* functions. No export is shared. Whichever lands second adds its functions to the file.

Tested

Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release.

  • guest_camera (new) checks indexes 0, 1 and -1, and that each declared function throws <name> not implemented. It passes.
  • Monopoly Plus (CUSA03312): run through the PS4 path of #6977 with the same sceCameraIsAttached on an RX 9070 XT. It gets past its camera check and goes on starting up; it calls none of the declared functions.
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py lists #7416 as above.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: CUSA03312 #7198
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4928055428 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8111). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-19T22:06:10Z. --- ### What `main` has no `libSceCamera`. A PS4 title that imports the camera functions does not load, and Monopoly Plus from CUSA03312 (Hasbro Family Fun Pack) asks `sceCameraIsAttached` at startup. This adds the library with the camera answer the host can give: no camera is ever attached. - `sceCameraIsAttached(0)` returns 0 (not attached). Any other index returns `SCE_CAMERA_ERROR_PARAM` (0x802E0000), as shadPS4 does when no camera is configured. - The ten other camera functions such titles import are declared and throw: `sceCameraOpen`, `Close`, `Start`, `Stop`, `GetConfig`, `SetConfig`, `SetAttribute`, `GetDeviceInfo`, `GetFrameData` and `IsValidFrameData`. What the console returns from them with no camera attached is not known, and a title that checks `sceCameraIsAttached` first does not reach them. `docs/dev/debt/libSceCamera.md` records both. #7416 also creates `libSceCamera/Export.cpp` and the debt file, with the PS5 `sceCamera2*` functions. No export is shared. Whichever lands second adds its functions to the file. ### Tested Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release. - `guest_camera` (new) checks indexes 0, 1 and -1, and that each declared function throws `<name> not implemented`. It passes. - **Monopoly Plus (CUSA03312):** run through the PS4 path of #6977 with the same `sceCameraIsAttached` on an RX 9070 XT. It gets past its camera check and goes on starting up; it calls none of the declared functions. - `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` lists #7416 as above. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: CUSA03312 #7198 - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-19 22:06:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T22:06:54Z.


Progress report (a30f58a → b236ea5)

📉 System libraries: 79.68% (-0.15%, +1 implemented, +10 declared functions)

✅ 1 implemented
Library Name
libSceCamera sceCameraIsAttached
🆕 10 declared as stubs
Library Name
libSceCamera sceCameraClose
libSceCamera sceCameraGetConfig
libSceCamera sceCameraGetDeviceInfo
libSceCamera sceCameraGetFrameData
libSceCamera sceCameraIsValidFrameData
libSceCamera sceCameraOpen
libSceCamera sceCameraSetAttribute
libSceCamera sceCameraSetConfig
libSceCamera sceCameraStart
libSceCamera sceCameraStop
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6278430282 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8111#issuecomment-6278430282). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T22:06:54Z. --- <!-- progress-report --> ### Progress report (a30f58a → b236ea5) 📉 **System libraries**: 79.68% (-0.15%, +1 implemented, +10 declared functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceCamera | `sceCameraIsAttached` | </details> <details> <summary>🆕 10 declared as stubs</summary> | Library | Name | | - | - | | libSceCamera | `sceCameraClose` | | libSceCamera | `sceCameraGetConfig` | | libSceCamera | `sceCameraGetDeviceInfo` | | libSceCamera | `sceCameraGetFrameData` | | libSceCamera | `sceCameraIsValidFrameData` | | libSceCamera | `sceCameraOpen` | | libSceCamera | `sceCameraSetAttribute` | | libSceCamera | `sceCameraSetConfig` | | libSceCamera | `sceCameraStart` | | libSceCamera | `sceCameraStop` | </details>
MarcZX10 commented 2026-10-21 23:58:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:58:45Z.

Review: APPROVED


Reviewed the complete diff and its linked title context. sceCameraIsAttached(0) returns the reported no-camera result, invalid indices return SCE_CAMERA_ERROR_PARAM, and the remaining ten declared exports throw instead of returning invented success values. The new guest test covers all of those cases. The linked CUSA03312 discussion confirms the camera check is on the title's startup path, so this is a generic missing-library/import fix with a concrete bring-up link.

The PR declares Unblocks: CUSA03312 #7198, has complete template fields, and current eligibility, intake, conventions, labels, and report checks pass. The current overlap scan reports no overlapping open PRs; the earlier #7416 PR has merged and its current diff no longer adds this library. Windows focused tests/title progress are author-reported. Hosted product jobs are skipped under repository policy; I did not run a local build.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607670455 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8111#pullrequestreview-5607670455). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T23:58:45Z. **Review:** APPROVED --- Reviewed the complete diff and its linked title context. `sceCameraIsAttached(0)` returns the reported no-camera result, invalid indices return `SCE_CAMERA_ERROR_PARAM`, and the remaining ten declared exports throw instead of returning invented success values. The new guest test covers all of those cases. The linked CUSA03312 discussion confirms the camera check is on the title's startup path, so this is a generic missing-library/import fix with a concrete bring-up link. The PR declares `Unblocks: CUSA03312 #7198`, has complete template fields, and current eligibility, intake, conventions, labels, and report checks pass. The current overlap scan reports no overlapping open PRs; the earlier #7416 PR has merged and its current diff no longer adds this library. Windows focused tests/title progress are author-reported. Hosted product jobs are skipped under repository policy; I did not run a local build.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8111
No description provided.