feat(libSceVideoOut): answer seven inventory calls as firmware 13.42 does #14941

Merged
BunnyFl merged 2 commits from upstream-pr/14941 into main 2026-11-05 21:29:01 +00:00
BunnyFl commented 2026-11-02 02:44:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T02:44:11Z.


What

Seven throwing inventory exports in libSceVideoOut/InventoryExports.cpp now return what firmware 13.42's libSceVideoOut returns:

Export NID Firmware 13.42
sceVideoOutAddBufferHdrPrivilege VAlir52gpQI returns 0
sceVideoOutRazorRecallCallbacks hGcTks-qqIU returns 0
sceVideoOutSysUpdateRenderingMode 4G37EIMMD+Q returns 0
sceVideoOutCurveSamplePointsCalc_ kazBRXPqR7c returns 0x8029001C
sceVideoOutDriverGetLatestEopHandle GL8+3RHW5vk returns 0x802900FF
sceVideoOutSysGetMonitorInfo_ vMLWuJckGv0 returns -1
sceVideoOutSysModeIsVr QEiuHxjungc returns bit 1 of the dword at offset 0x20 of its first argument

Each export is a defined entry in the module's dynamic symbol table, and each body is a single path with no calls, syscalls or globals. Read to the return, disassembly only, not measured on a console. sceVideoOutSysModeIsVr gains a const void* parameter, since the code reads through rdi. The other parameter lists stay as they were, because the code reads no arguments.

The seven rows leave the inventory table in docs/dev/debt/libSceVideoOut.md, and a new entry records what stays unverified (parameter lists, and the layout of the structure sceVideoOutSysModeIsVr reads apart from that dword). sceVideoOutDebugAddVrrPrivilege, which sets a module flag, is left throwing. The debt entry also records that sceVideoOutSysModeIsVr does not check its pointer.

Source: firmware 13.42 libSceVideoOut.sprx (sha256 975b229324655a2d2a945c755fc0339e7feecb62863efc28ad3b2d91a95ad215). Each NID is a defined entry at the address shown, and these are the complete bodies, each a single path:

0x06730 sceVideoOutAddBufferHdrPrivilege (VAlir52gpQI)     xor eax, eax ; ret
0x1abb0 sceVideoOutRazorRecallCallbacks (hGcTks-qqIU)      xor eax, eax ; ret
0x07220 sceVideoOutSysUpdateRenderingMode (4G37EIMMD+Q)    xor eax, eax ; ret
0x05c10 sceVideoOutCurveSamplePointsCalc_ (kazBRXPqR7c)    mov eax, 0x8029001c ; ret
0x13be0 sceVideoOutDriverGetLatestEopHandle (GL8+3RHW5vk)  mov eax, 0x802900ff ; ret
0x14730 sceVideoOutSysGetMonitorInfo_ (vMLWuJckGv0)        mov eax, 0xffffffff ; ret
0x17250 sceVideoOutSysModeIsVr (QEiuHxjungc)               mov eax, 0x101 ; bextr eax, dword [rdi+0x20], eax ; ret

The six constant returns read no argument register and write no memory. sceVideoOutSysModeIsVr has no check or branch before the load: bextr with control 0x101 (start 1, length 1) extracts bit 1 of the 32-bit value at rdi+0x20. A null argument therefore faults in the module as well.

Tested

Windows 11, WinLibs GCC 15.2.0 r7, Release, on upstream/main 93dbd0f82a:

  • New guest_video_out_firmware_answers passes. It checks each return value, and for sceVideoOutSysModeIsVr bit 1 set and clear, with every other bit and every byte outside the dword at 0x20 set.
  • Negative control: the same test built against main's InventoryExports.cpp and InventoryExports.hpp aborts with sceVideoOutAddBufferHdrPrivilege not implemented.
  • public_headers passes.
  • python3 tools/check_conventions.py --base upstream/main: all checks pass.
  • python3 tools/pr_overlap.py --branch feat/videoout-fw1342-constants: no confirmed overlap. It could not compare #4040, #5021, #6977, #9432, #9880, #10112, #12863 and #14212, which conflict with main and share CMakeLists.txt or the debt file. None of their diffs names these seven exports or their NIDs.
  • VideoOut validation run, same machine, this branch and main 93dbd0f82a: AMD Radeon RX 9070 XT (driver 32.0.32015.7029), Vulkan SDK 1.4.363 validation layer, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V for video_out_flip_controls, _cpuflip, _eop, _fresh, _deferred, _backtoback and video_out_output_mode_policy: 7/7 pass on both, none skipped. Neither log has the missing-layer message, a VUID- or a SYNC-HAZARD ID.

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: AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5114139612 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14941). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-02T02:44:11Z. --- ### What Seven throwing inventory exports in `libSceVideoOut/InventoryExports.cpp` now return what firmware 13.42's libSceVideoOut returns: | Export | NID | Firmware 13.42 | |---|---|---| | `sceVideoOutAddBufferHdrPrivilege` | `VAlir52gpQI` | returns 0 | | `sceVideoOutRazorRecallCallbacks` | `hGcTks-qqIU` | returns 0 | | `sceVideoOutSysUpdateRenderingMode` | `4G37EIMMD+Q` | returns 0 | | `sceVideoOutCurveSamplePointsCalc_` | `kazBRXPqR7c` | returns 0x8029001C | | `sceVideoOutDriverGetLatestEopHandle` | `GL8+3RHW5vk` | returns 0x802900FF | | `sceVideoOutSysGetMonitorInfo_` | `vMLWuJckGv0` | returns -1 | | `sceVideoOutSysModeIsVr` | `QEiuHxjungc` | returns bit 1 of the dword at offset 0x20 of its first argument | Each export is a defined entry in the module's dynamic symbol table, and each body is a single path with no calls, syscalls or globals. Read to the return, disassembly only, not measured on a console. `sceVideoOutSysModeIsVr` gains a `const void*` parameter, since the code reads through `rdi`. The other parameter lists stay as they were, because the code reads no arguments. The seven rows leave the inventory table in `docs/dev/debt/libSceVideoOut.md`, and a new entry records what stays unverified (parameter lists, and the layout of the structure `sceVideoOutSysModeIsVr` reads apart from that dword). `sceVideoOutDebugAddVrrPrivilege`, which sets a module flag, is left throwing. The debt entry also records that `sceVideoOutSysModeIsVr` does not check its pointer. Source: firmware 13.42 `libSceVideoOut.sprx` (sha256 `975b229324655a2d2a945c755fc0339e7feecb62863efc28ad3b2d91a95ad215`). Each NID is a defined entry at the address shown, and these are the complete bodies, each a single path: ``` 0x06730 sceVideoOutAddBufferHdrPrivilege (VAlir52gpQI) xor eax, eax ; ret 0x1abb0 sceVideoOutRazorRecallCallbacks (hGcTks-qqIU) xor eax, eax ; ret 0x07220 sceVideoOutSysUpdateRenderingMode (4G37EIMMD+Q) xor eax, eax ; ret 0x05c10 sceVideoOutCurveSamplePointsCalc_ (kazBRXPqR7c) mov eax, 0x8029001c ; ret 0x13be0 sceVideoOutDriverGetLatestEopHandle (GL8+3RHW5vk) mov eax, 0x802900ff ; ret 0x14730 sceVideoOutSysGetMonitorInfo_ (vMLWuJckGv0) mov eax, 0xffffffff ; ret 0x17250 sceVideoOutSysModeIsVr (QEiuHxjungc) mov eax, 0x101 ; bextr eax, dword [rdi+0x20], eax ; ret ``` The six constant returns read no argument register and write no memory. `sceVideoOutSysModeIsVr` has no check or branch before the load: `bextr` with control 0x101 (start 1, length 1) extracts bit 1 of the 32-bit value at `rdi+0x20`. A null argument therefore faults in the module as well. ### Tested Windows 11, WinLibs GCC 15.2.0 r7, Release, on upstream/main 93dbd0f82a: - New `guest_video_out_firmware_answers` passes. It checks each return value, and for `sceVideoOutSysModeIsVr` bit 1 set and clear, with every other bit and every byte outside the dword at 0x20 set. - Negative control: the same test built against main's `InventoryExports.cpp` and `InventoryExports.hpp` aborts with `sceVideoOutAddBufferHdrPrivilege not implemented`. - `public_headers` passes. - `python3 tools/check_conventions.py --base upstream/main`: all checks pass. - `python3 tools/pr_overlap.py --branch feat/videoout-fw1342-constants`: no confirmed overlap. It could not compare #4040, #5021, #6977, #9432, #9880, #10112, #12863 and #14212, which conflict with main and share `CMakeLists.txt` or the debt file. None of their diffs names these seven exports or their NIDs. - VideoOut validation run, same machine, this branch and main 93dbd0f82a: AMD Radeon RX 9070 XT (driver 32.0.32015.7029), Vulkan SDK 1.4.363 validation layer, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V` for `video_out_flip_controls`, `_cpuflip`, `_eop`, `_fresh`, `_deferred`, `_backtoback` and `video_out_output_mode_policy`: 7/7 pass on both, none skipped. Neither log has the missing-layer message, a `VUID-` or a `SYNC-HAZARD` ID. ### 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: none - [x] GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!14941
No description provided.