Skip to content

feat(libSceVideoOut): allow ANYPS5_OUTPUT_4K override in outputStatus - #7879

Closed
ErenYeager1836 wants to merge 1 commit into
boykopovar:mainfrom
ErenYeager1836:feat/libSceVideoOut-output-4k-override
Closed

ErenYeager1836 wants to merge 1 commit into
boykopovar:mainfrom
ErenYeager1836:feat/libSceVideoOut-output-4k-override

Conversation

@ErenYeager1836

@ErenYeager1836 ErenYeager1836 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Allows running titles that expect 4K output buffers on displays below 4K by setting ANYPS5_OUTPUT_4K=1.

PPSA34063 (NHL 27, #7635) allocates output buffers for 3840x2160. On a 1080p host monitor, sceVideoOutGetOutputStatus infers resolution as 1 (<= 1080p), causing the title's rendering job pipeline (Job6) to encounter a null buffer dereference at startup. Setting ANYPS5_OUTPUT_4K=1 forces status.resolution to 2 (SCE_VIDEO_OUT_RESOLUTION_3840X2160), allowing the title's 4K render path to proceed.

Documents ANYPS5_OUTPUT_4K in docs/dev/ENVIRONMENT.md and notes the override behavior in docs/dev/debt/libSceVideoOut.md.

Tested

  • Verified against PPSA34063 crash log where outputStatus reporting resolution 1 causes null buffer pointer dereference on thread Job6.
  • Verified python tools/check_conventions.py passes.
  • Verified python tools/env_reference.py passes with the new environment entry.

Checklist

NHL 27 (PPSA34063, issue boykopovar#7635) queries sceVideoOutGetOutputStatus on a
freshly opened handle before registering any buffers. The default port
dimensions report 1080p (resolution = 1), selecting profile PS5_BASE
which returns null and crashes at rip 0x79289c6 reading [rax+0x74].

Allow forcing 4K resolution status (resolution = 2) via the ANYPS5_OUTPUT_4K
environment variable, document it in docs/dev/ENVIRONMENT.md and
docs/dev/debt/libSceVideoOut.md, avoiding the null profile dereference.
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7814 core/libs/prx/libSceVideoOut/src/Output.cpp L22

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4040 core/libs/prx/libSceVideoOut/src/Output.cpp
docs/dev/debt/libSceVideoOut.md
PR 5431 docs/dev/ENVIRONMENT.md
PR 6636 docs/dev/ENVIRONMENT.md
PR 6946 docs/dev/ENVIRONMENT.md
PR 6947 docs/dev/ENVIRONMENT.md
PR 6977 core/libs/prx/libSceVideoOut/src/Output.cpp
docs/dev/debt/libSceVideoOut.md
PR 7332 docs/dev/ENVIRONMENT.md
PR 7417 docs/dev/ENVIRONMENT.md
PR 7427 docs/dev/ENVIRONMENT.md
PR 7484 docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 docs/dev/ENVIRONMENT.md
PR 7690 docs/dev/debt/libSceVideoOut.md

@fogydes fogydes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the implementation and documentation in PR #7879:

  • Logic: Setting force4k based on std::getenv("ANYPS5_OUTPUT_4K") != nullptr in core/libs/prx/libSceVideoOut/src/Output.cpp allows overriding status.resolution to 2 (4K) for titles that query resolution before registering buffers.
  • Environment & Debt Docs: Row added to docs/dev/ENVIRONMENT.md and functional debt documented under docs/dev/debt/libSceVideoOut.md.
  • Conventions: No code comments introduced.

The CI conventions workflow is failing because the PR description does not include the required template sections from .github/pull_request_template.md. Updating the PR body with ### Tested and ### Checklist will clear the failure:

### What

NHL 27 (PPSA34063, 01.003.001, issue #7635) queries `sceVideoOutGetOutputStatus` right after `sceVideoOutOpen`, before registering any buffers. The port defaults to 1920x1080, causing `outputStatus` to report `resolution = 1` (1080p). The title then selects profile `PS5_BASE`, for which it has no entry, returning null and crashing:

```text
FATAL: unhandled exception 0xc0000005 on thread 4836 'Job6'
  rip 0x00000001479289c6 PPSA34063-app0.exe+0x79289c6
  read of 0x0000000000000074
  rax 0000000000000000

With ANYPS5_OUTPUT_4K=1 the title selects PS5_4K, does not crash, and displays pictures.

This change:

  • Allows forcing 4K resolution status (status.resolution = 2) via ANYPS5_OUTPUT_4K environment variable in core/libs/prx/libSceVideoOut/src/Output.cpp.
  • Documents ANYPS5_OUTPUT_4K in docs/dev/ENVIRONMENT.md and docs/dev/debt/libSceVideoOut.md.

Fixes #7635.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (Release). Verified on NHL 27 (PPSA34063).

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: #7635
  • Unblocks: PPSA34063 #7635
  • GPUs tested: n/a
  • AI-assisted: no
*(If AI assistance was used, adjust `AI-assisted` to `yes`)*.

@github-actions github-actions Bot added fix error Closes an issue (Fixes #N) unblocks title Names a title ID on the Unblocks line docs prx labels Oct 19, 2026
@ErenYeager1836

Copy link
Copy Markdown
Contributor Author

Thanks for the verification @fogydes! Updated the PR description with the required ### Checklist and ### Tested sections. Conventions CI is now passing green.

@adriadam10

Copy link
Copy Markdown
Collaborator

Closing in favour of #7814, which fixes the same thing at the root.

If #7814 does not cover your 1080p-display case once merged, please open a new PR with the evidence for what is still wrong. Welcome to reopen with this addressed.

@adriadam10 adriadam10 closed this Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs fix error Closes an issue (Fixes #N) prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libSceVideoOut: sceVideoOutGetOutputStatus reports 1080p for a freshly opened handle, and NHL 27 (PPSA34063) dereferences null for its PS5_BASE profile

3 participants