Commit Graph

2041 Commits

Author SHA1 Message Date
Dean 2129a6ef29
Merge pull request #1001 from Dextroid17/fix/application-heap-finalize-order
fix(libc): register the application heap finalizer when libc loads
2026-10-07 15:19:33 +13:00
Dean f8975a8ef8
Merge pull request #1015 from hugodearaujo/feat/agc-dcb-end-of-shader-action-size
feat(libSceAgc): implement sceAgcDcbQueueEndOfShaderActionGetSize
2026-10-07 15:18:50 +13:00
Dean e28b9f4b94
Merge pull request #977 from hugodearaujo/feat/agc-driver-cond-write
feat(libSceAgcDriver): execute COND_WRITE
2026-10-07 15:18:09 +13:00
Dean f1efcc6786
Merge pull request #975 from hugodearaujo/feat/agc-cb-cond-write
feat(libSceAgc): implement sceAgcCbCondWrite
2026-10-07 15:17:27 +13:00
Dean c0eb929c09
Merge pull request #930 from ebarr24/fix/relinker-dynamic-segment-bounds
fix(relinker): reject malformed dynamic segments
2026-10-07 15:16:45 +13:00
Dean 293d1218e9
Merge pull request #684 from nicolasabosch/fix/windows-import-module-binding
fix(relinker): bind Windows imports to their declared modules
2026-10-07 15:16:03 +13:00
Dean e4048a0989
Merge pull request #709 from merwie/fix/videoout-unsupported-output-mode
fix(videoout): report unavailable output modes instead of throwing
2026-10-07 15:15:22 +13:00
Dean 8789a8d1db
Merge pull request #978 from ebarr24/codex/libc-memcpy-s-overlap
fix(libc): reject overlapping memcpy_s ranges
2026-10-07 15:15:11 +13:00
Dean a2073010c4
Merge pull request #972 from ebarr24/codex/libc-fscanf-abi
fix(libc): translate Windows fscanf guest arguments
2026-10-07 15:14:30 +13:00
Dean 87ab98b9e9
Merge pull request #968 from ebarr24/codex/libc-stdio-binary
fix(libc): preserve guest stdio bytes on Windows
2026-10-07 15:13:48 +13:00
Dean a0f79d5b4f
Merge pull request #962 from JAB-dev/feat/ngs2-plain-module
feat(libSceNgs2): build libSceNgs2 from the libSceNgs2.native implementation
2026-10-07 15:13:07 +13:00
Dean 66e0a1e9c5
Merge pull request #1019 from fisherjoey/feat/agc-semaphore-memory-register-multiple
feat(agc): declare sceAgcSetSemaphoreMemory and sceAgcDriverRegisterMultipleResources
2026-10-07 15:04:53 +13:00
Dean 5f96e1e040
Merge pull request #1018 from Raghav314/feat/ajm-resample
feat(ajm): implement sceAjmBatchJobSetResampleParameters and sceAjmBatchJobGetResampleInfo
2026-10-07 14:47:49 +13:00
Dean ee391a5614
Merge pull request #1016 from ArjenS-LA/fix/autorun-posix-path-quoting
fix(relinker): quote literal autorun paths on POSIX
2026-10-07 13:11:16 +13:00
Dean e69f196f09
Merge pull request #1006 from Dextroid17/fix/agc-command-tests-full-mode
test(agc): fix the stale 32-bit WriteWait expectation and run the full suite
2026-10-07 13:10:03 +13:00
Joey Fisher 23a6859a51 feat(agc): declare sceAgcSetSemaphoreMemory and sceAgcDriverRegisterMultipleResources 2026-10-06 18:07:53 -06:00
raghav314 72be77590c feat(ajm): implement sceAjmBatchJobSetResampleParameters and sceAjmBatchJobGetResampleInfo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 05:36:31 +05:30
Dean 4b0412fa97
Merge pull request #982 from ebarr24/codex/libc-wide-string-precision
fix(libc): keep wide printf precision on UTF-8 boundaries
2026-10-07 13:03:38 +13:00
Dean fde401d41f
Merge pull request #992 from CnRJay/feat/ppsa23566-missing-exports
feat(libs): declare the exports PPSA23566 imports that no library provides
2026-10-07 13:02:56 +13:00
hugodearaujo 26eec5bee6 feat(libSceAgc): implement sceAgcDcbQueueEndOfShaderActionGetSize
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>
2026-10-06 20:38:14 -03:00
Arjen Singh 6ac3ad5d1d fix(relinker): quote literal autorun paths on POSIX 2026-10-06 16:18:01 -07:00
Dextroid17 ea68e850ff test(agc): fix the stale 32-bit WriteWait expectation and run the full suite
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.
2026-10-06 18:58:45 -04:00
Adrià ab9437e34d
feat(libkernel): implement scePthreadTestcancel and pthread_testcancel (#834) 2026-10-07 11:43:32 +13:00
Dean 23ba389799
Merge pull request #993 from CnRJay/fix/mutexattr-settype-einval
fix(libkernel): return EINVAL for unknown mutex attribute types
2026-10-07 11:43:11 +13:00
Adrià 09f8782378
feat(libSceAudio3d): implement sceAudio3dTerminate (#830) 2026-10-07 11:42:29 +13:00
Dean 25f311fa00
Merge pull request #559 from Phi1ow/implement-login-dialog
feat(logindialog): implement the libSceLoginDialog state machine
2026-10-07 11:41:57 +13:00
Dean b5c1d08bd9
Merge pull request #553 from Phi1ow/implement-userservice-foreground-and-ids
feat(userservice): implement foreground user, registered list, user colour and NP account id
2026-10-07 11:41:16 +13:00
Dextroid17 cc7bda30e7 fix(libc): register the application heap finalizer when libc loads
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.
2026-10-06 18:40:06 -04:00
Chad df98b8899e feat(libs): name the PPSA23566 stubs from the shadPS4 NID list and implement sleep
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>
2026-10-06 17:28:39 -05:00
Dean c1241ad0dc
Merge pull request #979 from hugodearaujo/fix/video-recording-open-signature
fix(libSceVideoRecordingP): correct the sceVideoRecordingOpen signature
2026-10-07 11:11:12 +13:00
JAB e289b56e6f
feat(libSceNgs2.native): implement sceNgs2RackGetInfo, sceNgs2VoiceGetPortInfo and sceNgs2VoiceQueryInfo (#958)
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>
2026-10-07 11:10:30 +13:00
Dean 2b45df4706
Merge pull request #905 from gookie-dev/feat/pad-vr-controller-exports
feat(libScePad): declare the VR controller exports
2026-10-07 11:07:02 +13:00
Dean 24eac1c445
Merge pull request #886 from Fishybeing/fix/http-status-line-overflow
fix(http): count sceHttpParseStatusLine as implemented
2026-10-07 11:06:19 +13:00
Dean 97a6604f81
Merge pull request #883 from Fishybeing/fix/memorypool-header-guard
fix(libkernel): correct the MemoryPool.hpp include guard
2026-10-07 11:05:38 +13:00
Dean 84c058756b
Merge pull request #870 from aryanrawatispro-ship-it/feat/player-invitation-dialog-result
feat(playerinvitationdialog): implement scePlayerInvitationDialogGetResult
2026-10-07 11:05:26 +13:00
Dean 762bab6f9a
Merge pull request #863 from LeandroLP23/feat/font-writing-line-ordering-space
feat(font): implement sceFontWritingLineGetOrderingSpace
2026-10-07 11:04:45 +13:00
Chad 69973800a7 fix(libkernel): return EINVAL for unknown mutex attribute types
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>
2026-10-06 17:04:06 -05:00
Chad 7cbf45b660 feat(libs): declare the exports PPSA23566 imports that no library provides
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:04:05 -05:00
Dean edf90b169f
Merge pull request #824 from LeandroLP23/feat/font-get-font-resolution
feat(font): implement sceFontGetFontResolution
2026-10-07 11:04:01 +13:00
Dean b3c0365824
Merge pull request #823 from LeandroLP23/feat/font-glyphs-count-char-glyph-code
feat(font): implement sceFontGetFontGlyphsCount and sceFontGetCharGlyphCode
2026-10-07 11:03:19 +13:00
Phi1ow 0178b6530e fix(logindialog): report user-cancelled and write only the leading result int32
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.
2026-10-06 23:46:00 +02:00
Phi1ow fae2c8e6be feat(logindialog): implement the libSceLoginDialog state machine
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.
2026-10-06 23:46:00 +02:00
Phi1ow 55cbd2d6f1 feat(userservice): implement foreground user, registered list, user colour and NP account id
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.
2026-10-06 23:42:15 +02:00
hugodearaujo 956a8b7d5f fix(libSceVideoRecordingP): correct the sceVideoRecordingOpen signature
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>
2026-10-06 18:29:36 -03:00
Ethan Barr 62de7ab8ac fix(libc): keep wide printf precision on UTF-8 boundaries 2026-10-06 14:28:56 -07:00
Ethan Barr 0653b87497 fix(libc): reject overlapping memcpy_s ranges 2026-10-06 14:26:37 -07:00
Dean 5fc8755f4c
Merge pull request #961 from JAB-dev/feat/ngs2-mastering-gain
feat(libSceNgs2.native): mastering voice gain parameter
2026-10-07 10:22:26 +13:00
Dean 2775bb328a
Merge pull request #945 from Kikoarl/feat/prx-msgdialog-native-getstatus
feat(libSceMsgDialog.native): implement sceMsgDialogGetStatus
2026-10-07 10:21:42 +13:00
Dean a1107d2adf
Merge pull request #939 from CnRJay/feat/keyboard-jis-key2char
feat(libSceKeyboard): translate the 106-key arrangement in sceKeyboardGetKey2Char
2026-10-07 10:20:49 +13:00
CnR 7e3dcbc27e
feat(libkernel): implement sceKernelReleaseFlexibleMemory (#952)
* 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>
2026-10-07 10:20:07 +13:00