diff --git a/core/libs/prx/libSceConvertKeycode/Export.cpp b/core/libs/prx/libSceConvertKeycode/Export.cpp index 2ac60a0cdba2..ec43b33b032c 100644 --- a/core/libs/prx/libSceConvertKeycode/Export.cpp +++ b/core/libs/prx/libSceConvertKeycode/Export.cpp @@ -27,4 +27,9 @@ int APS5_VABI sceConvertKeycodeGetCharacterFromKeyboardData(void) { return 0; } +int APS5_VABI sceConvertKeycodeGetCharacter(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libSceHmd2/CMakeLists.txt b/core/libs/prx/libSceHmd2/CMakeLists.txt index 84efff8feb21..ec2f4eb5426b 100644 --- a/core/libs/prx/libSceHmd2/CMakeLists.txt +++ b/core/libs/prx/libSceHmd2/CMakeLists.txt @@ -12,4 +12,13 @@ if(BUILD_TESTING) set_tests_properties(guest_hmd2 PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$") endif() + add_test_executable(guest_ppsa07411_exports_tests ${LIBS_INCLUDE_DIR}/tests/GuestPPSA07411Exports.cpp) + target_include_directories(guest_ppsa07411_exports_tests PRIVATE ${LIBS_INCLUDE_DIR}) + target_link_libraries(guest_ppsa07411_exports_tests PRIVATE libSceHmd2 libSceVrTracker2 libScePad libSceSsl libSceJson2 libSceSharePlay libSceNpSessionSignaling libSceConvertKeycode libc) + configure_windows_unwind(guest_ppsa07411_exports_tests) + add_test(NAME guest_ppsa07411_exports COMMAND guest_ppsa07411_exports_tests) + if(WIN32) + set_tests_properties(guest_ppsa07411_exports PROPERTIES ENVIRONMENT_MODIFICATION + "PATH=path_list_prepend:$") + endif() endif() diff --git a/core/libs/prx/libSceHmd2/Export.cpp b/core/libs/prx/libSceHmd2/Export.cpp index 2e1740373ca4..198853309405 100644 --- a/core/libs/prx/libSceHmd2/Export.cpp +++ b/core/libs/prx/libSceHmd2/Export.cpp @@ -96,4 +96,59 @@ int APS5_VABI sceHmd2SetVibration() { return 0; } +int APS5_VABI sceHmd2Terminate() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2GetDeviceInformationByHandle() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionTerminate() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionSetTiming() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionEnableMirroring() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionDisableMirroring() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2GetFieldOfView() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2GazeGetResult() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceHmd2ReprojectionSetParam() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libSceJson2/Export.cpp b/core/libs/prx/libSceJson2/Export.cpp index 672d857eee12..47ba366e9bc7 100644 --- a/core/libs/prx/libSceJson2/Export.cpp +++ b/core/libs/prx/libSceJson2/Export.cpp @@ -784,6 +784,7 @@ struct InitParameter2 { void* allocator; void* userData; std::size_t fileBufferSize; + std::uint32_t specialFloatFormatType; }; static_assert(sizeof(InitParameter2) <= 40); @@ -830,4 +831,29 @@ int APS5_VABI _ZN3sce4Json5Value21setNullAccessCallBackEPFRKS1_NS0_9ValueTypeEPS NotImplemented_nid_no_patch(__func__); return 0; } + +void APS5_VABI _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE(InitParameter2* self, std::uint32_t type) { + self->specialFloatFormatType = type; +} + +int APS5_VABI _ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI _ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI _ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI _ZNK3sce4Json5ValuecvbEv(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libSceNet/Export.cpp b/core/libs/prx/libSceNet/Export.cpp index 0775ad06b872..d735d9f95466 100644 --- a/core/libs/prx/libSceNet/Export.cpp +++ b/core/libs/prx/libSceNet/Export.cpp @@ -369,6 +369,9 @@ std::int64_t message_length(const NetMsghdr* message) { extern "C" { extern const std::uint32_t sce_net_in6addr_any[4] = {}; +alignas(std::uint32_t) extern const std::uint8_t sce_net_in6addr_linklocal_allnodes[16] = { + 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 +}; int* APS5_VABI sceNetErrnoLoc(void) { return errno_slot(); diff --git a/core/libs/prx/libSceNpSessionSignaling/Export.cpp b/core/libs/prx/libSceNpSessionSignaling/Export.cpp index b28941f1b625..b694abb6f273 100644 --- a/core/libs/prx/libSceNpSessionSignaling/Export.cpp +++ b/core/libs/prx/libSceNpSessionSignaling/Export.cpp @@ -93,4 +93,10 @@ int APS5_VABI sceNpSessionSignalingGetConnectionFromPeerAddress(void) { NotImplemented_nid_no_patch(__func__); return 0; } + +int APS5_VABI sceNpSessionSignalingGetGroupFromSessionId(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libScePad/Export.cpp b/core/libs/prx/libScePad/Export.cpp index 38bb59ca5bb9..2d02b425df07 100644 --- a/core/libs/prx/libScePad/Export.cpp +++ b/core/libs/prx/libScePad/Export.cpp @@ -283,4 +283,29 @@ int APS5_VABI scePadUnknown_n3kSX62fgNo() { return 0; } +int APS5_VABI scePadVrControllerSetVibration(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI scePadVrControllerSetVibrationMode(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI scePadVrControllerSetTriggerEffects(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI scePadVrControllerGetTriggerEffectState(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI scePadVrControllerReadCombinedState(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libSceSsl/Export.cpp b/core/libs/prx/libSceSsl/Export.cpp index e8fd49499126..4b3e23a4e9b3 100644 --- a/core/libs/prx/libSceSsl/Export.cpp +++ b/core/libs/prx/libSceSsl/Export.cpp @@ -159,4 +159,34 @@ int APS5_VABI sceSslGetSubjectName(void) { return 0; } +int APS5_VABI sceSslCreateConnection(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceSslDeleteConnection(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceSslEnableVerifyOption(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceSslConnect(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceSslRead(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceSslWrite(void) { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/prx/libSceVrTracker2/Export.cpp b/core/libs/prx/libSceVrTracker2/Export.cpp index 34024033d5b3..e808c2d17778 100644 --- a/core/libs/prx/libSceVrTracker2/Export.cpp +++ b/core/libs/prx/libSceVrTracker2/Export.cpp @@ -35,4 +35,19 @@ int APS5_VABI sceVrTracker2UnregisterDevice() { return 0; } +int APS5_VABI sceVrTracker2Finalize() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceVrTracker2ResetLocalCoordinate() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + +int APS5_VABI sceVrTracker2LocateCoordinateSystem() { + NotImplemented_nid_no_patch(__func__); + return 0; +} + } diff --git a/core/libs/tests/GuestJson.cpp b/core/libs/tests/GuestJson.cpp index 8150bc2491e6..a51d35a17907 100644 --- a/core/libs/tests/GuestJson.cpp +++ b/core/libs/tests/GuestJson.cpp @@ -85,6 +85,7 @@ Value* APS5_VABI _ZN3sce4Json5Value10referValueEm(Value*, std::size_t); void APS5_VABI _ZN3sce4Json14InitParameter2C1Ev(void*); void APS5_VABI _ZN3sce4Json14InitParameter212setAllocatorEPNS0_12MemAllocatorEPv(void*, void*, void*); void APS5_VABI _ZN3sce4Json14InitParameter217setFileBufferSizeEm(void*, std::size_t); +void APS5_VABI _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE(void*, std::uint32_t); int APS5_VABI _ZN3sce4Json11Initializer10initializeEPKNS0_14InitParameter2E(void*, const void*); } @@ -351,9 +352,14 @@ static void ValueAccess() { int userData = 0; _ZN3sce4Json14InitParameter212setAllocatorEPNS0_12MemAllocatorEPv(parameter, &allocator, &userData); _ZN3sce4Json14InitParameter217setFileBufferSizeEm(parameter, 4096); + _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE(parameter, 2); void* stored[3]{}; std::memcpy(stored, parameter, sizeof(stored)); Require(stored[0] == &allocator && stored[1] == &userData && reinterpret_cast(stored[2]) == 4096); + std::uint32_t storedType = 0; + std::memcpy(&storedType, parameter + sizeof(stored), sizeof(storedType)); + Require(storedType == 2); + for (std::size_t index = 32; index < sizeof(parameter); ++index) Require(parameter[index] == 0xff); alignas(16) std::uint8_t initializer[16]{}; Require(_ZN3sce4Json11InitializerC1Ev(initializer) == 0); Require(_ZN3sce4Json11Initializer10initializeEPKNS0_14InitParameter2E(initializer, parameter) == 0); diff --git a/core/libs/tests/GuestPPSA07411Exports.cpp b/core/libs/tests/GuestPPSA07411Exports.cpp new file mode 100644 index 000000000000..f7c9381ac4c3 --- /dev/null +++ b/core/libs/tests/GuestPPSA07411Exports.cpp @@ -0,0 +1,104 @@ +#include "prx/libc/include/general/VabiMacros.hpp" + +#include +#include +#include + +extern "C" { +int APS5_VABI sceHmd2Terminate(); +int APS5_VABI sceHmd2GetFieldOfView(); +int APS5_VABI sceHmd2GazeGetResult(); +int APS5_VABI sceHmd2ReprojectionSetParam(); +int APS5_VABI sceHmd2GetDeviceInformationByHandle(); +int APS5_VABI sceHmd2ReprojectionTerminate(); +int APS5_VABI sceHmd2ReprojectionSetTiming(); +int APS5_VABI sceHmd2ReprojectionEnableMirroring(); +int APS5_VABI sceHmd2ReprojectionDisableMirroring(); +int APS5_VABI sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign(); +int APS5_VABI sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign(); +int APS5_VABI sceVrTracker2Finalize(); +int APS5_VABI sceVrTracker2ResetLocalCoordinate(); +int APS5_VABI sceVrTracker2LocateCoordinateSystem(); +int APS5_VABI scePadVrControllerSetVibration(); +int APS5_VABI scePadVrControllerSetVibrationMode(); +int APS5_VABI scePadVrControllerSetTriggerEffects(); +int APS5_VABI scePadVrControllerGetTriggerEffectState(); +int APS5_VABI scePadVrControllerReadCombinedState(); +int APS5_VABI scePadUnknown_n3kSX62fgNo(); +int APS5_VABI sceSslCreateConnection(); +int APS5_VABI sceSslDeleteConnection(); +int APS5_VABI sceSslEnableVerifyOption(); +int APS5_VABI sceSslConnect(); +int APS5_VABI sceSslRead(); +int APS5_VABI sceSslWrite(); +int APS5_VABI sceConvertKeycodeGetCharacter(); +int APS5_VABI sceNpSessionSignalingGetGroupFromSessionId(); +int APS5_VABI _ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_(); +int APS5_VABI _ZN3sce4Json5Value21setNullAccessCallBackEPFRKS1_NS0_9ValueTypeEPS2_PvES6_(); +int APS5_VABI _ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_(); +int APS5_VABI _ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_(); +int APS5_VABI _ZNK3sce4Json5ValuecvbEv(); +} + +namespace { + +struct Export { + const char* name; + int (APS5_VABI *function)(); +}; + +const Export exports[] = { + {"sceHmd2Terminate", sceHmd2Terminate}, + {"sceHmd2GetFieldOfView", sceHmd2GetFieldOfView}, + {"sceHmd2GazeGetResult", sceHmd2GazeGetResult}, + {"sceHmd2ReprojectionSetParam", sceHmd2ReprojectionSetParam}, + {"sceHmd2GetDeviceInformationByHandle", sceHmd2GetDeviceInformationByHandle}, + {"sceHmd2ReprojectionTerminate", sceHmd2ReprojectionTerminate}, + {"sceHmd2ReprojectionSetTiming", sceHmd2ReprojectionSetTiming}, + {"sceHmd2ReprojectionEnableMirroring", sceHmd2ReprojectionEnableMirroring}, + {"sceHmd2ReprojectionDisableMirroring", sceHmd2ReprojectionDisableMirroring}, + {"sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign", sceHmd2ReprojectionGetMirroringWorkMemorySizeAlign}, + {"sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign", sceHmd2ReprojectionGetMirroringDisplayBufferSizeAlign}, + {"sceVrTracker2Finalize", sceVrTracker2Finalize}, + {"sceVrTracker2ResetLocalCoordinate", sceVrTracker2ResetLocalCoordinate}, + {"sceVrTracker2LocateCoordinateSystem", sceVrTracker2LocateCoordinateSystem}, + {"scePadVrControllerSetVibration", scePadVrControllerSetVibration}, + {"scePadVrControllerSetVibrationMode", scePadVrControllerSetVibrationMode}, + {"scePadVrControllerSetTriggerEffects", scePadVrControllerSetTriggerEffects}, + {"scePadVrControllerGetTriggerEffectState", scePadVrControllerGetTriggerEffectState}, + {"scePadVrControllerReadCombinedState", scePadVrControllerReadCombinedState}, + {"scePadUnknown_n3kSX62fgNo", scePadUnknown_n3kSX62fgNo}, + {"sceSslCreateConnection", sceSslCreateConnection}, + {"sceSslDeleteConnection", sceSslDeleteConnection}, + {"sceSslEnableVerifyOption", sceSslEnableVerifyOption}, + {"sceSslConnect", sceSslConnect}, + {"sceSslRead", sceSslRead}, + {"sceSslWrite", sceSslWrite}, + {"sceConvertKeycodeGetCharacter", sceConvertKeycodeGetCharacter}, + {"sceNpSessionSignalingGetGroupFromSessionId", sceNpSessionSignalingGetGroupFromSessionId}, + {"_ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_", _ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_}, + {"_ZN3sce4Json5Value21setNullAccessCallBackEPFRKS1_NS0_9ValueTypeEPS2_PvES6_", _ZN3sce4Json5Value21setNullAccessCallBackEPFRKS1_NS0_9ValueTypeEPS2_PvES6_}, + {"_ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_", _ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_}, + {"_ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_", _ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_}, + {"_ZNK3sce4Json5ValuecvbEv", _ZNK3sce4Json5ValuecvbEv}, +}; + +bool ReportsNotImplemented(const Export& entry) { + try { + entry.function(); + } catch (const std::runtime_error& error) { + if (std::string(error.what()) == std::string(entry.name) + " not implemented") return true; + std::fprintf(stderr, "%s threw: %s\n", entry.name, error.what()); + return false; + } + std::fprintf(stderr, "%s returned instead of reporting that it is not implemented\n", entry.name); + return false; +} + +} + +int main() { + bool correct = true; + for (const auto& entry : exports) correct &= ReportsNotImplemented(entry); + return correct ? 0 : 1; +} diff --git a/core/libs/tests/GuestSceNet.cpp b/core/libs/tests/GuestSceNet.cpp index e71c5d65c1a9..d3fe0a70bf4e 100644 --- a/core/libs/tests/GuestSceNet.cpp +++ b/core/libs/tests/GuestSceNet.cpp @@ -46,6 +46,7 @@ int APS5_VABI sceNetEpollWait(int, NetEpollEvent*, int, int); int APS5_VABI sceNetEpollDestroy(int); int APS5_VABI sceNetEpollAbort(int, int); extern const std::uint32_t sce_net_in6addr_any[4]; +extern const std::uint8_t sce_net_in6addr_linklocal_allnodes[16]; int APS5_VABI sceNetResolverCreate(const char*, int, int); int APS5_VABI sceNetResolverStartNtoa(int, const char*, void*, int, int, int); int APS5_VABI sceNetResolverStartNtoaMultipleRecordsEx(int, const char*, void*, int, int, int); @@ -225,6 +226,18 @@ static void CheckAddressText(int family, const char* text) { } static bool ipv6Unavailable = false; +static void CheckLinkLocalAllNodesIpv6() { + std::array address{}; + Require(sceNetInetPton(28, "ff02::1", address.data()) == 1); + Require(std::memcmp(sce_net_in6addr_linklocal_allnodes, address.data(), address.size()) == 0); + std::array text; + text.fill('x'); + Require(sceNetInetNtop(28, sce_net_in6addr_linklocal_allnodes, text.data(), 8) == text.data()); + Require(std::strcmp(text.data(), "ff02::1") == 0 && text[8] == 'x'); + address.fill(0xa5); + Require(sceNetInetPton(28, text.data(), address.data()) == 1); + Require(std::memcmp(sce_net_in6addr_linklocal_allnodes, address.data(), address.size()) == 0); +} static bool HostIpv6LoopbackUnavailable() { const auto hostSocket = ::socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); @@ -320,6 +333,7 @@ int main() { CheckAddressText(28, "::1"); CheckAddressText(28, "1234:5678:9abc:def0:1234:5678:9abc:def0"); CheckUnspecifiedIpv6(); + CheckLinkLocalAllNodesIpv6(); const int listener = sceNetSocket(nullptr, 2, 1, 6); Require(listener >= 0); diff --git a/docs/dev/TechnicalDebt.md b/docs/dev/TechnicalDebt.md index 0c72b62a7c82..008fce990060 100644 --- a/docs/dev/TechnicalDebt.md +++ b/docs/dev/TechnicalDebt.md @@ -332,7 +332,7 @@ Throughout the project, every function at every stage either **does exactly what - [sceNgs2VoiceControl sampler filter](../../core/libs/prx/libSceNgs2.native/src/Voice.cpp) (libSceNgs2.native) - param `0x1000000a`, its layout and meaning follow KytyPS5 only: location 1 type 1 is an RBJ low-pass biquad at the system sample rate after resampling, scaled by `level`, a set `channel_mask` bit bypasses that channel, type 0 turns the filter off. Other locations and types throw. The voice keeps playing a filter tail after its last block until the history is zero, with outputs below 1e-20 flushed to zero (a KytyPS5 choice); the console's tail length is unknown - [sceNgs2PanInit / sceNgs2PanGetVolumeMatrix](../../core/libs/prx/libSceNgs2.native/src/Pan.cpp) (libSceNgs2.native) - follow the PS4 firmware 11.00 `libSceNgs2.sprx`, read and checked against its output for 2, 4, 5 and 7 speakers into 1, 2, 6 and 8 channels; not yet confirmed on the PS5 library. Speakers are taken in the order L R, L R Ls Rs, L R C Ls Rs or L R C Ls Rs Lb Rb and kept in a fixed circular order, not sorted; without angles the defaults are 90/270, 40/110/250/320, 0/40/110/250/320 and 0/40/110/150/210/250/320 degrees. As in that library, defaults converted to radians keep the wrap-around entry in degrees, so angles past the last speaker pan almost fully to it. Error codes are not known for the PS5, so invalid arguments throw, including a speaker angle equal to the unit angle, on which that library loops forever. Angles so large that adding or subtracting a turn leaves them unchanged throw for the same reason - [sceRtcGetDosTime, sceRtcSetDosTime](../../core/libs/prx/libSceRtc/Export.cpp) (libSceRtc) - bit layout from shadPS4 (PS4, the standard FAT date/time). A year outside 1980-2107 makes `GetDosTime` return `INVALID_YEAR` after writing 0 for an earlier one and `0xff9fbf7d` (2107-12-31 23:59:58, the largest encodable time) for a later one, and `SetDosTime` decodes the year as the unsigned 7-bit FAT field (1980-2107) without validating the fields, as the disassembly-derived [fpPS4](https://github.com/red-prig/fpPS4) reimplementation of the PS4 library does; not confirmed on a PS5 title, and shadPS4 instead masks out-of-range years into the packed value and sign-extends the 16-bit date -- [sce::Json::InitParameter2](../../core/libs/prx/libSceJson2/Export.cpp) (libSceJson2) - layout inferred, not known: assumed to start with the allocator, its user data and the file buffer size, in that order, and the whole struct is assumed to fit in 40 bytes; `Initializer::initialize(InitParameter2)` ignores them as `initialize(InitParameter)` does +- [sce::Json::InitParameter2](../../core/libs/prx/libSceJson2/Export.cpp) (libSceJson2) - layout inferred, not known: assumed to start with the allocator, its user data and the file buffer size, in that order, and the whole struct is assumed to fit in 40 bytes; `Initializer::initialize(InitParameter2)` ignores them as `initialize(InitParameter)` does; `setSpecialFloatFormatType(SpecialFloatFormatType)` stores the value as a 32-bit integer after the file buffer size (its place in the structure is assumed, and nothing reads it) - [sceAjmBatchJobSetResampleParameters, sceAjmBatchJobGetResampleInfo](../../core/libs/prx/libSceAjm.native/src/Ajm.cpp) (libSceAjm) - the ratio is taken as decoded samples per output sample and num_samples as the decoded samples the resampler holds, both inferred from FMOD (Hades II); the console's interpolation is unknown, a 4-point Catmull-Rom is used. The flags argument is ignored, as in shadPS4 and Kyty - [scePlayerReviewDialogOpen, scePlayerReviewDialogGetResult](../../core/libs/prx/libSceCdlgPlayerReview/Export.cpp) (libSceCdlgPlayerReview) - the PS5-only dialog has no public reference: the parameter is not read and the result is assumed to start with the 32-bit common dialog result, as `sceWebBrowserDialogGetResult` assumes - [sceHttpWaitRequest](../../core/libs/prx/libSceHttp/Export.cpp) (libSceHttp) - the timeout is assumed to be in microseconds and a negative timeout to wait without limit; the invalid-value error for a null handle or event array or a non-positive event count is assumed, not measured. No request is ever pending, so the call waits for the timeout and returns 0 events, and a wait without limit throws @@ -597,3 +597,4 @@ Throughout the project, every function at every stage either **does exactly what - [_fstatfs](../../core/libs/prx/libkernel/File/src/Stdio.cpp) (libkernel) fills the FreeBSD 11 `struct statfs` of the PS5 payload SDK with the host volume that holds the file: block size, transfer size, total, free and available blocks, maximum name length and the read-only, `nosuid` and `noexec` flags (on Windows only read-only, and `f_files` and `f_ffree` are 0, as NTFS has no fixed number of files). The filesystem type number and name, mount paths, owner, filesystem id and I/O counters are left 0 or empty, since they would describe a host mount, not a console one. Sockets and pipes return `EINVAL`, as FreeBSD's `getvnode` does; a Windows descriptor that is neither a file nor a pipe throws. Stremio Plus (PPSA74126) reads the free space before a download and only logs the other fields - [_WStoul](../../core/libs/prx/libc/src/Strings.cpp), [_Iswctype](../../core/libs/prx/libc/src/RuneLocale.cpp) and [swscanf_s](../../core/libs/prx/libc/src/ScanningWide.cpp) (libc) - `_WStoul` is `wcstoul` and throws for a base other than 0 or 2 to 36. `_Iswctype` takes the class numbers of Dinkumware's [xwcc.h](https://github.com/superna9999/ti-cgt6x/blob/cgt6x_7_3_4/include/xwcc.h) (1 `alnum` to 11 `xdigit`, 12 `blank`) and throws for any other value, including the FreeBSD masks `wctype` returns; the numbering is not confirmed on the console's `libc.prx`. `swscanf_s` follows C11 7.29.2.2 and K.3.9.1.5, but reads the size argument as `unsigned int` like `sscanf_s` where K.3.9.1.5 specifies `rsize_t`; the console's width is unverified. A runtime-constraint violation (null buffer, format or receiving pointer) only returns `EOF`, and a too small array gets a null first element as in `sscanf_s`. A literal mismatch is a matching failure and a field that is only a prefix, such as `0x` or `1e`, does not convert, as C11 requires; FreeBSD's `vfwscanf` reports an input failure for the first and converts the second. Integers out of range are truncated from `strtoll`/`strtoull`. It throws for `%p`, `%S`, `%C`, unknown length modifiers, scanset ranges, `%n` with suppression or width, and narrow `%s`, `%c` or `%[` input that the C-locale `wcrtomb` cannot convert - [sceSharePlayGetCurrentConnectionInfoA](../../core/libs/prx/libSceSharePlay/Export.cpp) (libSceSharePlay) - reports no Share Play session, as the library keeps none: status 0 (DORMANT), mode 0, empty online IDs, account IDs 0 and both user IDs -1 (`SCE_USER_SERVICE_USER_ID_INVALID`). A null pointer returns `SCE_SHARE_PLAY_ERROR_INVALID_ARGS` (0x810E0001). The 72-byte `SceSharePlayConnectionInfoA` layout and the error code follow [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libNet.cpp) and [fpPS4](https://github.com/red-prig/fpPS4/blob/trunk/src/ps4_libsceshareplay.pas), which agree on both; KytyPS5 sets the user IDs to -1 and fpPS4 leaves them 0, and which one the console returns is not verified. KytyPS5 also returns `SCE_SHARE_PLAY_ERROR_NOT_INITIALIZED` before `sceSharePlayInitialize`; this library keeps no initialization state and does not. +- PPSA07411 imports declared without parameters, signatures unknown, added without an implementation because the title fails to load without them: [sceHmd2Terminate, sceHmd2GetFieldOfView, sceHmd2GazeGetResult, sceHmd2GetDeviceInformationByHandle and the sceHmd2Reprojection* calls](../../core/libs/prx/libSceHmd2/Export.cpp) (libSceHmd2), [sceVrTracker2Finalize, sceVrTracker2ResetLocalCoordinate, sceVrTracker2LocateCoordinateSystem](../../core/libs/prx/libSceVrTracker2/Export.cpp) (libSceVrTracker2), [the scePadVrController* calls and `n3kSX62fgNo`](../../core/libs/prx/libScePad/Export.cpp) (libScePad, the name of `n3kSX62fgNo` is unknown), [sceSslCreateConnection, sceSslDeleteConnection, sceSslEnableVerifyOption, sceSslConnect, sceSslRead, sceSslWrite](../../core/libs/prx/libSceSsl/Export.cpp) (libSceSsl), [ sce::Json::Value members](../../core/libs/prx/libSceJson2/Export.cpp) (libSceJson2), [sceConvertKeycodeGetCharacter](../../core/libs/prx/libSceConvertKeycode/Export.cpp) (libSceConvertKeycode) and [sceNpSessionSignalingGetGroupFromSessionId](../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling)