feat(libSceVideoRecordingP): implement the recorder as unsupported #953

Closed
hugodearaujo wants to merge 1 commit from upstream-pr/953 into main
hugodearaujo commented 2026-10-06 20:20:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-06T20:20:24Z.


What

Six libSceVideoRecordingP exports threw. They now model a console whose recorder is unavailable, as the host has no recording service:

  • sceVideoRecordingQueryMemSize(param) returns 4 KiB, the maximum heap size in SharpProspero (MaxMemSize).
  • sceVideoRecordingOpen(path, param, heap, heapSize) returns SCE_VIDEO_RECORDING_ERROR_UNSUPPORTED (0x80A80008). Its signature on main was a placeholder (buffer, size, param); the new one follows SharpProspero and fpPS4's sceVideoRecordingOpen2. A null path, param or heap, or a path longer than 1023 bytes (SharpProspero MaxPathLen), throws.
  • sceVideoRecordingGetStatus returns NONE (0), as no recorder is ever open.
  • sceVideoRecordingStart, sceVideoRecordingStop and sceVideoRecordingClose return SCE_VIDEO_RECORDING_ERROR_INVALID_STATE (0x80A80006) without an open recorder.

Error values follow shadPS4 and fpPS4. The NIDs match the PS5 symbol lists for libSceVideoRecording.native.

The anonymous export iQS6DUtLybE (0x8904BA0D4B4BC9B1) still throws: no known name hashes to it and its ABI is unknown.

Assumptions are recorded in TechnicalDebt:

  • Unknown function info: the signatures, the 4 KiB size for every param, the throwing argument checks, and INVALID_STATE for start/stop/close.
  • Functional: the recorder is not implemented.

Open question for review: the Raeen HLE (libsce_online_misc.rs) returns 0 from Stop and Close in the same disabled-recorder model. INVALID_STATE was chosen here because no recorder is open, but neither value is verified on hardware.

Tested

Linux (Arch, GCC), Release with BUILD_TESTING=ON, rebased on current main. New guest_video_recording test:

  • QueryMemSize returns 4096, and a null param throws.
  • Open throws for a null path, param or heap and for a 1024-byte path. With a 1023-byte path or a normal path it returns UNSUPPORTED.
  • Start, Stop and Close(0 and 1) return INVALID_STATE.
  • GetStatus returns NONE before and after.

Four mutations each make the test fail: Open returning 0, an off-by-one path limit, the null heap check removed, and GetStatus returning 1. Full ctest: 360/360 passed. Not tested with a title.

tools/progress.py --compare against main: System libraries 87.21% (+0.21%, +6 implemented functions).

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4764193296 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/953). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-06T20:20:24Z. --- ### What Six libSceVideoRecordingP exports threw. They now model a console whose recorder is unavailable, as the host has no recording service: - `sceVideoRecordingQueryMemSize(param)` returns 4 KiB, the maximum heap size in [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Video/VideoRecording.cs) (`MaxMemSize`). - `sceVideoRecordingOpen(path, param, heap, heapSize)` returns `SCE_VIDEO_RECORDING_ERROR_UNSUPPORTED` (0x80A80008). Its signature on `main` was a placeholder `(buffer, size, param)`; the new one follows SharpProspero and fpPS4's `sceVideoRecordingOpen2`. A null path, param or heap, or a path longer than 1023 bytes (SharpProspero `MaxPathLen`), throws. - `sceVideoRecordingGetStatus` returns `NONE` (0), as no recorder is ever open. - `sceVideoRecordingStart`, `sceVideoRecordingStop` and `sceVideoRecordingClose` return `SCE_VIDEO_RECORDING_ERROR_INVALID_STATE` (0x80A80006) without an open recorder. Error values follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/video_recording/video_recording_error.h) and [fpPS4](https://github.com/red-prig/fpPS4/blob/trunk/src/ps4_libscevideorecording.pas). The NIDs match the PS5 symbol lists for `libSceVideoRecording.native`. The anonymous export `iQS6DUtLybE` (0x8904BA0D4B4BC9B1) still throws: no known name hashes to it and its ABI is unknown. Assumptions are recorded in TechnicalDebt: - **Unknown function info:** the signatures, the 4 KiB size for every param, the throwing argument checks, and `INVALID_STATE` for start/stop/close. - **Functional:** the recorder is not implemented. Open question for review: the Raeen HLE (`libsce_online_misc.rs`) returns 0 from Stop and Close in the same disabled-recorder model. `INVALID_STATE` was chosen here because no recorder is open, but neither value is verified on hardware. ### Tested Linux (Arch, GCC), Release with `BUILD_TESTING=ON`, rebased on current `main`. New `guest_video_recording` test: - `QueryMemSize` returns 4096, and a null param throws. - `Open` throws for a null path, param or heap and for a 1024-byte path. With a 1023-byte path or a normal path it returns `UNSUPPORTED`. - Start, Stop and Close(0 and 1) return `INVALID_STATE`. - `GetStatus` returns `NONE` before and after. Four mutations each make the test fail: `Open` returning 0, an off-by-one path limit, the null heap check removed, and `GetStatus` returning 1. Full `ctest`: 360/360 passed. Not tested with a title. `tools/progress.py --compare` against `main`: System libraries 87.21% (+0.21%, +6 implemented functions). ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
oneandonlydean commented 2026-10-06 21:20:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T21:20:41Z.


Thanks for fixing the sceVideoRecordingOpen signature. I'm closing this one. It turns six throwing functions into fixed returns, and no title is shown to need them (PPSA21564 imports none of them). They aren't UI either, so they don't fall under the "Silent stubs" exception. The project keeps unimplemented functions throwing, so that a title that reaches one stops with a clear message.

If a title stops at one of these throws, please reopen with its ID and the first call it reaches, and limit the changes to what it calls. The Open signature fix can also go in as its own PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6025672198 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/953#issuecomment-6025672198). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-06T21:20:41Z. --- Thanks for fixing the `sceVideoRecordingOpen` signature. I'm closing this one. It turns six throwing functions into fixed returns, and no title is shown to need them (PPSA21564 imports none of them). They aren't UI either, so they don't fall under the "Silent stubs" exception. The project keeps unimplemented functions throwing, so that a title that reaches one stops with a clear message. If a title stops at one of these throws, please reopen with its ID and the first call it reaches, and limit the changes to what it calls. The `Open` signature fix can also go in as its own PR.

Pull request closed

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!953
No description provided.