feat(libSceHmd2): export missing firmware functions from database #6844

Merged
al3w0f205 merged 1 commit from upstream-pr/6844 into main 2026-10-19 12:03:47 +00:00
al3w0f205 commented 2026-10-16 14:08:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by al3w0f205 on 2026-10-16T14:08:41Z.


What

Adds missing libSceHmd2 functions identified from firmware export databases (aerolib.csv) as explicit throwing stubs (NotImplemented_nid_no_patch(__func__)). Also documents the unverified guest signatures under ### Unknown function info in docs/dev/debt/libSceHmd2.md and verifies throwing behavior in guest tests.

Exported functions:

  • sceHmd2GazeGetCalibrationData
  • sceHmd2GazeGetCalibrationDataMaxSize
  • sceHmd2ReprojectionClearUserEventEnd
  • sceHmd2ReprojectionClearUserEventStart
  • sceHmd2ReprojectionGetCurrentOutput
  • sceHmd2ReprojectionGetStatus
  • sceHmd2ReprojectionSetUserEventEnd
  • sceHmd2ReprojectionSetUserEventStart
  • sceHmd2GazeActivateGazeTracking
  • sceHmd2GazeGetDeviceStatus
  • sceHmd2GazeGetUserCalibrationStatus
  • sceHmd2GazeInsertRawDataWithHandle
  • sceHmd2GazeSetEnabledEye
  • sceHmd2GazeSetUserCalibrationData
  • sceHmd2GazeSetUserCalibrationPoint
  • sceHmd2GazeStartUserCalibration
  • sceHmd2GazeStopUserCalibration
  • sceHmd2ReprojectionSeeThroughDraw
  • sceHmd2ReprojectionSeeThroughIC
  • sceHmd2ReprojectionVideoOutEq
  • sceHmd2ReprojectionWaitShader
  • sceHmd2SeeThroughCallbackGetPoseDataFunc
  • sceHmd2GazeObjectSelectionGetSelectedObject
  • sceHmd2GazeObjectSelectionInitialize
  • sceHmd2GazeObjectSelectionQueryMemory
  • sceHmd2GazeObjectSelectionTerminate
  • sceHmd2ReprojectionClear
  • sceHmd2ReprojectionSet
  • sceHmd2ReprojectionSetEventGpuEnd
  • sceHmd2ReprojectionSetEventGpuStart
  • sceHmd2RpeorjectionSetParam
  • sceHmd2SetFieldOfView
  • sceHmd2SetIpdOffset

Tested

  • Windows 11, MinGW64 Ninja build
  • CTest test suite passed 100%
  • tools/check_conventions.py --base origin/main passed with 0 errors

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: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4889562127 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844). Originally posted by [al3w0f205](https://github.com/al3w0f205) on 2026-10-16T14:08:41Z. --- ### What Adds missing `libSceHmd2` functions identified from firmware export databases (`aerolib.csv`) as explicit throwing stubs (`NotImplemented_nid_no_patch(__func__)`). Also documents the unverified guest signatures under `### Unknown function info` in `docs/dev/debt/libSceHmd2.md` and verifies throwing behavior in guest tests. Exported functions: - `sceHmd2GazeGetCalibrationData` - `sceHmd2GazeGetCalibrationDataMaxSize` - `sceHmd2ReprojectionClearUserEventEnd` - `sceHmd2ReprojectionClearUserEventStart` - `sceHmd2ReprojectionGetCurrentOutput` - `sceHmd2ReprojectionGetStatus` - `sceHmd2ReprojectionSetUserEventEnd` - `sceHmd2ReprojectionSetUserEventStart` - `sceHmd2GazeActivateGazeTracking` - `sceHmd2GazeGetDeviceStatus` - `sceHmd2GazeGetUserCalibrationStatus` - `sceHmd2GazeInsertRawDataWithHandle` - `sceHmd2GazeSetEnabledEye` - `sceHmd2GazeSetUserCalibrationData` - `sceHmd2GazeSetUserCalibrationPoint` - `sceHmd2GazeStartUserCalibration` - `sceHmd2GazeStopUserCalibration` - `sceHmd2ReprojectionSeeThroughDraw` - `sceHmd2ReprojectionSeeThroughIC` - `sceHmd2ReprojectionVideoOutEq` - `sceHmd2ReprojectionWaitShader` - `sceHmd2SeeThroughCallbackGetPoseDataFunc` - `sceHmd2GazeObjectSelectionGetSelectedObject` - `sceHmd2GazeObjectSelectionInitialize` - `sceHmd2GazeObjectSelectionQueryMemory` - `sceHmd2GazeObjectSelectionTerminate` - `sceHmd2ReprojectionClear` - `sceHmd2ReprojectionSet` - `sceHmd2ReprojectionSetEventGpuEnd` - `sceHmd2ReprojectionSetEventGpuStart` - `sceHmd2RpeorjectionSetParam` - `sceHmd2SetFieldOfView` - `sceHmd2SetIpdOffset` ### Tested - Windows 11, MinGW64 Ninja build - CTest test suite passed 100% - `tools/check_conventions.py --base origin/main` passed with 0 errors ### 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 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: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-16 14:09:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T14:09:30Z.


Progress report (c74aeb2 → 05bdd6a)

📉 System libraries: 82.18% (-0.56%, +32 declared functions)

🆕 32 declared as stubs
Library Name
libSceHmd2 sceHmd2GazeActivateGazeTracking
libSceHmd2 sceHmd2GazeGetCalibrationData
libSceHmd2 sceHmd2GazeGetCalibrationDataMaxSize
libSceHmd2 sceHmd2GazeGetDeviceStatus
libSceHmd2 sceHmd2GazeGetUserCalibrationStatus
libSceHmd2 sceHmd2GazeInsertRawDataWithHandle
libSceHmd2 sceHmd2GazeObjectSelectionGetSelectedObject
libSceHmd2 sceHmd2GazeObjectSelectionInitialize
libSceHmd2 sceHmd2GazeObjectSelectionQueryMemory
libSceHmd2 sceHmd2GazeObjectSelectionTerminate
libSceHmd2 sceHmd2GazeSetEnabledEye
libSceHmd2 sceHmd2GazeSetUserCalibrationData
libSceHmd2 sceHmd2GazeSetUserCalibrationPoint
libSceHmd2 sceHmd2GazeStartUserCalibration
libSceHmd2 sceHmd2GazeStopUserCalibration
libSceHmd2 sceHmd2ReprojectionClear
libSceHmd2 sceHmd2ReprojectionClearUserEventEnd
libSceHmd2 sceHmd2ReprojectionClearUserEventStart
libSceHmd2 sceHmd2ReprojectionGetCurrentOutput
libSceHmd2 sceHmd2ReprojectionSeeThroughDraw
libSceHmd2 sceHmd2ReprojectionSeeThroughIC
libSceHmd2 sceHmd2ReprojectionSet
libSceHmd2 sceHmd2ReprojectionSetEventGpuEnd
libSceHmd2 sceHmd2ReprojectionSetEventGpuStart
libSceHmd2 sceHmd2ReprojectionSetUserEventEnd
libSceHmd2 sceHmd2ReprojectionSetUserEventStart
libSceHmd2 sceHmd2ReprojectionVideoOutEq
libSceHmd2 sceHmd2ReprojectionWaitShader
libSceHmd2 sceHmd2RpeorjectionSetParam
libSceHmd2 sceHmd2SeeThroughCallbackGetPoseDataFunc
libSceHmd2 sceHmd2SetFieldOfView
libSceHmd2 sceHmd2SetIpdOffset
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217318089 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844#issuecomment-6217318089). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T14:09:30Z. --- <!-- progress-report --> ### Progress report (c74aeb2 → 05bdd6a) 📉 **System libraries**: 82.18% (-0.56%, +32 declared functions) <details> <summary>🆕 32 declared as stubs</summary> | Library | Name | | - | - | | libSceHmd2 | `sceHmd2GazeActivateGazeTracking` | | libSceHmd2 | `sceHmd2GazeGetCalibrationData` | | libSceHmd2 | `sceHmd2GazeGetCalibrationDataMaxSize` | | libSceHmd2 | `sceHmd2GazeGetDeviceStatus` | | libSceHmd2 | `sceHmd2GazeGetUserCalibrationStatus` | | libSceHmd2 | `sceHmd2GazeInsertRawDataWithHandle` | | libSceHmd2 | `sceHmd2GazeObjectSelectionGetSelectedObject` | | libSceHmd2 | `sceHmd2GazeObjectSelectionInitialize` | | libSceHmd2 | `sceHmd2GazeObjectSelectionQueryMemory` | | libSceHmd2 | `sceHmd2GazeObjectSelectionTerminate` | | libSceHmd2 | `sceHmd2GazeSetEnabledEye` | | libSceHmd2 | `sceHmd2GazeSetUserCalibrationData` | | libSceHmd2 | `sceHmd2GazeSetUserCalibrationPoint` | | libSceHmd2 | `sceHmd2GazeStartUserCalibration` | | libSceHmd2 | `sceHmd2GazeStopUserCalibration` | | libSceHmd2 | `sceHmd2ReprojectionClear` | | libSceHmd2 | `sceHmd2ReprojectionClearUserEventEnd` | | libSceHmd2 | `sceHmd2ReprojectionClearUserEventStart` | | libSceHmd2 | `sceHmd2ReprojectionGetCurrentOutput` | | libSceHmd2 | `sceHmd2ReprojectionSeeThroughDraw` | | libSceHmd2 | `sceHmd2ReprojectionSeeThroughIC` | | libSceHmd2 | `sceHmd2ReprojectionSet` | | libSceHmd2 | `sceHmd2ReprojectionSetEventGpuEnd` | | libSceHmd2 | `sceHmd2ReprojectionSetEventGpuStart` | | libSceHmd2 | `sceHmd2ReprojectionSetUserEventEnd` | | libSceHmd2 | `sceHmd2ReprojectionSetUserEventStart` | | libSceHmd2 | `sceHmd2ReprojectionVideoOutEq` | | libSceHmd2 | `sceHmd2ReprojectionWaitShader` | | libSceHmd2 | `sceHmd2RpeorjectionSetParam` | | libSceHmd2 | `sceHmd2SeeThroughCallbackGetPoseDataFunc` | | libSceHmd2 | `sceHmd2SetFieldOfView` | | libSceHmd2 | `sceHmd2SetIpdOffset` | </details>
github-actions[bot] commented 2026-10-16 14:39:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T14:39:55Z.


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 7658 core/libs/tests/GuestHmd2.cpp L10-11, L63
docs/dev/debt/libSceHmd2.md L14
PR 7798 core/libs/prx/libSceHmd2/Export.cpp L223
core/libs/tests/GuestHmd2.cpp L10-11
PR 7805 core/libs/prx/libSceHmd2/Export.cpp L223
core/libs/tests/GuestHmd2.cpp L10-11
PR 7826 core/libs/prx/libSceHmd2/Export.cpp L223
core/libs/tests/GuestHmd2.cpp L10-11

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 6044 core/libs/tests/GuestHmd2.cpp
PR 7463 docs/dev/debt/libSceHmd2.md
PR 7690 core/libs/prx/libSceHmd2/Export.cpp
core/libs/tests/GuestHmd2.cpp
docs/dev/debt/libSceHmd2.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217904148 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844#issuecomment-6217904148). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T14:39:55Z. --- <!-- 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 7658](https://www.github.com/boykopovar/AnyPS5/pull/7658) | `core/libs/tests/GuestHmd2.cpp` [L10-11](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/tests/GuestHmd2.cpp#L10-L11), [L63](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/tests/GuestHmd2.cpp#L63)<br>`docs/dev/debt/libSceHmd2.md` [L14](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/docs/dev/debt/libSceHmd2.md#L14) | | | | [PR 7798](https://www.github.com/boykopovar/AnyPS5/pull/7798) | `core/libs/prx/libSceHmd2/Export.cpp` [L223](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/prx/libSceHmd2/Export.cpp#L223)<br>`core/libs/tests/GuestHmd2.cpp` [L10-11](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/tests/GuestHmd2.cpp#L10-L11) | | | | [PR 7805](https://www.github.com/boykopovar/AnyPS5/pull/7805) | `core/libs/prx/libSceHmd2/Export.cpp` [L223](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/prx/libSceHmd2/Export.cpp#L223)<br>`core/libs/tests/GuestHmd2.cpp` [L10-11](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/tests/GuestHmd2.cpp#L10-L11) | | | | [PR 7826](https://www.github.com/boykopovar/AnyPS5/pull/7826) | `core/libs/prx/libSceHmd2/Export.cpp` [L223](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/prx/libSceHmd2/Export.cpp#L223)<br>`core/libs/tests/GuestHmd2.cpp` [L10-11](https://github.com/boykopovar/AnyPS5/blob/c82ffb0f20723ea46756fdacb07ffe69fbf2bfc5/core/libs/tests/GuestHmd2.cpp#L10-L11) | | | 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 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestHmd2.cpp` | | [PR 7463](https://www.github.com/boykopovar/AnyPS5/pull/7463) | `docs/dev/debt/libSceHmd2.md` | | [PR 7690](https://www.github.com/boykopovar/AnyPS5/pull/7690) | `core/libs/prx/libSceHmd2/Export.cpp`<br>`core/libs/tests/GuestHmd2.cpp`<br>`docs/dev/debt/libSceHmd2.md` |
MarcZX10 commented 2026-10-18 00:40:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T00:40:45Z.


Manual overlap check from #7323 found one concrete issue: upstream/main already defines sceHmd2ReprojectionGetStatus() at core/libs/prx/libSceHmd2/Export.cpp:14-17, while this PR adds a second definition of the same function near the end of that file. If merged as-is, the translation unit will contain duplicate definitions. Please drop this entry from the added stubs (the existing main definition already exports it); the other new exports can remain.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243829907 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844#issuecomment-6243829907). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T00:40:45Z. --- Manual overlap check from #7323 found one concrete issue: `upstream/main` already defines `sceHmd2ReprojectionGetStatus()` at `core/libs/prx/libSceHmd2/Export.cpp:14-17`, while this PR adds a second definition of the same function near the end of that file. If merged as-is, the translation unit will contain duplicate definitions. Please drop this entry from the added stubs (the existing main definition already exports it); the other new exports can remain.
oneandonlydean commented 2026-10-18 00:57:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T00:57:21Z.


Heads up: this needs a rebase onto current main. #5960 has since added sceHmd2ReprojectionGetStatus to main, so this branch merges without a text conflict but then has a duplicate definition of it. #7323 (which reorders libSceHmd2/Export.cpp) is also going in first; after it, Export.cpp merges automatically and only GuestHmd2.cpp conflicts. Could you rebase onto main once #7323 lands and drop the duplicate? We'll review the new head then.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243966729 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844#issuecomment-6243966729). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T00:57:21Z. --- Heads up: this needs a rebase onto current main. #5960 has since added `sceHmd2ReprojectionGetStatus` to main, so this branch merges without a text conflict but then has a duplicate definition of it. #7323 (which reorders `libSceHmd2/Export.cpp`) is also going in first; after it, `Export.cpp` merges automatically and only `GuestHmd2.cpp` conflicts. Could you rebase onto main once #7323 lands and drop the duplicate? We'll review the new head then.
al3w0f205 commented 2026-10-18 01:19:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by al3w0f205 on 2026-10-18T01:19:49Z.


Rebased onto current main following #7323, resolved the GuestHmd2.cpp test conflict, and dropped the duplicate sceHmd2ReprojectionGetStatus definition from core/libs/prx/libSceHmd2/Export.cpp.

Verified with guest_hmd2 passing 100% and ools/check_conventions.py passing cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244152750 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844#issuecomment-6244152750). Originally posted by [al3w0f205](https://github.com/al3w0f205) on 2026-10-18T01:19:49Z. --- Rebased onto current main following #7323, resolved the GuestHmd2.cpp test conflict, and dropped the duplicate sceHmd2ReprojectionGetStatus definition from core/libs/prx/libSceHmd2/Export.cpp. Verified with guest_hmd2 passing 100% and ools/check_conventions.py passing cleanly.
adriadam10 commented 2026-10-19 12:06:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T12:06:34Z.


Rebased onto current main (the head on the PR still conflicted in GuestHmd2.cpp) and pushed it as one commit:

  • GuestHmd2.cpp: kept main's TestWithoutHeadset() call and your three throw checks, added the missing <stdexcept> include.
  • docs/dev/debt/libSceHmd2.md: dropped sceHmd2ReprojectionGetStatus from the new line, since main already defines it.

None of the 32 added exports exist on main, and guest_hmd2 plus the rest of the scoped suite pass; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6266805536 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6844#issuecomment-6266805536). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T12:06:34Z. --- Rebased onto current main (the head on the PR still conflicted in `GuestHmd2.cpp`) and pushed it as one commit: - `GuestHmd2.cpp`: kept main's `TestWithoutHeadset()` call and your three throw checks, added the missing `<stdexcept>` include. - `docs/dev/debt/libSceHmd2.md`: dropped `sceHmd2ReprojectionGetStatus` from the new line, since main already defines it. None of the 32 added exports exist on main, and `guest_hmd2` plus the rest of the scoped suite pass; merged.
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!6844
No description provided.