The end-of-shader action is written by an inline SDK builder as a
RELEASE_MEM packet, so the size is the 32 bytes that
sceAgcCbReleaseMem writes and that sceAgcAcbQueueEndOfShaderActionGetSize
already returns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The finalizer was registered with std::atexit from the heap handshake, which
runs after libc's own __cxa_atexit runner and the title's exit callbacks
register theirs. std::atexit runs handlers in reverse registration order, so
the heap was torn down first: an exit user that allocated then threw
"application heap: allocator has been finalized" out of a destructor path,
which terminates the process.
Register the finalizer from a namespace-scope object instead, so it is
registered when libc is loaded and therefore runs last, and make finalize()
idempotent rather than throwing on a second pass.
application_heap_exit_order registers a guest exit callback that allocates
through the heap and aborts with "application heap: allocator has been
finalized" on the previous code.
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>