feat(videoout): implement sceVideoOutGetResolutionStatus #1714

Merged
johnmaia merged 1 commit from upstream-pr/1714 into main 2026-10-09 21:54:47 +00:00
johnmaia commented 2026-10-08 17:25:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-08T17:25:02Z.


What

Implements sceVideoOutGetResolutionStatus (NID 6kPnj51T62Y). Three of the homebrew titles in #1578 import it and stop at start-up without it: ps5-opengl (PPSA99005), EVO-PLAYER-PS5 (PPSA99039) and ProsperoRadio (PPSA99001). It was the most-needed import in that list without a pull request.

int sceVideoOutGetResolutionStatus(int32_t handle, SceVideoOutResolutionStatus* status);
  • Layout: the 48-byte VideoOutResolutionStatus follows the two title declarations, which agree: EVO-PLAYER-PS5 (projects/common/include/evo_ps5.h, fullWidth, fullHeight, paneWidth, paneHeight, uint64_t refreshRate, float screenSizeInInch, uint16_t flags, reserved) and ps5-opengl (src/platform/ps5_agc_native_runtime.c, with _Static_assert size 48 and refresh_rate at 16). A static_assert pins the size and both offsets.
  • Values: the full and pane size are the port's width and height, and refreshRate is the refresh rate ID chosen exactly as sceVideoOutGetOutputStatus does (3 for 59.94 Hz, 13 in the 119.88 Hz output mode; EVO-PLAYER-PS5 reads 13 as 120 Hz). The pane equals the full size because sceVideoOutSetWindowModeMargins applies no margins. screenSizeInInch is 0, the value EDID uses for an undefined size, since the host display's size is not read; shadPS4 returns a fixed 50. flags and the reserved fields are 0; the whole struct is written.
  • Errors: a null status or an invalid or closed handle throws, as in the other VideoOut status getters.
  • The layout, the screen size and the flags are recorded in TechnicalDebt as not confirmed on a console.

Tested

  • New guest_video_out_resolution_status (registered in ctest): status prefilled with 0xff bytes, then 1920x1080 full and pane, the same refreshRate as sceVideoOutGetOutputStatus, zero screen size, flags and reserved fields; null status, handles 0, -1, a never-opened handle and a closed handle all throw.
  • The built libSceVideoOut.prx exports 6kPnj51T62Y, the NID shadPS4 binds to sceVideoOutGetResolutionStatus.
  • Linux (Ubuntu 24.04.5, GCC 13.3, RX 7600) and Windows 11 (WinLibs GCC 15.2.0 r7): the VideoOut tests pass (guest_video_out_wqhd_detection, guest_video_out_resolution_status, guest_videodec2).
  • No title run: each of the three still has other absent imports listed in #1578.

Overlap: #1496 adds a test to the same place in libSceVideoOut/CMakeLists.txt and edits the neighbouring VideoOut lines of TechnicalDebt, so whichever merges second needs a small rebase. It does not change how the refresh rate is reported.

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:4790454082 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1714). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-08T17:25:02Z. --- ### What Implements `sceVideoOutGetResolutionStatus` (NID `6kPnj51T62Y`). Three of the homebrew titles in #1578 import it and stop at start-up without it: ps5-opengl (PPSA99005), EVO-PLAYER-PS5 (PPSA99039) and ProsperoRadio (PPSA99001). It was the most-needed import in that list without a pull request. ```c int sceVideoOutGetResolutionStatus(int32_t handle, SceVideoOutResolutionStatus* status); ``` - Layout: the 48-byte `VideoOutResolutionStatus` follows the two title declarations, which agree: EVO-PLAYER-PS5 (`projects/common/include/evo_ps5.h`, `fullWidth`, `fullHeight`, `paneWidth`, `paneHeight`, `uint64_t refreshRate`, `float screenSizeInInch`, `uint16_t flags`, reserved) and ps5-opengl (`src/platform/ps5_agc_native_runtime.c`, with `_Static_assert` size 48 and `refresh_rate` at 16). A `static_assert` pins the size and both offsets. - Values: the full and pane size are the port's `width` and `height`, and `refreshRate` is the refresh rate ID chosen exactly as `sceVideoOutGetOutputStatus` does (3 for 59.94 Hz, 13 in the 119.88 Hz output mode; EVO-PLAYER-PS5 reads 13 as 120 Hz). The pane equals the full size because `sceVideoOutSetWindowModeMargins` applies no margins. `screenSizeInInch` is 0, the value EDID uses for an undefined size, since the host display's size is not read; shadPS4 returns a fixed 50. `flags` and the reserved fields are 0; the whole struct is written. - Errors: a null `status` or an invalid or closed handle throws, as in the other VideoOut status getters. - The layout, the screen size and the flags are recorded in TechnicalDebt as not confirmed on a console. ### Tested - New `guest_video_out_resolution_status` (registered in ctest): status prefilled with `0xff` bytes, then 1920x1080 full and pane, the same `refreshRate` as `sceVideoOutGetOutputStatus`, zero screen size, flags and reserved fields; null status, handles 0, -1, a never-opened handle and a closed handle all throw. - The built `libSceVideoOut.prx` exports `6kPnj51T62Y`, the NID shadPS4 binds to `sceVideoOutGetResolutionStatus`. - Linux (Ubuntu 24.04.5, GCC 13.3, RX 7600) and Windows 11 (WinLibs GCC 15.2.0 r7): the VideoOut tests pass (`guest_video_out_wqhd_detection`, `guest_video_out_resolution_status`, `guest_videodec2`). - No title run: each of the three still has other absent imports listed in #1578. Overlap: #1496 adds a test to the same place in `libSceVideoOut/CMakeLists.txt` and edits the neighbouring VideoOut lines of TechnicalDebt, so whichever merges second needs a small rebase. It does not change how the refresh rate is reported. ### Checklist - [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)
github-actions[bot] commented 2026-10-08 17:25:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T17:25:30Z.


Progress report (17350cf → 16824f2)

➖ System libraries: 84.76% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceVideoOut sceVideoOutGetResolutionStatus
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6065373568 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1714#issuecomment-6065373568). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T17:25:30Z. --- <!-- progress-report --> ### Progress report (17350cf → 16824f2) ➖ **System libraries**: 84.76% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceVideoOut | `sceVideoOutGetResolutionStatus` | </details>
LeandroLP23 commented 2026-10-08 20:16:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-08T20:16:23Z.


sceVideoOutGetResolutionStatus is the next stop on Windows for two titles once their current blocker is fixed. EVO Player (PPSA99039) with #1634 and OpenGL Showcase (PPSA99005) with #1613 both stop at FAIL: unresolved ELF import 6kPnj51T62Y from libSceVideoOut.prx. With this PR, EVO Player gets past it to sigemptyset.

Windows 11, Radeon 860M, MinGW-w64 GCC 15.2.0, Release, main 4b6ab6bb; title relinked with relinker --windows and run with the patched build/core/libs/libs/*.prx.

Tested with AI assistance (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6068253194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1714#issuecomment-6068253194). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-08T20:16:23Z. --- `sceVideoOutGetResolutionStatus` is the next stop on Windows for two titles once their current blocker is fixed. EVO Player (PPSA99039) with #1634 and OpenGL Showcase (PPSA99005) with #1613 both stop at `FAIL: unresolved ELF import 6kPnj51T62Y from libSceVideoOut.prx`. With this PR, EVO Player gets past it to `sigemptyset`. Windows 11, Radeon 860M, MinGW-w64 GCC 15.2.0, Release, `main` 4b6ab6bb; title relinked with `relinker --windows` and run with the patched `build/core/libs/libs/*.prx`. Tested with AI assistance (Claude Code).
CouchRiv commented 2026-10-09 12:05:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CouchRiv on 2026-10-09T12:05:36Z.


A title that stops first on this: PS5VR (PPSA99177, v1.2.0 from the homebrew catalog), relinked for Linux and run on main d70b8998 (CachyOS, GCC, Release, in a bubblewrap sandbox):

symbol lookup error: app.elf: undefined symbol: 6kPnj51T62Y

6kPnj51T62Y is sceVideoOutGetResolutionStatus, the first unresolved import it binds. Not run with this PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080529330 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1714#issuecomment-6080529330). Originally posted by [CouchRiv](https://github.com/CouchRiv) on 2026-10-09T12:05:36Z. --- A title that stops first on this: PS5VR (PPSA99177, v1.2.0 from the homebrew catalog), relinked for Linux and run on `main` d70b8998 (CachyOS, GCC, Release, in a bubblewrap sandbox): ``` symbol lookup error: app.elf: undefined symbol: 6kPnj51T62Y ``` `6kPnj51T62Y` is `sceVideoOutGetResolutionStatus`, the first unresolved import it binds. Not run with this PR.
adriadam10 commented 2026-10-09 21:51:33 +00:00 (Migrated from github.com)

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


Checked on Linux: build and ctest green (guest_video_out_resolution_status passes and fails to build without the change). The 48-byte layout and offsets match shadPS4 and prosper; refreshRate follows sceVideoOutGetOutputStatus; the screenSizeInInch = 0 deviation (references use 50) and the unconfirmed layout are listed in TechnicalDebt. Linux and Windows CI green, confirmed on Windows by @LeandroLP23. Merging; #1496 will need a small rebase on the neighbouring CMake/TechnicalDebt lines.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089860163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1714#issuecomment-6089860163). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T21:51:33Z. --- Checked on Linux: build and ctest green (`guest_video_out_resolution_status` passes and fails to build without the change). The 48-byte layout and offsets match shadPS4 and prosper; `refreshRate` follows `sceVideoOutGetOutputStatus`; the `screenSizeInInch` = 0 deviation (references use 50) and the unconfirmed layout are listed in TechnicalDebt. Linux and Windows CI green, confirmed on Windows by @LeandroLP23. Merging; #1496 will need a small rebase on the neighbouring CMake/TechnicalDebt lines.
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!1714
No description provided.