fix(exports): export the PS VR2 calls PPSA07411 imports that no library has #4044

Merged
xXPBSXx merged 2 commits from upstream-pr/4044 into main 2026-10-12 07:01:14 +00:00
xXPBSXx commented 2026-10-11 22:02:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T22:02:43Z.


What

Resident Evil 4 (PPSA07411) imports seven PS VR2 calls that no library exports; #3537 adds other calls of the same family but not these. This PR declares them without parameters as throwing stubs (signatures unknown), as #1347 did for PPSA01317:

Library Exports
libSceHmd2 sceHmd2GetDeviceInformationByHandle, sceHmd2GetFieldOfView, sceHmd2Terminate
libScePad scePadVrControllerSetVibration, scePadVrControllerSetVibrationMode, scePadVrControllerReadCombinedState
libSceVrTracker2 sceVrTracker2ResetLocalCoordinate

Names come from the aerolib NID list (tools/nid_names.py). No test is added, since CONTRIBUTING says not to test that a symbol is exported; a TechnicalDebt entry lists the stubs. Overlap with #3537, checked with gh pr diff 3537: it declares sceHmd2GazeGetResult, sceHmd2Reprojection{DisableMirroring,EnableMirroring,GetMirroringDisplayBufferSizeAlign,GetMirroringWorkMemorySizeAlign,SetMirroringOption,SetParam,SetTiming,Terminate}, scePadVrControllerGetTriggerEffectState, scePadVrControllerSetTriggerEffect(s), sceVrTracker2Finalize, sceVrTracker2GetPlayAreaOrientedBoundingBox and sceVrTracker2LocateCoordinateSystem; none of the seven names here (main has sceHmd2GetFieldOfViewWithoutHandle but not sceHmd2GetFieldOfView). Both PRs append to the same three Export.cpp files, so they can conflict textually; this PR therefore inserts after the first function of each file. The title's other missing imports are covered by #3773 (Ssl, Json, ConvertKeycode, NpSessionSignaling), #3737 (Json setSpecialFloatFormatType), #3707 (libSceNet) and #3537. Each stub is added after the first function of its file, away from the end where #3537 appends.

Tested

  • Windows, MinGW GCC 15.2.0: libSceHmd2, libScePad and libSceVrTracker2 build (on a base from before this rebase, with #4021 applied for the unrelated Windows HostPoll build break of the current main); tools/check_conventions.py --base upstream/main passes after rebasing onto main. I searched the open PRs for these names and found none.
  • The RE4 import audit on a stack of main plus #3537, #3737, #3791, #3517, #3604 and #3707 lists exactly these names (together with the ones in #3773) as the remaining absent imports.
  • Not tested: running PPSA07411 with this change; the stubs throw.

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 in TechnicalDebt
  • 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 (no shared names with #3537; possible textual conflict only)
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4822707013 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4044). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T22:02:43Z. --- ### What Resident Evil 4 (PPSA07411) imports seven PS VR2 calls that no library exports; #3537 adds other calls of the same family but not these. This PR declares them without parameters as throwing stubs (signatures unknown), as #1347 did for PPSA01317: | Library | Exports | |---|---| | `libSceHmd2` | `sceHmd2GetDeviceInformationByHandle`, `sceHmd2GetFieldOfView`, `sceHmd2Terminate` | | `libScePad` | `scePadVrControllerSetVibration`, `scePadVrControllerSetVibrationMode`, `scePadVrControllerReadCombinedState` | | `libSceVrTracker2` | `sceVrTracker2ResetLocalCoordinate` | Names come from the aerolib NID list (`tools/nid_names.py`). No test is added, since CONTRIBUTING says not to test that a symbol is exported; a TechnicalDebt entry lists the stubs. Overlap with #3537, checked with `gh pr diff 3537`: it declares `sceHmd2GazeGetResult`, `sceHmd2Reprojection{DisableMirroring,EnableMirroring,GetMirroringDisplayBufferSizeAlign,GetMirroringWorkMemorySizeAlign,SetMirroringOption,SetParam,SetTiming,Terminate}`, `scePadVrControllerGetTriggerEffectState`, `scePadVrControllerSetTriggerEffect(s)`, `sceVrTracker2Finalize`, `sceVrTracker2GetPlayAreaOrientedBoundingBox` and `sceVrTracker2LocateCoordinateSystem`; none of the seven names here (`main` has `sceHmd2GetFieldOfViewWithoutHandle` but not `sceHmd2GetFieldOfView`). Both PRs append to the same three `Export.cpp` files, so they can conflict textually; this PR therefore inserts after the first function of each file. The title's other missing imports are covered by #3773 (Ssl, Json, ConvertKeycode, NpSessionSignaling), #3737 (Json `setSpecialFloatFormatType`), #3707 (libSceNet) and #3537. Each stub is added after the first function of its file, away from the end where #3537 appends. ### Tested - Windows, MinGW GCC 15.2.0: `libSceHmd2`, `libScePad` and `libSceVrTracker2` build (on a base from before this rebase, with #4021 applied for the unrelated Windows `HostPoll` build break of the current `main`); `tools/check_conventions.py --base upstream/main` passes after rebasing onto `main`. I searched the open PRs for these names and found none. - The RE4 import audit on a stack of `main` plus #3537, #3737, #3791, #3517, #3604 and #3707 lists exactly these names (together with the ones in #3773) as the remaining absent imports. - Not tested: running PPSA07411 with this change; the stubs throw. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 (no shared names with #3537; possible textual conflict only) - [x] AI-assisted: yes (Claude Code)
github-actions[bot] commented 2026-10-11 22:25:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T22:25:05Z.


Progress report (dd1cf5c → 859d0b1)

📉 System libraries: 86.07% (-0.17%, +7 declared functions)

🆕 7 declared as stubs
Library Name
libSceHmd2 sceHmd2GetDeviceInformationByHandle
libSceHmd2 sceHmd2GetFieldOfView
libSceHmd2 sceHmd2Terminate
libScePad scePadVrControllerReadCombinedState
libScePad scePadVrControllerSetVibration
libScePad scePadVrControllerSetVibrationMode
libSceVrTracker2 sceVrTracker2ResetLocalCoordinate
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114570320 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4044#issuecomment-6114570320). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T22:25:05Z. --- <!-- progress-report --> ### Progress report (dd1cf5c → 859d0b1) 📉 **System libraries**: 86.07% (-0.17%, +7 declared functions) <details> <summary>🆕 7 declared as stubs</summary> | Library | Name | | - | - | | libSceHmd2 | `sceHmd2GetDeviceInformationByHandle` | | libSceHmd2 | `sceHmd2GetFieldOfView` | | libSceHmd2 | `sceHmd2Terminate` | | libScePad | `scePadVrControllerReadCombinedState` | | libScePad | `scePadVrControllerSetVibration` | | libScePad | `scePadVrControllerSetVibrationMode` | | libSceVrTracker2 | `sceVrTracker2ResetLocalCoordinate` | </details>
github-actions[bot] commented 2026-10-11 22:28:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T22:28:18Z.


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
#3820 core/libs/prx/libSceHmd2/Export.cpp L18-21
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114597803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4044#issuecomment-6114597803). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T22:28:18Z. --- <!-- 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 | |---|---|---|---| | #3820 | `core/libs/prx/libSceHmd2/Export.cpp` [L18-21](https://github.com/boykopovar/AnyPS5/blob/d06c06565717961104edecdab46ce61c8cc72a70/core/libs/prx/libSceHmd2/Export.cpp#L18-L21) | | |
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!4044
No description provided.