Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
KernelPanicNT:fix/export-phasmophobia-psvr2-imports
Oct 16, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
KernelPanicNT:fix/export-phasmophobia-psvr2-imports

Conversation

@KernelPanicNT

@KernelPanicNT KernelPanicNT commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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 PPSA09030 Phasmophobia #4680 (load of psvr2.prx)
  • GPUs tested: n/a
  • AI-assisted: yes (Claude)

PPSA09030's Media/Plugins/psvr2.prx imports sceHmd2ReprojectionGetStatus
from libSceHmd2 and sceVrTracker2GetCoordinateSystem and
sceVrTracker2GetPlayAreaBoundaryGeometry from libSceVrTracker2, so the
title does not start with the plugin loaded (discussion boykopovar#4680). Declare
the three as throwing exports, like the earlier PS VR2 imports of
PPSA29866. The names resolve from the NIDs 8GkaY2B7opM, Y-3JCiU9bbU
and SCph4ZbkqzU with tools/nid_names.py; no reference gives their
signatures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Oct 15, 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 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

@adriadam10 adriadam10 self-assigned this Oct 16, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

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.

@adriadam10
adriadam10 merged commit 6e66776 into boykopovar:main Oct 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants