On Linux ngs2_atrac9 aborted without any output once TestParseFile was part of
its main(). The exception that TestCorruptSuperframeAtPageEnd throws in the
Ngs2 module and catches in main() has to resume through a cleanup landing pad
inside main(). That resume goes through the unwinder statically linked into the
test executable, which then fails with _URC_FATAL_PHASE2_ERROR and aborts
silently. Whether main() gets such a pad depends on what the compiler inlines
into it, so adding any function with non-trivial cleanups to that main() is
enough to trigger it.
Move the PCM and file parse tests into a new ngs2_parse executable and restore
Ngs2Atrac9.cpp to its upstream content, so the test that catches exceptions is
unchanged. The new executable has no catch and never relies on that path.
On Linux every absolute guest path is resolved under the working directory, so the temporary file in the host temp directory was not found. The test now asks ResolvePath_nid_no_patch for the host path of a guest path and writes the file there.
The call site of PPSA21402 sets only three argument registers, so the function has no size parameter. A data chunk that runs past the buffer or ends inside a frame returns INVALID_WAVEFORM_DATA instead of being shortened. The test no longer writes padding from a string literal.
WriteWait has truncated the reference and mask of a 32-bit wait since
9c2a7560 ("relaxed checks for what titles send"), but testMemory still
expected a reference above 32 bits to throw, so agc_command_tests failed
when run without arguments. ctest only registers the "defaults" mode, so
the stale expectation was never noticed.
Update the expectation to the truncating behaviour (the packet keeps the low
halves) and register the full mode as agc_commands so the packet, marker,
flip, register and memory cases are checked again.
Closes#1005.
20 of the 31 NIDs have names in shadPS4's aerolib list. They are declared
under those names; POSIX sleep is implemented. The NpPartner001 and Psml
MFSR2 exports stay unnamed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RackGetInfo reports the rack's handles, buffer, id, uid, option limits,
render count and active voices. VoiceGetPortInfo reports a port's matrix,
volume and destination. VoiceQueryInfo answers info id 0x4001 with the
voice channel count and throws for other ids. Assumptions are recorded in
TechnicalDebt.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
UFC 6 (PPSA23566) passes type 0 to pthread_mutexattr_settype during
startup. libkernel rejects it with EINVAL and leaves the attribute
unchanged, as fpPS4's decompiled body does, instead of aborting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sceLoginDialogGetResult zeroed 8 bytes of a result struct of unknown size and reported result 0
with user id 0. It now writes only the leading int32 (USER_CANCELED), like
sceWebBrowserDialogGetResult and like the sign-in dialog, so a title takes its "no user chosen"
path instead of reading an invalid user id. Records the dialog in the silent-stubs list in
docs/dev/TechnicalDebt.md.
The seven libSceLoginDialog exports were throwing stubs. They now implement the common-dialog
state machine (NONE -> INITIALIZED -> RUNNING -> FINISHED), mirroring the existing
libSceSigninDialog: the local user is always signed in, so the dialog finishes as soon as it
opens and a title waiting on it never blocks.
- sceLoginDialogInitialize -> INITIALIZED, or 0x80B80004 if already initialized
- sceLoginDialogOpen -> validates the state and the parameter, then FINISHED
- sceLoginDialogUpdateStatus / sceLoginDialogGetStatus -> the status
- sceLoginDialogGetResult -> zeroes the result (signed in) once FINISHED
- sceLoginDialogClose -> ok, or 0x80B80003 when not initialized
- sceLoginDialogTerminate -> NONE, or 0x80B80003 when not initialized
The status values and the shared common-dialog error codes match libSceSigninDialog and
libSceWebBrowserDialog. Adds a CMakeLists.txt so the library can carry its guest test.
New test core/libs/tests/GuestLoginDialog.cpp drives the whole machine (the not-initialized
and already-initialized errors, the argument and not-finished errors, open/get-result/close
and terminate). It fails on main (the stubs throw) and passes with the change.
Four exports that titles call during start-up were missing. They now follow the
single-user / offline model already used in this file (sceUserServiceGetInitialUser,
sceUserServiceGetLoginUserIdList, sceUserServiceGetPlatformPrivacyWs1):
- sceUserServiceGetForegroundUser(int*) -> the initial user
- sceUserServiceGetRegisteredUserIdList(UserServiceRegisteredUserIdList*) -> initial
user in slot 0, the other 15 slots invalid
- sceUserServiceGetUserColor(int, int*) -> blue (0)
- sceUserServiceGetNpAccountId(int, uint64_t*) -> 0 (no PSN account linked)
Adds UserServiceRegisteredUserIdList (int[16]) to SceTypes.hpp and a CMakeLists.txt
so the library can carry its guest test. Signatures follow the public OpenOrbis SDK
headers.
New test core/libs/tests/GuestUserService.cpp checks the valid returns, the pointer
and wrong-user-id error paths; it fails without the change (the symbols are undefined)
and passes with it.
sceVideoRecordingOpen takes the target path, the recording param, the
heap and the heap size, not (buffer, size, param). It still throws.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(libkernel): implement sceKernelReleaseFlexibleMemory
Unmaps the range through sceKernelMunmap, which returns its pages to
the flexible memory budget, as fpPS4 and prosper do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(libkernel): keep the flexible memory release check apart from the batch map checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>