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

Closed
ErenYeager1836 wants to merge 1 commit from upstream-pr/7879 into main
ErenYeager1836 commented 2026-10-19 12:05:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-19T12:05:51Z.


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

  • 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
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #7635
  • Unblocks: PPSA34063
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4920650678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7879). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-19T12:05:51Z. --- ### 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 - [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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation `.md` files or images added to the repository - [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: #7635 - [x] Unblocks: PPSA34063 - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-19 12:16:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T12:16:54Z.


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
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6266996639 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7879#issuecomment-6266996639). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T12:16:54Z. --- <!-- pr-overlap --> 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](https://www.github.com/boykopovar/AnyPS5/pull/7814) | `core/libs/prx/libSceVideoOut/src/Output.cpp` [L22](https://github.com/boykopovar/AnyPS5/blob/b6583dd8687f359c2caea295cde23e4732b73433/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](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceVideoOut/src/Output.cpp`<br>`docs/dev/debt/libSceVideoOut.md` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `docs/dev/ENVIRONMENT.md` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `docs/dev/ENVIRONMENT.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `docs/dev/ENVIRONMENT.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `docs/dev/ENVIRONMENT.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceVideoOut/src/Output.cpp`<br>`docs/dev/debt/libSceVideoOut.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `docs/dev/ENVIRONMENT.md` | | [PR 7417](https://www.github.com/boykopovar/AnyPS5/pull/7417) | `docs/dev/ENVIRONMENT.md` | | [PR 7427](https://www.github.com/boykopovar/AnyPS5/pull/7427) | `docs/dev/ENVIRONMENT.md` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `docs/dev/ENVIRONMENT.md` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `docs/dev/ENVIRONMENT.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `docs/dev/ENVIRONMENT.md` | | [PR 7690](https://www.github.com/boykopovar/AnyPS5/pull/7690) | `docs/dev/debt/libSceVideoOut.md` |
fogydes commented 2026-10-19 12:25:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:25:53Z.

Review: COMMENTED


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`)*.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5571497241 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7879#pullrequestreview-5571497241). Originally posted by [fogydes](https://github.com/fogydes) on 2026-10-19T12:25:53Z. **Review:** COMMENTED --- 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: ```markdown ### 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 - [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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical 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: #7635 - [x] Unblocks: PPSA34063 #7635 - [x] GPUs tested: n/a - [x] AI-assisted: no ``` *(If AI assistance was used, adjust `AI-assisted` to `yes`)*.
ErenYeager1836 commented 2026-10-19 13:44:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-19T13:44:18Z.


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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6268695826 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7879#issuecomment-6268695826). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-19T13:44:18Z. --- Thanks for the verification @fogydes! Updated the PR description with the required `### Checklist` and `### Tested` sections. Conventions CI is now passing green.
adriadam10 commented 2026-10-19 17:59:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T17:59:03Z.


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

  • On #7635 ionut27001 measured on a real PS5 that sceVideoOutGetOutputStatus right after sceVideoOutOpen, with no buffer registered, reports resolution following the console/display resolution setting (2 on a 4K display set to Automatic, 1 when set to 1080p). #7814 reports it from the host display accordingly, in the same outputStatus in Output.cpp, so the two PRs overlap and cannot both land.
  • A presence-only environment switch that forces 4K for everyone who sets it is a per-title workaround (the debt entry names NHL 27), not the behaviour the console shows, and it leaves the default (the crash) in place.

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273757183 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7879#issuecomment-6273757183). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T17:59:03Z. --- Closing in favour of #7814, which fixes the same thing at the root. - On #7635 ionut27001 measured on a real PS5 that `sceVideoOutGetOutputStatus` right after `sceVideoOutOpen`, with no buffer registered, reports `resolution` following the console/display resolution setting (2 on a 4K display set to Automatic, 1 when set to 1080p). #7814 reports it from the host display accordingly, in the same `outputStatus` in `Output.cpp`, so the two PRs overlap and cannot both land. - A presence-only environment switch that forces 4K for everyone who sets it is a per-title workaround (the debt entry names NHL 27), not the behaviour the console shows, and it leaves the default (the crash) in place. 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.

Pull request closed

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!7879
No description provided.