Commit Graph
225 Commits
Author SHA1 Message Date
Dean d6eafa54d0 Merge pull request #9279 from YossiYad/feat/kernel-sys-thread-defaults
feat(libkernel_sys): implement pthread_set_defaultstacksize_np, scePthreadSetDefaultstacksize and scePthreadSetName
2026-10-22 19:16:30 +13:00
Dean 84f8e2ffc2 Merge pull request #9201 from YossiYad/feat/gnm-neo-retail-unavailable
feat(libSceGnmDriverForNeoMode): return the retail answers of 48 debug, resource, SDMA, counter and validation calls
2026-10-22 19:09:09 +13:00
Kang, Harry Zixuan 726edc503b feat(windows): support MSYS2 GCC runtime builds 2026-10-21 20:29:55 -07:00
boykopovar cf717cd80f fix(videorecording): restore info selectors and unopened errors 2026-10-21 21:55:26 +03:00
boykopovar 39cb8593f3 fix(usbstoragedialog): restore parameters and result contract 2026-10-21 21:54:02 +03:00
Yossi Yadgar 92f760c461 test(libkernel_sys): cover the default stack size and scePthreadSetName 2026-10-21 20:24:13 +03:00
Yossi Yadgar e44e334332 test(libSceGnmDriverForNeoMode): check the retail answers of the debug, resource, SDMA, counter and validation calls 2026-10-21 18:05:23 +03:00
Adrià 64361960c5 Merge pull request #7818 from fogydes/feat/vorbisdec-firmware-exports
feat(libSceVorbisDec): export missing firmware Vorbis decoder interfaces
2026-10-21 13:38:24 +02:00
Dean d4eecab27a Merge pull request #8258 from YossiYad/feat/np-party-state
feat(libSceNpParty): report the user as not in a party from sceNpPartyGetState
2026-10-21 15:48:23 +13:00
fogydes 919e5f64f1 feat(libSceVorbisDec): export missing firmware Vorbis decoder interfaces 2026-10-20 20:09:32 +05:30
Dean 44e3389c88 Merge pull request #7807 from mazen320/fix/windows-stderr-dup2
fix(libkernel): keep host stderr off a guest dup2 onto descriptor 2
2026-10-21 01:45:30 +13:00
mazen c03168fb47 fix(libc): keep guest stdio on a dup2 of descriptors 1 and 2
Host logging opens its own FILE on the saved descriptor. The guest FILE stays on the replaced descriptor, so guest printf, puts and fprintf still reach the pipe.
2026-10-20 13:38:07 +04:00
nekomancer01andClaude Opus 5.5 680ba6bf29 feat(libSceRudp): implement the poll exports
Implement sceRudpPollCreate, sceRudpPollControl, sceRudpPollWait and
sceRudpPollDestroy with the PS Vita signatures and argument checks.
sceRudpTerminate removes the context from every poll and sceRudpEnd
destroys the polls and wakes their waiters.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:07:28 +11:00
Yossi Yadgar 12e33a68ab feat(libSceNpParty): report the user as not in a party from sceNpPartyGetState
There is no party service, so the 16-bit state is NOT_IN_PARTY; a null state returns INVALID_ARGUMENT.
2026-10-20 10:18:20 +03:00
Dean 9769b46ffb Merge pull request #8125 from erickerxhalli/feat/libscemove-no-controller
feat(libSceMove): report no connected PS Move controller
2026-10-20 18:31:39 +13:00
erickerxhalliandClaude Opus 5.5 0afb0c58dd test(libSceMove): register guest_move away from the netctl tests
Move the guest_move registration in core/libs/CMakeLists.txt next to the
voice tests so it no longer shares lines with the netctl access point
tests that another open pull request adds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Arbzg9c2DA4DEFKVSvRgYv
2026-10-19 23:07:47 +00:00
Federico Marras d8b425f1bf feat(libSceNetCtlAp): implement the access-point service that never starts 2026-10-19 20:26:24 +02:00
erickerxhalliandClaude Opus 5.5 14b52daf53 feat(libSceMove): report no connected PS Move controller
Add sceMoveInit, sceMoveTerm, sceMoveOpen, sceMoveGetDeviceInfo and
sceMoveSetVibration, and replace the throwing stubs of the other six
exports. Behaviour and error codes follow shadPS4; signatures follow
Orbital. A guest test covers the init state, argument checks and the
no-controller results.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Arbzg9c2DA4DEFKVSvRgYv
2026-10-19 18:23:44 +00:00
Adrià 4f10164198 Merge pull request #6901 from akkadbakkad89/feat/np-cpp-web-api
feat(libs): restore libSceNpCppWebApi for dumps that ship no copy
2026-10-19 16:18:42 +02:00
al3w0f205 58d0d53966 test(libSceGameLiveStreaming): add guest game live streaming test coverage 2026-10-19 10:21:59 +02:00
fogydes fa94b2cfc8 feat(libSceNpGameIntent): export missing firmware game intent interfaces 2026-10-19 09:22:26 +02:00
Adrià 7f596df48d Merge pull request #6550 from orishamir/fix/savedata-memory-journal
fix(libSceSaveData.native): write only the changed bytes of save-data memory
2026-10-19 08:39:54 +02:00
Adrià 05b5d192fb Merge pull request #6309 from fogydes/feat/voicechat-firmware-exports
feat(libSceVoiceChat): export missing firmware voice chat interfaces
2026-10-19 08:38:57 +02:00
fogydes 0f38f0fe58 feat(libSceVoiceChat): export missing firmware voice chat interfaces 2026-10-19 11:39:06 +05:30
fogydes a03d891ec0 feat(libSceUsbStorageDialog): implement common dialog lifecycle exports 2026-10-19 11:00:59 +05:30
Dean 60fb8078c7 Merge pull request #6067 from meh7an/perf/libs-mimalloc-windows
feat(libs): let relinked Windows games opt into mimalloc
2026-10-19 13:09:36 +13:00
Mehran 9824c46fe0 feat(libs): let relinked Windows games opt into mimalloc 2026-10-19 00:08:47 +03:00
Adrià 3aebaa7de6 Merge pull request #6124 from yripper/feat/macos-guest-arena
feat(libc): reserve the guest arena on macOS
2026-10-18 19:09:43 +02:00
Dean a0e688e55f Merge pull request #7209 from mohammad-alosta/test/libSceRudp-context-lifecycle
test(libSceRudp): add GuestRudpContextLifecycle behavioral tests
2026-10-18 10:02:54 +13:00
Adrià 07b4651142 Merge pull request #6104 from fma-rc/fix/libc-host-libstdcxx-exceptions
fix(libc): catch exceptions that libstdc++ throws inside the prx libraries on Linux
2026-10-17 19:59:41 +02:00
alosta 14db22d458 test(libSceRudp): add GuestRudpContextLifecycle behavioral tests
Adds tests for nine implemented libSceRudp functions that previously
lacked coverage:

- sceRudpActivate (returns 0 always)
- sceRudpEnableInternalIOThread (NOT_INITIALIZED before init, 0 after)
- sceRudpSetEventHandler (returns 0)
- sceRudpBind (NOT_INITIALIZED, INVALID_CONTEXT_ID, 0 on success)
- sceRudpSetOption (NOT_INITIALIZED, INVALID_CONTEXT_ID, 0 on success)
- sceRudpInitiate (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_REFUSED)
- sceRudpGetContextStatus (NOT_INITIALIZED, INVALID_CONTEXT_ID, fills
  status with 0, null status allowed)
- sceRudpWrite (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_RESET)
- sceRudpRead (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_RESET)

Each assertion mirrors the exact implementation in Export.cpp. Error
codes and return values are the constants hardcoded in the source.
No console measurement needed — these are pure offline behaviors.

AI-assisted: yes
2026-10-17 17:35:07 +01:00
akkadbakkad89 8cd400aa49 feat(libs): restore libSceNpCppWebApi for dumps that ship no copy 2026-10-17 05:25:03 +00:00
Adrià 7c3bfa8632 Merge pull request #5962 from nikowolf123/feat/libc-crash-register-text
feat(libc): print the text that registers point at in Windows crash reports
2026-10-17 06:51:43 +02:00
Dean 9070237dfd Merge pull request #5676 from MarcZX100/codex/pad-n3ksx62fgno-status
fix(libScePad): return measured status for unknown Pad NID
2026-10-17 13:05:42 +13:00
fma-rc c020d73a5b fix(libc): catch exceptions that libstdc++ throws inside the prx libraries on Linux
The nid_patcher turns each *_nid_no_patch_cut alias into a second dynamic
symbol with the same name as the plain alias exported next to it, seven
names in all. With those duplicates, LD_DEBUG=bindings shows libstdc++ keeping its own __cxa_allocate_exception, __cxa_throw,
__cxa_begin_catch, __cxa_end_catch, __cxa_rethrow, __gxx_personality_v0
and _Unwind_Resume while taking __cxa_init_primary_exception,
_Unwind_RaiseException and std::terminate from libc.prx. An exception
thrown inside libstdc++ (std::stoi, a stream with exceptions enabled) got
a libc header laid over a libstdc++ allocation, reached the libc
personality as a foreign exception, matched no typed handler and ended in
"terminate called without an active exception". The plain aliases already
export these names, so the duplicates go.

libstdc++ also describes std::__ios_failure with __iosfail_type_info, a
class that privately derives from __si_class_type_info at the same
address. Kind now follows such single same-address bases to the
__cxxabiv1 class, so catching std::ios_base::failure or std::exception
matches a stream failure.

The plain aliases came in a4c519b26 next to the cut aliases from
14f8c16ac.
2026-10-17 01:17:45 +02:00
NikoandClaude Opus 5.5 b263cbbb1b feat(libc): print the text that registers point at in Windows crash reports
Unreal titles end in their own libc fatal path with the UTF-16
LowLevelFatalError message in a register, and the crash report shows
only the first 64 bytes of it as hex words, so the message is lost
(#4238: Demon Slayer PPSA03490, Stray PPSA02100).

For every general register that points at readable memory starting
with at least four printable ASCII characters, as UTF-16LE or as single
bytes, the report now prints the text up to a NUL, the first other
character, 512 characters or the end of readable memory (each page is
checked with VirtualQuery before it is read).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 23:33:43 +02:00
Adrià eac5d8db12 Merge pull request #5956 from alexpournaras/feat/voice-get-port-attr
feat(libSceVoice): implement sceVoiceGetPortAttr
2026-10-16 23:29:52 +02:00
MarcZX100 e35c62c84c test(libScePad): remove obsolete stub-only export check 2026-10-16 20:40:53 +00:00
Adrià 1b1f8483ca Merge pull request #5849 from wachi35676/fix/nid-elf-duplicate-exports
fix(nid): reject ELF exports that patch to different symbols under one name
2026-10-16 21:24:01 +02:00
Alexandros Pournaras 8fe5916fd0 feat(libSceVoice): implement sceVoiceGetPortAttr 2026-10-16 21:01:32 +02:00
Adrià FranchandClaude 49ea68f2a6 fix(build): link core/libs executables against the shared libstdc++ on Linux
Co-Authored-By: Claude <[email protected]>
2026-10-16 16:26:42 +02:00
Ori ShamirandClaude Opus 5.5 f6fd60c6ca fix(libSceSaveData.native): write only the changed bytes of save-data memory
sceSaveDataSetSaveDataMemory2 read the whole slot file, patched it and
replaced it through a temporary file on every call, so each call cost a
full rewrite of the slot (up to 32 MiB). The changed ranges now go to a
small journal that is staged through the slot's temporary file and
renamed into place, then written into the slot file in place, and the
journal is removed. A journal left by an interrupted call is replayed by
the next setup, get, set or sync of that slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 22:43:50 +03:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 7d9a308044 fix(nid): reject ELF exports that patch to different symbols under one name
Two defined ELF exports that are renamed to the same name, such as foo
and foo_nid_disambig1, were both written as one name and the patcher
exited 0, leaving a lookup that can reach only one of them. The PE and
Mach-O back ends already reject this.

The ELF patcher now remembers the address (st_value and st_shndx) of
each patched export name and throws "duplicate patched export name"
only when the name comes from a symbol at a different address. Aliases
of one address are kept: the Linux libc defines __cxa_throw and
__cxa_throw_nid_no_patch_cut as aliases of __cxa_throw_nid_postfix, so
both become __cxa_throw, and any lookup of that name resolves to the
same code.

The Linux libc also exported __gxx_personality_v0 twice at different
addresses: the forwarding function in Personality.cpp and the
__gxx_personality_v0_nid_no_patch_cut alias of the guest personality.
Drop that alias, so the name keeps only the forwarding function, as
in the PE build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 00:08:27 +05:00
yripper 3e98703fc8 feat(libc): reserve the guest arena on macOS
macOS has no /proc/self/maps or MAP_FIXED_NOREPLACE, so the arena never came up and every guest allocation threw. Enumerate host regions with mach_vm_region and reserve free chunks with a fixed mach_vm_map, which fails instead of replacing. This skips dyld, the Rosetta runtime, and ranges the kernel never lets a process map (0x10_0000_0000-0x70_0000_0000). The POSIX commit/protection paths now build on macOS unchanged. Adds standalone guest_arena tests (x86_64 under Rosetta and arm64).
2026-10-14 19:47:07 -03:00
Adrià c14fd87044 Merge pull request #4721 from fdfawef324/build/stable-import-libraries
build(libs): keep import libraries stable so a source edit relinks one library
2026-10-14 19:08:35 +02:00
Dean 6f2ffb483a Merge pull request #4626 from mugurc/build/macos-rosetta-configure
build(macos): configure the full build for x86-64 under Rosetta
2026-10-14 20:16:53 +13:00
Dean 871f4ce8a0 Merge pull request #4693 from EagleBearerYS/fix/libc-windows-undeliverable-exception
fix(libc): report host C++ exceptions that Windows cannot deliver
2026-10-14 18:04:38 +13:00
fdfawef324andClaude Opus 5.5 2251649a7f build(libs): keep import libraries stable so a source edit relinks one library
Every library under core/libs/prx links the libc and libkernel import
libraries, and every NID patch step depended on the unpatched libc.prx.
GNU ld 2.46 rewrites the import library on every link with new archive
timestamps (the member headers and the symbol map header), so the restat
on the link edge never pruned anything: one libc or libkernel .cpp edit
relinked all 124 libraries and re-patched all of them.

On MinGW the shared library link now writes the import library to
<implib>.new with SOURCE_DATE_EPOCH=0 (ld then writes zero member
timestamps), makes the symbol map deterministic with ranlib -D and copies
the result over the import library only when its bytes differ
(cmake -E copy_if_different). The link edge keeps restat, so a link that
keeps the exports leaves the import library untouched and prunes every
dependent link. The SOURCE_DATE_EPOCH also zeroes the export directory
TimeDateStamp of the DLL; the COFF header TimeDateStamp that the unwinder
keys on is unchanged.

The NID patch steps only use the names libc exports. nid_patcher
--write-export-list writes those names, normalized and sorted, to
libc.exports and leaves the file untouched when they did not change; the
patch steps read it with --preserve-export-list and depend on it instead
of libc.prx, on every platform. A patched library is byte-identical to
one patched against libc.prx.

Measured on Windows (GCC 15.2, -j 4, loaded machine) after touching
libc/src/Strings.cpp: with CMAKE_LINK_DEPENDS_NO_SHARED off, 124 links and
124 patches in 74.9 s before, 1 compile, 1 link, the export list and the
libc patch in 4.3 s after; with it on, 124 patches in 7.8 s before and
the same four steps in 5.3 s after. Touching libkernel/Time/Time.cpp
runs 123 links and 123 patches (89.1 s) before and one compile, link and
patch (3.4 s) after. Removing a libc export still relinks and re-patches
all 124 libraries.

nid_patcher_macho covers --write-export-list (sorted normalized names, no
rewrite when unchanged, rewrite when changed) and --preserve-export-list
(the same exports kept as with --preserve-exports; malformed lists and
two references refused). It fails on main, where the option is unknown.

Sources: SOURCE_DATE_EPOCH, https://reproducible-builds.org/specs/source-date-epoch/;
ranlib -D and ld --out-implib, GNU binutils documentation; ninja restat,
https://ninja-build.org/manual.html#ref_rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 22:43:05 -04:00
Dean 75ceccd5db Merge pull request #4615 from MiniRML/fix/nid-elf-table-layout
fix(nid): validate ELF table layouts before patching
2026-10-14 15:38:11 +13:00
Dean 9baec8793f Merge pull request #3870 from yash27git/clean/Direct-Memory-Exception
fix(libkernel): harden DirectMemory validation and tests
2026-10-14 05:55:11 +13:00