docs(libSceVideoOut): record what a PS5 payload process did with sceVideoOutAddBufferAttributeOption #17763

Merged
xXPBSXx merged 1 commit from upstream-pr/17763 into main 2026-11-12 07:25:41 +00:00
xXPBSXx commented 2026-11-09 14:55:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-11-09T14:55:44Z.


What

docs/dev/debt/libSceVideoOut.md:23 (sceVideoOutAddBufferAttributeOption) says:

... The option is ORed into attribute->option; whether the console validates the bits, keeps them elsewhere or fails on an unknown option is unknown. ...

A PS5 now answers part of that: after sceVideoOutSetBufferAttribute2 filled a buffer attribute, sceVideoOutAddBufferAttributeOption ORed 0x20, 0x8, 0x1 and 0x8000000000000000 unchanged into the 64-bit option at offset 24 (0x20, then 0x28, 0x29, and the high word 0x80000000), added 0 and a repeated 0x20 without a change, and changed no other byte of the 80-byte attribute, which is what AnyPS5 does (attribute->option |= option, covered by Flip.cpp). The entry now says so and keeps unmeasured what the console does with an option when a buffer is registered. Only the entry changes; no code.

Tested

Measured on a PS5 with firmware 11.60 (kernel_get_fw_version 0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-09 at 12:54 UTC (the console clock was about 1 h 41 min ahead), one run with 34 cases; the cases 1 and 2 of the probe use only caller-owned memory. The return value of the call is meaningless (the function returns nothing). A title process may differ. The probe source and its complete raw output are in the first comment. tools/check_conventions.py --base upstream/main passes.

Overlap: the 22 other open pull requests that change docs/dev/debt/libSceVideoOut.md were checked on 2026-11-09 between 14:25 UTC and 14:36 UTC against main 6b58dfa474. Four already conflict with main without this change (#4040 and #14212 in that file, #12863 and #12315 in other files), and none conflicts only with this change. The other eighteen merge cleanly with and without it, among them #17696 (the Delete*Event entries of this account, on other lines of the file), #16584 and #14106.

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: none
  • GPUs tested: n/a (docs change)
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5225910353 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17763). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-11-09T14:55:44Z. --- ### What `docs/dev/debt/libSceVideoOut.md:23` (`sceVideoOutAddBufferAttributeOption`) says: > ... The option is ORed into `attribute->option`; whether the console validates the bits, keeps them elsewhere or fails on an unknown option is unknown. ... A PS5 now answers part of that: after `sceVideoOutSetBufferAttribute2` filled a buffer attribute, `sceVideoOutAddBufferAttributeOption` ORed 0x20, 0x8, 0x1 and `0x8000000000000000` unchanged into the 64-bit option at offset 24 (0x20, then 0x28, 0x29, and the high word 0x80000000), added 0 and a repeated 0x20 without a change, and changed no other byte of the 80-byte attribute, which is what AnyPS5 does (`attribute->option |= option`, covered by `Flip.cpp`). The entry now says so and keeps unmeasured what the console does with an option when a buffer is registered. Only the entry changes; no code. ### Tested Measured on a PS5 with firmware 11.60 (`kernel_get_fw_version` 0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-09 at 12:54 UTC (the console clock was about 1 h 41 min ahead), one run with 34 cases; the cases 1 and 2 of the probe use only caller-owned memory. The return value of the call is meaningless (the function returns nothing). A title process may differ. The probe source and its complete raw output are in the first comment. `tools/check_conventions.py --base upstream/main` passes. Overlap: the 22 other open pull requests that change `docs/dev/debt/libSceVideoOut.md` were checked on 2026-11-09 between 14:25 UTC and 14:36 UTC against `main` `6b58dfa474`. Four already conflict with `main` without this change (#4040 and #14212 in that file, #12863 and #12315 in other files), and none conflicts only with this change. The other eighteen merge cleanly with and without it, among them #17696 (the Delete*Event entries of this account, on other lines of the file), #16584 and #14106. ### 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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a (docs change) <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gabichuuuuu commented 2026-11-10 17:49:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:49:30Z.

Review: COMMENTED


Read e2a9f00b65 against main.

Correctness. sceVideoOutAddBufferAttributeOption (Buffer.cpp:139-144) throws on a null attribute and does attribute->option |= option, which is what the new text says. VideoOutBufferAttribute2.option is the first 64-bit member after six 32-bit fields (SceTypes.hpp:2295-2302), so offset 24 is right. sceVideoOutRegisterBuffers2 throws for any option other than 0 and 8 (Buffer.cpp:16, VideoOutDriver.hpp:82), matching the unchanged sentence kept at the end of the entry. The old sentence on main is unchanged, so the entry is not stale. The PS5 measurement (firmware 11.60, payload process) cannot be checked from the code; the entry correctly keeps registration behaviour as unmeasured. Does not overlap #17903, which edits a different line of the same file.

Not run here; this is from reading the code.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5846659679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17763#pullrequestreview-5846659679). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-10T17:49:30Z. **Review:** COMMENTED --- Read `e2a9f00b65` against `main`. **Correctness.** `sceVideoOutAddBufferAttributeOption` (`Buffer.cpp:139-144`) throws on a null attribute and does `attribute->option |= option`, which is what the new text says. `VideoOutBufferAttribute2.option` is the first 64-bit member after six 32-bit fields (`SceTypes.hpp:2295-2302`), so offset 24 is right. `sceVideoOutRegisterBuffers2` throws for any option other than 0 and 8 (`Buffer.cpp:16`, `VideoOutDriver.hpp:82`), matching the unchanged sentence kept at the end of the entry. The old sentence on main is unchanged, so the entry is not stale. The PS5 measurement (firmware 11.60, payload process) cannot be checked from the code; the entry correctly keeps registration behaviour as unmeasured. Does not overlap #17903, which edits a different line of the same file. Not run here; this is from reading the code. AI-assisted: yes.
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!17763
No description provided.