fix(libSceVideoOut): export unknown Onimusha import NID #5608

Merged
hossiendehghan989 merged 1 commit from upstream-pr/5608 into main 2026-10-14 07:17:13 +00:00
hossiendehghan989 commented 2026-10-14 01:02:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hossiendehghan989 on 2026-10-14T01:02:13Z.


What

Addresses #5595 by exporting the unresolved libSceVideoOut NID YNw9Xk5iNWo.

Onimusha Way of the Sword (PPSA27836) currently fails while loading libSceVideoOut.prx because this newer-SDK import is not present in the library. This change exposes the NID through the same explicit-export path used for other unknown VideoOut functions, allowing module loading to proceed to the next unresolved dependency.

The observed import shape is represented as (handle, status), but the semantic name, output layout, and console behavior are not known. This PR deliberately does not guess an implementation or silently return success: if the function is reached, it reports NotImplemented_nid_no_patch. The technical-debt entry records the limitation and the evidence needed for a future implementation. This PR does not claim to fully implement the issue; it isolates the missing export without hiding the remaining runtime work.

Tested

  • git diff --check
  • g++ -std=c++20 -fsyntax-only -Icore/libs -Icore -Icore/libs/prx -I3rdparty/SDL2/include core/libs/prx/libSceVideoOut/Unimplemented.cpp
  • Compiled the translation unit and verified with nm that YNw9Xk5iNWo_nid_no_patch_cut is exported.
  • GitHub Conventions check passed after the description was corrected.
  • Full CMake/Windows game bring-up was not run in this Linux sandbox.

Checklist

  • Based on current main; no other open PR implements the same function
  • 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); the limitation is recorded in docs/dev/debt/libSceVideoOut.md
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behavior, not specific to one title
  • Depends on: none
  • Unblocks module loading for PPSA27836; issue #5595 remains open for the actual implementation
  • GPUs tested: n/a (export-only change; no GPU tests run)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4851468528 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608). Originally posted by [hossiendehghan989](https://github.com/hossiendehghan989) on 2026-10-14T01:02:13Z. --- ### What Addresses #5595 by exporting the unresolved `libSceVideoOut` NID `YNw9Xk5iNWo`. Onimusha Way of the Sword (`PPSA27836`) currently fails while loading `libSceVideoOut.prx` because this newer-SDK import is not present in the library. This change exposes the NID through the same explicit-export path used for other unknown VideoOut functions, allowing module loading to proceed to the next unresolved dependency. The observed import shape is represented as `(handle, status)`, but the semantic name, output layout, and console behavior are not known. This PR deliberately does not guess an implementation or silently return success: if the function is reached, it reports `NotImplemented_nid_no_patch`. The technical-debt entry records the limitation and the evidence needed for a future implementation. This PR does not claim to fully implement the issue; it isolates the missing export without hiding the remaining runtime work. ### Tested - `git diff --check` - `g++ -std=c++20 -fsyntax-only -Icore/libs -Icore -Icore/libs/prx -I3rdparty/SDL2/include core/libs/prx/libSceVideoOut/Unimplemented.cpp` - Compiled the translation unit and verified with `nm` that `YNw9Xk5iNWo_nid_no_patch_cut` is exported. - GitHub Conventions check passed after the description was corrected. - Full CMake/Windows game bring-up was not run in this Linux sandbox. ### Checklist - [x] Based on current `main`; no other open PR implements the same function - [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`); the limitation is recorded in `docs/dev/debt/libSceVideoOut.md` - [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 behavior, not specific to one title - [x] Depends on: none - [x] Unblocks module loading for `PPSA27836`; issue #5595 remains open for the actual implementation - [x] GPUs tested: n/a (export-only change; no GPU tests run) - [x] AI-assisted: yes
hossiendehghan989 commented 2026-10-14 01:09:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hossiendehghan989 on 2026-10-14T01:09:58Z.


Follow-up validation after the initial PR review:

  • Added explicit (void) use for the existing unknown VideoOut stub parameters so the translation unit is clean under -Wall -Wextra -Wpedantic -Werror.
  • tools/check_conventions.py passes.
  • Strict C++20 syntax and object compilation pass.
  • readelf -Ws confirms the requested NID alias is present as YNw9Xk5iNWo_nid_no_patch_cut and resolves to sceVideoOutUnknown_YNw9Xk5iNWo.

The PR remains deliberately export-only. It unblocks module loading without inventing the unknown function semantics; issue #5595 stays open for the real implementation once the ABI and output layout are known.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158613048 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6158613048). Originally posted by [hossiendehghan989](https://github.com/hossiendehghan989) on 2026-10-14T01:09:58Z. --- Follow-up validation after the initial PR review: - Added explicit (void) use for the existing unknown VideoOut stub parameters so the translation unit is clean under -Wall -Wextra -Wpedantic -Werror. - tools/check_conventions.py passes. - Strict C++20 syntax and object compilation pass. - readelf -Ws confirms the requested NID alias is present as YNw9Xk5iNWo_nid_no_patch_cut and resolves to sceVideoOutUnknown_YNw9Xk5iNWo. The PR remains deliberately export-only. It unblocks module loading without inventing the unknown function semantics; issue #5595 stays open for the real implementation once the ABI and output layout are known.
Amirtheshwaran commented 2026-10-14 03:15:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amirtheshwaran on 2026-10-14T03:15:50Z.


Tested on Windows 11 (WinLibs MinGW GCC 15.2.0 r7, Ninja, CMake):

  • Merges cleanly into current \main.
  • \libSceVideoOut\ builds:
    • \uild/core/libs/libs/unpatched/libSceVideoOut.prx\ exports \sceVideoOutUnknown_YNw9Xk5iNWo\ (and alias \YNw9Xk5iNWo_nid_no_patch_cut).
    • The patched \uild/core/libs/libs/libSceVideoOut.prx\ exports \YNw9Xk5iNWo.
  • \check_conventions.py\ and \git diff --check\ pass.
  • \docs/dev/debt/libSceVideoOut.md\ links and formats cleanly.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6160075081 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6160075081). Originally posted by [Amirtheshwaran](https://github.com/Amirtheshwaran) on 2026-10-14T03:15:50Z. --- Tested on Windows 11 (WinLibs MinGW GCC 15.2.0 r7, Ninja, CMake): - Merges cleanly into current \main\. - \libSceVideoOut\ builds: - \uild/core/libs/libs/unpatched/libSceVideoOut.prx\ exports \sceVideoOutUnknown_YNw9Xk5iNWo\ (and alias \YNw9Xk5iNWo_nid_no_patch_cut\). - The patched \uild/core/libs/libs/libSceVideoOut.prx\ exports \YNw9Xk5iNWo\. - \check_conventions.py\ and \git diff --check\ pass. - \docs/dev/debt/libSceVideoOut.md\ links and formats cleanly.
oneandonlydean commented 2026-10-14 05:11:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T05:11:24Z.


Our PPSA27836 is v01.000.001, which doesn't import YNw9Xk5iNWo, so we can't exercise it here. Which version of the title imports it? The export only throws if called, so it can go in on a green build; the version helps the next person who hits the stop.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6161399541 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6161399541). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T05:11:24Z. --- Our PPSA27836 is v01.000.001, which doesn't import `YNw9Xk5iNWo`, so we can't exercise it here. Which version of the title imports it? The export only throws if called, so it can go in on a green build; the version helps the next person who hits the stop.
MarcZX10 commented 2026-10-14 06:46:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T06:46:43Z.


The linked issue identifies the import in Onimusha WotS Patch v01.000.002. The reporter later confirmed Base v01.000.001 has no such import; that narrows this export-only fix to the Patch build or other consumers. See the version-specific update on #5595.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6162603899 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6162603899). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T06:46:43Z. --- The linked issue identifies the import in Onimusha WotS Patch v01.000.002. The reporter later confirmed Base v01.000.001 has no such import; that narrows this export-only fix to the Patch build or other consumers. See the version-specific update on #5595.
oneandonlydean commented 2026-10-14 07:04:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T07:04:19Z.


Rebased onto main: main already has sceVideoOutGetOutputStatusWithVrr in Output.cpp, so the second commit became empty and dropped. What's left is the Onimusha NID export and its debt line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6162856406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6162856406). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T07:04:19Z. --- Rebased onto main: main already has `sceVideoOutGetOutputStatusWithVrr` in `Output.cpp`, so the second commit became empty and dropped. What's left is the Onimusha NID export and its debt line.
Raghav314 commented 2026-10-14 08:58:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-14T08:58:33Z.


This breaks presentation on main for me: since this merged, Hades II (PPSA36082) aborts at its first present with

[videoout] presentation failed: YNw9Xk5iNWo not implemented
terminate called after throwing an instance of 'std::runtime_error'
  what():  YNw9Xk5iNWo not implemented

I ran it on my machine (Linux, CachyOS, GCC, RTX 4090): 872f52320 aborts like this, d8888df9b (just before this PR) runs, and 872f52320 with only 5dc711192 reverted runs again.

YNw9Xk5iNWo is not a video out function. It is the NID of MouseIsOpen, AnyPS5's own helper: libSceMouse exports MouseIsOpen_nid_postfix, which the NID patch turns into YNw9Xk5iNWo (nm -D libSceMouse.prx lists T YNw9Xk5iNWo), and libSceVideoOut's presenter calls it every frame through MouseInput::UpdateCapture (nm -D libSceVideoOut.prx lists U YNw9Xk5iNWo). With this PR, libSceVideoOut defines a symbol of the same name itself, so its own call binds to the new stub instead of libSceMouse's helper, and the stub throws inside the presentation thread. This probably hits every title that presents, not only Hades II.

So the unresolved YNw9Xk5iNWo seen with Onimusha was most likely libSceVideoOut's import of MouseIsOpen with libSceMouse not loaded, not an import of the game. I think the export should be removed again (and its debt entry), and the Onimusha case looked at from the module loading side.

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6164711408 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6164711408). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-14T08:58:33Z. --- This breaks presentation on `main` for me: since this merged, Hades II (PPSA36082) aborts at its first present with ``` [videoout] presentation failed: YNw9Xk5iNWo not implemented terminate called after throwing an instance of 'std::runtime_error' what(): YNw9Xk5iNWo not implemented ``` I ran it on my machine (Linux, CachyOS, GCC, RTX 4090): 872f52320 aborts like this, d8888df9b (just before this PR) runs, and 872f52320 with only 5dc711192 reverted runs again. `YNw9Xk5iNWo` is not a video out function. It is the NID of `MouseIsOpen`, AnyPS5's own helper: `libSceMouse` exports `MouseIsOpen_nid_postfix`, which the NID patch turns into `YNw9Xk5iNWo` (`nm -D libSceMouse.prx` lists `T YNw9Xk5iNWo`), and `libSceVideoOut`'s presenter calls it every frame through `MouseInput::UpdateCapture` (`nm -D libSceVideoOut.prx` lists `U YNw9Xk5iNWo`). With this PR, `libSceVideoOut` defines a symbol of the same name itself, so its own call binds to the new stub instead of `libSceMouse`'s helper, and the stub throws inside the presentation thread. This probably hits every title that presents, not only Hades II. So the unresolved `YNw9Xk5iNWo` seen with Onimusha was most likely `libSceVideoOut`'s import of `MouseIsOpen` with `libSceMouse` not loaded, not an import of the game. I think the export should be removed again (and its debt entry), and the Onimusha case looked at from the module loading side. LLM assistance used.
oneandonlydean commented 2026-10-14 08:59:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T08:59:37Z.


Reverted in #5738, thanks @Raghav314, that's the cause: the stub took over libSceVideoOut's own call to MouseIsOpen (NID YNw9Xk5iNWo), so every present threw. Dreaming Sarah hit it too. @hossiendehghan989 the unresolved YNw9Xk5iNWo in the Onimusha log is that internal import, which means libSceMouse wasn't loaded there; if Onimusha still stops on it on current main, please post the module list from that run.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6164728903 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6164728903). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T08:59:37Z. --- Reverted in #5738, thanks @Raghav314, that's the cause: the stub took over `libSceVideoOut`'s own call to `MouseIsOpen` (NID `YNw9Xk5iNWo`), so every present threw. Dreaming Sarah hit it too. @hossiendehghan989 the unresolved `YNw9Xk5iNWo` in the Onimusha log is that internal import, which means `libSceMouse` wasn't loaded there; if Onimusha still stops on it on current `main`, please post the module list from that run.
hossiendehghan989 commented 2026-10-14 15:51:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hossiendehghan989 on 2026-10-14T15:51:01Z.


Thanks for tracing this to the internal MouseIsOpen import and reverting the change. I missed that exporting the same NID from libSceVideoOut could redirect its own call to the throwing stub; sorry for the regression. I have not rerun Onimusha against current main, so I do not have a module list to add. I will not reintroduce an export-only stub; any follow-up should start from the loader/module-loading path and evidence from a current repro.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6172394247 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5608#issuecomment-6172394247). Originally posted by [hossiendehghan989](https://github.com/hossiendehghan989) on 2026-10-14T15:51:01Z. --- Thanks for tracing this to the internal `MouseIsOpen` import and reverting the change. I missed that exporting the same NID from `libSceVideoOut` could redirect its own call to the throwing stub; sorry for the regression. I have not rerun Onimusha against current `main`, so I do not have a module list to add. I will not reintroduce an export-only stub; any follow-up should start from the loader/module-loading path and evidence from a current repro.
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!5608
No description provided.