fix(exports): export the PS VR2 calls Phasmophobia's psvr2.prx imports #5960

Merged
KernelPanicNT merged 1 commit from upstream-pr/5960 into main 2026-10-16 21:25:35 +00:00
KernelPanicNT commented 2026-10-14 17:11:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KernelPanicNT on 2026-10-14T17:11:49Z.


What

Phasmophobia (PPSA09030) ships a PS VR2 plugin, Media/Plugins/psvr2.prx, that imports three calls no library exports, so with --module-dir Media/Plugins the executable does not start (current-main status in the Game bring-up thread, 14 October; the workaround there is --exclude-sce-module psvr2.prx). This PR declares them without parameters as throwing stubs (signatures unknown), as #4044 did for PPSA07411 and #3819 for PPSA29866:

Library NID Export
libSceHmd2 8GkaY2B7opM sceHmd2ReprojectionGetStatus
libSceVrTracker2 Y-3JCiU9bbU sceVrTracker2GetCoordinateSystem
libSceVrTracker2 SCph4ZbkqzU sceVrTracker2GetPlayAreaBoundaryGeometry

The library of each NID comes from the title's load error; the names come from the aerolib NID list (tools/nid_names.py --nid resolves each NID to these names, and --name computes the same NIDs back). No public reference gives their signatures, so nothing beyond the declarations is implemented. A docs/dev/debt/libSceHmd2.md entry under Unknown function info lists the three, next to the PPSA29866 one. No test is added, since CONTRIBUTING says not to test that a symbol is exported.

If the plugin calls one of these during start-up, the title will now stop on a named not implemented throw instead of failing to load the plugin.

Tested

Head 9a0aa5f6a7671adc5123bc162aa254a1f52132cc, base a453108cf7768b71879b0e832d367a935c43440d.

  • Windows, full Build workflow on my fork (run 38601160601), this head merged into main at e34c479210c78d7b160d7054f3e72de422b23d7a, WinLibs MinGW-w64 GCC 15.2.0, Release, BUILD_TESTING=ON: libSceHmd2 and libSceVrTracker2 build and pass NID patching; 1198/1198 tests pass, including guest_hmd2.
  • Linux (Ubuntu 24.04, GCC 14.2.0, Ninja, Release, BUILD_TESTING=ON, AMD EPYC 7763 in GitHub Codespaces): both libraries build and pass NID patching, and the patched .prx files export 8GkaY2B7opM (libSceHmd2) and Y-3JCiU9bbU, SCph4ZbkqzU (libSceVrTracker2) as global functions (readelf --dyn-syms); guest_hmd2 passes.
  • tools/nid_names.py resolves the three NIDs to these names and computes the same NIDs from them. Conventions checker and git diff --check pass.
  • Not tested: running PPSA09030 with the plugin loaded; the stubs throw if the plugin calls them.

Duplicate and overlap check

Searched open, merged and closed PRs for the three names, their NIDs, PPSA09030 and psvr2.prx: none declares them. #5118 (closed) declared 20 other PS VR2 names, none of these three; #4682 and #5094 (merged) are the other PPSA09030 changes. Re-checked on 2026-10-15: four later PRs by @mazen320 touch the same files, and none declares these NIDs or names. #6253 and #6269 rewrite or remove line 9 of docs/dev/debt/libSceHmd2.md, the PPSA29866 entry this PR adds its line after, so whichever merges second needs a one-line rebase there (the upstream overlap check reports the same); #6271 and #6272 touch libSceVrTracker2/Export.cpp, libSceHmd2/Export.cpp and the same debt file and merge with this PR without conflict in either order.

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
  • Unblocks: PPSA09030 #4680 (load of psvr2.prx)
  • GPUs tested: n/a
  • AI-assisted: yes (Claude)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4861582085 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5960). Originally posted by [KernelPanicNT](https://github.com/KernelPanicNT) on 2026-10-14T17:11:49Z. --- ### What Phasmophobia (PPSA09030) ships a PS VR2 plugin, `Media/Plugins/psvr2.prx`, that imports three calls no library exports, so with `--module-dir Media/Plugins` the executable does not start (current-`main` status in the [Game bring-up thread, 14 October](https://github.com/boykopovar/AnyPS5/discussions/4680); the workaround there is `--exclude-sce-module psvr2.prx`). This PR declares them without parameters as throwing stubs (signatures unknown), as #4044 did for PPSA07411 and #3819 for PPSA29866: | Library | NID | Export | |---|---|---| | `libSceHmd2` | `8GkaY2B7opM` | `sceHmd2ReprojectionGetStatus` | | `libSceVrTracker2` | `Y-3JCiU9bbU` | `sceVrTracker2GetCoordinateSystem` | | `libSceVrTracker2` | `SCph4ZbkqzU` | `sceVrTracker2GetPlayAreaBoundaryGeometry` | The library of each NID comes from the title's load error; the names come from the aerolib NID list (`tools/nid_names.py --nid` resolves each NID to these names, and `--name` computes the same NIDs back). No public reference gives their signatures, so nothing beyond the declarations is implemented. A `docs/dev/debt/libSceHmd2.md` entry under Unknown function info lists the three, next to the PPSA29866 one. No test is added, since CONTRIBUTING says not to test that a symbol is exported. If the plugin calls one of these during start-up, the title will now stop on a named `not implemented` throw instead of failing to load the plugin. ### Tested Head `9a0aa5f6a7671adc5123bc162aa254a1f52132cc`, base `a453108cf7768b71879b0e832d367a935c43440d`. - **Windows, full Build workflow on my fork** ([run 38601160601](https://github.com/KernelPanicNT/AnyPS5/actions/runs/38601160601)), this head merged into `main` at `e34c479210c78d7b160d7054f3e72de422b23d7a`, WinLibs MinGW-w64 GCC 15.2.0, Release, `BUILD_TESTING=ON`: `libSceHmd2` and `libSceVrTracker2` build and pass NID patching; 1198/1198 tests pass, including `guest_hmd2`. - **Linux** (Ubuntu 24.04, GCC 14.2.0, Ninja, Release, `BUILD_TESTING=ON`, AMD EPYC 7763 in GitHub Codespaces): both libraries build and pass NID patching, and the patched `.prx` files export `8GkaY2B7opM` (`libSceHmd2`) and `Y-3JCiU9bbU`, `SCph4ZbkqzU` (`libSceVrTracker2`) as global functions (`readelf --dyn-syms`); `guest_hmd2` passes. - `tools/nid_names.py` resolves the three NIDs to these names and computes the same NIDs from them. Conventions checker and `git diff --check` pass. - Not tested: running PPSA09030 with the plugin loaded; the stubs throw if the plugin calls them. ### Duplicate and overlap check Searched open, merged and closed PRs for the three names, their NIDs, PPSA09030 and `psvr2.prx`: none declares them. #5118 (closed) declared 20 other PS VR2 names, none of these three; #4682 and #5094 (merged) are the other PPSA09030 changes. Re-checked on 2026-10-15: four later PRs by @mazen320 touch the same files, and none declares these NIDs or names. #6253 and #6269 rewrite or remove line 9 of `docs/dev/debt/libSceHmd2.md`, the PPSA29866 entry this PR adds its line after, so whichever merges second needs a one-line rebase there (the upstream overlap check reports the same); #6271 and #6272 touch `libSceVrTracker2/Export.cpp`, `libSceHmd2/Export.cpp` and the same debt file and merge with this PR without conflict in either order. ### 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] Unblocks: PPSA09030 #4680 (load of `psvr2.prx`) - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude)
github-actions[bot] commented 2026-10-14 17:12:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T17:12:28Z.


Progress report (5ef619a → 9a0aa5f)

📉 System libraries: 88.63% (-0.08%, +3 declared functions)

🆕 3 declared as stubs
Library Name
libSceHmd2 sceHmd2ReprojectionGetStatus
libSceVrTracker2 sceVrTracker2GetCoordinateSystem
libSceVrTracker2 sceVrTracker2GetPlayAreaBoundaryGeometry
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6173990012 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5960#issuecomment-6173990012). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T17:12:28Z. --- <!-- progress-report --> ### Progress report (5ef619a → 9a0aa5f) 📉 **System libraries**: 88.63% (-0.08%, +3 declared functions) <details> <summary>🆕 3 declared as stubs</summary> | Library | Name | | - | - | | libSceHmd2 | `sceHmd2ReprojectionGetStatus` | | libSceVrTracker2 | `sceVrTracker2GetCoordinateSystem` | | libSceVrTracker2 | `sceVrTracker2GetPlayAreaBoundaryGeometry` | </details>
github-actions[bot] commented 2026-10-15 15:58:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T15:58:47Z.


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 6844 sceHmd2ReprojectionGetStatus

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 6447 docs/dev/debt/libSceHmd2.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6196411524 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5960#issuecomment-6196411524). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T15:58:47Z. --- <!-- 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 6844](https://www.github.com/boykopovar/AnyPS5/pull/6844) | | `sceHmd2ReprojectionGetStatus` | | 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 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | `docs/dev/debt/libSceHmd2.md` |
adriadam10 commented 2026-10-16 19:01:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T19:01:32Z.


Checked the three NIDs against tools/nid_names.py (8GkaY2B7opM, Y-3JCiU9bbU, SCph4ZbkqzU), that none exists on main, the throwing stubs and the debt line under Unknown function info; libSceHmd2 tests build and pass; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222663032 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5960#issuecomment-6222663032). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T19:01:32Z. --- Checked the three NIDs against `tools/nid_names.py` (`8GkaY2B7opM`, `Y-3JCiU9bbU`, `SCph4ZbkqzU`), that none exists on `main`, the throwing stubs and the debt line under Unknown function info; `libSceHmd2` tests build and pass; merging.
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!5960
No description provided.