Commit Graph

1881 Commits

Author SHA1 Message Date
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
David dce174749d feat(libSceAmpr): implement _Cnd_signal and _Cnd_init_with_name
Deathloop (PPSA01670), Minecraft Legends (PPSA05510) and GTA III
Definitive Edition import both from libSceAmpr. They take a pointer to
the handle slot and act on the conditions created by the libc _Cnd_init:
_Cnd_signal wakes one waiter through a libc helper, _Cnd_init_with_name
is _Cnd_init with the name ignored. _Thrd_id still throws.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 13:41:49 +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
AlxcBTW 66236674f0 fix(recompiler): keep lane 31 a shuffle without subgroup arithmetic
The half-wave scan rules for 32-lane hosts made lane 31 of a matched
scan a subgroup reduction and threw on a device without subgroup
arithmetic, where the read used to build as a shuffle of the scan. Such
a device now keeps the shuffle for lane 31; lane 63 still reads the
identity, which needs no arithmetic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:24:14 +02:00
AlxcBTW 24894376ab fix(recompiler): give wave64 vertex programs on 32-lane hosts a 32-lane s3
A wave64 vertex program runs at one guest lane per invocation, so on a
32-lane host subgroup its lanes 32-63 have no invocation. The vertex
entry still set s3 = 64 | 64 << 8, telling the program that its wave
holds 64 vertices and 64 primitives. An NGG culling program then keys a
full-wave OR on lane < s3's primitive count, lanes 32-63 hold real cull
results, and its v_readlane_b32 of lane 63 cannot be built (#2783).

The entry now sets s3 = 32 | 32 << 8 for a wave64 program on a 32-lane
host, the wave the host runs; the console launches waves with fewer
vertices and primitives. The host subgroup width reaches the vertex
input the way it reaches the compute and mesh inputs
(BuildShaderStageInputInfo from HostSubgroupSize), and the source,
prepared-shader and disk cache keys already carry it for every stage.
Programs that do not read s3 are unchanged; wave32 programs and other
host widths keep the full wave.

The keys are then 0 in lanes 32-63, so the read is sound. On a 32-lane
host, when the existing half-wave scan rules fail, the scan may also:
- run under s_mov_b64 exec, -1 (EXEC constant true);
- use bound_ctrl:1 row_shr steps when 0, the fill, is the identity (OR,
  add, unsigned max), also into another register, whose old value never
  shows since such a step writes every lane;
- take keys shown to be 0 in lanes 32-63: built from 0 through selects
  under a lane id or v_mbcnt of -1 below at most 32, v_cmp_ne_u32 against
  0, ORs, DPP and permlanes, in stages whose entry EXEC is every lane.
Lane 63 is then the identity and lane 31 the subgroup reduction of the
host's invocations. A shuffle from lane 31 is not enough: an RTX 5070
runs the vertex warps of a non-indexed triangle list with 30 of their 32
invocations. A v_readlane_b32 outside the host subgroup of another value
that is 0 in lanes 32-63 reads 0. Only reads that used to throw change,
besides lane 31 of such scans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:24:14 +02: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
Adrià 58a581d983
Merge pull request #3399 from MathiasDevelopes/codex/feat-npwebapi2-push-event-abort
feat(libSceNpWebApi2): export sceNpWebApi2PushEventAbortHandle
2026-10-11 11:56:32 +02:00
Adrià 76f2d72d40
Merge pull request #3384 from sypher69/fix/sce-dynlibdata-relocation-offsets
fix(relinker): resolve SCE relocation tables relative to dynlibdata
2026-10-11 11:55:28 +02:00
Adrià b70a0e278f
Merge pull request #1491 from Celegans12/feat/shader-tessellation-triangle-patches
feat(shader): implement triangle-patch tessellation
2026-10-11 11:50:50 +02:00
MathiasDevelopes 6d70a46f74 docs: remove gap between technical debt entries 2026-10-11 11:43:36 +02:00
MathiasDevelopes 0f45675768 feat(libSceNpWebApi2): export sceNpWebApi2PushEventAbortHandle
Titles that import it now load; calling it throws until push event
handles have operations that can be aborted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit f50cb08c988736d645f0cc1c329f911f732fa935)
(cherry picked from commit ae3227dbfa2c972b36242056df5971d858ac65c3)
(cherry picked from commit 3df66a6a5dd9f0cd73daaee1342c22742c1915e4)
2026-10-11 11:43:35 +02:00
Pouare514 5290f92876 fix(libs): share Sony CRT semantics between libc and libSceAmpr with tests 2026-10-11 11:42:31 +02:00
Adrià 946ffa08d4
Merge pull request #3372 from alfalfa-star/fix/agc-fast-clear-import-window
fix(agc): keep a fast-clear copy where an import window can stamp watched memory
2026-10-11 11:40:15 +02:00
Semir Kabir cbd18363bd feat(libSceUsbd): implement transfer allocation and event handling for the no-device path 2026-10-11 09:40:14 +00:00
Adrià Franch c8f8014ea2 docs(debt): local programs get one artifact per tessellation configuration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 11:37:19 +02:00
Adrià 097f4e2284
Merge pull request #3373 from MathiasDevelopes/codex/feat-coredump-thread-context-export
feat(libkernel): export sceCoredumpGetThreadContextInfo
2026-10-11 11:36:29 +02:00
Dean Galvin 8da461ba51 perf(agc-driver): fix the host-import window at 8 MiB
The window was read from APS5_HOST_IMPORT_WINDOW_MIB on the device.
It is now always 8 MiB, the value the previous commit was measured
with; SetHostImportWindow stays for the tests. TechnicalDebt records
the window as a choice.
2026-10-11 22:35:37 +13:00
Dani cdfc11cf56 fix(relinker): resolve SCE relocation tables relative to dynlibdata 2026-10-11 11:34:59 +02:00
Adrià 65d4a8b189
Merge pull request #3375 from MarcZX100/codex/libc-unlocked-streams-lockfree-1765
feat(libc): implement unlocked character I/O
2026-10-11 11:31:03 +02:00
Adrià Franch 48c9156d10 docs: remove stray blank line in the TechnicalDebt list 2026-10-11 11:28:44 +02:00
MathiasDevelopes 92303a2ee5 feat(libkernel): export sceCoredumpGetThreadContextInfo
Titles that import it now load; calling it throws like the other
coredump queries, since host crashes are not turned into guest dumps.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit e0e5fd9ffbbaffdc065d1471ce1c91b144af5f98)
(cherry picked from commit 2ac0c88fdbb9e380b6eb5a37d5f98d557940f131)
(cherry picked from commit 1279010b1bc123d3b87664ede15ec6ab2ced806a)
2026-10-11 11:28:39 +02:00
Adrià 0333ec91ed
Merge pull request #1482 from awake-devel/fix/libkernel-umtx-op
feat(libkernel): implement _umtx_op wait and wake operations
2026-10-11 11:26:12 +02:00
Celegans12 77dcb74ccd feat(shader): implement triangle-patch tessellation
DecodeShaderStages accepts LS, HS and an NGG passthrough ES, reads the
3-bit VGT_TF_PARAM fields, refuses its other bits but DISTRIBUTION_MODE,
and needs HOS levels that keep [1, 63]; 0x286-0x287 join the draw key.
Local and domain programs are prepared with their stage group: its
headers are merged over one set of defaults, and a local program left
unbound by the hull header is prepared at its first draw.

The local program ends at its jump into the hull half.
TessellationLowering lowers LDS and ring addresses that are affine in
the control point and relative index to tessellation interfaces with
strides from the code, and refuses accesses outside the patch, per-patch
writes from other control points and a modified primitive export. Hull
lanes read their own saved exec bit, also of host-subgroup-masked
copies; other masks are refused, gl_InvocationID loads as a scalar and
factors clamp to 63.
2026-10-11 11:25:56 +02:00
Adrià 09bd4aa1a3
Merge pull request #1431 from Zaid-Talib/claude/focused-turing-ivfmjn
feat(libkernel): deliver sceKernelRaiseException on Linux
2026-10-11 11:22:31 +02:00
Romans Pokrovskis 228532e9a8 fix(libc): keep unlocked stream status queries lock-free
Use unlocked POSIX EOF/error queries after unlocked byte operations so status synchronization cannot reacquire the stream lock. Keep the verified UCRT status calls on Windows, and cover byte, status, error, and held-lock behavior.

Co-authored-by: MarcZX100 <marczxrr@gmail.com>
2026-10-11 09:18:23 +00:00
milescoviello ee720ee004 test(agc): reproduce an import window over a pending storage image
agc_driver_dcc_keys_first_write only exercises the import window when the
device's own host import resolves the write protection of the imported
pages, as the NVIDIA driver does on Linux. CI's devices do not, so the
comparison that #2984 adds for BlockMaybeWritten units is not run there.

RunImportWindow opens an import window itself over a pending storage
image with GuestMemory::ImportWatched and stores the byte already there,
which leaves the same stamp without depending on the driver: the image
must stay pending and unchanged. A store of a new byte inside a window
must still be seen. Devices whose imports are compared print that the
window is not tested, as the recorder's (w) test does. Linux only: the
Windows path compares imports.

TechnicalDebt records that an identical-byte CPU store inside a window
cannot be told apart from the import, and that images tracked by layer
still upload again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:18:04 +02:00
Adrià e8e4dfdb36
Merge pull request #3337 from AchrafReyani/carry/export-ppsa01530-ppsa13356-imports
fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
2026-10-11 11:16:45 +02:00
Adrià Franch 3879e7ed54 fix(libkernel): throw on a size-0 _umtx_op timeout that is not a valid timespec 2026-10-11 11:13:33 +02:00
Hannah Lyons 93cb3a1b0d fix(libkernel): compare the full WAIT_UINT value and throw on _umtx_op operation 1 2026-10-11 11:13:09 +02:00
clem-gb 79f90f3d9b feat(libkernel): implement _umtx_op wait and wake operations
Titles that ship their own libc.prx or Unity's PS5Util.prx import
_umtx_op (04AjkP0jO9U) for atomic waits, call_once and futex-style
waits. Implement UMTX_OP_WAIT, UMTX_OP_WAKE, UMTX_OP_WAIT_UINT,
UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE as FreeBSD 11's
kern_umtx.c does, on the sceKernelSyncOnAddressWait waiter queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-11 11:13:08 +02:00
Claude c356112f32 fix(libkernel): keep raises off unregistered threads and clamp the handler's MXCSR
Two defects found in review of the Linux delivery:

A raise right after scePthreadCreate reached the new thread before
RunThread set currentThread, so scePthreadSelf() in the handler adopted
a second handle, and could deadlock on glibc's thread lock when the
signal interrupted pthread_getattr_np. The creator now blocks all
signals around the std::thread construction, so the child starts with
them blocked, and RunThread restores the creator's mask once the thread
is registered, as libthr does. A raise in that window stays pending and
is delivered just before the entry runs.

A handler that set reserved MXCSR bits made rt_sigreturn fail with
SIGSEGV. The MXCSR the handler leaves is now masked with the frame's
MXCSR_MASK (0xffbf when it reads 0), as FreeBSD's fpusetregs does, on
both platforms; Windows also keeps CONTEXT.MxCsr equal to
FltSave.MxCsr.

guest_raise_exception raises right after each of 50 thread creations and
checks scePthreadSelf() in the handler, and its context round trip sets
a reserved MXCSR bit and FZ and checks that only FZ is kept.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwJx7AHrSUaMGSpEGhL1Kb
2026-10-11 11:12:02 +02:00
Adrià 90c152e840
Merge pull request #1333 from TibixDev/pr/descriptor-pool-recycling
perf(agc): recycle descriptor pools after their last set is released
2026-10-11 11:11:24 +02:00
Claude dca5a88ef2 feat(libkernel): deliver sceKernelRaiseException on Linux
sceKernelRaiseException threw on Linux, so a title whose garbage
collector stops threads with it (Unity's PS5Util raises SIGUSR1 on each
thread and reads mc_rsp from the handler's context) could not run there.

The raise now sends the host SIGUSR1 to the target thread with
pthread_kill. The host handler, installed on first use with SA_SIGINFO
and SA_RESTART, builds the FreeBSD-layout ucontext from the interrupted
registers and the FXSAVE area, calls the guest handler on the target's
own stack and writes the registers back, so the handler's changes reach
the interrupted code, as they do on Windows. errno is left as the
handler leaves it, as libthr does.

A raise on another thread takes the target's join lock with the host
signal blocked and returns ESRCH once the thread has finished, so a
detached thread's pthread_t is never signalled after it exits. The
pthread_t is recorded when the thread is created or adopted. Handlers
are now lock-free atomics, as the host handler reads them.

guest_raise_exception now runs on every platform. It also checks that
r13 and xmm8 reach the handler and that r12 and xmm8 written by the
handler reach the interrupted code.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwJx7AHrSUaMGSpEGhL1Kb
2026-10-11 11:11:23 +02:00
Adrià Franch 3c8c02f194 docs(debt): move the PPSA01530 imports line into Unknown function info and note the inferred Ult forwards 2026-10-11 11:07:12 +02:00
Achraf Reyani c9f4689248 fix(exports): drop the sceNpWebApi2GetMemoryPoolStats stub and register the test with the shared guest tests
include from Equeue.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:07:03 +02:00
xXPBSXx c4d29f6a99 fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
Forwards _sceUltWaitingQueueResourcePoolCreate and _sceUltSemaphoreCreate to the existing calls, like the other underscore Ult exports. Declares sceNetShowIfconfig, sceNpWebApi2GetMemoryPoolStats, Json::Value::setNullAccessCallBack, kqueue, kevent and one pad call of unknown name without an implementation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 11:07:03 +02:00
TibixDev 058b7e8f94 fix(agc): support alternate channel order in 16-bit color targets
Map red and blue exports, write masks and constant-color blend factors together. Reject conflicting simultaneous target constants.

Semantics: Mesa 26.2.2 src/amd/common/ac_formats.c ac_translate_colorswap; console equivalence remains unverified. Graphics tests passed. Written with AI assistance.
2026-10-11 10:59:37 +02:00
Karan Vora 2069fd1262 Merge remote-tracking branch 'origin/main' into perf/shader-coherent-alias 2026-10-11 04:57:31 -04:00
TibixDev 4e7ca3c760 fix(agc): recycle descriptor pools after their last set is released
Allocate cached sets without individual-free pools. Reset a pool after its
last owner releases it. Keep stable pool indices, skip full pools, and
terminate if reset fails. No GPU wait is added.

This avoids RADV 26.2.2's affected individual-free allocation path.

Validation: Fedora 44 Release graphics tests pass. The reset-failure
regression fails on the previous behavior and passes on this change.
llvmpipe and RX 6600 pass the 3,301-set lifecycle test with core and
synchronization validation. Windows was not tested.

AI-assisted: yes.
2026-10-11 10:54:44 +02:00
Hussein Kadhim 1100d41a36 fix(kernel): accept the default handler for SIGKILL and SIGSTOP in signal
FreeBSD's kernel_sigaction rejects SIGKILL and SIGSTOP only for a handler other than SIG_DFL, so signal(9, SIG_DFL) and signal(17, SIG_DFL) succeed. Drop the SIG_ERR rejection, which has no kernel basis and which sigaction does not apply.
2026-10-11 10:54:27 +02:00
Adrià 85c7cf9b02
Merge pull request #3343 from AchrafReyani/carry/progress-literal-braces
fix(progress): ignore braces in literals and comments when scanning bodies
2026-10-11 10:50:56 +02:00
Adrià 3c3992c5c2
Merge pull request #2985 from MrMha/fix/wait-memory-timeout-2832
fix(agc): keep polling unsatisfied memory waits after diagnostics
2026-10-11 10:50:34 +02:00
Adrià 536cbf4a98
Merge pull request #3341 from AchrafReyani/carry/shareplay-connection-info
fix(libSceSharePlay): export sceSharePlayGetCurrentConnectionInfoA with no Share Play session
2026-10-11 10:49:50 +02:00
Adrià 3fb2e29d75
Merge pull request #3315 from pushkarreddyy/feat/libc-nan
feat(libc): implement nan and nanf
2026-10-11 10:49:06 +02:00
Adrià d5477f8402
Merge pull request #2015 from arvindfroi/fix/agc-placeholder-images
fix(agc): typed image heaps on devices without nullDescriptor
2026-10-11 10:48:40 +02:00
Adrià f6b421b73c
Merge pull request #3040 from CouchRiv/fix-shader-ldexp-f16-denorm-flush
fix(shader): flush v_ldexp_f16 denormals per the f16 denormal mode
2026-10-11 10:48:14 +02:00
Adrià d3e84f8543
Merge pull request #3296 from SynnZer0/feat/npwebapi2-memory-pool-stats
feat(libSceNpWebApi2): implement sceNpWebApi2GetMemoryPoolStats
2026-10-11 10:46:44 +02:00
Adrià 71dda5b333
Merge pull request #3297 from SynnZer0/fix/libkernel-module-info-st-size
fix(libkernel): ignore the input st_size of sceKernelGetModuleInfoFromAddr
2026-10-11 10:45:21 +02:00
Hussein Kadhim d67ad1fc14 docs(technical-debt): record the Linux narrow %p difference 2026-10-11 10:43:41 +02:00
pushkarreddyy 31906bf9b0 feat(libc): implement nan and nanf
Add standard quiet NaN generators nanf (DZU+K1wozGI) and nan (zck+6bVj5pA) to libc.

Resolves startup failure in VLC for PS5 (PPSA85300) where execution halts at nanf on Linux once strsep is available.
2026-10-11 14:12:36 +05:30
SynnZer0 c5bcc085ba feat(libSceNpWebApi2): implement sceNpWebApi2GetMemoryPoolStats
PPSA21703's Unity PSN plugin imports sceNpWebApi2GetMemoryPoolStats
(Xweb+naPZ8Y), so the title did not start.

sceNpWebApi2Initialize now records the pool size of each context and
sceNpWebApi2Terminate forgets it. The statistics report that size with
no peak or current use, as sceHttp2GetMemoryPoolStats does, since nothing
is allocated from the pool. A null output or an unknown context throws.
The signature and layout follow the Http2 statistics and are recorded in
TechnicalDebt.

The library gets its own CMakeLists.txt, equivalent to the generic rule,
to register its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:42:09 +02:00
Arvind Frøiland 7216621545 fix(agc): typed image heaps on devices without nullDescriptor
The typed descriptor heaps write a null descriptor for a null guest
image, and the device therefore required VK_EXT_robustness2's
nullDescriptor. MoltenVK has the extension but not the feature, so on
macOS no Vulkan device opened and every GPU test was skipped. The
feature is now enabled when the device has it. Without it, the device
creates a placeholder image per typed image heap: 1x1, cleared to zero,
of the heap's dimension, sample count, numeric class and access, and a
null guest image binds the placeholder of its heap. A heap whose
placeholder the device cannot create throws when a null image reaches
it. TechnicalDebt.md lists where a placeholder differs from a null
descriptor.

agc_placeholder_images checks every image resource the recompiler maps
to a heap against that heap's placeholder, so the two cannot drift
apart, and agc_shader_device_profile now expects a device without
nullDescriptor to be accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 10:32:49 +02:00
Adrià 04ab4a86cd
Merge pull request #921 from 011010/feat/cmake-use-system-deps
build: add ANYPS5_USE_SYSTEM_DEPS option
2026-10-11 10:30:35 +02:00
Adrià 0c617bae95
Merge pull request #374 from MichonGoddijn231849/fix/depth-htile-fast-clear
fix(agc): depth fast clears through the HTILE metadata
2026-10-11 10:27:15 +02:00
Alex 327bf794a2 docs(shader): flush v_ldexp_f16 results before rounding in the debt entry
The entry said the result is flushed before or after the scale. The
lowering flushes the exact scaled value below the minimum normal before
rounding. Measured on RDNA2 (gfx1036) with round to nearest over every
half magnitude 0x0000..0x0fff of both signs, scaled by 2^-1 and 2^0,
IEEE 0 and 1, denorm16 0..3: no mismatch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 04:24:27 -04:00
Claude b87dd8d845 docs(shader): note the per-bit f16 denormal field against the f32 mode 1 and 2 refusals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9MzdVqDf6wHUKzNymQSze
2026-10-11 04:24:00 -04:00
Alex 63b2bcb354 fix(shader): flush v_ldexp_f16 denormals per the f16 denormal mode
v_ldexp_f16 ignored the FLOAT_MODE denorm16 flush bits on main. Flush a
denormal half input when bit 0 is clear. When bit 1 is clear, flush the
result when its exact value is below the minimum normal half, decided
on the f32 product before the half conversion rounds it: 0x07ff scaled
by 2^-1 is zero on RDNA2, not the minimum normal. NaN handling and
destination high-half preservation stay the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 04:24:00 -04:00
Adrià 7b5214d429
Merge pull request #846 from merwie/feat/relinker-module-dir
feat(relinker): add --module-dir for modules loaded at run time
2026-10-11 10:23:54 +02:00
Adrià bbd7157150
Merge pull request #822 from Celegans12/feat/agc-unnormalized-sampler-offsets
feat(agc): accept texel offsets with unnormalized sampler coordinates
2026-10-11 10:23:33 +02:00
Adrià 5c34f9e25e
Merge pull request #3319 from pushkarreddyy/feat/libSceHttp2-ping-interval
feat(libSceHttp2): export sceHttp2WebSocketSetPingInterval
2026-10-11 10:22:11 +02:00
Michon 56ea14f44c fix(agc): an HTILE fill covers a depth surface only over its whole pipe-aligned metadata
A fill was taken to cover the surface when it spanned ceil(w/8)*ceil(h/8)*4 bytes, a linear HTILE layout. In
the pipe-aligned SW_64KB_Z_X layout a surface's HTILE words lie across a 32 KiB metadata block per 1024x512
pixels (AMD PAL gfx10 addrlib: a 16x16 surface has a valid word at offset 260), so a fill of the linear size
cleared tiles it never wrote. HtileMetadataBytes gives that extent; the fast clear tests fill it (the compute
fixture now dispatches one group per KiB with TGID_X).

Reported with a PAL reproducer by @Amoenus.

Co-Authored-By: Amoenus <5391396+Amoenus@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 10:19:53 +02:00
Michon c133e23dde fix(agc): depth fast clears through the HTILE metadata
Rebased onto main as one commit (the six commits of #374). A uniform fill over a depth surface's whole
HTILE (DMA_DATA, the fill kernels or a CPU store) clears the depth and stencil aspects its ZMask and
SMem fields say, to DB_DEPTH_CLEAR / DB_STENCIL_CLEAR, when the surface is next bound or sampled.

Main's RADV clear_htile_mask recognition (#2229) now goes through the same pending clear: an HTILE clear
marks the matching surfaces' depth aspect, and one for a surface not created yet is applied when it is
first bound. Main's HTILE address decode and this one are merged into one (TILE_SURFACE_ENABLE, a
nonzero DB_HTILE_DATA_BASE and a depth format).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 10:19:53 +02:00
husari.orozco ce6edc5a00 build: reject an SDL2 without HIDAPI and fall back to shared SPIRV-Tools
A system SDL2 that does not define SDL_JOYSTICK_HIDAPI (sdl2-compat over
SDL3 ships no such macro, and neither does a build with the driver
disabled) fails pad_sdl and makes the disk audio driver open the port
with a different channel count, so ANYPS5_USE_SYSTEM_DEPS=ON now rejects
it with a named error, like the VK_KHR_maintenance8 check. Ubuntu's real
SDL2 defines the macro through its SDL_config.h indirection and is
unaffected.

SPIRV-Tools only exports SPIRV-Tools-static when built with
SPIRV_TOOLS_BUILD_STATIC=ON; distributions that ship it shared expose
SPIRV-Tools instead, so a shared target is aliased to the static name.
2026-10-11 10:18:23 +02:00
husari.orozco 96ad950914 build: add ANYPS5_USE_SYSTEM_DEPS option
Resolve SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and
SPIRV-Tools from the system instead of the bundled submodules when the
option is ON. It is OFF by default, so the bundled build is unchanged.

Every package is required: a missing one, or Vulkan-Headers older than
1.4.310 (the agc driver uses VK_KHR_maintenance8), fails the configure
with an error and nothing falls back to the submodule. The system
packages are exposed under the same target names the bundled path uses,
so the rest of the CMake is untouched.

SDL2 is linked from the system as a shared library because the prx
libraries are shared objects and distribution static SDL2 is usually not
PIC. ffmpeg-core, libjpeg-turbo, stb, VulkanMemoryAllocator and LibAtrac9
stay bundled.
2026-10-11 10:18:10 +02:00
GalaxyGamingFR f3216874c5 fix(progress): ignore braces in literals and comments when scanning bodies
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 17:16:25 +09:00
Abdulrahman Elkordy 0d2eeb87eb fix(libSceSharePlay): fill the connection info with no Share Play session
sceSharePlayGetCurrentConnectionInfoA now writes a 72-byte
SceSharePlayConnectionInfoA that reports no session: status DORMANT,
mode 0, empty online IDs, account IDs 0 and both user IDs invalid (-1).
A null pointer returns SCE_SHARE_PLAY_ERROR_INVALID_ARGS (0x810E0001)
instead of throwing. KytyPS5 and fpPS4 agree on the layout and the error
code; KytyPS5 sets the user IDs to -1, fpPS4 leaves them 0.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
2026-10-11 17:14:21 +09:00
xXPBSXx 00fba4472c fix(libSceSharePlay): export sceSharePlayGetCurrentConnectionInfoA
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 17:14:21 +09:00
Merijn 1c6eac425d feat(relinker): add --module-dir for modules loaded at run time
Relinks the ELF modules of extra directories under the module parent directory. Modules the executable or another module needs start with the executable; the others are initialized when the title loads them with sceKernelLoadStartModule, with its start arguments (Windows: __aps5_guest_initialize export; Linux: left out of DT_NEEDED).

Squashed onto main by the reviewer (history had a merge commit).
2026-10-11 10:11:31 +02:00
Celegans12 d0d127b17d feat(agc): accept texel offsets with unnormalized sampler coordinates
Explicit-LOD offset samples through FORCE_UNNORMALIZED samplers now add
sign-extended texel offsets to f32 coordinates before clamping, using
OpFAdd with NoContraction and a sampler specialization selector.

Without native nonconstant-offset support, retain only runtime image
modes valid for unnormalized sampling and reject normalized samplers.
Preserve constant-swizzle handling, indirect-image rejection and main's
flat-volume and flat-line compatibility rules when selecting those modes.

Serialize image compatibility and folding flags and the sampler folding
flag in cache format 34, with roundtrip, preparation and execution coverage.
Retain main's request format 15 and runtime ABI 11.
2026-10-11 10:08:25 +02:00
Adrià f60923bf50
Merge pull request #3294 from kr4y4/feat/shader-compute-user-data-calls
feat(shader): link compute shaders' user-data callees at dispatch
2026-10-11 10:07:22 +02:00
Adrià Franch cfb372a035 fix(libSceHttp2): make sceHttp2WebSocketSetPingInterval throw, document under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 10:06:26 +02:00
pushkarreddyy fb2b7b8dce feat(libSceHttp2): export sceHttp2WebSocketSetPingInterval
Export sceHttp2WebSocketSetPingInterval (YfaXPnc8PJE) in libSceHttp2.

Resolves unresolved ELF import in Palworld (PPSA23126, Issue #2648) bundled libdiscord_partner_sdk.prx.
2026-10-11 10:06:05 +02:00
Adrià 1be0a7ce9b
Merge pull request #3324 from AchrafReyani/carry/host-import-span-windows-alias
fix(agc): import a span's ranges one at a time when Windows refuses its alias
2026-10-11 10:01:20 +02:00
Adrià Franch 8c619f16da docs(architecture): user-data callees; drop code comment
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 09:59:27 +02:00
krishnaraya 6d9321fc57 feat(shader): link compute shaders' user-data callees at dispatch
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 09:59:27 +02:00
Adrià 59f0269723
Merge pull request #3328 from overlordxrz-source/feat/sharpprospero-sw-version
feat(libs): implement the SharpProspero version queries and export sceSystemServiceLaunchApp
2026-10-11 09:59:15 +02:00
Adrià e89aabc916
Merge pull request #3326 from AchrafReyani/carry/conventions-silent-stub-section
fix(conventions): restrict silent stub exemptions to their section
2026-10-11 09:58:47 +02:00
Adrià 5460611fed
Merge pull request #3323 from TheAggie/feat/libkernel-cpuset-setaffinity
feat(libkernel): implement cpuset_setaffinity for the calling thread or process
2026-10-11 09:57:15 +02:00
Adrià 9f051dff35
Merge pull request #3218 from babyhuey/feat/libkernel-sysctl-rng-pseudo
feat(libkernel): support kern.rng_pseudo in sysctlbyname
2026-10-11 09:57:12 +02:00
Adrià a18aaeaa39
Merge pull request #3216 from hugodearaujo/fix/pool-stats-console-errors
fix(net): return the console's errors from the memory pool stats calls
2026-10-11 09:56:52 +02:00
Adrià 44395d9f95
Merge pull request #3260 from fma-rc/feat/font-writing-line-order
feat(font): order writing line runs by embedding level and report their spacing
2026-10-11 09:55:44 +02:00
Adrià 98da5a9267
Merge pull request #3238 from Tamalero/fix/playgo-undeclared-chunks
fix(libScePlayGo): accept chunk ids when the dump has no chunk definitions
2026-10-11 09:54:25 +02:00
Adrià 6a8f0ebb19
Merge pull request #2740 from Yousef13710/fix/content-library-exports
fix(content): export the content calls PPSA06465 imports
2026-10-11 09:53:27 +02:00
Hannah Lyons 04835bdcd1 feat(libkernel): support kern.rng_pseudo in sysctlbyname 2026-10-11 09:51:22 +02:00
Adrià 51b5f52a9e
Merge pull request #3152 from MarcZX100/codex/marc-select-timeout-range
fix(libkernel): saturate oversized select timeouts
2026-10-11 09:49:58 +02:00
Adrià 8ee2834a38
Merge pull request #2945 from MarcZX100/carry/libkernel-system-sw-version
feat(libkernel): implement sceKernelGetSystemSwVersion
2026-10-11 09:49:38 +02:00
hugodearaujo 7e5a34c58c fix(net): return the console's errors from the memory pool stats calls
Measured on a PS5 (firmware 13.60):
- sceSslGetMemoryPoolStats returns 0x8095F007 for a null output, before
  the id check, and 0x8095F006 for an unknown or terminated context,
  zeroing the 32-byte output.
- sceHttp2GetMemoryPoolStats returns 0x817B1225 for a null output,
  before the id check, and 0x817B1100 for an unknown or terminated
  context, zeroing the 32-byte output.
- sceNetGetMemoryPoolStats checks the pool before the output, so an
  unknown pool with a null output returns EBADF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:49:13 +02:00
Adrià 65a4e8ef34
Merge pull request #2842 from Get-fix/fix/libc-daemon
fix(libc): export daemon
2026-10-11 09:49:05 +02:00
overlordxrz-source aaf5754d27 feat(libSceSystemService): export sceSystemServiceLaunchApp
AI-assisted: yes
2026-10-11 03:48:47 -04:00
overlordxrz-source aeee59614e feat(libkernel): implement sceKernelGetAllowedSdkVersionOnSystem
AI-assisted: yes
2026-10-11 03:48:47 -04:00
overlordxrz-source 26cad4e8c8 feat(libkernel): implement sceKernelGetProsperoSystemSwVersion
AI-assisted: yes
2026-10-11 03:48:46 -04:00
Achraf Reyani 94d6a82d83 docs(debt): list sceAudioInInit with the silent stubs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:46:16 +09:00
Adrià Franch db3c429e42 docs(playgo): update chunk-set comment and record unchecked chunk ids in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 09:44:17 +02:00
Adrià Franch 1583126a35 docs(libkernel): record unverified sceKernelGetSystemSwVersion argument checks 2026-10-11 09:43:06 +02:00
MarcZX100 d8ba169df8 fix(libkernel): correct system version ABI layout 2026-10-11 09:43:02 +02:00
MarcZX100 e0e0b66cbb docs(libkernel): clarify system version ABI assumption 2026-10-11 09:42:57 +02:00
pushkarreddyy 5890160278 feat(libkernel): implement sceKernelGetSystemSwVersion
(cherry picked from commit 7143d0b46e389254b0b3bd52812a196ace0c7a6b)
2026-10-11 09:42:49 +02:00
fma-rc 5680c32381
fix(font): throw where the writing line error codes come from the PS4 module only and accept attribute 0 2026-10-11 09:41:52 +02:00
Get-fix 520b9facb6 fix(libc): export daemon
VLC (PPSA85300) imports daemon (Wn6I3wVATUE) and fails to load because
no library exports it. Forking into the background is not supported,
so it throws if called. VLC 3.0 calls daemon only when its daemon
option is set, and the title starts libVLC with --ignore-config and
without --daemon.
2026-10-11 09:40:35 +02:00
MarcZX100 4b3f02ab13 docs(libkernel): clarify guest socket descriptor range 2026-10-11 09:36:43 +02:00
MarcZX100 bb9bd2183c fix(libkernel): return ESPIPE for positioned socket I/O 2026-10-11 09:36:43 +02:00
Adrià 2bb78d2c7a
Merge pull request #1825 from TheAggie/feat/agc-ngg-vertex-mesh-v2
feat(agc): run unregistered NGG vertex programs that need a workgroup on the mesh path
2026-10-11 09:35:19 +02:00
Adrià a4b0b16bb8
Merge pull request #3244 from leorossi2005/feat/appcontent-download-progress
feat(libSceAppContent): implement sceAppContentGetAddcontDownloadProgress
2026-10-11 09:33:12 +02:00
Adrià a6d45b68fa
Merge pull request #3170 from fma-rc/feat/libscejobmanager-cpu
feat(libSceJobManager): implement CPU job sequences
2026-10-11 09:32:50 +02:00
Adrià 3db4637fcc
Merge pull request #2789 from tototomate123/fix/hfw-apr-split
fix(APR): correct guest resolution outputs, object layout and gather sizing
2026-10-11 09:32:21 +02:00
Adrià 683bb1c78c
Merge pull request #2788 from tototomate123/fix/hfw-http-split
fix(libSceHttp): retain request-status callbacks with the guest ABI
2026-10-11 09:32:00 +02:00
Scott Schuster bb4b938e34 feat(libkernel): implement cpuset_setaffinity for the calling thread or process
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:31:57 -05:00
Adrià 92bc441279
Merge pull request #3306 from CouchRiv/fix-shader-ldexp-f32-denorm-keep
fix(shader): keep f32 subnormals in v_ldexp_f32 when denormals are kept
2026-10-11 09:28:17 +02:00
Adrià 66479c96d0
Merge pull request #3281 from oneandonlydean/up4/amm-placement-3146
fix(libkernel): reserve the AMM virtual address ranges at the top of the guest arena
2026-10-11 09:27:00 +02:00
Abdulrahman Elkordy aa653ec50e fix(agc): import a span's ranges one at a time when Windows refuses its alias
#3158 imports a run of address-adjacent registered ranges as one span.
On Windows a shared mapping in the span needs a read-write alias, and
MapAlias refuses one unless the range is a single contiguous run of
views of one section. Ranges that are adjacent in guest address can be
separate views, so the refusal escaped from importAllocation and
agc_driver_dcc_keys_first_write failed on main with "read-write alias
of shared guest memory ...: the range is not one contiguous run of
views of a section".

A span whose alias is refused is now remembered, and its ranges are
imported one at a time as before spans; a single range that is refused
still throws.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
2026-10-11 10:24:24 +03:00
xXPBSXx 1fb359b959 fix(content): export the content calls PPSA06465 imports
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 09:23:39 +02:00
Adrià 4484ddc0bf
Merge pull request #3105 from parl0v/feat/np-get-sandbox-info
docs(npmanager): name ZVZ++68nNI8 sceNpGetSandboxInfo, imported by PPSA28416
2026-10-11 09:23:05 +02:00
Adrià be8a67db1c
Merge pull request #3228 from GustavoGamarra95/feat/agc-alpha-to-coverage
feat(agc): emulate undithered alpha-to-coverage
2026-10-11 09:22:23 +02:00
Adrià 47c8e19eb7
Merge pull request #1619 from fisherjoey/fix/depth-compare-copy
perf(agc): sample comparison-read R32F/R16 surfaces from a GPU depth copy of their storage image
2026-10-11 09:21:23 +02:00
Adrià 010fad317a
Merge pull request #3194 from XairRrR/feat/agc-8-8-swap-alt-blending
feat(agc-driver): blend into COLOR_8_8 SWAP_ALT targets with a separate alpha equation
2026-10-11 09:17:35 +02:00
MarcZX100 c6c9e51439 docs(libkernel): document oversized select timeout 2026-10-11 09:17:07 +02:00
Adrià a258e5e3e7
Merge pull request #3222 from fma-rc/fix/shader-implicit-lod-2d-on-1d
fix(shader): sample a 1D T# through a 2D implicit-LOD image_sample
2026-10-11 09:16:28 +02:00
Adrià a41bad9771
Merge pull request #3141 from MarcZX100/codex/carry-sce-dyn-3093
fix(relinker): read SCE dynamic tables from PT_SCE_DYNLIBDATA
2026-10-11 09:15:56 +02:00
Adrià 1f2161bf5c
Merge pull request #2977 from MarcZX100/fix/shader-f64-denorm-preserve
fix(shader): preserve f64 denormals when supported by Vulkan
2026-10-11 09:15:32 +02:00
Adrià 7b98a306c0
Merge pull request #3160 from babyhuey/feat/libkernel-sys-fork
feat(libkernel_sys): export fork and implement setsid and umask
2026-10-11 09:14:48 +02:00
Adrià 75c979ad9f
Merge pull request #3056 from TheAggie/feat/libkernel-get-app-info
feat(libkernel): implement sceKernelGetAppInfo
2026-10-11 09:12:54 +02:00
Adrià 833e5eb507
Merge pull request #3142 from MarcZX100/codex/carry-sce-scan-3093
fix(relinker): stop code scans at the PLT for PS4 executables
2026-10-11 09:12:30 +02:00
Adrià 1884f17d1e
Merge pull request #2140 from overlordxrz-source/fix/shader-volume-address-planar-texture
fix(shader): read 2D-array T#s through 3D image accesses
2026-10-11 09:12:23 +02:00
Adrià bae9962954
Merge pull request #3108 from AchrafReyani/feat/opus-celt-dec-exports
fix(opus): export the libSceOpusCeltDec module
2026-10-11 09:07:53 +02:00
Alex 54d4024c2b fix(shader): keep f32 subnormals in v_ldexp_f32 when denormals are kept
With the f32 denormal field of FLOAT_MODE set to keep, v_ldexp_f32
flushed subnormal inputs and results to zero. Keep subnormal inputs and
round a result that lands in the subnormal range in the f32 round mode
of FLOAT_MODE. An overflow follows the round mode as well, with or
without denormals kept: the largest finite value instead of infinity
when the mode rounds that sign toward zero. This matches RDNA2
(gfx1036) on 2163 rows in each round mode. Denormal modes 1 and 2 now
throw.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 02:36:48 -04:00
Dean 946df245ef
Merge pull request #3012 from CouchRiv/fix-shader-f16-directed-rounding
fix(shader): honor directed f16 rounding in f16 conversions and ldexp
2026-10-11 19:35:14 +13:00
Dean 4213dda236
Merge pull request #3278 from oneandonlydean/carry/alx-rne-tininess
perf(shader): check f32 product tininess in one multiply to nearest even
2026-10-11 19:09:09 +13:00
SynnZer0 8ad1bcb589 fix(libkernel): ignore the input st_size of sceKernelGetModuleInfoFromAddr
The bundled libc.prx of PPSA21703 calls sceKernelGetModuleInfoFromAddr
with a 0x1A8-byte stack buffer and never sets st_size, so the field holds
whatever was on the stack (983040 in one run) and the call threw. The
console cannot require the field on input. The full size is still
written back. The flags check is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 02:02:38 -04:00
Adrià Franch fdc0b5268b docs(technical-debt): record the NGG vertex mesh routing assumptions 2026-10-11 07:56:42 +02:00
Dean b7222870c9
Merge pull request #3200 from hugodearaujo/feat/rudp-status-console
fix(libSceRudp): match the console's init and status checks
2026-10-11 18:54:38 +13:00
Dean 6db55f7718
Merge pull request #3110 from Recapi/feat/pad-vr-controller-read-state
feat(libScePad): export scePadVrControllerReadState
2026-10-11 18:54:29 +13:00
Dean af08c417eb
Merge pull request #2887 from babyhuey/feat/libsceaudioout-sys-hdmi-monitor-info
feat(libSceAudioOut): export the sceAudioOutSys HDMI output functions
2026-10-11 18:54:19 +13:00
MrMha 49a50abd80 chore(agc): synchronize wait fix with current main
Retain the original WAIT_REG_MEM fix from #2985 and resolve its test-registration conflict with main d7cfa728. Preserve both upstream test blocks and the original commit ancestry.

Local conventions and whitespace checks pass. Windows/GPU results cited in issue #2832 belong to their reporting contributors. No local GPU execution.
2026-10-11 09:53:09 +04:00
Adrià Franch 41b2841b0a docs: format sceAppContentGetAddcontDownloadProgress technical debt line
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 07:48:17 +02:00
Leonardo 228c8a0d6e docs: document sceAppContentGetAddcontDownloadProgress in technical debt 2026-10-11 07:48:11 +02:00
Dean d7cfa72813
Merge pull request #3150 from MarcZX100/codex/marc-socket-vector-io
fix(libkernel): route vector I/O on guest sockets
2026-10-11 18:47:36 +13:00
Dean 0cf94023b6
Merge pull request #3047 from babyhuey/feat/libkernel-pthread-kill
feat(libkernel): implement pthread_kill
2026-10-11 18:44:02 +13:00
Adrià Franch 4474548223 docs(libSceJobManager): move the TechnicalDebt line off the end of the section 2026-10-11 07:40:46 +02:00
fma-rc 8897c5ceac fix(libSceJobManager): count a wait before serialising it and close under the lock 2026-10-11 07:40:37 +02:00
fma-rc e2a7aac32d feat(libSceJobManager): implement CPU job sequences 2026-10-11 07:40:37 +02:00
Dean 4f6024863e
Merge pull request #2918 from XairRrR/feat/videoout-vrr-peg
feat(libSceVideoOut): accept VRR peg and unpeg on a fixed-rate output
2026-10-11 18:37:08 +13:00
tototomate123 63d29116b4 fix(http): retain request status callbacks with the guest ABI 2026-10-11 07:36:46 +02:00
Adrià Franch b299350a7a docs(debt): record the unverified ForEach resolve count 2026-10-11 07:27:53 +02:00
tototomate123 65c8ef656f fix(apr): compact gather records to avoid command buffer exhaustion 2026-10-11 07:27:52 +02:00
Dean 33c0cffb7e
Merge pull request #3134 from SleglJan/feat/agc-display-rgba16-float
feat(agc): present 16-bit float display buffers
2026-10-11 18:20:13 +13:00
fma-rc 25afd95d35
fix(font): keep the step fields the library leaves alone and test multi-level closing 2026-10-11 05:55:36 +02:00
fma-rc eecba6888d
feat(font): order writing line runs by embedding level and report their spacing 2026-10-11 05:48:07 +02:00
MarcZX100 16adcd4871 fix(relinker): validate SCE dynamic data segment 2026-10-11 03:30:09 +00:00
Get-fix ef727569cc fix(relinker): read SCE dynamic tables from PT_SCE_DYNLIBDATA
DT_SCE_STRTAB, DT_SCE_SYMTAB, DT_SCE_RELA and DT_SCE_JMPREL are offsets
into the PT_SCE_DYNLIBDATA segment, as the code analysis and the guest
image reader already read them, but the pipeline read them as file
offsets. That only works when the segment starts at file offset 0, as in
the test fixtures. A PS4 executable (CUSA00900) keeps the segment at
0x53e9b40, so the relinker read its relocations from the code and failed
with "Dynamic string offset is outside DT_STRSZ". Without the segment the
values are still read as file offsets.

(cherry picked from commit 5dbf89a57e096f2891ae786f44c3f57935af2285)
2026-10-11 03:25:49 +00:00
MarcZX100 ebaa687d36 fix(shader): respect float control independence 2026-10-11 03:09:34 +00:00
ThatsLeo 24c4dbae1e fix(shader): keep f64 denormals where the device can preserve them
Shaders with f64 instructions now declare DenormPreserve for 64-bit floats
when the device reports shaderDenormPreserveFloat64. Without it Mesa ANV
flushed the subnormal result of v_fma_f64 to zero.

(cherry picked from commit 7df6c709de994cea0019707d45b6e7b96698fad1)
2026-10-11 03:09:34 +00:00
Adrià Franch bf779b2d71 docs(technical-debt): move the depth copy line off the end of the file 2026-10-11 04:52:43 +02:00
Joey Fisher b384183505 test(agc): pin the depth copy path, its refresh on reuse, R16 and several mips and layers; drop APS5_NO_DEPTH_COPY 2026-10-11 04:52:36 +02:00
Joey Fisher d024709cff perf(agc): sample comparison-read R32F/R16 surfaces from a GPU depth copy of their storage image 2026-10-11 04:52:36 +02:00
Adrià Franch 859f2f3b92 feat(libc): implement malloc_usable_size
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 04:41:39 +02:00
Adrià Franch b1267b3388 docs(technical-debt): list the random family under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 04:07:59 +02:00
David 1671179c4f feat(libc): implement random, srandom, initstate and setstate
Port FreeBSD 11 lib/libc/stdlib/random.c (freebsd-src 4ab2e064): the
additive feedback generator with the default 128-byte TYPE_3 table,
good_rand seeding, state sizes rounded down to 8, 32, 64, 128 or 256
bytes, setstate returning the previous state, and initstate returning
null below 8 bytes without setting errno. Calls are serialised by one
lock; a null state throws.

The import audit of the homebrew catalog on main 262c0316 lists them as
absent libSceLibcInternal imports:
- random: PPSA74126 Stremio Plus, PPSA85300 VLC, PPSA99169 RetroArch,
  PPSA99177 PS5VR, PPSA99420 PS5MC, PPSA99505 Jelly5, PPSA99515 Emby5,
  PPSA99810 PSBox Cloud Gaming
- srandom: PPSA85300, PPSA99169, PPSA99420, PPSA99810
- initstate, setstate: PPSA99177, PPSA99420, PPSA99505, PPSA99515

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 04:07:38 +02:00
Adrià Franch 250b617f14 docs: record the two-pass blend into 8_8 SWAP_ALT targets 2026-10-11 04:00:52 +02:00
Adrià Franch 3cd36b0135 feat(libc): implement acosl and frexpl
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:58:47 +02:00
fma-rc 8132ac7a21
docs(debt): state the measured steps and the non-pixel LOD of a 2D implicit-LOD sample on a 1D T# 2026-10-11 03:57:24 +02:00
fma-rc eb2c43a2eb
fix(shader): sample a 1D T# through a 2D implicit-LOD image_sample
A plain image_sample that says DIM 2D on a 1D T# takes its texel and its LOD
from the first coordinate alone, measured on RDNA2 (gfx1036) with the
hardware oracle. Astro's Playroom draws with such a pair.
2026-10-11 03:54:50 +02:00
Gustavo Ariel Gamarra Rojas 7d92bf70f9 feat(agc): decode undithered alpha-to-coverage
DB_ALPHA_TO_MASK 0xaa01, the enable bit with the four offsets at 2 and no OFFSET_ROUND, reaches the pixel stage, which keeps a pixel when its MRT0 alpha is at least one half. Dithered or rounded settings, and an MRT0 that is missing, swizzled, packed or exported without a floating-point alpha, still throw. God of War Sons of Sparta (PPSA28997) stopped on it a few minutes into play.
2026-10-10 22:50:46 -03:00
Adrià Franch d4b9808705 fix(libkernel_sys): keep umask bits up to 07777 like FreeBSD
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:36:40 +02:00
Hannah Lyons 9c38ea16cf docs: say where XashPS5 calls fork 2026-10-11 03:36:32 +02:00
Hannah Lyons 967de40393 feat(libkernel_sys): export fork and implement setsid and umask 2026-10-11 03:36:32 +02:00
Claude 7c4f9381d4
Merge upstream main into fix-shader-f16-directed-rounding
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9MzdVqDf6wHUKzNymQSze
2026-10-11 01:33:16 +00:00
MarcZX100 d78af2c710 fix(libkernel): route vector I/O on guest sockets 2026-10-11 01:16:58 +00:00
Adrià Franch bbe26912dc fix(agc): view 4_4_4_4 textures as B4G4R4A4, which every Vulkan device can sample
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:13:40 +02:00
Scott Schuster 39748573b0 docs(technical-debt): record what sceKernelGetAppInfo infers
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:11:29 +02:00
Hannah Lyons d8af71c0ca feat(libkernel): implement pthread_kill 2026-10-10 21:11:29 -04:00
Dean Galvin 5543c73b37 fix(libkernel): reserve the AMM virtual address ranges at the top of the guest arena
The AMM ranges were reserved address-less on first use, so they took the
lowest free address of the arena, directly after the title's last mapping,
where the title's next hinted maps go. They are now reserved at a fixed
place, the last 64 GiB of the guest arena, which maps without MAP_FIXED and
the hints derived from them do not reach; a reservation that cannot be made
there throws.

Fixes #3146
2026-10-11 13:56:11 +13:00
hugodearaujo 4c4e789a33 fix(libSceRudp): match the console's init and status checks
Measured on a PS5 (firmware 13.60):
- sceRudpInit rejects a null pool or a size of 0 or less with
  INVALID_ARGUMENT, and a pool under 0xC58 bytes or not 8-byte aligned
  with MEMORY (0x80770007).
- sceRudpGetStatus rejects a null pointer or a byte count of 0 or above
  0xF8 with INVALID_ARGUMENT and reports the live context count at 0x64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:40:27 -03:00
Adrià 06da117642
Merge pull request #3176 from adriadam10/carry/pthread-attr-setsolosched-np
feat(libkernel): implement pthread_attr_setsolosched_np
2026-10-11 02:24:45 +02:00
Adrià 343163a0c1
Merge pull request #3174 from adriadam10/carry/system-gesture-no-touch
fix(libSceSystemGesture): report no touch events for the primitive and recognizer calls
2026-10-11 02:22:43 +02:00
Adrià Franch 8d90c1f190 docs(technical-debt): list pthread_attr_setsolosched_np under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:11:41 +02:00
David 064f5ca825 feat(libkernel): implement pthread_attr_setsolosched_np
The POSIX alias takes (attr, int), returns EINVAL (22) for a null or
uninitialized attribute like the other pthread_attr setters, and
stores the value through scePthreadAttrSetsolosched, returning its
result in errno form. The signature and the stored int follow the SCE
twin in KytyPS5 and sharpemu; PS5PCEM implements the alias the same
way. The value is not applied to scheduling, recorded in TechnicalDebt.

Returnal (PPSA01285 v03.000.005) stops on it after eager binding
(#2872, #1155):

    what(): pthread_attr_setsolosched_np_nid_postfix not implemented

LEGO Horizon Adventures (PPSA14632, #734) and Palworld (PPSA23126,
#2598) import it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 02:06:30 +02:00
Adrià Franch 894ef6db09 test(libSceSystemGesture): cover the handle and null checks of every recognizer call
Moves the no-touch line to "Silent stubs" and records the error-code disagreement with KytyPS5.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:04:04 +02:00
Adrià e8d6de4ae7
Merge pull request #1091 from kjhq/feat/libkernel-socket-events
feat(libkernel): implement read and write events for guest sockets
2026-10-11 02:02:31 +02:00
xXPBSXx 6e2ea0a071 docs(technical-debt): list the system gesture no-touch behavior
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 02:01:32 +02:00
AlxcBTW 4e7511dc32 perf(shader): check f32 product tininess in one multiply to nearest even
#2839 decides f32 product tininess after rounding, in all four f32
round modes, from the exponents and a UMulHi and IMul of the
significands, and builds the flushed value from them. To nearest even,
the mode of shaders without a known float mode and of the 0xc0 most
titles use, one multiply decides it: one factor times 2^64, which is
exact below 2^64, times the other factor rounds the exact product once
to 24 bits in the normal range, and 0 < |that| < 2^-62 is tininess
after rounding. A product that rounds up to 2^-126 is then not tiny and
keeps the emitted product, which is 2^-126 there, so nothing has to be
built from the significands.

The flush of v_mul_f32 v5, v6, v7 takes 12 IR instructions instead of
34, counted as the instructions the flush select needs beyond the
product. vector_constant_factor_tininess pins 12 to nearest and 36 for
the directed path of the same instruction, and checks that the
directed modes and v_mad_legacy_f32 (before rounding) keep #2839's
check. Its round-to-nearest branches are removed as unreachable.

The f32 denormals entry says which rounding the check inherits: the
multiply is a plain OpFMul like the product, with no f32 rounding mode
requested, so it relies on the driver rounding f32 to nearest even, as
the products do. F32ConstantFactorTininess names the row a check before
rounding flushes, 0x3f7ffffe * 0x00800001, which keeps the emitted
0x00800000.

Against #2839 to nearest even, a model of both checks agrees on
1,074,977,546 operand pairs (every 24-bit significand at both rounding
thresholds, random pairs, specials) with each other and with an exact
reference. On an RTX 5070 the outputs of #2839's own tininess and
mixed-source shaders are bit-identical with either lowering over
165,298 and 164,008 generated rows in all six float modes tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 01:54:16 +02:00
kjhq 0abe0b832b feat(libkernel): wake socket read and write events instead of polling
A wait on an equeue that holds socket events now blocks in poll/WSAPoll on
those sockets plus a per-thread loopback wake socket, instead of rechecking
every millisecond. Adding, triggering or deleting an event and closing the
equeue wake the blocked waiters. Closing a socket removes its read and write
events, as on FreeBSD. A read event also reports EV_EOF once the peer has
shut down its sending side.
2026-10-11 01:54:15 +02:00
kjhq 9b7535c6a4 feat(libkernel): implement read and write events for guest sockets
sceKernelAddReadEvent/DeleteReadEvent and sceKernelAddWriteEvent/
DeleteWriteEvent register EVFILT_READ and EVFILT_WRITE events on guest
sockets. The equeue polls the host socket for readiness on each wait
and reports the readable byte count or the send buffer size in data,
with EV_EOF on hang-up or error.
2026-10-11 01:54:04 +02:00
MarcZX100 324be50c64 docs(libkernel): record condition wait errors 2026-10-11 01:53:27 +02:00
XairRrR 9021735022 feat(libSceVideoOut): accept VRR peg and unpeg on a fixed-rate output
sceVideoOutVrrPegToFixedRate and sceVideoOutVrrUnpegFromFixedRate were
NotImplemented without arguments. Both take the output handle; the peg
also takes two further arguments whose meaning is unknown. VRR is not
modelled and the output always runs at a fixed rate, so both validate
the handle and return 0; non-zero peg arguments throw. Recorded in
TechnicalDebt.

Uncharted: Legacy of Thieves Collection (PPSA05684) stops on main with
"sceVideoOutVrrUnpegFromFixedRate not implemented"; it passes its
output handle to both (and zeros to the peg) and ignores the results.
2026-10-11 01:52:10 +02:00
Adrià ed79bde5b9
Merge pull request #2987 from CouchRiv/fix-shader-f16-addmul-denorm-flush
fix(shader): flush scalar f16 add/mul/sub denormals to signed zero
2026-10-11 01:51:46 +02:00
Adrià 9d792ae477
Merge pull request #2989 from CnRJay/fix/srt-null-root-reads
fix(recompiler): read SRT words through a null user-data pointer as zero
2026-10-11 01:49:13 +02:00
Adrià 9402d32fc2
Merge pull request #2993 from CnRJay/fix/agc-indirect-getsize-count
fix(agc): ignore the count passed to the indirect register GetSize functions
2026-10-11 01:48:56 +02:00
Adrià b64c75fc12
Merge pull request #2939 from CnRJay/fix/agc-dcc-comp-to-single
fix(agc): expand comp-to-single DCC keys in a DCC decompress pass
2026-10-11 01:46:49 +02:00
Adrià c633e6d532
Merge pull request #2880 from SleglJan/fix/shader-log2-near-one
fix(shader): correct v_log_f32 near 1.0 when the driver's log2 strays from a series
2026-10-11 01:46:08 +02:00
Adrià 5bd6912b0b
Merge pull request #2978 from MarcZX100/fix/libkernel-rwlock-destroy-busy
fix(libkernel): return EBUSY when destroying a held rwlock
2026-10-11 01:45:28 +02:00
Adrià 59a8cbab89
Merge pull request #2981 from MarcZX100/codex/system-service-language-2769
feat(libSceSystemService): select the console language
2026-10-11 01:43:53 +02:00
overlordxrz-source c447b289ca fix(shader): read 2D-array T#s through 3D image accesses
Since #2133, a 3D image_sample_lz or image_load bound to a 2D-array T#
decodes as 2D and matches the new 2D mode, so it reads layer 0 for any
r and returns zero for z != 0. adriadam10 measured on RDNA2 (gfx1035)
that dim 3D on a 2D-array T# behaves exactly like dim 2D-array, with r
or z as the layer. Decode a 2D-array T# bound to a 3D access as 2D-array
and add a 2D-array mode next to the 2D one.

The same measurement covers image_load_mip on both T# types and
image_get_resinfo, which returns (w, h, 1, levels) on a 2D T# and
(w, h, layers, levels) on a 2D-array T#. Allow those accesses and return
1 as the third resinfo component through the 2D mode. image_get_lod is
not measured and keeps throwing.
2026-10-10 23:42:50 +00:00
Adrià Franch 9678b46d8b docs(technical-debt): state the key range comp-to-single uniformity is judged over 2026-10-11 01:38:32 +02:00
Chad b89b7f953c fix(agc): expand comp-to-single DCC keys in a DCC decompress pass
Key 0x10 (GFX9_DCC_CLEAR_SINGLE in Mesa) marks a 256-byte block whose texels all equal its first texel. A CB DCC decompress pass over uniform comp-to-single keys now writes that texel over its block and stores uncompressed keys; a fast-clear eliminate over them throws.
2026-10-11 01:38:27 +02:00
Adrià Franch c9d1dbe6ed docs(debt): record rwlock destroy EBUSY choice 2026-10-11 01:37:32 +02:00
Adrià Franch 1e1554c768 docs(technical-debt): record the strided buffer overhang clamp 2026-10-11 01:37:01 +02:00
Adrià 29083579f4
Merge pull request #2873 from CouchRiv/fix-shader-div-scale-denorm-flush
fix(shader): flush v_div_scale_f32 input denormals
2026-10-11 01:35:02 +02:00
Adrià Franch 3983f16e37 docs(technical-debt): v_log near 1.0 bound from the exhaustive band sweep
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 01:33:54 +02:00
Jan Šlégl 447f3a5080 docs: note the unconditional log2 series and its f16 path
v_log_f16 is lowered through the same f32 log2, so the entry names both
and states the f16 effect measured over every f16 input (one NVIDIA
result moves onto the hardware's bits, none on RADV). The series is
chosen with OpSelect, so its cost applies to every v_log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq
2026-10-11 01:33:44 +02:00
Jan Šlégl 580ac08478 fix(shader): correct v_log_f32 near 1.0 when the driver's log2 strays from a series
The driver's Log2 has an absolute error that does not shrink with the
result, so near 1.0 the relative error explodes: on an RTX 3080, v_log_f32
of 1 - 2^-24 is 23,947,836 ULP off. Measured on RDNA2 (gfx1036), the
hardware's log2 is within 1 ULP of the correctly rounded value, and an
eight-term series in x - 1 is within 2 ULP of both for |x - 1| <= 1/8.

The lowering keeps the driver's Log2 and takes the series only inside that
band when the two differ by more than 4 ULP, so RADV's native result stays
bit-exact and NVIDIA's is within 6 ULP inside the band.
agc_driver_log_near_one pins 64 inputs per type from the oracle with
per-lane tolerances.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-11 01:33:44 +02:00
Adrià 2cae6cc3cd
Merge pull request #2917 from XairRrR/feat/agc-prepare-unpredicted-variants
feat(agc-driver): prepare shader variants registration did not predict
2026-10-11 01:31:32 +02:00
Adrià 1e52f94ea1
Merge pull request #3147 from SleglJan/feat/libc-realpath
feat(libc): implement realpath
2026-10-11 01:22:38 +02:00
Adrià 2b5d119fc5
Merge pull request #3138 from MarcZX100/codex/carry-font-script-3125
feat(font): retain script language and typographic design settings
2026-10-11 01:19:31 +02:00
Adrià 7d294690e2
Merge pull request #2856 from CouchRiv/fix-agc-shared-code-two-headers
fix(agc): retain registered headers sharing shader code
2026-10-11 01:18:38 +02:00
Adrià 53924632bb
Merge pull request #2675 from husseinkad/fix/lds-atomic-mixed-width-lock
fix(shader): LDS 32-bit atomics take the workgroup lock of the program's 64-bit LDS atomics
2026-10-11 01:15:44 +02:00
Alex cf637814eb fix(shader): flush v_div_scale_f32 input denormals
Enable the existing input-only f32 flush policy for division scaling.
RDNA2 measurements pin all three sources and signed zeros; keep the
scaling rules unchanged and retain their separate technical debt.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>
2026-10-11 01:14:31 +02:00
Adrià 5b4709f283
Merge pull request #3140 from MarcZX100/codex/carry-dialogs-3107
feat(dialogs): run G2P and VR setup dialogs without UI
2026-10-11 01:14:15 +02:00
Jan Šlégl e1f168a24d feat(libc): implement realpath
Resolves a guest path the way FreeBSD 11's realpath does: a relative
path starts from the guest working directory, "." and empty components
are skipped, ".." drops the last component and never climbs above "/",
every other component must exist, and one that is not a directory with
anything after it is ENOTDIR. Backslashes separate components as in the
rest of the path layer. The result is the guest path; the host is
consulted only for existence and type, so host symlinks are followed but
not expanded, and ".." is lexical, as in the rest of the path layer. A
null buffer is PATH_MAX bytes from the application heap, a null path is
EINVAL, an empty one ENOENT, and 1024 bytes or more in the input or the
result is ENAMETOOLONG. On failure the caller's buffer holds the path
that failed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq
2026-10-11 01:11:33 +02:00
Adrià 0d2546e87f
Merge pull request #2876 from CouchRiv/fix-shader-minmax-f16-denorm-flush
fix(shader): flush f16 min/max denormal inputs
2026-10-11 01:10:52 +02:00
Adrià Franch 946158a503 docs(architecture): describe the per-code header registry
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 01:04:50 +02:00
Adrià Franch 1d298ad8b4 docs(debt): list the font script/typographic setters under Unknown function info
Their signatures are inferred from SharpProspero only, so the line belongs
with the other unverified signatures and not at the end of Silent stubs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 01:03:58 +02:00
Abdulrahman Elkordy 5ea89c7d4c feat(font): keep a handle's script languages and typographic features
sceFontSetScriptLanguage, sceFontGetScriptLanguage,
sceFontSetTypographicDesign and sceFontGetTypographicDesign threw. With
the signatures SharpProspero declares, a font handle now keeps the
language set for each script and the feature set for each typographic
design, under the handle's lock, and returns them, with 0 for one never
set. They do not change shaping or rendering yet; TechnicalDebt records
the assumptions.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
(cherry picked from commit c4dcbe4403dc635fde2a823dec311a939816cefc)
2026-10-11 01:03:52 +02:00
Adrià e4045bbbbe
Merge pull request #2839 from CouchRiv/fix-shader-tininess-after-rounding
fix(shader): detect f32 tininess after rounding when flushing products
2026-10-11 00:57:20 +02:00
Get-fix 9a13dc8c78 fix(relinker): stop code scans at the PLT in executables with PT_SCE_DYNLIBDATA
A PS4 executable (CUSA00900) keeps 37 MiB of read-only data in its
executable segment after the code. The syscall scan and the call-site
resolution decoded the whole segment linearly, reached a float table and
failed with "Unsupported 0F 79 opcode without SSE4A prefix". In
executables with a PT_SCE_DYNLIBDATA segment they now stop at the end of
the PLT that follows the last function of the unwind table. The PLT is
found by searching forward from that function for its first entry, which
pushes the GOT entry at PLTGOT + 8 and jumps through PLTGOT + 16, since
code without unwind entries can sit in between (680 bytes of start-up
code in an OpenOrbis-built sample). When the executable has PLT
relocations and no such entry follows, the relinker fails instead of
guessing. Executables without the segment are scanned as before.

(cherry picked from commit a21e8fe4c0e6c03189d559e992c0f037c076700d)
2026-10-10 22:53:48 +00:00
Abdulrahman Elkordy 2a92eaa351 feat(libs): run the G2P and VR setup dialogs as common dialogs without UI
libSceCdlgG2P and libSceVrSetupDialog threw from every export. They now
run the common-dialog state machine libSceLoginDialog uses: Initialize,
Open, the status calls, GetResult, Close and Terminate follow it, the
dialog finishes at Open without showing anything, and GetResult reports
that the user cancelled, writing only the leading int32 result. The
signatures are assumed from the other common dialogs, as TechnicalDebt
records. 13 exports move from stubs to implemented.

Claude-Session: https://claude.ai/code/session_012SLQbhAiexxW6TtjYToW8a
(cherry picked from commit 07992adf80bae9b2d7da4b751cd21c040fa1c5b8)
2026-10-10 22:53:48 +00:00
Hussein Kadhim c9e1fa0ce1 fix(shader): 32-bit flat atomics in the LDS aperture take the workgroup lock
A flat_atomic_* whose address lands in the LDS aperture updated the dword without the lock, so it could lose updates against a ds_add_u64 or a 64-bit flat atomic on the same dwords. It takes the lock like the 32-bit ds atomics when the program has a 64-bit LDS atomic; programs without one emit the same SPIR-V as before.
2026-10-11 01:53:37 +03:00
Hussein Kadhim cffe4bf070 docs(technical-debt): state the measured LDS atomic overlap as the slot's high dword 2026-10-11 01:53:37 +03:00
Hussein Kadhim 34e4aaf133 fix(shader): LDS 32-bit atomics take the workgroup lock of the program's 64-bit LDS atomics
The hardware serialises 32-bit and 64-bit LDS atomics on one address; the lock that makes the 64-bit forms atomic did not order 32-bit atomics, which lost increments between the two halves of a 64-bit update (#2297).
2026-10-11 01:53:36 +03:00
Adrià 91b1341319
Merge pull request #3079 from MarcZX100/codex/carry-3068
feat(libc): implement Dinkumware mutex and condition exports
2026-10-11 00:52:49 +02:00
Adrià 7250918fea
Merge pull request #2827 from Get-fix/fix/libkernel-execvp
fix(libkernel): export execvp
2026-10-11 00:49:40 +02:00
MarcZX100 b603d19bc4 fix(libc): match console mutex failure behavior 2026-10-10 22:47:34 +00:00
MarcZX100 583b3de28f fix(libc): return thread errors for invalid operations 2026-10-10 22:46:48 +00:00
MarcZX100 697e3bf797 fix(libc): match console Dinkumware handle ABI 2026-10-10 22:46:48 +00:00
David 9277d06705 feat(libc): implement the Dinkumware mutex and condition exports
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 22:46:48 +00:00
Chad 7ea5898f10 fix(agc): ignore the count passed to the indirect register GetSize functions 2026-10-10 17:42:05 -05:00
Jan Šlégl 2e19053f63 feat(agc): present 16-bit float display buffers
PPSA11386 registers 3840x2160 tiled display buffers in pixel format
0xC001000622000000, R16G16B16A16 float in KytyPS5 and SharpProspero
(0xC001000600000000 is the blue-first variant), and stops on "VideoOut:
unsupported display pixel format". The buffer is eight bytes per texel; its
tiled layout is assumed to be the 8-byte SW_64KB_R_X equation applied to
full coordinates, as addrlib applies it. The values are taken as linear
light and encoded with the sRGB curve for the 8-bit output. The encoding
compares the raw half-float bits against two tables of 255 thresholds
(color and alpha) that the CPU decode and the color transfer shader share,
so both give the same bytes on any driver; negative and NaN values give 0.
Guest-memory detile, the resident image path and the CPU decode all handle
both formats; DCC metadata on a float buffer throws. Neither the layout nor
the transfer is verified against console frames.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq
2026-10-11 00:38:12 +02:00
PhialsBasement 2d9b6aebb7 feat(libSceNgs2.native): render silent waveform blocks with flag 0x10
A waveform block that declares samples with no data threw as not
fitting them. PPSA04867 adds such a block with flags 0x11 (data_size 0,
num_samples 16385) and terminates the process on the throw, followed by
a fully specified block under the same flags, which takes the ordinary
path. Accept flag 0x10, named SILENCE here: a dataless block under it
renders num_samples frames of silence and finishes like a complete
block, reporting its bytes through decoded_data_size. A dataless block
without the flag keeps throwing. No public reference names the flag;
the assumption is recorded in TechnicalDebt.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-11 00:37:42 +02:00
Adrià a1f82d238b
Merge pull request #2386 from krishnaraya4/fix/agc-packed-16bit-channel-order
fix(agc): sample 5_6_5, 1_5_5_5 and 4_4_4_4 textures in AMD's channel order
2026-10-11 00:34:09 +02:00
Adrià 379d8b4e8f
Merge pull request #1873 from fisherjoey/feat/queue-thread-priority
feat(agc): opt-in raised priority for the queue workers and the presenter
2026-10-11 00:27:26 +02:00
Adrià 13851b58b4
Merge pull request #1940 from Dextroid17/feat/aperture-sources
fix(shader): decode the scalar aperture sources 235-238 instead of failing the shader
2026-10-11 00:26:50 +02:00
Adrià 4d27834ff9
Merge pull request #2119 from mugurc/macos-rosetta
feat(relinker): convert for Rosetta with --to-rosetta
2026-10-11 00:26:25 +02:00
Renan Pires 2d206e31bb feat(libScePad): export scePadVrControllerReadState 2026-10-10 19:21:32 -03:00
Adrià a3c43ad20f
Merge pull request #1739 from Sanjaysrinivas/test/pthread-cancel-recovery
test(libkernel): cover cancellation recovery for #1668
2026-10-11 00:20:59 +02:00
Adrià b65d6b71be
Merge pull request #1190 from MichonGoddijn231849/feat/flat-shared-private-apertures
feat(recompiler): FLAT addresses in the shared and private apertures reach LDS and scratch
2026-10-11 00:18:33 +02:00
Josip Parlov 9968fda961 docs(npmanager): name ZVZ++68nNI8 sceNpGetSandboxInfo (throwing stub), imported by PPSA28416 2026-10-11 00:15:48 +02:00
Adrià 3c46fa6f4a
Merge pull request #3078 from MarcZX100/codex/carry-3048-fcntl
feat(libkernel): implement sceKernelFcntl
2026-10-11 00:15:30 +02:00
Achraf Reyani 373670294e fix(opus): export the libSceOpusCeltDec module
ProsperoRadio (PPSA99001) imports six sceOpusCeltDec functions from
libSceOpusCeltDec and fails to load because no such module exists. It
opens this decoder only as a fallback when libSceOpusDec reports a
retryable error for a CELT packet, which libSceOpusDec here never
returns, so the module is exported without an implementation and each
function throws if it is called, as for sceSaveDataCancel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 07:10:03 +09:00
Adrià 2b831510be
Merge pull request #3080 from MarcZX100/codex/carry-3071
feat(libSceAmpr): implement Dinkumware thread helpers
2026-10-11 00:07:57 +02:00
Michon f4f05d2e6a fix(recompiler): flat apertures are 4 GB windows; an aperture access past the end is dropped whole
Measured on RDNA2 (gfx1035) in review:
- the shared and private apertures are 4 GB windows (the gfx9+ layout of kfd_flat_memory.c), so a flat
  address routes by its whole high dword, 0x80000000 or 0x70000000, not by its top 16 bits;
- a dword or short access whose last byte is past the end of LDS reads 0 or writes nothing as a whole;
  multi-dword accesses are checked per dword.
The aperture test gets rows that straddle and pass the end of LDS; the TechnicalDebt line names the
public source of the layout and keeps only the PS5's base values as inferred.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 00:06:44 +02:00
Michon c35f29b6be fix(recompiler): every FLAT access kind routes the shared and private apertures; table test
Sub-dword stores and unaligned dword accesses go byte-wise; 32- and 64-bit FLAT atomics
route to LDS (64-bit under the workgroup lock), scratch (read-modify-write) or BDA.
agc_driver_flat_apertures covers them in 121 rows, with mixed-address waves and wave64.
The aperture bases and the unmodelled operands 235-238 are listed as inferred.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 00:06:43 +02:00
David 9902f137af feat(libkernel): implement sceKernelFcntl
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit f0c649704dbf0b84077c29ea914e0e4799714fe1)
2026-10-11 00:06:02 +02:00
Adrià 0de1dfdff8
Merge pull request #3046 from MarcZX100/codex/libc-secure-format-scan-3032
feat(libc): implement vsnprintf_s and vsscanf_s
2026-10-11 00:05:28 +02:00
Adrià d3f9dd07e6
Merge pull request #2968 from babyhuey/feat/libc-hostname
feat(libc): implement guest gethostname
2026-10-11 00:02:54 +02:00
Adrià Franch fddcb00a40 fix(libSceAmpr): give _Thrd_sleep the console signature and move its TechnicalDebt line
The title's libc.prx _Thrd_sleep takes a second xtime* (remaining) and returns int.
The TechnicalDebt entry no longer sits at the end of its section.
2026-10-11 00:01:46 +02:00
Adrià ecafb64f28
Merge pull request #3083 from MarcZX100/codex/carry-3077-wide-conversions
feat(libc): implement Dinkumware wide conversion exports
2026-10-11 00:01:31 +02:00
David b446119c76 feat(libSceAmpr): implement the Dinkumware thread, sleep and spin lock exports
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 00:01:28 +02:00
Adrià Franch db2743e377 docs(technical-debt): describe the vsnprintf_s/vsscanf_s constraint behaviour as implemented 2026-10-10 23:52:18 +02:00
pushkarreddyy e251de849d feat(libc): implement vsnprintf_s and vsscanf_s
(cherry picked from commit 4ca866ea3b989da6947ad110f4d6c7f4efbe27c8)
2026-10-10 23:52:11 +02:00
Adrià 5a8844676c
Merge pull request #2995 from CnRJay/feat/agc-branch-patch-target-0300
feat(agc): implement sceAgcBranchPatchSetThenTarget_0300 and SetElseTarget_0300
2026-10-10 23:52:01 +02:00
David 51fca3cec3 feat(libc): implement _WStoul, _Iswctype and swscanf_s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 23:44:00 +02:00
Alex 951526662f fix(shader): honor directed f16 rounding in f16 conversions and ldexp
Directed FLOAT_MODE modes for v_cvt_f16_f32, v_cvt_f16_i16,
v_cvt_f16_u16 and v_ldexp_f16 were ignored, so results stayed
round-to-nearest-even. Hardware uses FLOAT_MODE bits 3:2 (round16);
the directed path runs only when f16 denormals are preserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-10 16:27:01 -04:00
Dean 262c031692
Merge pull request #2907 from oneandonlydean/carry/libkernel-reserved-range-hint
fix(libkernel): map non-fixed hints inside a reserved range in place
2026-10-11 09:26:41 +13:00
Dean 7c83d020f9
Merge pull request #2937 from oneandonlydean/up3/vertex-barrier
fix(shader): drop s_barrier in vertex programs that share nothing between waves
2026-10-11 09:16:31 +13:00
Dean b8284f667f
Merge pull request #2936 from oneandonlydean/up3/emulated-compare-array-on-2d
fix(shader): give an emulated comparison of a 2D-array access a plain 2D mode
2026-10-11 09:16:22 +13:00
Dean b8a083b253
Merge pull request #2946 from SleglJan/fix/libSceSharePlay-null-heap
fix(libSceSharePlay): accept a null heap in sceSharePlayInitialize
2026-10-11 09:13:01 +13:00
Dean 7db7c9f908
Merge pull request #2919 from XairRrR/feat/libscevoice-mute-flag
feat(libSceVoice): track the port mute flag
2026-10-11 09:12:51 +13:00
Dean 94416bd6ad
Merge pull request #2764 from Get-fix/fix/audioout-ex-exports
fix(audio): export the sceAudioOutEx bitstream port functions
2026-10-11 09:12:41 +13:00
Chad 402bc1cdfc feat(agc): implement sceAgcBranchPatchSetThenTarget_0300 and SetElseTarget_0300 2026-10-10 15:05:43 -05:00
Dean 0ed05471e5
Merge pull request #2899 from MarcZX100/codex/mutexattr-prioceiling-2689
feat(libkernel): implement mutex priority ceiling attributes
2026-10-11 09:02:05 +13:00
Dean 97d347cf33
Merge pull request #2897 from LeandroLP23/feat/libkernel-pthread-sigmask
feat(libkernel): implement pthread_sigmask
2026-10-11 09:01:55 +13:00
Dean 17d73d7fe7
Merge pull request #2896 from MarcZX100/fix/avplayer-autostart-race
fix(avplayer): keep title-started playback running
2026-10-11 08:58:15 +13:00
Chad 27e1ddca99 fix(recompiler): read SRT words through a null user-data pointer as zero 2026-10-10 14:51:20 -05:00
mugurc 92b20608e8 feat(relinker): convert for Rosetta with --to-rosetta
Rosetta runs AVX2, FMA, BMI1/2, F16C and MOVBE, but, unlike an Intel
host, it has neither RDSEED, CLWB nor RDPID. --to-rosetta converts
everything --to-intel does and lowers these three as well:

- RDSEED becomes RDRAND (the /6 form of the same opcode), which also
  returns a random value and sets CF.
- CLWB only writes a cache line back, so it becomes a NOP of the same
  length.
- RDPID becomes a load of 0 through an optional stub: Rosetta's TSC_AUX
  is a constant, not a processor index, so every thread reports
  processor 0. A site with no movable instruction after it for the jump
  is kept.

The flag implies --to-intel and conflicts with --windows. It is
independent of --macos: it only changes what the conversion produces, so
--macos alone leaves these instructions as they are, as on an Intel Mac,
and a title for Rosetta is relinked with --macos --to-rosetta. Intel
output is unchanged: the target is a parameter of the converter, Intel by
default.
2026-10-10 22:46:45 +03:00
Dean 9206c3e621
Merge pull request #2791 from alfalfa-star/perf/agc-storage-baseline-settled
perf(agc): take a storage image's generation baseline only when its guest bytes are settled
2026-10-11 08:45:14 +13:00
Alex 2f3f1a9c41 fix(shader): flush scalar f16 add/mul/sub denormals to signed zero
Scalar f16 add/mul/sub ignore FLOAT_MODE denorm16 flush bits on main.
Flush inputs when bit 0 is clear and results when bit 1 is clear at
nearest-even. Multiply checks tininess after 11-bit rounding
(0x387ff000); add/sub use 0x38800000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-10 15:44:41 -04:00
MrMha 72f623197a fix(agc): keep polling unsatisfied memory waits after diagnostics
Keep WAIT_REG_MEM diagnostic timeouts from completing unsatisfied waits.
Register the existing gated-dispatch capture test with a 1ms diagnostic
timeout and document the missing-producer limitation.
2026-10-10 23:39:36 +04:00
Sanjaysrinivas 982f7d7817 test(libkernel): cover cancellation recovery
Refs #1668. Complements #1141 with resource ownership and lifecycle regressions.
2026-10-10 21:27:49 +02:00
Get-fix fb380440d7 feat(libSceSystemService): select the console language with ANYPS5_LANGUAGE
sceSystemServiceParamGetInt always reported English (United States) as
the console language, so a title that follows the console's language,
such as Jelly5 (PPSA99505) with its Arabic text, can only show English.
ANYPS5_LANGUAGE now selects a console language number from 0 to 30
(21 is Arabic). Unset or empty keeps English (United States); any other
value throws at the language query instead of being ignored.

(cherry picked from commit 9bcf196daa01b07a22be876a7f1143149503e054)
2026-10-10 19:25:39 +00:00
Hannah Lyons 8da88ad3ac feat(libSceAudioOut): export the sceAudioOutSys HDMI output functions 2026-10-10 15:23:02 -04:00
Dean 3cb317fcfd
Merge pull request #2893 from LeandroLP23/docs/environ-technical-debt
docs(libkernel): record that environ is not libc's environment
2026-10-11 07:50:13 +13:00
Dean 29380369ad
Merge pull request #2890 from CnRJay/feat/audioout2-enable-chat
feat(audioout): declare sceAudioOut2EnableChat
2026-10-11 07:43:41 +13:00
QRMOE f153c28b52 docs(libc): record the fixed guest hostname policy
AI-assisted: yes. Record that gethostname exposes AnyPS5 rather than the native machine name. Console hostname configuration, sysctl integration and name resolution remain unverified and unimplemented. This one-line note is placed beside an unchanged libc compatibility entry so the branch merges cleanly into tested main 5edae3536.
2026-10-10 14:42:50 -04:00
Dean 43e1425ba8
Merge pull request #2888 from CnRJay/feat/psml-mfsr-1300
feat(psml): declare scePsmlMfsrCreateContext1300 and scePsmlMfsrGetDispatchMfsrPacket1300
2026-10-11 07:40:19 +13:00
Jan Šlégl 60148c0e96 fix(libSceSharePlay): accept a null heap in sceSharePlayInitialize
PPSA11386 calls sceSharePlayInitialize(NULL, 0x1800) at start-up and stops
on any non-zero result, so the console accepts a null heap. The library
keeps no state and does not use the heap; a zero size still throws, as its
error is unknown. libSceSharePlay gets its own CMakeLists for the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:38:56 +02:00
Dean Galvin 696b93a107 fix(shader): drop s_barrier in vertex programs that share nothing between waves
An NGG passthrough program on the vertex path whose s_barrier only orders wave 0's GS_ALLOC_REQ produced a workgroup OpControlBarrier, which the Vertex execution model does not allow; SPIR-V validation rejected the module at the program's first draw. In a Vertex-stage program the barrier now emits nothing when the program has no LDS or GDS access and no memory write or atomic, so no wave can observe another. With any of those it throws.
2026-10-11 07:32:30 +13:00
Dean Galvin 27353e16b7 fix(shader): give an emulated comparison of a 2D-array access a plain 2D mode
A comparison sample with a 2D-array address on a plain 2D color T# takes the emulated comparison, whose runtime modes were only the 2D-array and cube ones. No mode matched, and materialization threw that the image descriptor was incompatible with the static runtime image interface. The emulated comparison now also gets a 2D mode, as the native modes of a 2D-array access already have; the slice is ignored.
2026-10-11 07:32:16 +13:00
Dean b78ced2b1e
Merge pull request #2858 from babyhuey/feat/libkernel-fstatfs
feat(libkernel): implement _fstatfs
2026-10-11 07:26:56 +13:00
Dean ce9ca660aa
Merge pull request #2857 from babyhuey/feat/libscehttp-recv-block-size
feat(libSceHttp): accept sceHttpSetRecvBlockSize
2026-10-11 07:26:46 +13:00
Dean df6b831400
Merge pull request #2831 from SleglJan/feat/libscenet-show-netstat
feat(libSceNet): declare sceNetShowNetstat
2026-10-11 07:23:26 +13:00
Joey Fisher f01f95d1f9 fix(agc): report a refused queue worker priority as a driver failure and reject unknown APS5_THREAD_PRIORITY values 2026-10-10 12:23:12 -06:00
Alex c3b8aa3264 fix(shader): flush f16 min3/max3/med3 denormal inputs
The ternary forms share minMaxF16 with v_min_f16 and v_max_f16 and follow
the same rule on gfx1036: a subnormal half input becomes a signed zero when
bit 0 of the f16 denormal field is clear, at IEEE=0 and IEEE=1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 14:21:31 -04:00
Dean 9c5d67fbe2
Merge pull request #2478 from itsbo5/feat/libkernel-dup
feat(libkernel): implement dup and dup2
2026-10-11 07:19:54 +13:00
Dean cf5d9bc1b5
Merge pull request #1772 from LuisBiceps/feat/libc-ifaddrs
feat(libc): implement getifaddrs and freeifaddrs
2026-10-11 07:19:36 +13:00
Dean 9f87be5cc0
Merge pull request #2872 from CouchRiv/feat-libscecdlgg2p-dialog-close
feat(libs): provide the exports PPSA01285 imports that no library has
2026-10-11 07:16:15 +13:00
Dean bb29b62250
Merge pull request #2843 from MathiasDevelopes/feat/libsceajm-decode-split-resample-ex
feat(libSceAjm): implement sceAjmBatchJobDecodeSplit and sceAjmBatchJobSetResampleParametersEx
2026-10-11 07:16:06 +13:00
ps54all 08728f95b9 feat(libkernel): implement pthread_mutexattr_setprioceiling and getprioceiling
The mutex attribute now keeps its protocol and priority ceiling the way
FreeBSD's libthr does: the ceiling can be set and read only under
PTHREAD_PRIO_PROTECT (EINVAL otherwise), and setting a protocol resets it
to the highest SCHED_RR priority. Mutexes still do not apply priority
protection; that is listed as a silent stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit d10c024f8fdbcdfced0187550f272333264f07df)
2026-10-10 18:12:31 +00:00
ps54all 3444ebf5cd fix(libkernel): map non-fixed hints inside a reserved range in place
A map without MAP_FIXED whose hint lies wholly inside a range still
reserved by sceKernelReserveVirtualRange is placed at the hint, as a fixed
map into the reservation would be. Hints outside reservations and ranges
that are partly mapped keep their hint behaviour. The reservation is
checked under the registry mutation, so it cannot be released and its
address reused between the check and the map (MarcZX100, #2687).

Fixes #2687

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A2cY3SsTYnh4u4ZtEr2Adx
2026-10-11 07:10:29 +13:00
XairRrR 1232fd6cdf feat(agc-driver): prepare shader variants registration did not predict
Registration prepares the variants a shader's registered state
predicts; a draw or dispatch whose state needs another one threw
"prepared shader artifact is missing for the requested static ABI".
Titles that link their own libSceAgc build that state themselves and
never call the driver's static ABI resolution, so their draws differ
from the registered prediction. The missing artifact is now prepared at use, logged, and kept
with the snapshot like the deferred and null pixel cases. SourceHandleFor
now checks that the request refers to the registered code, as
InvocationFor already did.

Uncharted: Legacy of Thieves Collection (PPSA05684) still misses on
main 197ffac9 (after the fixed push slots of #2661) for its own pixel
shaders: "prepared shader artifact is missing for the requested static
ABI: address=85899411712 stage=5 wave=64 pushOffset=128
pushCapacity=128".
2026-10-10 19:59:24 +02:00
XairRrR c7cd20e82f feat(libSceVoice): track the port mute flag
sceVoiceSetMuteFlag was NotImplemented with an unknown signature and
sceVoiceGetMuteFlag was not exported. Signatures follow shadPS4's
voice.h: a port id and a bool, and for sceVoiceGetMuteFlag a port id
and a bool pointer. The flag is stored per port like the volume; an
unknown port throws and a null output pointer is an invalid argument.

Uncharted: Legacy of Thieves Collection (PPSA05684) imports
sceVoiceGetMuteFlag (Pc4z1QjForU), so on main it stops at startup with
"undefined symbol: Pc4z1QjForU".
2026-10-10 19:59:15 +02:00
Yassine 9fc0af0b10 fix(avplayer): do not let auto start restart playback the title started
sceAvPlayerAddSource queues an auto start for a player created with auto
start or without an event callback. When the title enabled its streams
and called sceAvPlayerStart before the controller thread ran it, the auto
start called Start again on the playing player, which stopped it, released
every video buffer, including the frame the title held, and started the
film over. guest_avplayer occasionally caught this as "video frame is not
a texture allocation"; right after the test's own start, 8 texture
buffers were released in 15 of 15 runs.

The auto start now starts the player only while it is still ready, and
checks that under the player lock together with the start.

TestAutoStartKeepsStartedPlayback starts a callback-less player itself and
checks that no texture buffer is released afterwards and that the frame
it holds stays allocated. It fails on every run without the fix.
2026-10-10 17:56:25 +00:00
LeandroLP23 68a1aea611 docs(libkernel): record that environ is not libc's environment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:48:06 +02:00
LeandroLP23 df415ff1fd feat(libkernel): implement pthread_sigmask
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:45:28 +02:00
Chad a73b4e3f6d feat(audioout): declare sceAudioOut2EnableChat
Imported by party-ps5-shipping.prx bundled with PPSA28416.
2026-10-10 12:43:28 -05:00
Chad beba4ce204 feat(psml): declare scePsmlMfsrCreateContext1300 and scePsmlMfsrGetDispatchMfsrPacket1300
PPSA28416 imports both from libScePsml; the names hash to NIDs kLF7WtQ1-Dg and DDVUyPyYHTA.
2026-10-10 12:42:01 -05:00
Renan Pires 9a3e55b8e8 feat(libkernel): implement _fstatfs 2026-10-10 13:07:42 -04:00
Alex 2d0cf26804 fix(shader): flush f16 min/max denormal inputs
RDNA2 min/max flush half inputs to signed zero when input
preservation is disabled, while output flushing alone keeps them.
Apply this to the measured binary forms and pin the hardware rows.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-10 13:07:31 -04:00
Alex 2a675598f2 feat(libSceNpManager): add the missing request timeout export
Validate timeout arguments and track live requests so unknown or deleted
ids return REQUEST_NOT_FOUND. This supplies the remaining absent load
import alongside the dialog Close export; timeouts follow the existing
offline network model and are not stored.

Co-Authored-By: GPT-6.1-sol <noreply@openai.com>
2026-10-10 12:57:01 -04:00
Alex 18590d1f79 feat(libs): provide the missing G2P dialog Close export
Eager binding fails when a caller imports sceG2PDialogClose.
Add the missing throwing stub alongside the existing G2P exports
and record the assumed Close signature in TechnicalDebt.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-10 12:40:57 -04:00
Hannah Lyons e203c43221 feat(libSceHttp): accept sceHttpSetRecvBlockSize 2026-10-10 12:40:55 -04:00
MathiasDevelopes e8209307e9 feat(libSceAjm): implement sceAjmBatchJobDecodeSplit and sceAjmBatchJobSetResampleParametersEx
sceAjmBatchJobDecodeSplit queues a split run job with the stream
sideband, as sceAjmBatchJobDecode does for a single buffer pair.
sceAjmBatchJobSetResampleParametersEx with a zero ratio change per
sample sets the ratio as sceAjmBatchJobSetResampleParameters does; a
non-zero change throws, since its ramp is unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:24:54 +02:00
Alex d59efa478e test(shader): pin mixed-source tininess after rounding
Measure the mixed f16/f32 boundary on gfx1036 and pin both factor
slots, half selection, signs and zero f16 addends in the existing test.
Record this measured scope while keeping legacy mad/mac unchanged.

Co-Authored-By: Codex gpt-6.1-sol <noreply@openai.com>
2026-10-10 12:24:36 -04:00
Alex a68dbbe112 fix(shader): detect f32 tininess after rounding when flushing products
With f32 denormals flushed, RDNA2 flushes a product only when its value
rounded to 24 bits in the current round mode is below 2^-126. The
tiny-product check tested the exact product, so products that round up
to 2^-126 became zero in v_mul_f32, v_mul_legacy_f32, v_mullit_f32 and
zero-addend f32 FMAs. The separately rounded v_mad_legacy_f32 and
v_mac_legacy_f32 keep the exact check, as they are not measured there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 12:24:36 -04:00
Get-fix d686f7057c fix(libkernel): export execvp
VLC (PPSA85300) imports execvp (0NJDcQ2B8vE) from libkernel and fails
to load because no library exports it. Replacing the process image is
not supported, so it throws if called, like sceSystemServiceLoadExec
does for executable replacement. VLC itself cannot reach the call: its
fork and vfork fail with ENOSYS, so the child that would call execvp is
never created.
2026-10-10 19:12:49 +03:00
Jan Šlégl 875ff3f8d9 feat(libSceNet): declare sceNetShowNetstat
PPSA11386 imports it; on main it is one of the title's three missing
imports, with sceSslGetCaList and sceSslFreeCaList, and the title does not
call it during its start-up. The signature is unknown, so it is declared
without parameters and throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:01:23 +02:00
Jan Šlégl 33184a1b33 feat(libSceSsl): implement sceSslGetCaList, sceSslFreeCaList and sceSslUnloadCert
PPSA11386 imports sceSslGetCaList and sceSslFreeCaList and PPSA15508
imports sceSslUnloadCert; on main all three are missing and the loaders of
both titles stop on them. No root certificate bundle is shipped and no
loaded certificate is kept, so an SSL context holds no certificates:
sceSslGetCaList clears the list and returns NOT_FOUND, as sceSslGetCaCerts
does; sceSslFreeCaList accepts only that cleared list; sceSslUnloadCert has
nothing to drop and is assumed to return 0. A null list returns the
invalid-argument code that sceSslGetCaCerts and KytyPS5 return. An unknown
context and a list sceSslGetCaList did not return throw, as their codes are
not confirmed. Signatures and the SceSslCaList layout follow SharpProspero
and shadPS4.

guest_ssl_tests now links libc, as guest_http2_tests does, so an exception
thrown from libSceSsl unwinds with the same unwinder that resumes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:01:23 +02:00
Karan Vora c3742a3995 Merge remote-tracking branch 'origin/main' into perf/shader-coherent-alias
# Conflicts:
#	core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ProgramMetadata.hpp
2026-10-10 11:34:02 -04:00
Karan Vora 5a16ed15b1 docs(shader): list plain buffer loads beside GLC accesses as not coherent 2026-10-10 11:33:29 -04:00
krishnaraya 1feb89cd56 fix(agc): read X for a DST_SEL W of 5_6_5 textures as measured on gfx1035
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 11:22:07 -04:00
alfalfa-star 75b540c216 perf(agc): take a storage image's generation baseline only when its guest bytes are settled
An upload of a storage image up to 1 MiB reads the surface's guest bytes
into a baseline (#1599), which a later write-back compares against for
blocks the CPU stamped. When a unit shadow, another image's pending
results or a recorded GPU store covers the surface, that read goes
through the flush hook: the shadow is published and the worker waits for
the GPU, although the upload itself runs on the GPU from the import.

The baseline is now taken only when nothing of that kind overlaps the
surface. Otherwise the image has none, and its write-back keeps the CPU's
bytes for stamped blocks, the rule before #1599. TechnicalDebt's entry
names the condition.

agc_storage_baseline_settled creates a storage image over a watched host
import with a recorded store pending over part of it and checks that the
upload did not submit the open batch; without the change the baseline
read syncs on that store. agc_unchanged_cpu_stamps (#1599) still passes.

PPSA14632 (LEGO Horizon Adventures) refreshes such images about 870
times per 10 s from queue 0 dispatches: the hook's recorded-store syncs
go from about 3400 waiting 4.0 s to about 630 waiting 0.3 s per 10 s,
and a direct dispatch's device call from 356 to 107 us.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:07:47 +02:00
Get-fix f2b4bf3b5b fix(audio): export the sceAudioOutEx bitstream port functions
Jelly5 (PPSA99505) imports sceAudioOutExGetMonitorInfo (PhnNN0UEV6Y),
sceAudioOutExConfigureOutput (VcE+gXSwFXI), sceAudioOutExOpen
(6X6dp+07h4U) and sceAudioOutExClose (0TfjSulCV2A) from libSceAudioOut
and fails to load because no library exports them. It calls them only
for its optional HDMI bitstream output, and their signatures are
unconfirmed, so they are exported without an implementation and throw
if they are called, like sceSaveDataCancel.
2026-10-10 16:12:11 +03:00
Rohan K 179c9b6014 fix(videoout): add throwing output status with VRR export 2026-10-10 18:14:49 +05:30
Adrià Franch 8e73f6e73e perf(agc): relink library pipelines with link-time optimization in the background
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 14:24:45 +02:00
Adrià Franch cb34140cfb docs(technical-debt): record dup and dup2 limits 2026-10-10 15:52:46 +04:00
Dextroid17 b7e32b3648 fix(shader): decode the scalar aperture sources 235-238 instead of failing the shader 2026-10-10 06:57:12 -04:00
Adrià Franch 8c802e5eb1 perf(agc): give each graphics stage a fixed push constant slot with pipeline libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 12:19:31 +02:00
Joey Fisher 0fe61e4191 fix(agc): pick one priority path per mode and throw when it is refused 2026-10-10 04:14:08 -06:00
Joey Fisher 22147dbbe6 fix(agc): lower the RLIMIT_RTTIME hard limit only when rtkit requires it
Read rtkit's MaxRealtimePriority and RTTimeUSecMax before touching the
limit, keep a hard limit that already satisfies rtkit, lower the soft
limit to at most half of the hard one, and log when the hard limit is
lowered. rtkit checks the hard limit, so it cannot be left alone when it
is above RTTimeUSecMax; the side effect is listed in TechnicalDebt.md.
Log the policy rtkit applied, SCHED_RR by default.
2026-10-10 04:14:02 -06:00
Joey Fisher a9c132a629 feat(agc): opt-in raised priority for the queue workers and the presenter 2026-10-10 04:13:57 -06:00
Adrià Franch 0c20cab656 perf(agc): render with dynamic rendering when pipelines come from libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:45:25 +02:00
Adrià be403084c6
Merge pull request #1141 from nicolasabosch/feat/kernel-pthread-cancel
feat(libkernel): implement thread cancellation
2026-10-10 11:40:09 +02:00
Adrià 663cc42c85
Merge pull request #2636 from adriadam10/feat/gpl-libraries
perf(agc): link graphics pipelines from per-stage libraries
2026-10-10 11:39:12 +02:00
Adrià 6675e60bf1
Merge pull request #2409 from danzaio/feat/rudp-activate
feat(libSceRudp): implement sceRudpActivate
2026-10-10 11:35:58 +02:00
Nicolas Abosch 3acca27f27 feat(libkernel): implement thread cancellation
scePthreadCancel and pthread_cancel threw, scePthreadTestcancel did
nothing and the cleanup handler exports did not exist.

A cancel request is now recorded on the thread and acted on at
scePthreadTestcancel, the condition variable waits, scePthreadSem and
sem waits, scePthreadJoin and the sleeps, and under their POSIX names.
A thread blocked in one of the waits is woken; a condition wait takes
its mutex back before the thread exits. The thread exits with
PTHREAD_CANCELED through scePthreadExit, which now runs the handlers
of __pthread_cleanup_push_imp and __pthread_cleanup_pop_imp.
scePthreadSetcancelstate and scePthreadSetcanceltype reject unknown
values, and pthread_setcanceltype is added.

Constants, the handler node layout and the order of events follow
FreeBSD libthr. A sleep is not interrupted, file and socket calls are
not cancellation points and the asynchronous type acts like the
deferred one except at the two set calls (TechnicalDebt). New test:
guest_pthread_cancel.
2026-10-10 11:32:09 +02:00
Adrià 948a526c23
Merge pull request #407 from Pouare514/feat/deathloop-loading
feat(libs): Deathloop loading support (Ampr, NetCtlApDialog + stubs)
2026-10-10 11:29:40 +02:00
Adrià 1052fcc7e6
Merge pull request #2593 from eliasbruno124-dev/fix/agc-bulk-resource-unavailable
fix(libSceAgcDriver): report unavailable bulk resource registration
2026-10-10 11:29:12 +02:00
Adrià cb6870f965
Merge pull request #2538 from husseinkad/fix/windows-stat-file-identity
fix(libkernel): report a stable file identity from stat and fstat on Windows
2026-10-10 11:26:32 +02:00
Adrià Franch 0a04c8658c perf(agc): link graphics pipelines from per-stage libraries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:25:23 +02:00
Adrià cd73e149b3
Merge pull request #1290 from SirDarky/fix/shader-mac-legacy-denormals
fix(shader): flush v_mac_legacy_f32 denormals as measured on gfx1010
2026-10-10 11:23:53 +02:00
Adrià 3afc78464c
Merge pull request #2543 from overlordxrz-source/feat/libkernel-kill
feat(libkernel): implement kill
2026-10-10 11:21:08 +02:00
Adrià b750211412
Merge pull request #1776 from Celegans12/feat/shader-lds-beyond-device-limit
feat(shader): implement compute LDS beyond the device's shared memory limit
2026-10-10 11:20:13 +02:00
Adrià 1138fa96f4
Merge pull request #2554 from 22alfbassett/fix/kernel-sync-recorded-paths-linux
fix(libkernel): flush only recorded paths in sceKernelSync on Linux
2026-10-10 11:17:59 +02:00
Adrià 95fe14235a
Merge pull request #2536 from orbz22/fix/audioout2-queue-port-buffers
fix(audioout): play every AudioOut2 port buffer set between pushes, one per grain
2026-10-10 11:17:19 +02:00
Adrià Franch 0c6be3e23f docs(TechnicalDebt): move the sceRudpActivate line away from the end of the section 2026-10-10 11:13:57 +02:00
Adrià a0a650884b
Merge pull request #2412 from MathiasDevelopes/feat/libscepsml-module
feat(libScePsml): build libScePsml from the libScePsml_debug source
2026-10-10 11:13:55 +02:00
danzaio d0407a808d feat(libSceRudp): implement sceRudpActivate
Astro's Playroom (PPSA01325) calls sceRudpActivate during start-up, where the throwing stub stopped it. The host has no reliable-UDP stack to activate, so the export returns success and does nothing, matching the OK-returning stubs shadPS4 keeps for the whole library. The guest_offline_imports test now checks the success path with and without sceRudpInit, and still checks that the sceRudpGetStatus sibling throws and writes nothing.
2026-10-10 11:13:46 +02:00
Adrià Franch 43cc101910 docs(technical-debt): record the lossy Windows file identity fold
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 11:08:15 +02:00
overlordxrz-source 9a70477170 feat(libkernel): implement kill
ProsperoStore (PPSA99000) imports kill from libkernel and stops at it on
current main. Its crash reporter resets a crash signal to SIG_DFL and
sends it again with kill(getpid(), signal).

kill follows FreeBSD's kern_kill and killpg1 for the only guest process:
EINVAL for signals outside 0 to 128, signal 0 only checks the target,
and the caller's own pid, 0 and minus its pid deliver through raise.
Any other pid, and -1, which skips the caller, report ESRCH.
2026-10-10 11:06:12 +02:00
Adrià 2f3b5046e5
Merge pull request #1492 from Celegans12/feat/agc-dual-source-blending
feat(agc): implement dual-source blending from the MRT1 export
2026-10-10 11:01:16 +02:00
Adrià 412fa8b06f
Merge pull request #1864 from fisherjoey/fix/agc-compute-gate-capture
fix(agc): land cross-queue waits and capture the gated compute group at the gate
2026-10-10 10:57:52 +02:00
Adrià Franch 60251f9205 docs: describe LDS in device memory in ARCHITECTURE and TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 10:56:56 +02:00
Marcus 683ea37935 fix(shader): flush v_mac_legacy_f32 denormals as measured on gfx1010
VOP2 0x06 measured the same as VOP3 0x140 on gfx1010 (RX 5700 XT) in
wave32 and wave64, IEEE 0 and 1 and f32 denormal modes 0 to 3: the
product is rounded before the add, f32 denormal sources, product and
result are flushed in every mode, and a zero factor gives a +0 product.
It now shares the v_mad_legacy_f32 translation with the accumulator as
the addend, and f32DenormalFlushFor returns 3 for it as well. A new
execution test pins the measured results of its VOP2 and VOP3 forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:54:23 +02:00
Adrià e11c7bef4e
Merge pull request #2623 from oneandonlydean/fix/savedata-cancel-2598
fix(savedata): export sceSaveDataCancel
2026-10-10 10:50:53 +02:00
Adrià 4b6abf0381
Merge pull request #2625 from oneandonlydean/fix/carry-2577
feat(agc): sample with DISABLE_CUBE_WRAP through non-seamless cube samplers
2026-10-10 10:47:31 +02:00
Adrià 970c3059c2
Merge pull request #2617 from oneandonlydean/fix/carry-2553
fix(libSceFont): report vertical glyph metrics
2026-10-10 10:46:39 +02:00
LuisBiceps 63a20d672b refactor(libc): move the getifaddrs test and TechnicalDebt entry away from lines other pull requests change
The guest_interfaces test now follows guest_thread_callback_abi instead of guest_errors, and the TechnicalDebt entry follows the libc SSE4a trap emulation entry instead of ending the Functional list, where other open pull requests add theirs.
2026-10-10 16:41:11 +08:00
Adrià 444edc3652
Merge pull request #1819 from TheAggie/feat/agc-pixel-stipple-fixed-point
feat(agc): accept the LINE_STIPPLE_TEX and POS_FIXED_PT pixel inputs
2026-10-10 10:37:00 +02:00
Celegans12 b8cc4adb3b feat(agc): implement dual-source blending from the MRT1 export
CB_BLENDn_CONTROL factors 15-18 (BLEND_SRC1_COLOR, BLEND_INV_SRC1_COLOR,
BLEND_SRC1_ALPHA, BLEND_INV_SRC1_ALPHA) threw "unsupported blend
factor". They blend MRT0 with the pixel shader's MRT1 export as the
second source, as RADV and radeonsi program it.

DecodeState maps them to the VK_BLEND_FACTOR_SRC1_* factors and accepts
them only with pixel exports to slots 0 and 1, color writes to slot 0
alone, an MRT1 export with MRT0's export format and shader mask, an
ADD, SUBTRACT or REVERSE_SUBTRACT operation and an identity component
order. The blend is draw state, so the specialized module of the
registered pixel shader moves its MRT1 output to location 0 index 1,
which ValidateShaders requires; pipelines need dualSrcBlend, now enabled
when present. The request field dualSourceBlend is in the module key,
the result memo, the draw key and the serialized request (version 15).
2026-10-10 10:29:00 +02:00
Joey Fisher db1bd553c7 fix(agc): drop the switches that turned the wait and capture fixes off 2026-10-10 10:27:59 +02:00
Joey Fisher f89bf1d417 fix(agc): resolve a compute queue's dispatch group when its wait passes 2026-10-10 10:27:59 +02:00
Joey Fisher de93d3e7b0 fix(agc): land cross-queue waits passed on recorded labels before guest reads 2026-10-10 10:27:59 +02:00
LuisBiceps 5c0610f334 feat(libc): keep getifaddrs flags consistent with their addresses on Linux
Drop IFF_POINTOPOINT from an address without a peer and compute an IPv4 broadcast address the host omits from the netmask, since FreeBSD always provides the address when the flag is set. Check zero port, flowinfo and padding in the test.
2026-10-10 10:23:55 +02:00
LuisBiceps a09b67b142 feat(libc): report getifaddrs errors through errno and handle Windows edge cases
Return -1 with the FreeBSD errno for a null list and for expected host and allocation failures, as getcwd does. On Windows, give an unspecified prefix length a host mask, leave PPP and tunnel adapters without broadcast or point-to-point flags since their peer address is not reported, fall back to if<index> for long NDIS names, and bound the adapter query retries. Compare every entry with the host's own list in the test.
2026-10-10 10:23:55 +02:00
LuisBiceps 7cd185ec79 feat(libc): implement getifaddrs and freeifaddrs
List the host's IPv4 and IPv6 addresses in FreeBSD's struct ifaddrs layout, with FreeBSD sockaddrs and interface flags, from getifaddrs on Linux and GetAdaptersAddresses on Windows. The list is one allocation, so freeifaddrs is a single free.
2026-10-10 10:23:55 +02:00
Yassine a44e70957a fix(libSceFont): report vertical glyph metrics
sceFontGetCharGlyphMetrics and sceFontGetRenderCharGlyphMetrics set the
vertical bearing and advance to zero although the glyph is loaded with
FT_LOAD_VERTICAL_LAYOUT. The library's own text writing steps the pen by
that vertical advance, so every character of vertical text was placed on
the previous one.

The vertical metrics now follow the FreeType driver's metrics of a
rendered glyph: FreeType's vertical advance, and for a face without
vertical metrics a bearing of half the horizontal advance left of the
horizontal bearing and of half the advance left over by the glyph height.

guest_system_font checks every metric of a square glyph at 100 pixels.

(cherry picked from commit 04dd69f806379df8b52cfdeb2979f2595973a9b3)
(cherry picked from commit 11f6f9e954756ee8d4a3fc2be574ab3b57ecd7c5)
2026-10-10 21:23:19 +13:00
Dean Galvin ec2bb21e70 fix(savedata): export sceSaveDataCancel
Palworld (PPSA23126) imports sceSaveDataCancel (e6y3WMBYbiM) from
libSceSaveData and fails to load because no library exports it. Its
signature is unknown, so it is exported without an implementation and
throws if it is called, like sceSaveDataConvert.
2026-10-10 21:22:48 +13:00
AlxcBTW bf18420007 feat(agc): sample with DISABLE_CUBE_WRAP through non-seamless cube samplers
Guest samplers with DISABLE_CUBE_WRAP (S# word 0 bit 28) are created with
VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT when the device enables
VK_EXT_non_seamless_cube_map; RADV maps the flag to the same bit. The bit
only changes cube filtering, so without the extension the sampler is still
created and only a cube texture sampled through it throws.
2026-10-10 21:20:28 +13:00
Adrià f6af6d11d3
Merge pull request #2123 from LuisBiceps/feat/libkernel-waitpid-no-children
feat(libkernel): report no child processes from waitpid
2026-10-10 10:18:56 +02:00
Scott Schuster c160d31649 feat(agc): accept the LINE_STIPPLE_TEX and POS_FIXED_PT pixel inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:18:16 +02:00
Adrià ddcb251a97
Merge pull request #2092 from authurtabo-byte/fix/agc-color-compare-forms
fix(agc): accept additional color comparison image forms
2026-10-10 10:13:30 +02:00
Adrià eab888e02f
Merge pull request #2573 from oneandonlydean/fix/carry-2241
fix(agc): zero-fill a vertex fetch past the record count
2026-10-10 10:13:05 +02:00
Adrià Franch 8de5e70477 docs(technicaldebt): shorten the waitpid entry
Requested by @oneandonlydean in review.
2026-10-10 10:11:04 +02:00
LuisBiceps c059cc733f refactor(libkernel): move waitpid and its TechnicalDebt entry away from lines open pull requests change
waitpid now sits between exit and _exit, and its TechnicalDebt entry follows the packed horizontal gathers entry, so the open system and getuid pull requests and the thread cancellation test pull request no longer touch the same lines.
2026-10-10 10:11:04 +02:00
LuisBiceps ac6852ec26 test(libkernel): check every waitpid option set on every pid, with and without a status
Unknown options are now checked for every pid, with 0x80 and 0x80000040 added, and so are valid combinations such as WNOHANG | WUNTRACED. Each call is repeated with a null status. The TechnicalDebt entry cites kern_wait, which adds WEXITED and WTRAPPED, and lists pdfork.
2026-10-10 10:11:04 +02:00
LuisBiceps 918bc0a49c feat(libkernel): report no child processes from waitpid
waitpid returns -1 with ECHILD, or EINVAL for an option FreeBSD does not know, and leaves the status unwritten: AnyPS5 runs the title as one process and exports nothing that creates a child. VLC PPSA85300 stops on main at this import.
2026-10-10 10:11:04 +02:00
authurtabo-byte e50bd2f824 fix(agc): retain anisotropic compare rejection and test sRGB forms 2026-10-10 01:08:03 -07:00
Adrià 2c4828a63d
Merge pull request #2072 from STUPIDCONTEM/fix/srt-signed-comparison
fix(shader): evaluate signed comparisons in SRT expressions
2026-10-10 10:07:30 +02:00
Adrià d185c31678
Merge pull request #2348 from Pipodi/fix/1d-storage-through-2d-stores
fix(shader): write 1D storage images through 2D image stores
2026-10-10 10:06:36 +02:00
Dean ac75a96dd7
Merge pull request #1908 from TheAggie/fix/libkernel-sched-other-priority
fix(libkernel): accept SCHED_OTHER in sched_get_priority_max/min
2026-10-10 21:05:56 +13:00
Adrià 0bc8313a25
Merge pull request #2177 from MarcZX100/codex/fix-color-compare-negative-wrap
fix(shader): normalize negative color comparison wrap indices
2026-10-10 10:02:56 +02:00
Adrià 700d5a64c8
Merge pull request #2312 from SleglJan/feat/shader-lds-float-atomics
fix(shader): LDS float atomics quiet signalling NaNs and flush denormals as the hardware does
2026-10-10 10:00:51 +02:00
Adrià af1a8edfe1
Merge pull request #2583 from gjonn/perf/async-registration-prepare
perf(agc): prepare registered shaders in the background
2026-10-10 10:00:11 +02:00
Adrià 034dd75f85
Merge pull request #2204 from XairRrR/feat/videoout-deferred-flip-buffer
feat(libs): resolve command-buffer flip buffers when the GPU reaches the flip
2026-10-10 09:59:35 +02:00
danzaio 5e3268969b fix(agc): zero-fill a vertex fetch past the record count
A strided vertex fetch whose index is at or past the descriptor's num_records threw and aborted the title. PPSA01325 draws its fullscreen composite as a 4-vertex strip over a 3-record buffer, so the fourth vertex past the records stopped presentation.

Hardware returns (0, 0, 0, 0) for such a fetch with OOB_SELECT 0 and 1, measured on RDNA2 gfx1036 with tools/hw-oracle in #2241. VertexBufferReadSize now spans the whole fetch, and the staging copy reads the record bytes then zero-fills from num_records * stride onward. Each such fetch gets its own copy, outside the shared copies of its sibling attributes, the host-import in-place path and the draw-snapshot cache. OOB_SELECT 2 and 3 keep throwing past num_records, since each needs its own rule. Recorded in docs/dev/TechnicalDebt.md.
2026-10-10 20:58:25 +13:00
Adrià Franch f6d97ad3d2 test(agc): drop the 1D-T# image_load refusal that main now accepts
eb06284c7 made a read-only 2D image_load through a 1D T# valid, so the
test no longer pins a refusal. The TechnicalDebt line now says storage
loads still throw.
2026-10-10 09:57:16 +02:00
Alex Collini 6c4660b73c fix(shader): ignore y in 2D stores through a 1D storage image
Measured on RDNA2 (gfx1035) in review: image_store with DIM 2D through a
1D T# writes texel x for every y, including y = 0xffffffff. The T# type
decides the addressing and DIM only how many address VGPRs are read. The
store no longer drops y != 0.

The test now pins the second store at y = 1 with dmask 0x5: texel x holds
its components 0 and 2, components 1 and 3 are 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:55:37 +02:00
Alex Collini 14d9b13cd8 fix(shader): write 1D storage images through 2D image stores
A compute program of PPSA26344 writes a 1D storage image with image_store
DIM 2D, and no runtime image mode matched its T#. A write-only 2D storage
access now also gets a 1D mode. A store through it is dropped when y is not
0, as a one-texel-high image bounds it; this mirrors the measured 3D loads
through 2D T#s of #2023 and is listed in TechnicalDebt as unmeasured.

Loads, atomics and image_store_mip through such a pair still throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:55:37 +02:00
XairRrR c9fe124c10 feat(libs): resolve command-buffer flip buffers when the GPU reaches the flip
A flip packet names a buffer index; the buffer was looked up when the
command buffer was submitted, so a title that registers its buffers
after submitting the first frame failed with "flip buffer is not
registered". The buffer is now resolved when the GPU reaches the flip,
as the hardware does. A flip whose buffer is still unregistered then
presents black and completes (see TechnicalDebt).

Uncharted: Legacy of Thieves Collection (PPSA05684) submits its first flip before registering its buffers and stopped with "flip buffer is not registered".
2026-10-10 09:54:29 +02:00
Adrià a29bae31af
Merge pull request #2572 from oneandonlydean/fix/carry-2237
fix(shader): read 2D image accesses through 1D T#s as measured
2026-10-10 09:54:13 +02:00
Adrià Franch ac03a5b718 docs(architecture): describe background shader preparation at registration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:52:20 +02:00
Adrià d697af329d
Merge pull request #2351 from Faffu/fix/avplayer-nosync-late-frames
fix(avplayer): skip late video frames in no-sync mode while audio drives the clock
2026-10-10 09:50:52 +02:00
Adrià ada939d2eb
Merge pull request #2035 from CouchRiv/fix-shader-f64-snan-ieee0
fix(shader): quiet f64 signaling NaNs only in IEEE mode
2026-10-10 09:49:38 +02:00
Adrià f70a091f90
Merge pull request #2380 from SleglJan/fix/shader-trig-quarter-fold
fix(shader): make v_sin and v_cos linear within 2^-12 of a turn from a zero
2026-10-10 09:47:14 +02:00
Faffu 068da6a99f fix(avplayer): skip late video frames in no-sync mode while audio drives the clock
In SCE_AVPLAYER_AV_SYNC_MODE_NONE every decoded frame was handed out in
order, so a title that requests video slower than the film's frame rate
fell behind its audio (about 52 s by the end of the PPSA12544 intro).
While the title pulls audio, frames the audio clock has already passed are
now skipped; frames that are not late are handed out as before.

Fixes #1635

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:42:20 +02:00
Jan Šlégl 4fb613ec40 fix(shader): flush LDS float atomic inputs for FP_DENORM_FLUSH_IN as well
On RDNA2 (gfx1036) ds_min/max/cmpst(_rtn)_f32 and _f64 flush both operands
when bit 0 of the type's denormal field is clear: field 2 flushes like field
0, field 1 keeps like field 3, in IEEE 0 and 1. The flush decision now tests
that bit. agc_driver_lds_float_atomic_modes adds FLOAT_MODE 0x50 (both fields
1) and 0xa0 (both fields 2), and the TechnicalDebt entry records the measured
fields.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 09:40:42 +02:00
Jan Šlégl c2a9491e96 fix(shader): LDS float atomics quiet signalling NaNs and flush denormals as the hardware does
ds_min/max/cmpst_f32 and ds_min/max/cmpst_f64 with their _rtn forms follow the
rule measured on RDNA2 (gfx1036): both operands are flushed to a signed zero
when the type's denormal field flushes, a signalling-NaN data operand is stored
quieted, else a signalling-NaN old value, else a quiet NaN loses, else the
ordered compare decides, and the flushed value is written. The shared f32
path used the host's float compares, so its NaN and denormal results were the
driver's; the shared f64 path lacked the signalling-NaN rules the buffer path
has. Both now use AtomicFloatBits. The translation marks the shared float
atomics with the mode's flush in MemoryInfo.

The new agc_driver_lds_float_atomic_modes pins 32 operand pairs per type in
the titles' mode, with both fields kept and with both flushed. The 64-bit
test's model gets the signalling-NaN rule and one lane kind now feeds the
signalling NaN of its table into min/max.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 09:40:41 +02:00
Alex d199fbc708 fix(shader): quiet f64 signaling NaNs only in IEEE mode
The f64 unary instructions, v_ldexp_f64, v_div_fixup_f64 and
v_cvt_f64_f32 always quieted a signaling NaN. The hardware does that
only with IEEE_MODE=1, as #1867 measured for the f32 and f16 forms;
with IEEE=0 the NaN comes out unchanged, measured on gfx1036.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 09:40:09 +02:00
Adrià Franch 64193dd96d docs(technical-debt): measured v_sin and v_cos error inside the bands
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:39:14 +02:00
Jan Šlégl 909281c994 fix(shader): make v_sin and v_cos linear within 2^-12 of a turn from a zero
After #1979 the cycle is exact, but the driver's sine of the radians loses
tiny results to its absolute error, and near the zeros of sine at k + 0.5
and of cosine at k ± 0.25 the f32 radians drop the low bits of the cycle.
Measured on RDNA2 (gfx1036), the hardware returns the input times 6.2831826
for every input below 2^-12 of a turn and stays within 7 ULP of the f32 2π
times the distance at the half and quarter turns.

Within 2^-12 of a turn from a zero the lowering now returns the linear term
of the exact distance to that zero, with the hardware's constant at the
integers and the f32 2π elsewhere; everywhere else it keeps the driver's
sine or cosine of the radians. agc_driver_sin_cos_near_zero pins 32 inputs
per type from the oracle with per-lane tolerances.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 09:39:01 +02:00
Nahuel Genchi eb06284c78 fix(shader): read 2D image accesses through 1D T#s as measured
A compute shader in Astro Bot samples an image as 2D while the bound
T# is 1D, and the recompiler refused it. Offer a 1D runtime mode for
sampled images used only by image_sample_lz and mip-less image_load,
which reads the texel the first coordinate selects, as measured on
RDNA2 in #2237.
2026-10-10 09:35:34 +02:00
eliasbruno124-dev 5a1b5bf947 fix(libSceAgcDriver): report unavailable bulk resource registration 2026-10-10 09:34:26 +02:00
ale 0bea402a1c feat(shader): follow FP16_OVFL in every f16 result
With FP16_OVFL=1 the hardware writes an f16 result that would round to
infinity as the largest finite value of that sign, unless a source
operand is infinite. v_div_fixup_f16 keeps the infinity it writes for a
zero denominator or an infinite numerator. Measured on RDNA2 (gfx1036)
at IEEE=0 and IEEE=1 with f16 denormals kept and flushed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 04:32:38 -03:00
Adrià e8b47b9270
Merge pull request #2043 from CouchRiv/fix-shader-cube-sc-tc-snan
fix(shader): quiet signaling NaN cube results in IEEE mode
2026-10-10 09:28:56 +02:00
Adrià f198c8ff97
Merge pull request #2036 from CouchRiv/fix-shader-minmax-f16-f64-ieee
feat(shader): follow IEEE_MODE in f16 and f64 min and max
2026-10-10 09:28:37 +02:00
Adrià 51b8cef4f9
Merge pull request #1969 from lubaxe/fix/agc-null-vertex-buffer-descriptor
fix(agc): read zero for vertex attributes behind a null V#
2026-10-10 09:28:06 +02:00
Adrià 41e34915b8
Merge pull request #1777 from MathiasDevelopes/feat/libkernel-random-device
feat(libkernel): open /dev/random and /dev/urandom for reading
2026-10-10 09:27:46 +02:00
Adrià d99babe24c
Merge pull request #1607 from saarthakpant/fix/agc-per-stage-color-attachments
fix(agc): count a pixel stage's colour attachments against maxPerStageResources
2026-10-10 09:25:20 +02:00
MarcZX100 9ffd06eab0 docs(shader): identify llvmpipe wrap regression version 2026-10-10 07:24:07 +00:00
MarcZX100 15673a94ea docs(shader): record unverified color compare wrap 2026-10-10 07:23:24 +00:00
Adrià b23bd7323f
Merge pull request #1831 from yabanana/fix/macos-descriptor-array-ranges
fix(agc): preserve descriptor array ranges in draw snapshots
2026-10-10 09:22:08 +02:00
Adrià 5596e5bd62
Merge pull request #1837 from EdouardSence/fix/agc-shader-header-copies
fix(agc): accept bound copies of a registered shader header that differ only in user_data
2026-10-10 09:20:19 +02:00
Adrià eba8525acb
Merge pull request #1924 from fisherjoey/fix/depth-bias-per-face
fix(agc): draw each face with its own depth bias
2026-10-10 09:19:03 +02:00
Sasha Papo f1c15c2cda docs: record the null vertex buffer V# as not measured on hardware
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:17:49 +02:00
Alex 6d1fe2b499 feat(shader): follow IEEE_MODE in f16 and f64 min and max
The f16 min/max/min3/max3/med3 now pick NaN results on the bits and
quiet a signaling NaN only with IEEE=1. With IEEE=0, v_min_f64 and
v_max_f64 return the other operand for a NaN, not a quieted NaN. This
completes #1826 for these forms, as measured on RDNA2 (gfx1036).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 09:16:09 +02:00
Adrià Franch b49ffef75a docs(technical-debt): record the /dev/random and /dev/urandom emulation 2026-10-10 09:13:07 +02:00
Adrià 97b985f157
Merge pull request #2046 from CouchRiv/fix-shader-mullit-flush
fix(shader): flush v_mullit_f32 denormals in the float modes that flush them
2026-10-10 09:13:07 +02:00
Adrià Franch aee2d25655 docs(debt): v_cubema no longer left to the driver
Its signaling NaN result is quieted with IEEE=1 by the cube sentence above.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:13:06 +02:00
Alex 2185d82522 fix(shader): quiet signaling NaN cube results in IEEE mode
With IEEE_MODE=1 the hardware quiets a signaling NaN that v_cubesc,
v_cubetc or v_cubema_f32 returns, keeping the sign the instruction gives
it; with IEEE=0 the bits pass through. Same rule as #1867, measured on
gfx1036 in both modes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 09:13:00 +02:00
Adrià a86ffd3368
Merge pull request #1995 from lubaxe/feat/agc-store-pending-at-flip
feat(agc): store pending storage-image results at each flip with APS5_STORE_AT_FLIP
2026-10-10 09:12:46 +02:00
ah 5f6da63e4a
fix(shader): evaluate signed comparisons in SRT expressions
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPEHi56pUMbT1X4VZwStm9
2026-10-10 02:08:12 -05:00
Daniele Giovane 1730b29c4a fix(agc): preserve descriptor array ranges in draw snapshots 2026-10-10 09:07:26 +02:00
EdouardSence cd1f76c831 fix(agc): accept bound copies of a registered shader header that differ only in user_data
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:06:48 +02:00
Adrià ca412953ea
Merge pull request #2042 from CouchRiv/fix-shader-pack-b32-f16-snan
fix(shader): quiet signaling NaN halves in v_pack_b32_f16 in IEEE mode
2026-10-10 09:05:54 +02:00
Adrià c8e266577a
Merge pull request #1934 from fisherjoey/fix/shader-ancillary-moved-word
fix(shader): carry a packed pixel ancillary through phis when every reader extracts a modelled field
2026-10-10 09:05:48 +02:00
Joey Fisher e0084a56b0 fix(agc): draw each face with its own depth bias
A draw that rasterizes both faces with different front and back depth
bias was rejected, since Vulkan has one depth bias per draw and the
cull mode is pipeline state. Such a draw is now recorded twice in the
same pass: front faces with the back faces culled and the front bias,
then back faces with the front faces culled and the back bias. A face
whose offset is disabled gets no bias.
2026-10-10 09:04:37 +02:00
Adrià 40a5b8fae9
Merge pull request #2142 from MathiasDevelopes/fix/videoout-overlay-bus-flips
fix(libSceVideoOut): overlay-bus flips no longer replace the main output
2026-10-10 09:01:37 +02:00
Adrià 6717a118ca
Merge pull request #2576 from adriadam10/fix/progress-empty-libs
fix(progress): link include-shared libraries and label empty ones
2026-10-10 09:00:44 +02:00
Adrià 3a1c79f387
Merge pull request #2219 from XairRrR/feat/agc-depth-clear-draws
feat(agc-driver): draw DB_RENDER_CONTROL depth clears
2026-10-10 08:59:33 +02:00
Sasha Papo ef53b0614f feat(agc): store pending storage-image results at each flip with APS5_STORE_AT_FLIP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:56:02 +02:00
Adrià Franch db491f0c7e docs(technical-debt): record that f32 tininess is detected after rounding on hardware
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 08:55:16 +02:00
Alex b64d413036 fix(shader): flush v_mullit_f32 denormals in the float modes that flush them
With f32 denormals flushed, as in the 0xc0 float mode titles use, the
hardware flushes all three v_mullit_f32 sources and its product like
v_mul_f32, so a positive denormal limit selects -FLT_MAX and a tiny
product gives zero. The recompiler kept denormals in every mode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 08:55:16 +02:00
Adrià 40a7711a3e
Merge pull request #2229 from TheAggie/fix/agc-radv-htile-depth-clear
fix(agc): apply RADV's HTILE depth fast clears to the host depth surface
2026-10-10 08:54:11 +02:00
Alex e1f81abd85 fix(shader): quiet signaling NaN halves in v_pack_b32_f16 in IEEE mode
With IEEE_MODE=1 the hardware quiets each signaling NaN half that
v_pack_b32_f16 packs, after neg and abs; with IEEE=0 it copies the bits.
The recompiler always copied them. Same rule as #1867, measured on
gfx1036 in both modes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 08:52:03 +02:00
Adrià Franch 507f5707dc fix(progress): link include-shared libraries and label empty ones
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 08:49:58 +02:00
Adrià Franch 988394447a docs(TechnicalDebt): move the overlay bus line off the end of the section 2026-10-10 08:48:04 +02:00
MathiasDevelopes 85d1eb2e60 fix(libSceVideoOut): overlay-bus flips no longer replace the main output
A title that opens a main and an overlay port flips both, and every flip
was presented as a whole frame, so the window alternated between the two
buses: PPSA01736 shows its intro on the main bus and an empty overlay,
and the intro blinked black on every other frame. Overlay flips now
complete and signal their events without being shown. Compositing the
overlay over the main output is not implemented.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 08:48:03 +02:00
Adrià c20184aba7
Merge pull request #2162 from CouchRiv/fix-shader-fma-mix-f16-fused
fix(shader): round v_fma_mixlo_f16 and v_fma_mixhi_f16 once to f16
2026-10-10 08:46:56 +02:00
seven 5b9fdd111a fix(agc): count a pixel stage's colour attachments against maxPerStageResources
Vulkan counts the framebuffer colour attachments against maxPerStageResources
for the fragment stage. The draw's attachment count now seeds the fragment
stage's resource total in ShaderResources, so a pixel shader whose buffers and
images fit the limit but whose pipeline exceeds it throws instead of creating
an invalid pipeline. The draw resource cache key carries the attachment count,
so a cached build is never reused by a draw with more attachments.
2026-10-10 12:07:56 +05:30
Adrià Franch 1de9bbe7e4 docs(technical-debt): record the HTILE depth fast clear limits
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 08:37:16 +02:00
Adrià d43d50beb1
Merge pull request #2322 from jweidenh/codex/last-provoking-vertex
feat(agc): support last provoking vertex for native primitives
2026-10-10 08:36:55 +02:00
Alex 3a9da568fe fix(shader): round v_fma_mixlo_f16 and v_fma_mixhi_f16 once to f16
The f16 forms of v_fma_mix computed an f32 FMA and converted it to f16,
so a result that lands on an f16 tie after the f32 rounding was rounded
twice. RDNA2 rounds the exact product-sum once. They now use the exact
f64 path of v_interp_p2_f16 and flush f32 sources like v_fma_mix_f32.
They follow the f16 round and denormal fields on hardware, so another
f16 mode throws, as packed f16 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:33:43 +02:00
XairRrR 295223f3eb feat(agc-driver): draw DB_RENDER_CONTROL depth clears
DEPTH_CLEAR_ENABLE (DB_RENDER_CONTROL bit 0, Mesa sid.h) makes the DB
write DB_DEPTH_CLEAR wherever the draw covers. Such a draw is now
rasterized as submitted with an always-passing depth write, no depth
bounds, no depth bias and the viewport depth range pinned to the clear
value, so it touches exactly the pixels the title's geometry covers.
Clearing a read-only or absent depth plane throws, at decode and in the
draw precheck. Depth and stencil clears combine; copy, resummarize and
decompress draws still throw.

Uncharted: Legacy of Thieves Collection (PPSA05684) clears with draws
that set DB_RENDER_CONTROL to 0x3 and stopped with "depth/stencil
clear, copy, resummarize or decompress draws (DB_RENDER_CONTROL) is
unsupported (register 0x0 = 0x00000003)".
2026-10-10 08:33:04 +02:00
Adrià 55a631bb4a
Merge pull request #1281 from SirDarky/fix/shader-mad-legacy-rounded-product
fix(shader): round the v_mad_legacy_f32 product before the add
2026-10-10 08:31:19 +02:00
Adrià 0aaadd6457
Merge pull request #1599 from andrey231/fix/storage-keep-baseline
fix(agc): store GPU results over CPU-stamped bytes the CPU left unchanged
2026-10-10 08:28:10 +02:00
Adrià 23ed501f4a
Merge pull request #1511 from cubersu/fix/libc-swprintf-wcsrtombs-utf16
fix(libc): format guest wide strings in swprintf as 16-bit units
2026-10-10 08:26:15 +02:00
jweidenh 3a8cf3a38b feat(agc): support last provoking vertex for native primitives 2026-10-10 08:26:14 +02:00
Adrià b5315f046d
Merge pull request #2381 from SleglJan/docs/shader-scalar-measurements
docs(shader): record the measured s_call_b64 and null s_swappc_b64 behaviour
2026-10-10 08:25:58 +02:00
Adrià 1a668689d6
Merge pull request #2133 from queeeef/fix/agc-3d-access-on-2d-texture
fix(shader): bind 2D textures to 3D sample and load accesses as measured
2026-10-10 08:25:22 +02:00
Adrià 530b6a4270
Merge pull request #2226 from EdouardSence/fix/agc-conservative-uncertainty-disabled
fix(agc): accept disabled conservative rasterization with uncertainty-region bits
2026-10-10 08:20:08 +02:00
Marcus 5377db48fd fix(shader): round the v_mad_legacy_f32 product before the add
VOP3 0x140 is v_mad_legacy_f32 on gfx10.1. Measured on gfx1010 (RX 5700
XT) in wave32 and wave64, IEEE 0 and 1 and f32 denormal modes 0 to 3, it
rounds the product before the add, flushes f32 denormal sources, product
and result in every mode, and gives a +0 product for a zero factor.

The translation multiplies, applies the zero rule and flushTinyProduct,
adds, and keeps the nanResultF32 wrapper. f32DenormalFlushFor returns 3
for the instruction before reading FLOAT_MODE. A sum of two zeros takes
its sign on the bits, as lavapipe returned -0 for +0 + -0. The execution
test pins the measured results and compares NaN bits exactly. RDNA2
(gfx1031), where the encoding is v_fma_legacy_f32 and fused, is noted in
TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:18:55 +02:00
Adrià accf6bffc5
Merge pull request #2477 from itsbo5/feat/libScePad-bias-correction
feat(libScePad): implement scePadSetAngularVelocityBiasCorrectionState
2026-10-10 08:18:16 +02:00
Adrià 3064754c6a
Merge pull request #1547 from russhil/feat/shader-barycentric-emulation
feat(shader): emulate fragment barycentrics with a generated geometry stage
2026-10-10 08:15:00 +02:00
Adrià 40aeb97d57
Merge pull request #1152 from alfalfa-star/perf/linux-direct-memory-import-chunks
perf(agc): share one dma-buf import per 64 MiB of Linux direct memory
2026-10-10 08:14:40 +02:00
fisherjoey 79653e00be fix(shader): carry a packed pixel ancillary through a phi into field extracts 2026-10-10 00:14:18 -06:00
Adrià dacb0cdd28
Merge pull request #2137 from Sanjaysrinivas/feat/mesh-wave32
fix(shader): support wave32 mesh programs
2026-10-10 08:13:11 +02:00
Adrià 9bb5619c83
Merge pull request #2045 from CouchRiv/fix-shader-div-fixup-flush
fix(shader): flush v_div_fixup_f32 src1 and src2 denormals
2026-10-10 08:12:41 +02:00
Adrià ccedc3a891
Merge pull request #1947 from oguzhanozfe/fix/audio-propagation-singular-path
fix(audio): recognize individual propagation path import
2026-10-10 08:12:21 +02:00
Adrià 692c397a6c
Merge pull request #1854 from Sanjaysrinivas/fix/shader-mode-registers
fix(shader): guard runtime MODE changes
2026-10-10 08:12:00 +02:00
Adrià 0f84feff1d
Merge pull request #2000 from hansjm10/fix/shader-f16-fma-single-rounding
fix(shader): round the f16 fused multiply-adds once
2026-10-10 08:08:00 +02:00
Adrià 473e64bc8c
Merge pull request #1860 from overlordxrz-source/feat/libkernel-shm-open
feat(libkernel): implement shm_open for anonymous objects
2026-10-10 08:07:24 +02:00
Adrià ffd80d7c6a
Merge pull request #2011 from CouchRiv/fix-shader-pk-minmax-clamp-dx10
fix(shader): clamp packed f16 min/max signaling NaN results to zero
2026-10-10 08:07:16 +02:00
turkishcuber a3186c59ef fix(libc): format guest wide strings in swprintf as 16-bit units
The padded, exact-fit and invalid-conversion swprintf checks come from #1512.

Co-Authored-By: Noface07 <yuvrajsoni7@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ULF8vCbJFyzxVsW3SfiWC5
2026-10-10 08:04:44 +02:00
Adrià e0526f57cd
Merge pull request #1686 from Cloud-Multiplayer/feat/macos-write-watch
feat(libc): write watch on macOS hosts
2026-10-10 08:03:40 +02:00
Adrià 29b4429870
Merge pull request #1485 from Celegans12/feat/agc-10-11-11-unorm-color-targets
feat(agc): implement 10_11_11 unorm color targets through 32-bit uint attachments
2026-10-10 07:58:55 +02:00
Adrià a2236210c3
Merge pull request #1605 from QRMOE/fix/shader-bitfield-mask-overflow
fix(shader): truncate overflowing 32-bit bitfield masks
2026-10-10 07:58:20 +02:00
Dean 903863c974
Merge pull request #959 from JAB-dev/feat/ngs2-pan
feat(libSceNgs2.native): implement sceNgs2PanInit and sceNgs2PanGetVolumeMatrix
2026-10-10 18:53:48 +13:00
Scott Schuster 570aac4677 fix(libkernel): accept SCHED_OTHER in sched_get_priority_max/min
SDL queries the SCHED_OTHER range before it sets a thread priority. It gets
the same 256 to 767 range as SCHED_FIFO and SCHED_RR, which
pthread_setschedparam applies regardless of policy. The console's answer is
unverified and recorded in TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:47:11 -05:00
Dean 001124896d
Merge pull request #2470 from oneandonlydean/up639/cmask-gpu-clear
fix(agc): apply CMASK fast clears per tile
2026-10-10 18:36:56 +13:00
Adrià Franch 7dec9c9fd8 docs(technical-debt): record the unchanged-bytes baseline of storage write-back
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 07:36:34 +02:00
Dean 0949984e5e
Merge pull request #1945 from TacoCat055/docs/relinker-python-tests
docs: explain relinker Python test discovery
2026-10-10 18:36:32 +13:00
Dean c323d49386
Merge pull request #2052 from esatturan/fix/ajm-atrac9-gapless-segments
fix(ajm): decode an ATRAC9 run's whole input and follow gapless segments
2026-10-10 18:36:09 +13:00
Dean 14469b74e8
Merge pull request #964 from JAB-dev/fix/ngs2-unset-matrix-passthrough
fix(libSceNgs2.native): mix ports without set levels through the default channel map
2026-10-10 18:36:02 +13:00
Dean Galvin 9c3a35b867 fix(agc): apply CMASK fast clears per tile
A CMASK that was neither all fast-cleared nor all expanded threw, so a
title that fast clears a target and then draws over part of it before the
eliminate could not run past it.

The CMASK is now decoded tile by tile: one nibble per 8x8 tile in
1024x512 metablocks of 4 KiB, addressed with the pipe-aligned
SW_64KB_Z_X CMASK equation for 16 pipes (addrlib
GFX10_CMASK_SW_PATTERN, Gfx10Lib::HwlComputeCmaskAddrFromCoord). Code 0
stores CB_COLOR_CLEAR_WORD into the tile's texels, 0xF keeps them; any
other code, a cleared tile of a DCC target and any other CMASK swizzle
mode throw. Edge tiles are included and the CMASK is then stored as
expanded.

For a resident target whose CMASK is host-imported the clear is a
compute pass recorded in stream order: it reads the nibbles from the
import, stores the clear into the cleared tiles through a UINT view of
the image and fills the CMASK expanded, so nothing waits for pending GPU
writes of the CMASK. Invalid codes it reads set a bit that the next
materialization throws on. Otherwise the CPU reads the CMASK and stores
the cleared tiles into guest memory, or fills the resident image when
every tile is cleared. A CMASK nothing has stored over since it was
expanded is skipped.

The decode requires CB_COLOR_ATTRIB3 FMASK_SW_MODE SW_64KB_Z_X with
CMASK_PIPE_ALIGNED, a 4 KiB aligned writable CMASK and texels of at most
64 bits, and CMASK_BASE_EXT is part of the draw key.

Tests: CMASK sizes and nibble addresses against addrlib; decode
rejections and draw key coverage; CPU eliminate of full, partial,
out-of-range-nibble and DCC decompress cases and invalid codes. The new
agc_driver_cmask_fast_clear GPU test draws over fast-cleared and partly
fast-cleared linear and SW_64KB_R_X targets, eliminates partial, edge
and checkerboard CMASKs through the compute pass and checks that an
invalid code it reads throws.
2026-10-10 18:20:06 +13:00
22alfbassett b2b71cd213 fix(libkernel): flush only recorded paths in sceKernelSync on Linux
On Linux, sceKernelSync called sync(2), which blocks until all
dirty pages are written back. Unrelated host I/O can stall guest's
sceKernelSync, causing the guest_kernel_sync test to stall for minutes.

Share the Windows implementation instead.
Fsync each recorded path and its changed parent directories.
Use st_mtim and coarse realtime mark on Linux in place of FILETIME.
2026-10-09 23:55:38 -05:00
Jan Šlégl 9376a0291a docs(shader): record the measured s_call_b64 and null s_swappc_b64 behaviour
Measured on RDNA2 (gfx1036) with tools/hw-oracle in wave32 and wave64:
s_call_b64 writes PC + 4 to the link pair and branches to
PC + 4 + signext(SIMM16) * 4, and s_setpc_b64 of the link returns;
s_swappc_b64 with SDST 125 branches and leaves a marker pair untouched, so
its decode as s_setpc_b64 matches, and with an SGPR destination the link is
PC + 4.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 06:46:53 +02:00
Dean ac57f46711
Merge pull request #2275 from mrk1987/fix/libkernel-rwlock-concurrent-first-lock
fix(libkernel): initialize guest rwlocks before they are shared
2026-10-10 17:46:25 +13:00
Dean ea8f654350
Merge pull request #2178 from oneandonlydean/up639/resummarize-blits
fix(agc): draw nothing for resummarize draws without depth or color work
2026-10-10 17:44:46 +13:00
Dean b57e66fa60
Merge pull request #2152 from MathiasDevelopes/feat/videoout-pre-vblank-start-events
feat(libSceVideoOut): deliver pre-vblank start events
2026-10-10 17:44:23 +13:00
Dean 9ac075e8c0
Merge pull request #1926 from fisherjoey/fix/exit-teardown-order
fix(ajm, apr): keep AJM and APR state alive through static teardown
2026-10-10 17:42:42 +13:00
Dean de723ac54b
Merge pull request #1804 from gdrosa/fix/libc-guest-wide-printf
fix(libc): format guest wide printf arguments on Linux
2026-10-10 17:41:26 +13:00
Dean 5b6c778a95
Merge pull request #1769 from TideOPL/pr/stride0-raw-range
fix(agc): apply the raw OOB_SELECT range rules to zero-stride vertex buffers
2026-10-10 17:41:11 +13:00
Dean a8ce7b7e21
Merge pull request #1727 from SleglJan/feat/libkernel-socket-read-write
fix(libkernel): read and write guest sockets
2026-10-10 17:41:03 +13:00
Dean 9fd45aa4fb
Merge pull request #1632 from MarcZX100/fix/amd-proprietary-subgroup-clock
fix(agc): detect AMD proprietary narrow clock
2026-10-10 17:40:02 +13:00
Dean 17874f1177
Merge pull request #2044 from CouchRiv/fix-agc-completion-label-pm4
fix(agc): store labels the GPU cannot reach in stream order
2026-10-10 17:16:19 +13:00
Adrià Franch 090a30ca93 docs(debt): end the 3D-on-2D image access line with a period
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 05:17:16 +02:00
Daan Dehing 70d190cdd5 fix(shader): bind 2D textures to 3D sample and load accesses as measured
A 3D image access bound to a 2D T# matched no runtime image mode and
threw "image descriptor is incompatible with the static runtime image
interface" (Sonic Origins, #2023). CouchRiv measured RDNA2 (gfx1036)
with the hardware oracle: image_sample_lz with dim 3D ignores r and
reads the (u,v) texel, and image_load reads the (x,y) texel when z is
0 and returns zero otherwise. Add a 2D mode for 3D accesses whose only
uses are those two forms, and make the load return zero for z != 0.
Every other access keeps throwing.

Fixes #2023

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:15:30 +02:00
Joey Fisher 78388c247e docs(debt): record the deliberately leaked AJM, APR and NGS2 state 2026-10-09 20:14:14 -06:00
Raihan Abdul Majid 144e60f836 fix(audioout): play every AudioOut2 port buffer set between pushes, one per grain
A port kept only the last PCM buffer set before a push and played it again
at every later push without a new one. PPSA12544 sets one grain of a ring
buffer per call on its object port, often two or three between pushes and
then none for a few, so all but the last of each burst were dropped and the
stale grain repeated: a buzz on loud sounds and after a sound stopped.

Buffers set between pushes are now queued and played in order, at most 16
queued. A push without a new buffer repeats the last one only for a port
that has always been given the same buffer (rewritten in place, as the
timing tests do); a port whose buffers move on plays silence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:11:23 +07:00
overlordxrz-source e607b1ce4e feat(libkernel): implement shm_open for anonymous objects 2026-10-09 22:05:57 -04:00
Oguzhan Ozdemir 2e01ba2832 fix(audio): bind singular propagation path setter as unsupported 2026-10-10 03:50:02 +02:00
russhil 4a2e60546c feat(shader): emulate fragment barycentrics with a generated geometry stage
Without VK_KHR_fragment_shader_barycentric the recompiler dropped
v_interp_p1_f32 and made v_interp_p2_f32 read the attribute Vulkan
interpolated, but never wrote the I/J VGPRs: a pixel shader that read
them for anything else got 0, and v_interp_mov_f32 of P10/P20 (or P0 of
an interpolated input) needed PerVertexKHR and failed pipeline
validation.

The fallback translation now loads the I/J VGPRs and marks v_interp_p1
and v_interp_p2 with witnesses. After the front-end simplification
(SSA, folding, DCE, read-lane and masked-select elimination),
HostInterpolationChecker requires every p2 to read its J, and its p1's
I, from a barycentric of the parameter's kind, every p1 result to reach
only the matching p2 (through a write masked by the p2's EXEC, whose
inactive lanes keep the old register), no parameter read as raw
vertices and no slot shared by different interpolations. It then
lowers the witnesses to the host-interpolated attribute as before,
reruns DCE and masked-select elimination, and accepts the program only
when no barycentric read remains, so reusing the I/J VGPRs after
interpolating keeps host interpolation and the previous SPIR-V. Any other
program is translated with the barycentric path and marked as emulated:
its barycentrics become vec3 inputs (NoPerspective for the linear
weights) and its per-vertex parameters flat vec4[3] inputs, placed in
the free locations by LayoutBarycentricEmulation. The driver then
inserts a generated geometry stage between the vertex and fragment
shaders that copies the position and parameters, writes the one-hot
weights of each vertex and the three vertices' parameter values, so the
rasterizer interpolates the same weights the extension provides.

The stage needs geometryShader and a vertex shader before it;
tessellation, mesh and rect-list pipelines, other primitive types and
interfaces beyond 32 locations or the device's geometry limits throw.
CompiledShaderArtifact carries the emulation (shader disk cache format 21).

Hardware snaps window corners to 1/256 pixel before interpolating
(measured by yahya308 on an RTX 4070 Laptop and a Radeon 780M in #1547);
lavapipe snaps only for coverage (lp_rast.h FIXED_ORDER 8), so the test
accepts either reference per pixel at the original 1e-4 margin.

Sources:
- v_interp_p1_f32/v_interp_p2_f32/v_interp_mov_f32 semantics (P0,
  P10, P20, I/J): AMD RDNA2 ISA, "Parameter Interpolation".
- BaryCoordKHR/BaryCoordNoPerspKHR weights and PerVertexKHR vertex order:
  SPV_KHR_fragment_shader_barycentric, VK_KHR_fragment_shader_barycentric.
- Geometry shader triangle input order and provoking vertex: Vulkan
  specification, "Primitive Topologies" and "Geometry Shading".
- Interpolation decorations decided by the fragment input: Vulkan
  specification, "Interpolation Decorations".
- lavapipe interpolation: Mesa src/gallium/drivers/llvmpipe/lp_rast.h
  (FIXED_ORDER 8), lp_setup_tri.c (subpixel_snap for coverage only),
  lp_state_setup.c (init_args, plane setup from float positions).
2026-10-10 03:24:50 +02:00
alfalfa-star b7443c4424 perf(agc): share one dma-buf import per 64 MiB of Linux direct memory
Every direct memory allocation had a memfd of its own, so each one the
GPU used became its own udmabuf and its own imported buffer object. An
imported buffer object cannot be always valid in the GPU VM: amdgpu
validates every one of them at every command submission. PPSA14632
(LEGO Horizon Adventures) imports about 7000 allocations, 5800 of them
64 KiB, and each vkQueueSubmit took about 2.3 ms (5 s per 10 s, held
under the GPU mutex). A standalone test shows the cost follows the
count of imported dma-buf buffer objects, not their size or the count
of ordinary allocations.

- libkernel: on Linux all direct memory lives in one sparse memfd of
  DIRECT_MEMORY_SIZE, at file offset = physical address
  (PhysicalBacking keeps the file and its offset; SharedBacking returns
  that offset). A range allocated again is zeroed through a temporary
  mapping, as the old per-allocation memfd was.
- Driver: an import of shared direct memory that lies inside one
  64 MiB chunk of the file binds its own VkBuffer into that chunk's
  memory, one udmabuf import per chunk (HostImport::chunk holds it, so
  it lives until the last buffer bound to it retires). Ranges that
  cross a chunk or do not meet the buffer alignment are imported alone
  as before.

On PPSA14632 vkQueueSubmit drops from about 2400 us to 46 us on
average, the GPU idles 36 ms instead of 172 ms per present, and
presents go from about 40 to 80-97 per 10 s.

Released direct memory stays committed in the file (see
TechnicalDebt.md): a live chunk import pins its pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:21:53 +02:00
Adrià Franch 4120b2be0f docs(architecture): keep the recompiler stage notes under their diagram
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 03:16:29 +02:00
Sanjaysrinivas 140c46093c fix(shader): guard runtime MODE changes
Read MODE rounding fields from the declared initial mode. Accept only
constant writes that preserve it; diagnose unsupported runtime changes.
Document the supported contract and add decoder-to-recompiler regressions.

Refs #1668, #981
2026-10-10 03:16:25 +02:00
Adrià 67bb99865a
Merge pull request #1518 from ArjenS-LA/fix/windows-file-timestamps
fix(libkernel): preserve Windows file timestamp precision
2026-10-10 03:15:32 +02:00
Adrià 426fe62282
Merge pull request #2028 from overlordxrz-source/feat/libkernel-get-module-list
feat(libkernel): implement sceKernelGetModuleList and sceKernelGetModuleInfo
2026-10-10 03:15:01 +02:00
Adrià 419069e6d3
Merge pull request #1606 from mohdfaour03/fix/libc-guest-tm-layout
fix(libc): convert times into the guest's 56-byte tm on Windows
2026-10-10 03:14:40 +02:00
Adrià 6637eee34d
Merge pull request #1600 from awake-devel/fix/libkernel-unwind-info-linux
fix(libkernel): report guest unwind tables in sceKernelGetModuleInfoForUnwind on Linux
2026-10-10 03:13:40 +02:00
Elijah De Guzman 80b0bab279 feat(libc): write watch on macOS hosts
macOS has no counterpart to userfaultfd write-protect or
MEM_WRITE_WATCH, so GuestWriteWatch had no backend there and the driver
re-read every guest buffer on each use.

The macOS backend write-protects watched pages. The first write to a
page faults, the SIGBUS/SIGSEGV handler records the page and restores
its protection, and Collect reports the recorded pages and protects
them again. A page is protected before its record is cleared, under the
lock the handler takes, so a write that lands in between is recorded.
The lock hands out turns in order: an unfair one starved writers under
Rosetta.

The protection is real, which adds three entry points:
- GuestWriteWatchBeginHostWrite/EndHostWrite lift it around a system
  call that writes guest memory, which would otherwise fail with
  EFAULT. GuestArena::HostWrite calls them, as it calls the Windows
  equivalent.
- GuestWriteWatchProtectionChanged tells the watch the protection given
  to watched pages by mprotect or a new mapping.
- GuestWriteWatchProtection reports that protection, since a watched
  page is read-only between a collection and the next write.

Register keeps the recorded protection of a page it already watches:
read from the kernel it would be the watch's own read-only protection,
and the page would never be watched again.

The tests build without the prx libraries and run natively and through
Rosetta.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 21:11:40 -04:00
Adrià 527b18ea59
Merge pull request #1556 from MarcZX100/docs/fedora-static-cmake-deps
docs(build): note Fedora static link packages
2026-10-10 03:10:35 +02:00
Adrià 7f1b6a0b30
Merge pull request #1507 from ArjenS-LA/fix/libc-wcsrtombs
fix(libc): convert wcsrtombs using guest characters
2026-10-10 03:05:55 +02:00
Adrià 0eb7f098dd
Merge pull request #1499 from yabanana/codex/macos-unwind-register-context
feat(libc): support x86-64 unwind register contexts on macOS
2026-10-10 03:04:54 +02:00
Adrià 85d4bfcf34
Merge pull request #1496 from hugodearaujo/fix/videoout-output-mode-errors
fix(videoout): answer output mode queries with the console's codes
2026-10-10 03:04:33 +02:00
Adrià ba6f1e5bd6
Merge pull request #1487 from Celegans12/feat/agc-forced-degamma-srgb
feat(agc): accept samplers that force sRGB decoding of sRGB textures
2026-10-10 03:03:19 +02:00
Adrià 3fe03f7227
Merge pull request #1473 from LeandroLP23/fix/shader-lg-compare-amd-wave32
fix(shader): emit ordered not-equal through an integer NaN check
2026-10-10 03:02:02 +02:00
Adrià Franch 6fee7e854d docs(shader): record the bitfield mask measurement on gfx1035
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 02:14:00 +02:00
QRMOE 9fbb5a9f13 docs(shader): place bitfield debt with shader entries
AI-assisted: yes. Full current-main project build passed. Seven focused Windows tests pass; four shader tests also pass in full and none optimization modes with actual Vulkan execution required. Updated Linux and title runs remain pending.
2026-10-10 02:13:51 +02:00
Mohd Faour 0aae158635 fix(libc): convert times into the guest's 56-byte tm on Windows
gmtime, localtime, mktime, strftime and asctime took and returned the
host std::tm. The guest's FreeBSD tm has tm_gmtoff and tm_zone after the
nine calendar fields, so on Windows, where std::tm is 36 bytes, a title
reading those fields read past the thread-local result, and gmtime_s left
them unwritten. Windows gmtime_s also accepts only 1969-12-31 12:00 to
3001-01-19 21:59 UTC, where the guest libc converts any time.

Convert through a GuestTm with the guest layout on both hosts. Compute
the UTC fields from the day count, so every time whose year fits an int
converts, and on Windows take the local offset and zone name from the
CRT. gmtime reports the zone as UTC like the guest libc. localtime and
mktime keep the CRT's range on Windows; recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 02:13:17 +02:00
clem-gb 1bd1923718 fix(libkernel): report guest unwind tables in sceKernelGetModuleInfoForUnwind on Linux
A title that ships its own libc.prx unwinds C++ exceptions with that
libc's libunwind, which asks sceKernelGetModuleInfoForUnwind where each
frame's eh_frame is. On Linux the call always reported no tables, so
no C++ exception thrown in guest code could be caught. For the main
executable and .guest.prx images, report the PT_GNU_EH_FRAME tables
that sceKernelGetModuleInfoFromAddr finds, as Windows does from
.ehmeta. Other host images still report none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-10 02:09:56 +02:00
Celegans12 c4b7a7453e feat(agc): implement 10_11_11 unorm color targets through 32-bit uint attachments
CB_COLOR_INFO format 6 (COLOR_10_11_11) with NUMBER_UNORM threw in
DecodeColorFormat: Vulkan has only the B10G11R11 float format. Such a
target now renders into an R32_UINT attachment in the layout of
format-30 images (unorm11 R and G in bits 0-21, unorm10 B in bits
22-31), so later image loads of the surface read the same words.

The target format is draw state, so the packing is a specialization of
the registered pixel shader: every float MRT export also computes the
packed word (EmitFormatStoreComponent) behind specialization constant
ExportPackingBase + target, and the specialized module turns a packed
target's output into a uint4 that ValidateShaders expects. The new
request field targetExportPacking is in the module key, the result memo,
the draw key and the serialized request (version 14). Blending, partial
RGB writes, UNORM16/SNORM16/UINT16 exports, DCC and ROUND_MODE throw.
2026-10-10 02:09:27 +02:00
ArjenS-LA 705e49d407 fix(libkernel): preserve Windows file timestamp precision 2026-10-10 01:51:56 +02:00
hugodearaujo cadcbfd3a8 fix(videoout): answer output mode queries with the console's codes
Measured on a PS5 (firmware 13.60) through dlopen of
libSceVideoOut.sprx on a handle the payload opened.
sceVideoOutInitializeOutputOptions writes 0xFF to byte 2 of the 64-byte
options and returns INVALID_ADDRESS for a null pointer.
sceVideoOutIsOutputSupported checks the handle, then the reserved
arguments, then the mode, then the options. It never answers 0: a mode
the display lacks returns UNSUPPORTED_OUTPUT_MODE, and a value that is
not a mode returns 0x8029001E. Options must keep the initialized words,
except word 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:42:40 +02:00
overlordxrz-source 8a41d280af feat(libkernel): implement sceKernelGetModuleInfo
Fill takes either info struct, so sceKernelGetModuleInfo reports the
name and segments sceKernelGetModuleInfoFromAddr reports for the same
image, on Linux and Windows.
2026-10-09 19:39:49 -04:00
overlordxrz-source 6d42f3a910 feat(libkernel): implement sceKernelGetModuleList 2026-10-09 19:39:49 -04:00
Adrià Franch ec2df2691a docs(tech-debt): record the FORCE_DEGAMMA measurement on RDNA2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 01:38:23 +02:00
Celegans12 619ec7ad39 feat(agc): accept samplers that force sRGB decoding of sRGB textures
A sampler with FORCE_DEGAMMA (S# word 0 bit 20) threw at decode, so
every dispatch or draw sampling through one was skipped.

DecodeSamplerResource now records the bit, but accepts it only for a
caller that pairs the sampler with its images. The direct sampler
binding does, and RequireDegammaFormat checks each sampled image
against its paired samplers: only already sRGB formats (8, 8_8 and
8_8_8_8 SRGB, BC1, BC2, BC3 and BC7 SRGB) pass, decoded once, as
shadPS4 (PS4) models it. Other textures and unpaired decodes still
throw; gfx10 behaviour is not measured.
2026-10-10 01:38:17 +02:00
Adrià 787239eca5
Merge pull request #1459 from nauroth/claude/strtol-c17-prefix
fix(libc): stop the strtol family at a binary prefix on Linux
2026-10-10 01:31:16 +02:00
Adrià Franch 8404c4987d docs(technicaldebt): move the ordered not-equal line away from the f32 denormal entries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 01:28:00 +02:00
LeandroLP23 4f03d9f4d6 fix(shader): emit ordered not-equal through an integer NaN check
The AMD Windows driver returns 1 for a NaN operand when any float form
of ordered not-equal feeds a ballot on a 32-wide subgroup, which is how
e32 compares are read in wave32. FPOrdNotEqual32 is now emitted as an
unordered not-equal with both operands checked for NaN on their bits,
which gives the same result for every input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:27:52 +02:00
Adrià 8c6780d606
Merge pull request #1300 from TibixDev/pr/ngs2-atrac9-streaming
fix(ngs2): decode ATRAC9 across streamed waveform blocks
2026-10-10 01:25:02 +02:00
Adrià 76bff21fbe
Merge pull request #1421 from popcoder565/fix/kernel-raise-exception-ntcontinue
fix(libkernel): stop losing and deadlocking sceKernelRaiseException deliveries on Windows
2026-10-10 01:23:17 +02:00
Adrià c5424ab69c
Merge pull request #1916 from johnmaia/feat/libkernel-sigaction
feat(libkernel): implement sigaction
2026-10-10 01:20:54 +02:00
Adrià 00dd2ba844
Merge pull request #1017 from NahuelGenchi/fix/v-fma-f64-subnormals
fix(shader): round v_fma_f64 once for subnormal operands and results
2026-10-10 01:19:26 +02:00
Adrià 624b2b7eff
Merge pull request #1135 from orbz22/fix/kernel-aio-keep-offset-windows
fix(kernel): keep the file offset in Windows AIO reads and writes
2026-10-10 01:09:52 +02:00
MarcZX100 10957e0dc4 docs(build): show Fedora static package command 2026-10-09 23:03:15 +00:00
MarcZX100 6074d658f8 docs(build): note Fedora static link packages 2026-10-09 23:03:15 +00:00
Adrià 0df342c640
Merge pull request #1179 from MichonGoddijn231849/feat/pixel-ancillary-whole-word
feat(recompiler): pixel ancillary word used whole
2026-10-10 00:56:51 +02:00
Adrià dc4b7104e5
Merge pull request #2205 from XairRrR/feat/gamelivestreaming-status2
feat(libs): implement sceGameLiveStreamingGetCurrentStatus2
2026-10-10 00:55:16 +02:00
virp-mta 95cd0e8faf feat(libScePad): implement scePadSetAngularVelocityBiasCorrectionState 2026-10-10 02:54:42 +04:00
Adrià c2f1139436
Merge pull request #1824 from Mouhand-Kaddo/feat/sce-zlib
feat(zlib): implement sequential libSceZlib decompression
2026-10-10 00:54:10 +02:00
TibixDev 4a04a78bfc fix(ngs2): decode ATRAC9 across streamed waveform blocks
Keep logical sample and skip counts across byte-only continuation buffers, assemble split superframes, and allow callbacks to refill, pause or reset the stream. Preserve decoded audio while waiting for input and reject truncated closed streams.

Validated with seven NGS2 tests, an ASan/UBSan streaming test build, and PPSA03747 repeatedly supplying continuation buffers during playback. Flag semantics follow the pinned KytyPS5 source documented in TechnicalDebt.md.

Written with AI assistance.
2026-10-10 00:50:23 +02:00
Adrià c9d42619a6
Merge pull request #1292 from Celegans12/feat/agc-draw-null-srt
feat(agc): implement deferred faults for descriptors read through null SRT pointers
2026-10-10 00:48:27 +02:00
Adrià Franch ab658fcfb0 docs(technical-debt): state what raise does for each recorded signal 2026-10-09 23:42:52 +01:00
john.maia cfe4a277c4 feat(libkernel): implement sigaction
EVO-PLAYER (PPSA99039) v0.11.0 stops at sigaction once its earlier
imports resolve: it installs a crash handler for SIGSEGV, SIGBUS and
SIGABRT and a quit handler for SIGTERM, SIGINT and SIGHUP at start-up.

sigaction records the handler, flags and mask of signals 1 to 128 and
reports them back, with FreeBSD's EINVAL cases. signal shares the table
and records SA_RESTART, as FreeBSD's libc does. Plain handlers on the
signals signal already delivers run as signal handlers do; SA_SIGINFO
handlers and other signals are recorded only, and raise of such a
signal throws.

Assisted by Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwFnKjMxmwGDWiuYYf1v4D
2026-10-09 23:42:43 +01:00
Adrià Franch b2961b702c docs(debt): v_fma_f64 subnormals measured, f64 denormal flush not read
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 00:38:04 +02:00
Nahuel Genchi a12ddaa905 fix(shader): round v_fma_f64 once for subnormal operands and results
A subnormal operand sent v_fma_f64 to a separate multiply and add, and a
subnormal result was rounded twice: once to 53 bits in the scaled domain
and again by the power-of-two rescale. Both differ from IEEE 754
fusedMultiplyAdd in the last bit.

Subnormal operands are now widened by 2^64 and enter the exact path with
their exponent lowered by 64. The exact path keeps the sign of the residual
between the 53-bit result and the exact sum; when the result lands on a
midpoint of the subnormal grid it is moved one ulp towards the exact sum
before the single final rounding. Normal results are rebuilt by setting
the exponent, so only a subnormal result rounds. v_div_fmas_f64 shares the
path.
2026-10-10 00:38:04 +02:00
Adrià 27965d8ae7
Merge pull request #1170 from MichonGoddijn231849/fix/dcc-keys-fill-over-aliased-images
fix(agc): a fill of a surface's DCC keys is a key fill over other images' memory
2026-10-10 00:32:43 +02:00
esatturan 9c95d4810e fix(ajm): decode an ATRAC9 run's whole input and follow gapless segments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:29:58 +03:00
Raihan Abdul Majid e768d97949 fix(kernel): keep the file offset in Windows AIO reads and writes
Each Windows AIO request is an overlapped ReadFile/WriteFile at the
request's offset, which on a synchronous handle also moves the
descriptor's file pointer; on the console AIO transfers leave it alone.
The requests now go through the positioned path sceKernelPread and
sceKernelPwrite use (NativePositioned in Stdio.cpp, exposed as
NativePositioned_nid_no_patch), which restores the pointer afterwards.
Negative offsets still fail with EINVAL before the transfer.

GuestAio sets the offset to 2 before a write batch and checks it is
still 2 after. TechnicalDebt records that a concurrent read or write on
the same descriptor can see the moved pointer in between, as for the
pread family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-10 00:22:22 +02:00
Adrià 2d537f13bb
Merge pull request #1073 from alfalfa-star/feat/agc-uint16-color-export
feat(agc): accept UINT16_ABGR color exports into unsigned integer targets
2026-10-10 00:13:23 +02:00
Adrià fa899a3468
Merge pull request #1857 from hikazey/feat/msync
feat(libkernel): implement msync
2026-10-10 00:12:20 +02:00
Michon d8b1ad71d8 fix(recompiler): lower the ancillary word only where every reader extracts a modelled field
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 00:11:23 +02:00
Adrià ec05c02205
Merge pull request #1713 from MathiasDevelopes/feat/libsceime-panel-position-and-form
feat(libSceIme): implement sceImeGetPanelPositionAndForm
2026-10-10 00:08:14 +02:00
popcoder565 5dc7021c38 Merge remote-tracking branch 'origin/main' into fix/kernel-raise-exception-ntcontinue
Keeps both new TechnicalDebt entries: this branch's note that a raise
can still reenter host code it interrupted, and #2107's sigaltstack note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:07:20 -04:00
Adrià 025a911360
Merge pull request #2359 from mrzacarias/feat/rudp-get-status
feat(libSceRudp): implement sceRudpGetStatus
2026-10-10 00:04:52 +02:00
MarcZX100 02005c86d2 fix(agc): detect narrow clock on RX 7800 XT 2026-10-09 22:04:49 +00:00
Adrià Franch 810eda2edf docs(zlib): record shadPS4 length and invalid-argument differences
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 02:03:59 +04:00
Mouhand-Kaddo 8fc83ae05c feat(zlib): implement sequential libSceZlib decompression
Resolve the missing system library with checksum-validating decompression. Add behavioral tests and document unsupported request semantics.
2026-10-10 02:03:59 +04:00
Adrià 0ccdf15f18
Merge pull request #915 from Pacuka/fix/audiodec-m4aac-raw-channels
fix(audiodec): take the M4AAC raw channel layout from the stream
2026-10-10 00:03:46 +02:00
Adrià bfef67f362
Merge pull request #1849 from authurtabo-byte/fix/audio3d-missing-exports
feat(libSceAudio3d): implement sceAudio3dObjectSetAttributes and sceAudio3dPortFlush
2026-10-10 00:03:08 +02:00
Adrià b0d834be25
Merge pull request #1796 from Mouhand-Kaddo/feat/posix-gethostbyname
feat(posix): implement gethostbyname
2026-10-10 00:02:15 +02:00
MarcZX100 aa17030a65 fix(agc): detect AMD proprietary narrow clock on RX 7900 XT 2026-10-09 22:02:13 +00:00
MarcZX100 0f1f5e721b fix(agc): detect narrow clock on tested AMD device 2026-10-09 22:02:13 +00:00
Dean 9ee4972db6
Merge pull request #2336 from JAB-dev/feat/ngs2-reverb-rack
feat(libSceNgs2.native): reverb rack following the PS4 libSceNgs2 reverb
2026-10-10 10:59:54 +13:00
Adrià 2a42045df8
Merge pull request #2153 from EdouardSence/feat/ult-ulthread-runtime
feat(libSceUlt): implement sceUltUlthreadTryJoin, sceUltUlthreadRuntimeDestroy and the underscore ulthread exports
2026-10-09 23:59:50 +02:00
Adrià 416e40ef29
Merge pull request #2118 from rozbh/feat/libkernel-aio-poll-requests
feat(libkernel): implement sceKernelAioPollRequests
2026-10-09 23:59:29 +02:00
Jan Šlégl 9d0b105771 fix(libkernel): read and write guest sockets
read, write, _read and _write on a guest socket descriptor went to the
host, which has no such descriptor, so sceKernelRead and sceKernelWrite
threw. They now reach the socket as recv and send without flags, with
the socket layer's errno (EAGAIN 35, EPIPE 32, EBADF 9), a zero-length
read returns 0 as dofileread does, and the two sceKernel forms return
the kernel error for the same cases. The host's SIGPIPE on EPIPE, a
write above INT_MAX bytes, readv, writev and the positioned forms are
recorded in TechnicalDebt.

OpenSSL's QUIC notifier signals its socketpair with write and read.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 23:57:33 +02:00
XairRrR c642428e82 feat(libs): implement sceGameLiveStreamingGetCurrentStatus2
The status layout is shadPS4's OrbisGameLiveStreamingStatus2 (72
bytes). Live streaming is not supported, so the call reports that no
stream is on air, with an invalid user id; a null status throws.

Uncharted: Legacy of Thieves Collection (PPSA05684) stopped at sceGameLiveStreamingGetCurrentStatus2.
2026-10-09 23:56:40 +02:00
Adrià 7331a123e9
Merge pull request #2107 from LeandroLP23/feat/libkernel-sigaltstack
feat(libkernel): implement sigaltstack
2026-10-09 23:56:02 +02:00
Adrià db06355f84
Merge pull request #1859 from overlordxrz-source/feat/libkernel-system
feat(libkernel): implement system
2026-10-09 23:55:09 +02:00
Adrià 7b705629a6
Merge pull request #1714 from johnmaia/feat/videoout-resolution-status
feat(videoout): implement sceVideoOutGetResolutionStatus
2026-10-09 23:54:46 +02:00
Adrià cb4f41c1e8
Merge pull request #1978 from LuisBiceps/feat/agc-get-tf-ring
feat(agc): implement sceAgcDriverGetTFRing
2026-10-09 23:53:52 +02:00
Adrià 8d47cfba88
Merge pull request #1807 from SleglJan/feat/libkernel-sandbox-random-word
feat(libkernel): implement sceKernelGetFsSandboxRandomWord
2026-10-09 23:52:40 +02:00
Adrià 2dbc137693
Merge pull request #1798 from hugodearaujo/feat/libkernel-pthread-getname-np
feat(libkernel): implement pthread_getname_np
2026-10-09 23:51:56 +02:00
Adrià 4b112364b5
Merge pull request #1339 from gjonn/feat/videoout-vrr-status-event
feat(libSceVideoOut): register the VRR status event and accept the VRR status call
2026-10-09 23:51:35 +02:00
Dean 4cdf38439a
Merge pull request #2334 from parl0v/docs/drop-stale-pool-stats-debt
docs: drop the stale unknown-signature entries for the memory pool stats
2026-10-10 10:51:07 +13:00
Adrià 3d19932caf
Merge pull request #1738 from SleglJan/feat/libkernel-termios
feat(libkernel): implement tcgetattr and tcsetattr
2026-10-09 23:48:53 +02:00
Adrià 64c6b11420
Merge pull request #1729 from johnmaia/feat/libc-syslog
feat(libc): implement syslog and vsyslog
2026-10-09 23:48:32 +02:00
Dean 292d854ea6
Merge pull request #2264 from xXPBSXx/docs/build-windows-antivirus
docs(build): note antivirus quarantine of relinker test executables on Windows
2026-10-10 10:46:53 +13:00
Dean 8908c3ee18
Merge pull request #2350 from snoozedDev/feat/hw-oracle-lds-size
feat(hw-oracle): make the group segment size an option
2026-10-10 10:44:34 +13:00
Dean 75994ad8ec
Merge pull request #2337 from JAB-dev/fix/ngs2-matrix-level-clamp
fix(libSceNgs2.native): clamp matrix levels to -4..4 as the PS4 libSceNgs2 does
2026-10-10 10:44:24 +13:00
Dean 6918141ebe
Merge pull request #2249 from zmeizy/claude/llvmpipe-shader-clock-wrap
test(agc): compare llvmpipe shader clocks modulo 2^32
2026-10-10 10:44:04 +13:00
Dean cb86a0f269
Merge pull request #2159 from Angel21PC/fix/avplayer-ps5-init-data-ex
fix(avplayer): read the PS5 SceAvPlayerInitDataEx layout
2026-10-10 10:43:32 +13:00
Dean 51b1c56057
Merge pull request #2065 from LuisBiceps/feat/system-service-web-browser-unavailable
feat(libSceSystemService): report the web browser as unavailable
2026-10-10 10:42:50 +13:00
hikazey 0bff6da3d3 feat(libkernel): implement msync
msync follows FreeBSD 11's kern_msync and vm_map_sync over the guest's
mappings as sceKernelVirtualQuery reports them: the address is rounded
down to the page, a range that wraps and MS_ASYNC with MS_INVALIDATE are
EINVAL, an unmapped start or page is ENOMEM, and length 0 checks the
mapping that holds the address. The guest has no file mappings, so a
successful call has nothing to write back. MS_INVALIDATE on a mapped
range throws, since FreeBSD's EBUSY for mlocked pages needs lock state
that is not tracked.

EVO-PLAYER PPSA99039 v0.11.0 imports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:38:58 +02:00
Adrià e603f3f560
Merge pull request #1613 from NumberGuan/codex/posix-temp-files
feat(posix): implement mkstemp and isatty
2026-10-09 23:37:02 +02:00
Adrià Franch 4dfeac2989 docs(technical-debt): move the sceImeGetPanelPositionAndForm entry off the end of its section
Lines at the end of a section conflict with every other pull request that appends there.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-09 23:36:36 +02:00
MathiasDevelopes e21d8bd12f feat(libSceIme): implement sceImeGetPanelPositionAndForm
The IME panel cannot be open while sceImeOpen is unimplemented, so the
query returns SCE_IME_ERROR_NOT_OPENED and leaves the output untouched,
like sceImeSetCaret, sceImeSetText and sceImeSetTextGeometry. As with
sceImeSetCaret, the closed panel is reported before a null output.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 23:36:28 +02:00
Adrià 00159cffb5
Merge pull request #1544 from arvindfroi/feat/share-remaining-calls
feat(share): answer sceShareSetContentParamForApplicationTitle
2026-10-09 23:34:10 +02:00