feat(libSceVideoOut): register the VRR status event and accept the VRR status call #1339

Merged
gjonn merged 1 commit from upstream-pr/1339 into main 2026-10-09 21:51:35 +00:00
gjonn commented 2026-10-07 23:51:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-07T23:51:50Z.


What

Both NIDs of libSceVideoOutVrrStatus were throwing stubs (#518). A title calls both while it sets up video output:

  • kP2L8t3j-aM is called without arguments right after sceVideoOutSetFlipRate, and the result is ignored. It now returns 0 and does nothing, since the host output has no VRR state to report; it is listed under silent stubs.
  • LibwuIonIBw is called as (equeue, handle, udata) directly after sceVideoOutAddVblankEvent, sceVideoOutAddFlipEvent and sceVideoOutAddOutputModeEvent with the same arguments, and the result is ignored. The title's video out event loop handles event ids 0, 1, 8 and 16; the id 16 handler re-reads the VRR bits of sceVideoOutGetVblankStatus and sceVideoOutGetOutputStatus. It now registers a video out event with id 16 (VIDEO_OUT_EVENT_VRR_STATUS) through the same path as the other add-event functions, removes it on close, and sceVideoOutGetEventId accepts it. The event is never triggered because the host VRR state does not change.

The names are still unknown, so the exports keep their sceVideoOutUnknown00/01 names; the TechnicalDebt entries now record what is known about their signatures.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0: video_out_flip_tests controls passes with new checks that the id 16 subscription is recorded, that waiting for a vblank does not deliver it, and that sceVideoOutGetEventId accepts it.
  • A title that calls both: video output setup continues past both calls.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779877537 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-07T23:51:50Z. --- ### What Both NIDs of `libSceVideoOutVrrStatus` were throwing stubs (#518). A title calls both while it sets up video output: - `kP2L8t3j-aM` is called without arguments right after `sceVideoOutSetFlipRate`, and the result is ignored. It now returns 0 and does nothing, since the host output has no VRR state to report; it is listed under silent stubs. - `LibwuIonIBw` is called as `(equeue, handle, udata)` directly after `sceVideoOutAddVblankEvent`, `sceVideoOutAddFlipEvent` and `sceVideoOutAddOutputModeEvent` with the same arguments, and the result is ignored. The title's video out event loop handles event ids 0, 1, 8 and 16; the id 16 handler re-reads the VRR bits of `sceVideoOutGetVblankStatus` and `sceVideoOutGetOutputStatus`. It now registers a video out event with id 16 (`VIDEO_OUT_EVENT_VRR_STATUS`) through the same path as the other add-event functions, removes it on close, and `sceVideoOutGetEventId` accepts it. The event is never triggered because the host VRR state does not change. The names are still unknown, so the exports keep their `sceVideoOutUnknown00/01` names; the TechnicalDebt entries now record what is known about their signatures. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0: `video_out_flip_tests controls` passes with new checks that the id 16 subscription is recorded, that waiting for a vblank does not deliver it, and that `sceVideoOutGetEventId` accepts it. - A title that calls both: video output setup continues past both calls. ### 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
github-actions[bot] commented 2026-10-07 23:52:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T23:52:11Z.


Progress report (870ac04 → 04dec3d)

📈 System libraries: 85.3% (+0.07%, +2 implemented, -2 removed functions)

✅ 2 implemented
Library Name
libSceVideoOut sceVideoOutAddVrrActiveStatusEvent
libSceVideoOut sceVideoOutAddVrrStatusFlagsPrivilege
🗑️ 2 removed
Library Name
libSceVideoOut sceVideoOutUnknown00
libSceVideoOut sceVideoOutUnknown01
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6049197859 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339#issuecomment-6049197859). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-07T23:52:11Z. --- <!-- progress-report --> ### Progress report (870ac04 → 04dec3d) 📈 **System libraries**: 85.3% (+0.07%, +2 implemented, -2 removed functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceVideoOut | `sceVideoOutAddVrrActiveStatusEvent` | | libSceVideoOut | `sceVideoOutAddVrrStatusFlagsPrivilege` | </details> <details> <summary>🗑️ 2 removed</summary> | Library | Name | | - | - | | libSceVideoOut | `sceVideoOutUnknown00` | | libSceVideoOut | `sceVideoOutUnknown01` | </details>
oneandonlydean commented 2026-10-08 09:38:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T09:38:33Z.


#1340 just landed and changes libSceVideoOut/tests/Flip.cpp too, so this needs a rebase onto main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6057045558 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339#issuecomment-6057045558). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T09:38:33Z. --- #1340 just landed and changes `libSceVideoOut/tests/Flip.cpp` too, so this needs a rebase onto main.
EdouardSence commented 2026-10-09 10:37:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-09T10:37:43Z.


Title evidence: Ratchet & Clank: Rift Apart (PPSA01474) calls kP2L8t3j-aM.

On main 43972e69 (with its missing imports satisfied locally), the title stops about 9 s in, during video output setup:

what():  sceVideoOutUnknown00 not implemented

With this PR merged on top, it gets past that call, creates its swapchain and starts registering shaders. It stops later at about 19 s, on an unrelated crash in title code.

The only conflict with current main is in libSceVideoOut/tests/Flip.cpp.

Measured on Linux, RX 9070 XT. Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6079214542 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339#issuecomment-6079214542). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-09T10:37:43Z. --- Title evidence: Ratchet & Clank: Rift Apart (PPSA01474) calls `kP2L8t3j-aM`. On `main` 43972e69 (with its missing imports satisfied locally), the title stops about 9 s in, during video output setup: ``` what(): sceVideoOutUnknown00 not implemented ``` With this PR merged on top, it gets past that call, creates its swapchain and starts registering shaders. It stops later at about 19 s, on an unrelated crash in title code. The only conflict with current `main` is in `libSceVideoOut/tests/Flip.cpp`. Measured on Linux, RX 9070 XT. *Tested and written by Claude (AI assistant) on a contributor's machine.*
tv7 commented 2026-10-09 11:34:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-09T11:34:52Z.


Title evidence: Marvel's Wolverine (PPSA03671, v01.001.005) imports kP2L8t3j-aM (not LibwuIonIBw).

Windows 11, MinGW, RTX 3070, main d70b89989 (with its three missing unnamed imports satisfied locally). The title starts its job threads, opens its archives and creates the Vulkan device and swapchain, then stops in video output setup:

what():  sceVideoOutUnknown00 not implemented

With this PR merged on top, it gets past that call and stops later, in an unrelated shader recompile (v_readlane_b32 of lane 63 on the 32-lane host, the known limit in TechnicalDebt.md).

As reported above, the only conflict with current main is in libSceVideoOut/tests/Flip.cpp; I kept main's version of that file for this run.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080048991 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339#issuecomment-6080048991). Originally posted by [tv7](https://github.com/tv7) on 2026-10-09T11:34:52Z. --- Title evidence: Marvel's Wolverine (PPSA03671, v01.001.005) imports `kP2L8t3j-aM` (not `LibwuIonIBw`). Windows 11, MinGW, RTX 3070, `main` d70b89989 (with its three missing unnamed imports satisfied locally). The title starts its job threads, opens its archives and creates the Vulkan device and swapchain, then stops in video output setup: ``` what(): sceVideoOutUnknown00 not implemented ``` With this PR merged on top, it gets past that call and stops later, in an unrelated shader recompile (`v_readlane_b32` of lane 63 on the 32-lane host, the known limit in TechnicalDebt.md). As reported above, the only conflict with current `main` is in `libSceVideoOut/tests/Flip.cpp`; I kept `main`'s version of that file for this run.
XairRrR commented 2026-10-09 11:55:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-09T11:55:28Z.


For naming: the two NIDs hash to names that appear in assert messages of Uncharted: Legacy of Thieves Collection (PPSA05684):

  • kP2L8t3j-aM = sceVideoOutAddVrrStatusFlagsPrivilege (called without arguments during device init; the title requires SCE_VIDEO_OUT_OK)
  • LibwuIonIBw = sceVideoOutAddVrrActiveStatusEvent (called with the equeue, handle and udata it gives sceVideoOutAddVblankEvent; requires SCE_VIDEO_OUT_OK)

The title also calls sceVideoOutVrrPegToFixedRate(handle, 0, 0) and sceVideoOutVrrUnpegFromFixedRate(handle), ignoring the results.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080350106 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339#issuecomment-6080350106). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-09T11:55:28Z. --- For naming: the two NIDs hash to names that appear in assert messages of Uncharted: Legacy of Thieves Collection (PPSA05684): - `kP2L8t3j-aM` = `sceVideoOutAddVrrStatusFlagsPrivilege` (called without arguments during device init; the title requires `SCE_VIDEO_OUT_OK`) - `LibwuIonIBw` = `sceVideoOutAddVrrActiveStatusEvent` (called with the equeue, handle and udata it gives `sceVideoOutAddVblankEvent`; requires `SCE_VIDEO_OUT_OK`) The title also calls `sceVideoOutVrrPegToFixedRate(handle, 0, 0)` and `sceVideoOutVrrUnpegFromFixedRate(handle)`, ignoring the results.
adriadam10 commented 2026-10-09 21:21:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:21:35Z.


Rebased onto main (conflicts in tests/Flip.cpp and TechnicalDebt.md, both sides kept) and added from our side:

  • Renamed the exports to the names @XairRrR found: kP2L8t3j-aM = sceVideoOutAddVrrStatusFlagsPrivilege, LibwuIonIBw = sceVideoOutAddVrrActiveStatusEvent. Both NIDs hash to these names.
  • TechnicalDebt: dropped the two "unknown name" lines; the silent-stub entry uses the real name and records that the arguments are unknown.

Checked: build and ctest on the rebased tree (only patched_libraries fails, it cannot open libkernel.prx here), and video_out_flip_tests controls run by hand (it is not in ctest) passes. Title runs by @EdouardSence (PPSA01474, Linux) and @tv7 (PPSA03671, Windows) get past both calls. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089467115 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1339#issuecomment-6089467115). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T21:21:35Z. --- Rebased onto main (conflicts in `tests/Flip.cpp` and `TechnicalDebt.md`, both sides kept) and added from our side: - Renamed the exports to the names @XairRrR found: `kP2L8t3j-aM` = `sceVideoOutAddVrrStatusFlagsPrivilege`, `LibwuIonIBw` = `sceVideoOutAddVrrActiveStatusEvent`. Both NIDs hash to these names. - TechnicalDebt: dropped the two "unknown name" lines; the silent-stub entry uses the real name and records that the arguments are unknown. Checked: build and ctest on the rebased tree (only `patched_libraries` fails, it cannot open `libkernel.prx` here), and `video_out_flip_tests controls` run by hand (it is not in ctest) passes. Title runs by @EdouardSence (PPSA01474, Linux) and @tv7 (PPSA03671, Windows) get past both calls. Merging once CI is green.
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!1339
No description provided.