Commit Graph
14017 Commits
Author SHA1 Message Date
Ondra97 e6ec827647 fix(libSceNet): reject invalid descriptors for epoll DEL 2026-10-20 22:24:10 +02:00
Dean a6a4101e19 Merge pull request #8595 from MarcZX10/codex/socket-fdset-limit-followup
fix(libkernel): keep socket descriptors within FD_SETSIZE
2026-10-21 09:22:06 +13:00
Dom3005andClaude Opus 5.5 1af777afb1 fix(libc): map a Windows symbolic link loop to ELOOP when opening
CreateFileW fails a symbolic link that resolves to itself with
ERROR_CANT_RESOLVE_FILENAME (1921). WindowsOpenError_nid_no_patch had no
case for it, so sceKernelOpen, open and fopen reported EINVAL where
FreeBSD reports ELOOP.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 22:18:21 +02:00
Dean aa1b1bfcea Merge pull request #7443 from Agnibha007/fix/debt-split-staying-entry-paragraphs
fix(tools): keep the blank line between a staying entry and a paragraph
2026-10-21 09:14:10 +13:00
Dean ebb5f6fcb4 Merge pull request #7440 from MrMha/feat/audit-strict-stubs-20261018
feat: optionally fail import audits on referenced throwing stubs
2026-10-21 09:14:03 +13:00
Dean ecdf9b3901 Merge pull request #7436 from MrMha/feat/explain-test-selection-20261018
feat: explain saved test selections and fixture dependencies
2026-10-21 09:13:59 +13:00
Dean 722cf9388c Merge pull request #7433 from MrMha/feat/trace-thread-filter-20261018
feat: filter trace digests by named event threads
2026-10-21 09:13:53 +13:00
Adrià FranchandClaude 7caa8fa045 test(libSceAudio3d): drop the wall-clock upper bound of the real-time push check
Co-Authored-By: Claude <[email protected]>
2026-10-20 22:06:56 +02:00
011010 64092044df fix(libSceAudio3d): queue the bed writes and consume one per advance
sceAudio3dBedWrite2 stored the bed in a single slot that
sceAudio3dPortAdvance mixed without clearing, so an advance with no new
write replayed the previous block instead of mixing silence, and two
writes before one advance kept only the second.

The writes are queued now, as shadPS4's ConvertAndEnqueue does: the
queue is bounded by queue_depth and returns NOT_READY when full, an
advance consumes one bed, and an advance with nothing queued mixes
silence through the mixer's empty-source path, which the mixer test
already covers.

guest_audio3d_port gains the queue case: fill the queue, require
NOT_READY, advance, and require the consumed bed to make room. It fails
on the old code at the NOT_READY of the full queue.
2026-10-20 22:06:52 +02:00
011010 c85d284e39 fix(libSceAudio3d): let the mixer test find libc.prx on Windows
The mixer test links libc and loads libc.prx, so on Windows its executable
exits 0xC0000135 unless the unpatched library directory is on PATH. Every
other test in the tree that links libc prepends it, and the two tests next
to this one only prepend the libSceAudio3d directory because they link the
library as well. Prepend the libc directory here too.
2026-10-20 22:06:52 +02:00
011010 0531b591e8 test(libSceAudio3d): check that a blocking push runs at real time
The push hands the mixed frames to an AudioOut port, so the pacing
comes from the AudioOut queue and not from a local wait. The test
pushes 200 frames of 256 samples at 48 kHz and requires the elapsed
time to be the duration of the audio within 150 ms below and 300 ms
above, the shape libSceAudioOut's own real-time test uses.
2026-10-20 22:06:52 +02:00
011010 7887d17766 fix(libSceAudio3d): use the reference error code for an unsupported buffer mode
The branch invented AUDIO3D_ERROR_NOT_SUPPORTED as 0x80EA0005, which
shadPS4's error enum names OUT_OF_MEMORY. Both shadPS4 and prosper
put the unsupported buffer mode at 0x80EA0008, prosper from the PS5
module's own error table.

The debt entries now name the reference behind each unverified
choice: the downmix coefficients and the dropped LFE follow shadPS4
(fpPS4 agrees) against prosper's contradiction, the channel order
follows shadPS4, prosper and fpPS4, the return of
sceAudio3dAudioOutOutput follows KytyPS5 and prosper against
shadPS4's total-sample answer, and the full-queue NOT_READY follows
shadPS4, the only reference with a body.

The stubs leave the branch: this pull request carries the bed path
alone.
2026-10-20 22:06:52 +02:00
husari.orozco c917d7dbf7 docs(technical-debt): record the audio3d bed and audio out behaviour 2026-10-20 22:06:52 +02:00
husari.orozco 553ce8e9ba fix(libSceAudio3d): tie the audio out drain to the frame it submits
Pop the associated frame under g_mutex before submitting it, so two
concurrent PortPush calls cannot submit the same frame twice or drop
another, and restore it at the front if the submission fails. Open the
lazy internal AudioOut port for PortPush outside g_mutex, re-checking the
port before storing the handle and closing it when the port vanished.
Move the rollback close in sceAudio3dAudioOutOpen outside the lock too.
2026-10-20 22:06:52 +02:00
husari.orozco 6caa4971f9 fix(libSceAudio3d): drain the associated AudioOut ports on push
Queue the explicit AudioOut buffers instead of submitting them straight
away: sceAudio3dAudioOutOutput now copies the block into the associated
port's pending queue and returns the sample count, so the queue_depth
backpressure clears instead of wedging the port in NOT_READY forever.
PortPush drains every associated port's pending queue outside g_mutex,
popping a frame only once its submission succeeds. PortFlush keeps
draining the ports with a null output while clearing their queues.
sceAudio3dAudioOutOpen rejects a non-zero index and an unknown format
before opening and opens the AudioOut port outside g_mutex, re-checking
the port before it registers the handle.

sceAudio3dAudioOutOutputs returns 0 on success, matching the reference;
sceAudio3dAudioOutOutput returns the granularity as the sample count.
2026-10-20 22:06:52 +02:00
husari.orozco 0ee0731675 feat(libSceAudio3d): implement the explicit AudioOut exports 2026-10-20 22:06:52 +02:00
husari.orozco cd58534968 fix(libSceAudio3d): drain audio out of the lock and make sync and async distinct
Deliver and close the AudioOut port outside g_mutex: the queued frames are
moved out of the mixed deque under the lock and submitted after it is
released, and a failed output is returned instead of being dropped.

Make the blocking modes distinct: BLOCKING_SYNC drains every queued frame so
the queue level reaches 0, while BLOCKING_ASYNC submits only the excess and
leaves up to queue_depth - 1 frames buffered. Map a failed sceAudioOutOpen to
AUDIO3D_ERROR_OUT_OF_RESOURCES and rename the handle member to
audio_out_handle.
2026-10-20 22:06:52 +02:00
husari.orozco 68efaf1e55 feat(libSceAudio3d): mix on advance and deliver through AudioOut 2026-10-20 22:06:52 +02:00
husari.orozco 64be87978d fix(libSceAudio3d): accept every bed output route and cover the bed validation 2026-10-20 22:06:52 +02:00
husari.orozco 28a53f31db feat(libSceAudio3d): implement sceAudio3dBedWrite and BedWrite2 2026-10-20 22:06:52 +02:00
husari.orozco bae822a57a refactor(libSceAudio3d): name the downmix channel layout and coefficients 2026-10-20 22:06:52 +02:00
husari.orozco aece87d4c4 feat(libSceAudio3d): downmix multichannel sources to stereo in the mixer 2026-10-20 22:06:52 +02:00
husari.orozco 8c734ce7b6 fix(libSceAudio3d): clamp pan, guard null sources and widen mixer coverage 2026-10-20 22:06:52 +02:00
husari.orozco 670d8bfda5 fix(libSceAudio3d): apply the pan balance to stereo sources 2026-10-20 22:06:51 +02:00
husari.orozco 1dc045b632 feat(libSceAudio3d): add a pure mixer with gain and stereo pan 2026-10-20 22:06:51 +02:00
cadenasynysterandClaude Sonnet 5.5 97a2dcb27f fix(libkernel): report ELOOP when opening below a Windows symbolic link loop
A path below a self-referencing symbolic link returned ENOTDIR on Windows; FreeBSD returns ELOOP. A failed native open now uses the loop check that sceKernelStat uses.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ
2026-10-20 22:06:36 +02:00
Dean 9a97ac784d Merge pull request #8591 from xXPBSXx/fix/getdirentries-basep-windows
fix(libkernel): report the starting entry index in getdirentries basep on Windows
2026-10-21 09:04:26 +13:00
Dean 5e113d91f9 Merge pull request #8414 from xXPBSXx/fix/raise-signal-zero
fix(libkernel): let raise(0) check the calling thread and return 0
2026-10-21 09:03:51 +13:00
Dean 29e4c46b4d Merge pull request #7417 from IshmamDC217/feat/relinker-trace-imports-linux
feat(relinker): support --trace-imports for Linux output
2026-10-21 09:03:29 +13:00
Evgeniy Kazarin 7898b5bd3a fix(libc): avoid repeated resident write faults 2026-10-21 03:55:51 +08:00
Evgeniy Kazarin de04b642b3 fix(agc): keep resident imports writable during validation 2026-10-21 03:53:50 +08:00
Evgeniy Kazarin a627328cfa perf(libc): skip write-watch queries for proven clean resident ranges 2026-10-21 03:53:50 +08:00
xXPBSXxandClaude Sonnet 5.5 c98377710f test(libkernel): rename the variant-name decoys so they still compete for the stem
With the stem cut at the last extension, the decoy guest_module_fixture.sprx.elf.GUEST.PRX
and the dangling link guest_module_fixture.zprx.elf.GUEST.PRX had the stems
guest_module_fixture.sprx and guest_module_fixture.zprx, so they no longer
matched the request and the shortest-name rule was not exercised. They are now
guest_module_fixture.sprx.GUEST.PRX and guest_module_fixture.zprx.GUEST.PRX,
which have the request's stem and are longer than the real module copy.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 21:53:32 +02:00
MarcZX10 092a66773a docs(shader): record measured color compare formats 2026-10-20 19:53:00 +00:00
MarcZX10 4f0e4ba8e7 fix(agc): return zero for measured color compares 2026-10-20 19:53:00 +00:00
MarcZX10 aec6bba8c4 test(agc): cover zero result for 16-bit color compares 2026-10-20 19:53:00 +00:00
Evgeniy Kazarin 9d5f8326bf perf(libc): collect resident writes directly into the output buffer 2026-10-21 03:52:09 +08:00
Ondra97 f29c507668 test(net): retain native close results in blocking regression 2026-10-20 21:51:37 +02:00
orezraeyandClaude Opus 5.5 a9a0c05af3 docs(libSceNpWebApi2): name the initializer that sets the reported pool size
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 16:48:55 -03:00
Ondra97 1b182e7fb2 fix(net): keep MSG_DONTWAIT transfers nonblocking on Windows 2026-10-20 21:47:08 +02:00
cadenasynyster 9e6544fbab docs(libc): shorten the _Thrd_detach debt entry 2026-10-20 21:43:57 +02:00
billythemenace2andClaude Opus 5.5 681926e085 fix(libkernel): keep waiting while a raise target is inside a system call
Since #8512 a raise redirects a target running host code once 50 ms have
passed since the raise began. A target inside a system call that is not a
wait, such as the NtWriteFile of an fwrite that holds its stream lock, can
stay there longer; the redirect then ran the handler with the lock held.
SONIC SUPERSTARS froze at frame 67 again on main this way, with its GC
raise delivered at ntdll!ZwWriteFile+20.

A target stopped right after a syscall instruction in ntdll now restarts
the 50 ms host-code window, so the raise keeps sampling until the call
returns and the target leaves host code, bounded by the 1 s retry limit.
guest_raise_in_system_call holds a writer in NtWriteFile on a slowly
drained pipe; it times out on main and passes with this change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 20:35:36 +01:00
Dean 2185dbf92e Merge pull request #5656 from Raghav314/perf/agc-data-hit-user-word-mask
perf(agc): data-only draw hits compare only the user words a stage reads
2026-10-21 08:32:28 +13:00
cadenasynysterandClaude Sonnet 5.5 a8b6d1c411 feat(libc): implement _Thrd_detach
Animal Well (PPSA22520) imports _Thrd_detach (L7f7zYwBvZA) from libc.prx and nothing exports it, so the Windows loader stops at startup. Register libkernel's pthread_detach with libc like pthread_create and pthread_join, and return _Thrd_error (4) when it fails.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ
2026-10-20 21:31:16 +02:00
dantdmdarealguy 83a1c326b4 fix(libc): link the thread-name test against libc for its personality routine 2026-10-20 14:27:23 -05:00
Dean c70524a3db Merge pull request #8596 from ebarr24/ws/libkernel-kevent-note-lowat-above-1-on-e
fix(libkernel): fire EVFILT_WRITE on a socket once free send space reaches NOTE_LOWAT
2026-10-21 08:27:05 +13:00
xXPBSXxandClaude Sonnet 5.5 62e6ba7481 fix(libkernel): clamp long nanosleep requests like FreeBSD instead of wrapping them
kern_clock_nanosleep limits the sleep to INT32_MAX / 2 seconds and sleeps
for that long (sys/kern/kern_time.c:543-547). The guest multiplied tv_sec
by 1e9 in 64 bits, so a request of 18446744074 seconds or more wrapped to a
short sleep: nanosleep with tv_sec = INT64_MAX returned after about 0.1 s.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 21:24:54 +02:00
xXPBSXxandClaude Sonnet 5.5 ae8d8f179c fix(tools): create the seed directory in configure_seed
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 21:23:52 +02:00
billythemenace2andClaude Opus 5.5 e5b66f2ddf fix(libkernel): retry a failed thread context read during a raise
GetThreadContext can fail on a target that was just suspended. A raise
used to throw "cannot read the target thread context" at the first
failure; it now resumes the target and tries again, within the existing
1 s retry limit, before throwing. SONIC SUPERSTARS hit the throw once in
three runs. guest_raise_in_host_code prints the longest single raise.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 20:12:28 +01:00
milescovielloandClaude Opus 5.5 0ff3d32a3d fix(libSceNgs2): count a system's renders to refuse a destroy from a nested render
A render recorded only the innermost system it was rendering, so a
destroy called from the callback of a system rendered inside another
system's callback was let through, and the outer render then used the
destroyed rack. Each system now counts the renders it is in. A destroy
first waits until no other thread holds the exclusive state, so a
non-zero count can only come from the calling thread's own stack.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 19:07:53 +00:00