Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions core/libs/prx/libSceHmd2/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,164 @@ std::int32_t APS5_VABI sceHmd2SetVibration(std::int32_t handle, std::uint32_t le
return 0;
}

int APS5_VABI sceHmd2GazeGetCalibrationData() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeGetCalibrationDataMaxSize() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionClearUserEventEnd() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionClearUserEventStart() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionGetCurrentOutput() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSetUserEventEnd() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSetUserEventStart() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeActivateGazeTracking() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeGetDeviceStatus() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeGetUserCalibrationStatus() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeInsertRawDataWithHandle() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeSetEnabledEye() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeSetUserCalibrationData() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeSetUserCalibrationPoint() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeStartUserCalibration() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeStopUserCalibration() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSeeThroughDraw() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSeeThroughIC() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionVideoOutEq() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionWaitShader() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2SeeThroughCallbackGetPoseDataFunc() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeObjectSelectionGetSelectedObject() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeObjectSelectionInitialize() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeObjectSelectionQueryMemory() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2GazeObjectSelectionTerminate() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionClear() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSet() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSetEventGpuEnd() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2ReprojectionSetEventGpuStart() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2RpeorjectionSetParam() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2SetFieldOfView() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

int APS5_VABI sceHmd2SetIpdOffset() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

}
27 changes: 27 additions & 0 deletions core/libs/tests/GuestHmd2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <stdexcept>

extern "C" {
int APS5_VABI sceHmd2GazeActivateGazeTracking();
int APS5_VABI sceHmd2ReprojectionGetCurrentOutput();
int APS5_VABI sceHmd2SetFieldOfView();
}
namespace {

alignas(16) std::array<std::byte, 0x40> process{};
Expand Down Expand Up @@ -61,6 +67,27 @@ int main() {
InstallProcessParameters();
TestBeforeInitialize();
TestWithoutHeadset();
bool threw = false;
try {
sceHmd2GazeActivateGazeTracking();
} catch (const std::runtime_error&) {
threw = true;
}
Require(threw, "gaze activation did not throw");
threw = false;
try {
sceHmd2ReprojectionGetCurrentOutput();
} catch (const std::runtime_error&) {
threw = true;
}
Require(threw, "reprojection get current output did not throw");
threw = false;
try {
sceHmd2SetFieldOfView();
} catch (const std::runtime_error&) {
threw = true;
}
Require(threw, "set field of view did not throw");
std::puts("HMD2 tests passed");
return 0;
}
1 change: 1 addition & 0 deletions docs/dev/debt/libSceHmd2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [sceHmd2SetVibration](../../../core/libs/prx/libSceHmd2/Export.cpp) (libSceHmd2) - the second parameter is checked against 25 only while a headset is connected; its name and unit are unknown. The field of view member names are assumed: of the firmware's default tangents the first is the widest and the last two are equal
- PPSA01317 imports declared without parameters, signatures unknown: the [libSceHmd2](../../../core/libs/prx/libSceHmd2/Export.cpp) exports that throw and the remaining [libSceVrTracker2](../../../core/libs/prx/libSceVrTracker2/Export.cpp) exports. Names from the aerolib NID list
- PPSA15878 imports declared without parameters, signatures unknown: the [libSceHmd2](../../../core/libs/prx/libSceHmd2/Export.cpp) reprojection and gaze exports, `sceVrTracker2Finalize`, `sceVrTracker2GetPlayAreaOrientedBoundingBox` and `sceVrTracker2LocateCoordinateSystem` in [libSceVrTracker2](../../../core/libs/prx/libSceVrTracker2/Export.cpp), and the `scePadVrController` trigger effect exports in [libScePad](../../../core/libs/prx/libScePad/Export.cpp). Names from the aerolib NID list
- [libSceHmd2 gaze and reprojection exports](../../../core/libs/prx/libSceHmd2/Export.cpp) (libSceHmd2) - `sceHmd2GazeGetCalibrationData`, `sceHmd2GazeGetCalibrationDataMaxSize`, `sceHmd2ReprojectionClearUserEventEnd`, `sceHmd2ReprojectionClearUserEventStart`, `sceHmd2ReprojectionGetCurrentOutput`, `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` are declared without parameters from the firmware export database (aerolib.csv); their guest signatures are unverified on hardware and every call throws

Check warning on line 15 in docs/dev/debt/libSceHmd2.md

View workflow job for this annotation

GitHub Actions / conventions

debt-length

Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1401 characters

### Functional

Expand Down
Loading