Commit Graph

1343 Commits

Author SHA1 Message Date
Adrià 8b679d8d9e
Merge pull request #3498 from MarcZX100/codex/progress-inert-reporting
feat(tools): mark behaviourally empty functions in progress reports
2026-10-11 13:59:56 +02:00
Adrià 6c4a84fbc6
Merge pull request #3492 from fable-void/pr/macos-module-start-args
fix(relinker): pass module start arguments to macOS guest initializers
2026-10-11 13:54:49 +02:00
Adrià eaffdc402f
Merge pull request #3489 from MarcZX100/codex/carry-equeue-level-once-3115
fix(libkernel): report level-triggered equeue events once per wait
2026-10-11 13:54:44 +02:00
Adrià bc193544f4
Merge pull request #3487 from DariusHQ/feat/libkernel-underscore-ioctl
feat(libkernel): export _ioctl
2026-10-11 13:54:41 +02:00
Adrià c68b887799
Merge pull request #3479 from MarcZX100/codex/carry-arc4random-3450
feat(libScePosixForWebKit): implement arc4random
2026-10-11 13:52:52 +02:00
Adrià 6731a610e7
Merge pull request #3470 from Techx3/trophy2-show-trophy-list
fix(libSceNpTrophy2): return success from sceNpTrophy2ShowTrophyList
2026-10-11 13:51:05 +02:00
Adrià daa13905cb
Merge pull request #3434 from Yuva1024/fix/agc-nvidia-pipeline-link-optimization
fix(agc): skip the background pipeline relink on NVIDIA's proprietary driver
2026-10-11 13:49:43 +02:00
Adrià 3a37a896fa
Merge pull request #3455 from YossiYad/carry/select-non-socket-descriptors
fix(libkernel): answer select on non-socket descriptors
2026-10-11 13:49:06 +02:00
Adrià 08e0079e4d
Merge pull request #3451 from LeandroLP23/fix/libc-time-strftime-freebsd-conversions
fix(libc): format %k, %l, %s, %v and %+ in strftime
2026-10-11 13:46:24 +02:00
Adrià 7ff417f8b9
Merge pull request #3449 from hypermoist/feat/np-entitlement-game-trials-flag
feat(libSceNpEntitlementAccess): declare sceNpEntitlementAccessGetGameTrialsFlag
2026-10-11 13:45:07 +02:00
Adrià 83929de897
Merge pull request #3444 from Pipodi/fix/fused-hull-header
fix(agc): select the registered back half for a fused hull header
2026-10-11 13:44:59 +02:00
Adrià 612e93651c
Merge pull request #3453 from LeandroLP23/fix/libc-scanf-suppressed-eof
fix(libc): return 0 from scanf when input fails after a suppressed conversion on Windows
2026-10-11 13:44:57 +02:00
Adrià 97fbc7e629
Merge pull request #3447 from sypher69/fix/thread-process-affinity-inheritance
fix(libkernel): inherit process affinity in new guest threads
2026-10-11 13:44:45 +02:00
Leandro Soares 90a82da283 feat(tools): mark behaviourally empty bodies in the progress report
Cherry-picked from commit f1be92e95c02be451971fc1a8eec139e738e936d.
2026-10-11 11:44:28 +00:00
Adrià 077eeb05ea
Merge pull request #3448 from Feuris/carry/agc-debug-raise-exception
feat(libSceAgc): implement sceAgcDebugRaiseException
2026-10-11 13:43:54 +02:00
Adrià e5d4f59dac
Merge pull request #3438 from ivica00/fix/srgb-bilinear-cube-compare
fix(shader): return 0 for 8-bit sRGB color comparison
2026-10-11 13:43:27 +02:00
Hussein Kadhim 59517ef5f5 test(libkernel): cover blocking wait, edge and repeated AMPR equeue events
Document the level-triggered user event semantics of sceKernelWaitEqueue in TechnicalDebt.

(cherry picked from commit db79bee1e597effff34c72493ed893d4e750b95d)
2026-10-11 11:28:34 +00:00
fablevoid 1b865fc3ea fix(relinker): pass module start arguments to macOS guest initializers
The macOS image initializer called a guest module's DT_INIT with no
arguments, so a module started with sceKernelLoadStartModule never saw
its args and argp, and its result was dropped. The Linux writer already
calls DT_INIT through libkernel's pending argument handoff. On the
macOS port, the PSN plugin of PPSA12544 refuses to start without its
argument block ("PSN is an old version that cannot be used by the
current player runtime") and the title then crashes.

A guest module with DT_INIT now gets two slots bound to
__aps5_get_pending_module_args_nid_no_patch and
__aps5_set_module_init_result_nid_no_patch, and its initializer calls
DT_INIT with the args and argp that sceKernelLoadStartModule records,
as on Linux, then hands the result back. The TechnicalDebt sentence
about the missing arguments on macOS is removed.

guest_module_args also relinks its fixture with --macos and checks the
two binds; on x86-64 macOS it loads the module and checks that DT_INIT
receives the arguments and that its result is returned.

AI-assisted: yes
2026-10-11 11:22:38 +00:00
DariusHQ b4a59e34c4 feat(libkernel): export _ioctl
Stremio Plus (PPSA74126) stops at start-up on _ioctl, which its statically
linked tc* functions call. FreeBSD's _ioctl is the same system call as
ioctl, so it forwards to ioctl.
2026-10-11 14:19:02 +03:00
David 7083b2941a feat(libScePosixForWebKit): implement arc4random
Implement arc4random (UISQ-dQzw28) in libScePosixForWebKit on top of the
existing arc4random_buf, so both draw from the same thread-local host
std::random_device. Like FreeBSD 11.4 lib/libc/gen/arc4random.c
(8c639945) it returns a uniformly distributed 32-bit value and has no
failure result.

Cloud Play (PPSA99600) imports it: the import audit in #3249 on main
ccf9ff90 lists `UISQ-dQzw28` `arc4random` among nine absent imports
("no PR or issue found"). The ps5-payload-dev SDK stubs (f5d40f02,
sce_stubs/libScePosixForWebKit.c) place arc4random, arc4random_buf and
fnmatch in libScePosixForWebKit; arc4random_uniform is in neither that
set nor libSceLibcInternal, so it is not added.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 95da68017f6817abec785864e682530e9b135a2b)
2026-10-11 11:14:30 +00:00
Suery 6c96c2ee1e
fix(libSceNpTrophy2): return success from sceNpTrophy2ShowTrophyList
There is no system trophy UI, so the call returns success without showing a
list, like the other silent NpTrophy2 entry points; recorded in
docs/dev/TechnicalDebt.md. PPSA15552 (Dead Cells) calls it and
aborted on the NotImplemented exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Dqgm9nUKygsXzr6poJsHJ
2026-10-11 07:02:34 -04:00
hypermist ef5d2130f4 feat(libSceNpEntitlementAccess): declare sceNpEntitlementAccessGetGameTrialsFlag
PPSA08427 (Killing Floor 3) stops on main at start-up because its bundled
pros.sdk.Prospero.prx imports it:

pros.sdk.Prospero.prx.guest.prx: undefined symbol: y7JD1gfwyfA

The signature is unknown, so it is declared without parameters and
throws, like the other entitlement flag queries the title does not reach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uzy15wqYTt6iWyxYXEzUWo
2026-10-11 23:50:45 +13:00
Abdulrahman Elkordy abed1c4314 fix(libkernel): answer select on the standard descriptors
Dungeons (PPSA16064) calls select on descriptor 0 and stopped with
"select on descriptor 0 (not a libSceNet socket) not implemented".
Descriptor 0 is now never readable and descriptors 1 and 2 are always
writable, as for a console title with no input. The assumption is in
TechnicalDebt next to the termios entry for the same descriptors.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
2026-10-11 13:48:29 +03:00
Adrià 9a9bd3fb3c
Merge pull request #2369 from karanvora2599/perf/shader-coherent-alias
perf(shader): load from buffers without Coherent when the load has no GLC or DLC
2026-10-11 12:47:46 +02:00
David 9bec190733 feat(libSceAgc): implement sceAgcDebugRaiseException
sceAgcDebugRaiseException (NID T6xuVw0KUJo) now logs the exception id
with APS5_LOG_OUT and returns 0, as libkernel's
sceKernelDebugRaiseException does.

Palworld PPSA23126 (#2598) and 007 First Light PPSA11386 (#2523) import
it; neither is shown calling it.

OpenAGC 3c7e8072 (src/game_compat.c) returns 0 and says the function is
a no-op on retail hardware; the ud2 trap it describes for development
hardware is not reproduced. KytyPS5 6f0cddd4 (src/libs/agc.cpp) takes a
uint32 exception_id, logs it and returns 0. OpenAGC declares no
arguments, but a body that only traps reads none, so the uint32 is kept
and the conflict is recorded in TechnicalDebt. The aerolib name is from
zecoxao/sce_symbols 2883963a; ps5-payload-dev/sdk f5d40f02 has only an
untyped stub.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 07:47:33 -03:00
ivica00 cb52ca10c9 fix(shader): return 0 from 8-bit sRGB color comparison
image_sample_c_lz on gfx1035 returns 0 for 8-bit sRGB, so the unorm clamp was the wrong result. Bilinear cube comparison without DISABLE_CUBE_WRAP keeps throwing because that filter blends across faces.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 12:44:53 +02:00
Adrià Franch 7a0d708e70 docs(technical-debt): record the NVIDIA proprietary pipeline relink skip 2026-10-11 12:44:52 +02:00
Dani 21f4be11ad fix(libkernel): inherit process affinity in new guest threads 2026-10-11 12:44:26 +02:00
Adrià 03a84d02a9
Merge pull request #3392 from MarcZX100/codex/fchdir-3288
feat(libkernel_sys): implement fchdir
2026-10-11 12:40:41 +02:00
Adrià 6554fcb68a
Merge pull request #3430 from AchrafReyani/feat/libkernel-sigtimedwait
feat(libkernel): export sigtimedwait
2026-10-11 12:36:53 +02:00
Adrià f6d156a72e
Merge pull request #3435 from alfalfa-star/fix/playgo-package-chunk-table
fix(libScePlayGo): take the chunk set from sce_sys/playgo-chunk.dat
2026-10-11 12:36:22 +02:00
Alex Collini 687f73c951 fix(agc): select the registered back half for a fused hull header
sceAgcFuseShaderHalves returns a fused hull as a copy of its back half
(type 7) that is not registered: type 3, no user data, and shader
registers copied to scratch memory with the checksum, RSRC1/RSRC2 and
the LS program address rewritten. sceAgcCreatePrimState accepts only that
type-3 header, and graphics ABI resolution refused it as a replaced
shader header.

SameHeader now also takes a type-3 header as the registered type-7
header for the same code when every other field is equal and its shader
registers differ only in the fused ones. Graphics ABI resolution then
applies the bound header's shader registers over the registered state.

PPSA26344 fuses its hull halves during its loading screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:36:01 +02:00
Adrià c064e6898e
Merge pull request #3425 from oneandonlydean/up4/fix-3158-span-limit
perf(agc-driver): join host-import spans only over whole aligned windows
2026-10-11 12:35:57 +02:00
ivica00 fc7446590a fix(shader): compare sRGB colors and bilinear cube faces
Subnautica Below Zero stops while compiling a menu shader that compares an sRGB color texture or a bilinear cube face. sRGB uses the unorm reference clamp, and a bilinear cube sample stays on the face it hits.

Written with AI assistance.
2026-10-11 12:32:28 +02:00
alfalfa-star 6a4ac0c629 docs(libScePlayGo): record where the chunk set comes from
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:30:52 +02:00
Tharun Balaji 5a8091fafd feat(libkernel_sys): implement fchdir
FreeBSD fchdir(2) changes the working directory to the directory referenced by a descriptor. The guest imports fchdir from libkernel_sys (PPSA99764, issue #1578) and the module did not export it.

The descriptor's directory is resolved from the path recorded when the directory was opened on Windows, and from the /proc/self/fd link target on Linux. The guest working directory is then set through the libc routine shared with chdir. A descriptor that is not open returns EBADF and one that is not a directory returns ENOTDIR.

AI-assisted: yes
(cherry picked from commit 76329cbb08781e13d757c3ff955acf71f8bd506f)
2026-10-11 10:26:53 +00:00
Adrià 99c1c26347
Merge pull request #3426 from MathiasDevelopes/codex/agc-clear-state-mask
fix(agc): mask clear-state command to four bits
2026-10-11 12:24:18 +02:00
Adrià 0809bcc8ae
Merge pull request #3421 from DariusHQ/feat/libkernel-ucontext-freebsd
feat(libkernel): implement getcontext, setcontext and makecontext
2026-10-11 12:21:46 +02:00
Achraf Reyani 2a2696bd9c feat(libkernel): export sigtimedwait
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:20:16 +09:00
Hussein Kadhim 60b1318226 docs(technical-debt): list the float exponent quirk with the scanf host differences 2026-10-11 12:12:48 +02:00
Hussein Kadhim 09921dd376 fix(libc): return 0 from scanf when input fails after a suppressed conversion on Windows
C17 7.21.6.2p16 returns EOF only if input fails before the first conversion completes, and a suppressed conversion completes. FreeBSD counts it in nconversions (vfscanf.c, releng/11.4, lines 799-805). The host scanf returned EOF there, so sscanf("12", "%*d%d", &v) reported EOF instead of 0. Each suppressed conversion now records its end with a %n and a result of EOF becomes 0 when one was recorded.
2026-10-11 12:12:48 +02:00
MathiasDevelopes 46d8c587c6 fix(agc): mask clear-state command to four bits 2026-10-11 12:11:03 +02:00
Adrià a4d5d3ce53
Merge pull request #545 from Pouare514/feat/ampr-c-runtime
feat(libs): implement C runtime re-exports for libSceAmpr
2026-10-11 12:06:18 +02:00
Hussein Kadhim 7195e355b4 docs(technical-debt): list the doubled strftime modifier among the host differences 2026-10-11 12:05:00 +02:00
Hussein Kadhim c5bc118f4b fix(libc): accept E and O before new strftime conversions and take %+ zone from tm 2026-10-11 12:05:00 +02:00
Hussein Kadhim 7e3a409022 fix(libc): format %k, %l, %s, %v and %+ in strftime 2026-10-11 12:05:00 +02:00
Adrià 24cb0d2412
Merge pull request #3389 from semirkabir/feat/usbd-no-devices
feat(libSceUsbd): implement transfer allocation and event handling for the no-device path
2026-10-11 12:02:06 +02:00
DariusHQ cf1545d751 feat(libkernel): implement getcontext, setcontext and makecontext
PSXS5, SwanStationPS5 and Nuvio stop at start-up on setcontext on main,
and EVO Player and ProsperoStore do on Windows. The three are imported
by the statically linked OpenSSL's ASYNC code.

The three use FreeBSD 11's amd64 ucontext_t (mcontext at 0x10, mc_len
800, uc_link at 0x330, 0x370 bytes), which the titles are built
against: EVO Player's ASYNC_is_capable captures into a 0x370-byte stack
buffer, and async_fibre_makecontext sets uc_link at 0x330 and uc_stack
at 0x338. getcontext saves every register at its call in assembly and
stores the context as FreeBSD's sys_getcontext does: rax and rdx as 0,
the carry flag clear, the FXSAVE image and the signal mask, and nothing
from uc_link on. setcontext checks mc_len and mc_flags as set_mcontext
does, installs the signal mask, masks MXCSR with the host's MXCSR_MASK
and returns through iretq, so every general register and the flags are
restored and nothing is written below the target stack pointer.
makecontext follows FreeBSD 11's amd64 libc.

Windows checks guard-page growth and exception unwinding against the
stack bounds in the TEB. setcontext and longjmp now set them to the
stack they switch to, which makecontext registers and pins writable as
libSceFiber does for fiber stacks. OpenSSL enters a context with
setcontext and then switches with _setjmp and _longjmp.
2026-10-11 13:00:38 +03:00
Adrià b44eeb967a
Merge pull request #3393 from LeandroLP23/fix/libc-printf-pointer-form
fix(libc): format %p as FreeBSD does on Windows
2026-10-11 11:58:03 +02:00
Adrià 708ffcd2ef
Merge pull request #3394 from LeandroLP23/fix/kernel-signal-unmapped-numbers
fix(libkernel): accept signal() for every valid signal number
2026-10-11 11:56:52 +02:00