mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 00:53:02 -05:00
5.5 KiB
5.5 KiB
libSceHmd2 technical debt
Silent stubs
- libSceHmd2 has no PS VR2 runtime:
sceHmd2Initializereturns libSceHmd'sUNSUPPORTED_FEATURE(0x81110016) for any param, so the other calls answer as before initialization andsceHmd2OpenreturnsNotInitialized(0x8a720002). These results are restored from the behaviour before #7323 and are not measured on hardware: firmware 13.20's libSceHmd2, with the/dev/hmd2_cmdstate measured on a retail PS5 with no headset connected (connected flag 0, status 2, user -1), initializes, returns a handle fromsceHmd2Openand reportsNotDetected, which the code past the initialization check models but no title reaches. PPSA01317 passes a pointer to 16 zeroed bytes, only tests the result for non-zero and then skips its VR set-up; with initialization succeeding it stopped onsceHmd2ReprojectionQueryBufferSizeAlign(#6350). That export,sceHmd2ReprojectionQueryDisplayBufferSizeAlignandsceHmd2ReprojectionQuerySeeThroughBufferSizeAlignstay unimplemented and throw pending console measurements of their sizes and alignments. The other reprojection and gaze exports throw, and libSceVrTracker2 never initializes
Unknown function info
- PPSA09030 imports from its
Media/Plugins/psvr2.prxdeclared without parameters, signatures unknown, added without an implementation because the title fails to load the plugin without them: sceHmd2ReprojectionGetStatus (libSceHmd2) - sceHmd2Open (libSceHmd2) - the handle is the value the console's driver returned to the first open; titles built with an SDK before 7.00 may open for any user, and the firmware's
sceMbusAddHandleByUserIdresult for a user other than the initial one is unknown, so that case throws. 0x8a720006 for a second open is namedAlreadyOpenedfrom its use - sceHmd2SetVibration (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 exports that throw and the remaining libSceVrTracker2 exports. Names from the aerolib NID list
- PPSA15878 imports declared without parameters, signatures unknown: the libSceHmd2 reprojection and gaze exports,
sceVrTracker2Finalize,sceVrTracker2GetPlayAreaOrientedBoundingBoxandsceVrTracker2LocateCoordinateSystemin libSceVrTracker2, and thescePadVrControllertrigger effect exports in libScePad. Names from the aerolib NID list - libSceHmd2 gaze and reprojection exports (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,sceHmd2SetIpdOffsetare declared without parameters from the firmware export database (aerolib.csv); their guest signatures are unverified on hardware and every call throws
Functional
- sceHmd2Initialize (libSceHmd2) - the firmware also fails with 0x8a72001f when
sceKernelGetAppInfofails and with 0x8a72000a for some applications, depending on app info fields at 0x2c, 0x4b and 0x4d whose meaning is unknown, and then callssceMbusInit; none of this is modelled - sceHmd2ReprojectionQueryDisplayBufferSizeAlign, sceHmd2ReprojectionQuerySeeThroughBufferSizeAlign, sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign and sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign (libSceHmd2) - each returns a
{uint64 size, uint64 alignment}pair in RAX:RDX; the values were measured on a retail PS5 (firmware 13.60) with no PS VR2 headset from a homebrew payload that loadedlibSceHmd2.sprxwithout initializing it, and stayed the same for every argument tried;sceHmd2ReprojectionQueryBufferSizeAlignmeasured there returns 0x100828 and 0x100 for every argument, including the 2, 0xAF and 1 that PPSA05666 passes. They are assumed not to depend on initialization or on a connected headset, and their parameters are unknown