Commit Graph

1659 Commits

Author SHA1 Message Date
hugodearaujo 802ec551c2 fix(libSceUserService): answer sceUserServiceGetUserName as the console does
On a PS5 (firmware 13.60) a null name returns INVALID_ARGUMENT first,
then a user id the console does not know returns 0x80960105 whatever
the buffer, and a buffer shorter than 17 bytes is zeroed before
BUFFER_TOO_SHORT is returned. Here an unknown user returned
INVALID_ARGUMENT and a short buffer was left untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:12:43 -03:00
virp-mta 8b04156bfd fix(libkernel): return EDESTADDRREQ for send and sendto on unconnected UDP sockets 2026-10-12 03:12:34 +04:00
Yunus Shaikh f7a85491ef fix(libSceNet): report EAGAIN when a datagram receive times out on Windows
With SO_RCVTIMEO set, Winsock fails a receive that waits that long with
WSAETIMEDOUT, which native_error turned into ETIMEDOUT (60). sceNetRecv,
sceNetRecvfrom and sceNetRecvmsg on a datagram socket therefore failed
with 0x8041013C on Windows, where FreeBSD's sbwait returns EWOULDBLOCK
(35) to soreceive, Linux returns EAGAIN, and POSIX (XSH 2.10.16)
requires EAGAIN or EWOULDBLOCK when no data was received.

A datagram socket has no connection that can time out, so WSAETIMEDOUT
there only means that the receive timeout the guest set has expired:
report EAGAIN. Stream sockets keep ETIMEDOUT, since Winsock leaves a
connection in an indeterminate state after a timeout; TechnicalDebt
records that gap and the one for SO_SNDTIMEO.
2026-10-11 16:01:51 -07:00
hugodearaujo 65b6a4729b fix(libkernel): accept only the solo scheduling values the console accepts
On a PS5 (firmware 13.60) scePthreadAttrSetsolosched and
pthread_attr_setsolosched_np accept only 0 and 16; every other value
returns ENOTSUP and keeps the stored one. The SCE set and get calls
return EINVAL for a null or uninitialized attribute instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:01:44 -03:00
Yunus Shaikh 0245ba7d88 fix(libc): open fopen streams with delete sharing on Windows
fopen opened its stream with _wfopen, which shares read and write
access but not delete access. While the guest held a stream open,
rename of its file failed with EIO and remove with EBUSY. POSIX rename
and remove work on open files, as on Linux and FreeBSD, and since
#3677 the descriptors sceKernelOpen returns share delete access.

fopen now creates the handle with CreateFileW sharing read, write and
delete, with the access and creation disposition of the mode, and
wraps it with _open_osfhandle and _wfdopen, keeping append mode. A
failed CreateFileW sets errno through the error mapping #3677 added to
libkernel's NativeOpen, which moves to libc as
WindowsOpenError_nid_no_patch so that both use it. freopen still
reopens through _wfreopen; TechnicalDebt records it.
2026-10-11 15:56:20 -07:00
pushkarreddyy 726e773417 feat(libkernel): support kern.sdk_version in sysctlbyname 2026-10-12 11:53:41 +13:00
Alex de54527a8b fix(shader): keep f32 denormals in compares when denormals are kept
With the f32 denormal field of FLOAT_MODE set to keep, v_cmp_X_f32 and
v_cmpx_X_f32 read a denormal operand as zero: NVIDIA, RADV and lavapipe
all flush denormals in their float compares. Compare the operands as
sign-magnitude integers instead, with NaN handled apart. Compares with
flushed denormals are unchanged. This matches RDNA2 (gfx1036) on 256
operand pairs per opcode, with f32 denormals kept and flushed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 18:51:37 -04:00
Adrià 22cecd5aac
Merge pull request #3779 from pushkarreddyy/feat/libkernel-sysctl-pathname-hw-physmem
feat(libkernel): handle sysctl queries for pathname, physmem and cacheline size
2026-10-12 00:48:35 +02:00
hugodearaujo 7b5ac83a2a fix(libkernel): destroy rwlocks the way the console does
On a PS5 (firmware 13.60) destroying a rwlock returns 0 even while it
is held, and leaves 1 in the handle; every later call on that handle
returns EINVAL until it is initialized again. A zero handle is
initialized on first use by the scePthreadRwlock calls too. Here a held
rwlock returned EBUSY, a destroyed handle became null and was silently
re-created by the next POSIX call, and the scePthreadRwlock calls threw
on a zero handle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:48:33 -03:00
hugodearaujo 3ba4751f98 fix(libkernel): report the console's scheduling priority range
On a PS5 (firmware 13.60) sched_get_priority_max returns 767 and
sched_get_priority_min 256 for SCHED_FIFO and SCHED_RR; the two were
swapped. Every other policy, SCHED_OTHER included, returns -1 with
EINVAL instead of a range or a host exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:47:18 -03:00
Adrià ba08a1582a
Merge pull request #3876 from CnRJay/feat/savedata-convert
feat(savedata): implement sceSaveDataConvert
2026-10-12 00:43:58 +02:00
Adrià f9905068b7
Merge pull request #3730 from MarcZX100/codex/voiceqos-end-3331
feat(libSceVoiceQoS): implement sceVoiceQoSEnd
2026-10-12 00:42:41 +02:00
Adrià 6dbc0ea66a
Merge pull request #3829 from YossiYad/carry/agc-vieBRwlh1Lw
feat(libSceAgc): implement the vieBRwlh1Lw interpolant mapping update
2026-10-12 00:39:58 +02:00
Adrià 2c884140a5
Merge pull request #3721 from MarcZX100/codex/content-export-sessions-3374
feat(libSceContentExport): implement export sessions
2026-10-12 00:35:54 +02:00
Adrià 6426baa107
Merge pull request #3691 from MarcZX100/fix/sem-timedwait-available-first
fix(libkernel): handle available sem_timedwait counts first
2026-10-12 00:35:17 +02:00
xXPBSXx 859d0b1e63 fix(exports): also export sceHmd2GetFieldOfView
main has sceHmd2GetFieldOfViewWithoutHandle only; PPSA07411 imports sceHmd2GetFieldOfView.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:33:41 +02:00
Adrià dd1cf5cb9d
Merge pull request #3771 from yunusshaikh7/fix/savedata-dir-name-search-sort
fix(savedata): sort sceSaveDataDirNameSearch results by the requested key and order
2026-10-12 00:30:16 +02:00
Adrià ae7dbfa9cb
Merge pull request #3770 from A-Akhil/fix/shader-sin-cos-series
fix(shader): take v_sin_f32 and v_cos_f32 from an exact series where the driver's result is more than 4 ulp off
2026-10-12 00:29:31 +02:00
Adrià e8169f49b3
Merge pull request #3756 from Lorkydey/feat/agc-acb-atomic-gds
feat(libSceAgc): build versioned ACB atomic GDS commands
2026-10-12 00:28:45 +02:00
eljackjoestar-cmd 9a0c59570c feat(ajm): decode Opus surround mapping family 2026-10-12 02:28:14 +04:00
Adrià f9e1d2541c
Merge pull request #3750 from fma-rc/feat/shader-subvector-loop
feat(shader): implement s_subvector_loop_begin and s_subvector_loop_end
2026-10-12 00:28:10 +02:00
Simon 233590462c fix(libSceNgs2): report EMPTY for a streaming sampler that played its queue
A playing sampler voice whose waveform still accepts blocks (CONTINUE)
reported only INUSE|PLAYING after it had played every queued block, so
a title that waits for EMPTY before it reuses the voice never did.
PPSA18391 (engine: Clickteam Fusion) reads state_flags & 0x22 != 2 from
sceNgs2VoiceGetState as the end of a sound; each of its sound effects
played once and never again.

The voice now also reports EMPTY (0x20) in that state and keeps
playing, so blocks added later still play. A waveform that was closed
without CONTINUE does not report it.
2026-10-12 00:26:12 +02:00
Adrià 5aaf26bd32
Merge pull request #3689 from MarcZX100/codex/libkernel-spin-reltimedwait-3554
feat(libkernel): implement pthread spinlocks and relative condition wait
2026-10-12 00:23:53 +02:00
Adrià c059590d8e
Merge pull request #3598 from Recapi/feat/libc-asinl
feat(libc): implement the remaining long double math functions RetroArch imports
2026-10-12 00:22:48 +02:00
Dean fabbeb393b
Merge pull request #3522 from pushkarreddyy/feat/libc-reallocf
feat(libc): implement reallocf
2026-10-12 11:21:30 +13:00
Adrià 8fc53cb325
Merge pull request #3853 from billythemenace2/feat/rudp-ppsa06888-imports
feat(libSceRudp): declare the calls PPSA06888 imports
2026-10-12 00:20:03 +02:00
Adrià Franch 8c00fe871e docs(TechnicalDebt): put the InitParameter2 line where the old one was, not at the end of the file
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 22:19:14 +00:00
David 1d5f5eb6c8 feat(libSceJson2): implement the InitParameter2 constructors and setSpecialFloatFormatType
Resident Evil 4 (PPSA07411, #2776) and PRAGMATA (PPSA02530, #3043) stop
on the absent export with

  what():  _ZN3sce4Json14InitParameter225setSpecialFloatFormatTypeENS0_22SpecialFloatFormatTypeE not implemented

Deathloop, Minecraft Legends and Cyberpunk import the base-object
constructor InitParameter2::InitParameter2(), InitParameterRtti2::
setAllocatorRtti and InitParameterRtti::InitParameterRtti(AllocParamRtti*,
void*, unsigned long), which were NotImplemented stubs.

InitParameter2 is the 40-byte object of SharpEmu and KytyPS5: the
allocator, its user data, the file buffer size and the 32-bit special
float format type at 0x18. Both constructors zero it, setAllocatorRtti
writes the allocation parameters and user data where setAllocator writes
the allocator, and setSpecialFloatFormatType stores the type.
InitParameterRtti's constructor writes its three arguments to the first
24 bytes. The NID WVZBP4IyM+E recomputes from the mangled name and is in
the aerolib database. The enum's values are unknown, so no value is
rejected; the inferred layouts are recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 258f2910808e5ef1636973aaefbdf51615873dcb)
2026-10-11 22:19:14 +00:00
pushkarreddyy 931aaa2a7e feat(libkernel): handle sysctl queries for pathname, physmem and cacheline size 2026-10-12 00:17:14 +02:00
Adrià 43bc17f7ed
Merge pull request #3727 from mariusyo07/fix/pad-vibration-mode-3
fix(pad): accept vibration mode 3
2026-10-12 00:14:30 +02:00
Adrià f803854a5c
Merge pull request #3670 from SibteProf/fix/json2-initparameter2-base-constructor
fix(json2): implement InitParameter2 base constructor
2026-10-12 00:12:05 +02:00
Adrià af0b52ebb4
Merge pull request #3592 from MarcZX100/codex/socket-errno-errors-3573
fix(libkernel): map host socket errors to guest errno
2026-10-12 00:11:40 +02:00
Adrià b18d4feddd
Merge pull request #3580 from Amr-Youssef/feat/libkernel-sigwait
feat(libkernel): export pause, sigwait and sigwaitinfo
2026-10-12 00:11:14 +02:00
Adrià 33067ca0c7
Merge pull request #3856 from ErenYeager1836/carry/recompiler-vector-window
perf(recompiler): keep relatively addressed vector registers in a window array
2026-10-12 00:10:58 +02:00
Adrià 59584d58b1
Merge pull request #3858 from LeandroLP23/fix/libc-internal-force-tls-destructor-windows-test
test(libSceLibcInternal): run guest_force_tls_destructor on Windows
2026-10-12 00:10:39 +02:00
Adrià 7667f53232
Merge pull request #3845 from semirkabir/feat/umtx-nwake-private
feat(libkernel): wake each listed address in _umtx_op UMTX_OP_NWAKE_PRIVATE
2026-10-12 00:09:31 +02:00
Adrià 93ba44d750
Merge pull request #3847 from semirkabir/feat/usbd-device-calls
feat(libSceUsbd): declare the device and handle calls for the no-device path
2026-10-12 00:09:29 +02:00
Adrià 972b45b807
Merge pull request #3835 from queeeef/fix/agc-rect-list-partial-primitive
fix(agc): draw the complete rectangles of a rect-list draw with a partial last one
2026-10-12 00:09:05 +02:00
Adrià 7e4074fcb9
Merge pull request #3838 from gookie-dev/fix/pad-special-port-not-connected
fix(pad): report special ports as not connected in scePadOpen
2026-10-12 00:09:03 +02:00
Adrià 01b7bb68be
Merge pull request #3823 from xXPBSXx/fix/rudp-exports-ppsa03490-v3
fix(rudp): provide the calls PPSA03490 still lacks
2026-10-12 00:07:39 +02:00
Adrià 1a7b96b5bc
Merge pull request #3822 from object05/test/f32-denormal-flush-split-fma
test(shader): accept the split fma sum in F32DenormalFlush
2026-10-12 00:06:56 +02:00
Adrià 5317eeb54e
Merge pull request #3817 from omurc4/feat/videoout-add-buffer-attribute-option
feat(libSceVideoOut): export sceVideoOutAddBufferAttributeOption
2026-10-12 00:06:21 +02:00
Adrià 5130c66b88
Merge pull request #3794 from semirkabir/feat/cpuset-getaffinity-process
feat(libkernel): report the process affinity from cpuset_getaffinity
2026-10-12 00:04:42 +02:00
hamb3r b8a1cbe42b fix(libc): add missing Unity engine static imports 2026-10-12 01:04:39 +03:00
Adrià 90933951d9
Merge pull request #419 from MichonGoddijn231849/feat/msaa-targets
feat(agc): multisampled color and depth targets with CB resolves
2026-10-12 00:01:37 +02:00
Mouhand Kaddo 82ac3bd93e fix(agc): skip read-only depth resummarize draws 2026-10-12 02:01:36 +04:00
David 6ce1240aba feat(libSceContentExport): implement the export session calls
sceContentExportStart hands out positive session ids, at most 10 live
(SharpProspero MaxExecution), and sceContentExportFinish closes them.
sceContentExportGetProgress, sceContentExportCancel and
sceContentExportFromDataWithThumbnail take their Orbital signatures and
check the session. The host has no media library to export into, so
FromDataWithThumbnail throws before it calls either data callback, and
GetProgress and Cancel throw for a live session since no export ever
runs and their result for an idle session is unknown. An eleventh Start
and Term with live sessions throw.

Titles: Cult of the Lamb PPSA06465 imports GetProgress, Cancel and
FromDataWithThumbnail (#2686); PPSA21564 (#271) and Cyberpunk 2077
PPSA04029 (#266) import Start.

Sources: Orbital tools/ida/db_types.json (cc408367) for the signatures,
SharpProspero Interop/Content/ContentExport.cs (5dfdb4b0) for the
session model and MaxExecution, shadPS4 content_export.h (443f0224) for
the parameter and callback layouts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 473d6dd355d2c0ee22f9792927e0e465846569cf)
2026-10-12 00:01:17 +02:00
Hannah Lyons c154b8bff3 feat(libkernel_sys): implement openat 2026-10-11 18:01:11 -04:00
xXPBSXx 1b7e842b9c fix(exports): export the PS VR2 calls PPSA07411 imports that no library has
PPSA07411 (Resident Evil 4) fails to load without these imports. Their signatures are unknown, so they are declared without parameters and throw until they are implemented. Adds a TechnicalDebt entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 00:01:07 +02:00
David 5164f7875a feat(libSceVoiceQoS): implement sceVoiceQoSEnd
End clears the init flag set by sceVoiceQoSInit and returns 0, so the
library can be initialized again. Before an initialization it returns
0x804E0901 (LIBVOICEQOS_NOT_INIT), as measured on a PS5 (firmware 13.60)
in #1407.

LEGO Horizon Adventures (PPSA14632) calls it at shutdown and Ghost of
Yotei (PPSA26344) calls it on its sceVoiceQoSInit failure branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 25fbc944faddc5fb3519c4ce4b8d3600b3bc9e1b)
2026-10-12 00:01:03 +02:00
Adrià 51e2c511e7
Merge pull request #3773 from xXPBSXx/fix/export-ppsa07411-imports-v4
fix(exports): export the calls PPSA07411 imports
2026-10-11 23:59:49 +02:00
Adrià f60fe21bc3
Merge pull request #3761 from semirkabir/feat/fiber-underscore-frame-pointer
feat(libSceFiber): add the underscore thread frame pointer export
2026-10-11 23:58:58 +02:00
Adrià 34ceeb05d0
Merge pull request #3760 from semirkabir/feat/ult-underscore-exports
feat(libSceUlt): add underscore mutex and queue create exports
2026-10-11 23:58:47 +02:00
Adrià b997cecfec
Merge pull request #3740 from jagrat04/feat/libSceAcm-fft-panner
feat(libSceAcm): implement sceAcm_FFT and sceAcm_Panner
2026-10-11 23:57:24 +02:00
Adrià 2b4b8178f9
Merge pull request #3603 from itsbo5/feat/libSceNpEntitlementAccess-offline-requests
feat(libSceNpEntitlementAccess): implement offline entitlement info r…
2026-10-11 23:56:38 +02:00
Adrià 72e67c0e50
Merge pull request #3555 from lisn0/feat/linux-named-shared-memory
feat(libkernel): support named shared memory on Linux
2026-10-11 23:55:30 +02:00
Adrià b6555c8454
Merge pull request #3714 from MarcZX100/codex/libkernel-aio-set-param-3708
feat(libkernel): implement sceKernelAioSetParam
2026-10-11 23:55:27 +02:00
Adrià 32f6414314
Merge pull request #3713 from SleglJan/fix/libkernel-flexible-module-charge
fix(libkernel): count guest module segments against the flexible memory budget
2026-10-11 23:54:59 +02:00
MarcZX100 8935160160 fix(libkernel): handle available sem_timedwait counts first
Co-authored-by: milescoviello <kitslayer29@gmail.com>
2026-10-11 23:54:18 +02:00
Adrià 1be2ca2028
Merge pull request #3706 from MarcZX100/codex/http-abort-wait-3156
feat(libSceHttp): implement abortable epoll waits
2026-10-11 23:53:59 +02:00
David 774f21845d feat(libkernel): implement pthread_cond_reltimedwait_np
Add pthread_cond_reltimedwait_np (K953PF5u6Pc; computed with
tools/nid_names.py and matching aerolib.csv) as scePthreadCondTimedwait
with POSIX error numbers: ETIMEDOUT when the relative timeout expires,
EPERM when the caller does not hold the mutex, and the mutex held again on
return in every waiting case.

Titles: Porpoise PPSA99764 and RetroArch PPSA99169 import it.
Predicted from relink registry order, not observed: Porpoise stops with
"FAIL: unresolved ELF import K953PF5u6Pc from libkernel.prx" (registry
index 384; RetroArch index 490). No call site is resolved in the registry.

The third argument is a relative timeout in microseconds, not a
struct timespec. FreeBSD 11.4 libthr (8c639945a44588f6cfdddfb057bb5aad88735da0)
has no such function. shadPS4 (3a9f57265d28975658f1ca941daa5c879c7a74bd,
src/core/libraries/kernel/threads/condvar.cpp:229-234, 445, 467-468)
registers posix_pthread_cond_reltimedwait_np(cond, mutex, u64 usec) for this
NID and the same function for scePthreadCondTimedwait (BmMjYxmew1w), whose
microsecond argument this repository already implements. The width follows
the SCE twin's 32-bit SceKernelUseconds, as sem_reltimedwait_np does, not
shadPS4's u64. There is no timespec to validate, so no EINVAL case.
Recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit c86ec8417d12f5b12136b0f06eae06493b0e7a62)
2026-10-11 23:53:37 +02:00
David 092f7ef00a feat(libkernel): implement the pthread spinlock calls
Add pthread_spin_init (ZMn3clnAGBA), pthread_spin_destroy (IJIggoPZExk),
pthread_spin_lock (pw+70ClLYlY), pthread_spin_trylock (rCTGkBIHfPY) and
pthread_spin_unlock (LEfMMCT+SlM). The NIDs were computed with
tools/nid_names.py and match aerolib.csv. libkernel has no scePthreadSpin*
twin in aerolib, so the calls are implemented directly, like the barrier.

Titles: Porpoise PPSA99764 and RetroArch PPSA99169 import pthread_spin_lock.
Predicted from relink registry order, not observed: after
pthread_cond_reltimedwait_np, Porpoise stops with
"FAIL: unresolved ELF import pw+70ClLYlY from libkernel.prx" (registry
index 387; RetroArch index 493). No call site is resolved in the registry.

Behaviour follows FreeBSD 11.4 libthr thr_pspinlock.c and thr_umtx.h
(8c639945a44588f6cfdddfb057bb5aad88735da0). The guest pthread_spinlock_t
holds a pointer to an allocated lock. EINVAL for a null or destroyed lock and
for a pshared other than PTHREAD_PROCESS_PRIVATE or PTHREAD_PROCESS_SHARED,
EBUSY from trylock while any thread holds the lock, EPERM from unlock by a
thread that does not hold it. libthr spins forever when the holder locks
again; that call throws here. A shared lock is allocated like a private one,
since guest code runs in one process. Recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 13ebf7f926fa2ee1c825cb1fcf18451a8781c045)
2026-10-11 23:53:36 +02:00
Adrià 9ce99f8f4d
Merge pull request #3697 from JAB-dev/fix/font-writing-letter-step
fix(libSceFont): return the letter step of sceFontWritingRefersRenderStepCharacter through a pointer
2026-10-11 23:52:50 +02:00
Adrià 6fa58ec0ac
Merge pull request #3696 from JAB-dev/feat/font-syllable-string-state
feat(libSceFont): implement sceFontCharacterGetSyllableStringState
2026-10-11 23:52:45 +02:00
David 059e1319d1 feat(libkernel): export pause, sigwait and sigwaitinfo
Exports pause (EDyhWelj7UY), sigwait (mrbHXqK8wkg) and sigwaitinfo
(Uq5BGthgbl4) from libkernel. NIDs computed with tools/nid_names.py and
matched in aerolib; ps5-payload-dev/sdk f5d40f02 sce_stubs/libkernel.c
places all three in libkernel.

They throw like the merged sigtimedwait (#3430), with the same message
pattern: "sigwait: waiting for a pending signal", "sigwaitinfo: waiting
for a pending signal" and "pause: waiting for a delivered signal". In
FreeBSD 11.4 (8c639945) sigwaitinfo is kern_sigtimedwait without a
timeout (sys/kern/kern_sig.c:1212), sigwait is the same wait returning
the error number (kern_sig.c:1150, lib/libthr/thread/thr_sig.c:676-728)
and pause is sigsuspend of the current mask (lib/libc/gen/pause.c:46-56).
AnyPS5 never leaves a guest signal pending (blocked signals are dropped
in Dispatch, raise delivers at once), so there is nothing to take, and
raise, kill and pthread_kill run a handler only on the calling thread,
so nothing can end a pause.

Titles (predicted stops, registry order; not observed runs):
- Ruffle PPSA68091, observed today
  "FAIL: unresolved ELF import 1t1-JoZ0sZQ from libSceLibcInternal.prx"
  (sinhf, #3519), predicted next
  "FAIL: unresolved ELF import EDyhWelj7UY from libkernel.prx"
  (pause, call site 0x8F7266).
- RetroArch PPSA99169: pause (0x30DB1, an address table entry).
- PS5MC PPSA99420: pause (0x3BD80F6, 0x3C9E220), sigwait (0x3C9E4C7),
  sigwaitinfo (0x3C9E588).
- XPSemu PPSA97358: sigwait (0xE02AEC, 0x1101294, 0x1101368), QEMU's
  dummy vCPU thread and sigwait_compat thread.

guest_sigtimedwait now also checks the three throws, with an empty set,
a null info, a SIGINT raised while blocked, and that neither the output
nor the blocked mask changes. TechnicalDebt records the call sites.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 23:52:33 +02:00
SibteProf eaa9ce97ca test(json2): isolate base constructor regression from float format changes 2026-10-11 23:51:46 +02:00
Codex 3d8db7b5a8 fix(json2): implement InitParameter2 base constructor
Carry the implementation and regression from lucfx18's PR #2823, retaining
the original Git author. Extend the regression with a leading guard and
typed default-field checks, and record the unverified console layout.

Source: https://github.com/boykopovar/AnyPS5/pull/2823
2026-10-11 23:51:34 +02:00
Adrià Franch 7663d8479c docs(technical-debt): note glibc errno for logb and remainder 2026-10-11 23:49:39 +02:00
Renan Pires a36b9092d1 feat(libc): implement the long double math functions RetroArch imports 2026-10-11 23:49:38 +02:00
Adrià d956de8425
Merge pull request #3596 from Lorkydey/feat/libc-fstatvfs
feat(libc): implement guest fstatvfs volume statistics
2026-10-11 23:48:10 +02:00
Adrià 2605ad6c76
Merge pull request #3669 from MarcZX100/carry/audioin-open-variants-3340
feat(libSceAudioIn): implement sceAudioInHqOpen and sceAudioInAsyncOpen
2026-10-11 23:46:54 +02:00
Adrià 2b988061ed
Merge pull request #3665 from itsbo5/feat/libSceSigninDialog-completion
feat(libSceSigninDialog): complete offline sign-in dialog lifecycle
2026-10-11 23:45:50 +02:00
pushkarreddyy 324669722e feat(libkernel): implement pthread_attr_getstackaddr 2026-10-11 17:45:35 -04:00
pushkarreddyy 91bfd6a18c feat(libkernel): implement pthread_attr_getinheritsched, pthread_attr_getscope and pthread_attr_setscope 2026-10-11 17:45:17 -04:00
Adrià cbd98bbdc1
Merge pull request #3540 from ivica00/fix/srgb-bilinear-cube-zero
fix(shader): return 0 for an 8-bit sRGB bilinear cube comparison
2026-10-11 23:45:00 +02:00
Adrià f6203c150b
Merge pull request #3497 from LightStorm72/https-ca-list-stubs
fix(libSceHttp): return an empty CA list from sceHttpsGetCaList/sceHttpsFreeCaList
2026-10-11 23:44:40 +02:00
Hussein Kadhim d9c2622655 docs(libkernel): record the unreported nonblocking connect refusal and the recv after SHUT_RD difference
(cherry picked from commit c1519d951b2b77346392ccc18204f37c587e7eda)
2026-10-11 23:43:47 +02:00
Hussein Kadhim d694aac7b4 fix(libkernel): translate every host socket error to the guest errno of its name
NativeError listed 17 Winsock and 17 POSIX errors and turned every other
one into EIO. A second connect while the first is pending (WSAEALREADY,
EALREADY) and an option the host rejects (WSAENOPROTOOPT, ENOPROTOOPT)
reached the guest as EIO; on Linux a nonblocking connect (EINPROGRESS),
a send with no destination (EDESTADDRREQ), ENOTSOCK, EAFNOSUPPORT,
EOPNOTSUPP and others did too.

The translation moves to SocketError.hpp and covers the socket errors of
both hosts by name, with the FreeBSD 11 numbers. WSAESHUTDOWN stays EPIPE
as before. socketpair's own table is gone, as NativeError covers it.

(cherry picked from commit a889c98e6a59d62da289f2e6a77355d2b41a1bde)
2026-10-11 23:43:47 +02:00
Adrià 57ba0e7bca
Merge pull request #3568 from DariusHQ/feat/libkernel-sendfile
feat(libkernel): implement sendfile
2026-10-11 23:43:14 +02:00
Adrià aab41deda0
Merge pull request #3541 from MarcZX100/codex/amd-ordered-nan-compare-3536
fix(shader): handle ordered NaN comparisons
2026-10-11 23:43:11 +02:00
Adrià Franch 5c5912c49e fix(agc): guard a multisampled target's whole sample planes; docs for host-only multisampled targets
The guest-access guard covers CB bytes times samples (the single-sample layout size alone missed the later sample planes' tile padding), with a test row in that padding. Remove two TechnicalDebt lines duplicated by the rebase, document the guard bound and the unevicted targets, and add the multisampled targets to ARCHITECTURE.md.
2026-10-11 23:41:30 +02:00
Michon eeefb06549 fix(agc): multisampled targets use main's CMASK fields; their CMASK state refuses what it cannot model
The duplicate ColorTarget::cmaskAddress, decode and size helper are gone: multisampled targets
use main's cmaskAddress/cmaskBytes (whole metablocks). Single-sample targets keep main's rule
(CMASK under FAST_CLEAR); a multisampled one takes it under FAST_CLEAR or COMPRESSION. A zero
fill of the whole CMASK clears at the next use, 0xFFFFFFFF marks it expanded, any other or
partial fill refuses the next use; eliminate/DCC passes over a multisampled target and a CB
resolve into a fast-clear destination are refused. The draw key adds CMASK_BASE_EXT (0x398),
which main decodes but did not key.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 23:41:30 +02:00
Adrià 752db7da76
Merge pull request #3569 from DariusHQ/fix/libc-format-positional-arguments
fix(libc): format positional arguments on Windows
2026-10-11 23:40:52 +02:00
Adrià Franch 9ac63c0af8 style: restore blank lines touched by accident 2026-10-11 23:40:51 +02:00
bilel 11f329fd4b fix(libkernel): reject identity changes before ordinary-file fallback
A descriptor replaced before the shared-memory path probe can otherwise
bypass the pinned-object identity check through native fallback. Compare
the negative probe's current file identity to the initial snapshot and
reject a mismatch. Exercise the earlier window with an ordinary file for
all six descriptor operations.

Confidence: high
Scope-risk: narrow
Tested: 18 Linux runtime tests with zero skips; 18 deterministic reuse scenarios; affected three patched modules; standalone ASan/UBSan; Clang analyzer; conventions and diff checks
Not-tested: Full project build/suite, Windows runtime, console hardware and titles
Directive: Identity checks do not synchronize the entire descriptor table or identify separate opens of the same inode
2026-10-11 23:40:46 +02:00
bilel f6ef5a77e2 fix(libkernel): preserve patched loading and shared-memory object identity
Keep guest creation-mask state in libc behind C-linkage helpers so NID
patching preserves the shared exports. Reject a pinned descriptor whose
file identity differs from the snapshot taken before classification.
Exercise close and reuse from another thread at both acquisition windows
for writes, resize and seek, and create temporary ordinary-file fixtures
so runtime tests work without the source tree.

Constraint: NID exemptions require the literal suffix at the end of the exported symbol
Confidence: high
Scope-risk: narrow
Tested: 18 targeted Linux runtime tests with zero skips; patched_libraries for libc/libkernel/libkernel_sys; standalone ASan/UBSan with warnings as errors; source-prefix-remapped fixtures; Clang analyzer and conventions
Not-tested: Full project build and library set, Windows runtime, console hardware and titles
Directive: Device/inode validation establishes file identity, not open-file-description identity
2026-10-11 23:40:46 +02:00
bilel 72b3a2abdd fix(libkernel): keep shared-memory identity and guest permissions consistent
Pin the descriptor before mmap validation so guest descriptor reuse cannot
redirect the eventual mapping. Apply the canonical guest creation mask when
creating named objects, distinguishing new objects before setting permissions
without changing the host process umask. Add regressions that reproduce both
failures and document the remaining host requirements.

Constraint: Guest umask must not mutate the process-wide host mask
Confidence: high
Scope-risk: narrow
Tested: 17 targeted Linux runtime tests passed with zero skips; conventions and diff checks; Clang analyzer on three changed production translation units
Not-tested: Full project build and suite, Windows runtime, console hardware and titles
2026-10-11 23:40:46 +02:00
bilel 2aaeaa3f05 feat(libkernel): make Linux shared memory usable through guest APIs (#3923)
Complete the object lifecycle through guest mapping and unlink APIs, and
preserve FreeBSD shared-object size and seek rules across scalar, vector
and asynchronous descriptor writes. Pin descriptors during operations and
coordinate size-sensitive operations across cooperating emulator processes.

Constraint: Linux host support with existing dependencies and allocation tracking
Rejected: Bare descriptor registry | close, duplication and reuse invalidate identity
Rejected: Per-object OFD locks | forked descriptors share the same lock description
Confidence: high
Scope-risk: moderate
Directive: Keep guest resize, truncating open and bounded writes under the same namespace guard
Tested: Ten Linux runtime suites; focused shared-memory ASan/UBSan suite with warnings as errors
Not-tested: Windows build, PS5 hardware and title compatibility
2026-10-11 23:40:45 +02:00
bilel zenned f274ceb18d feat(libkernel): allow Linux guests to reopen named shared memory (#3921)
Translate guest named-open flags and permissions to POSIX shared-memory descriptors. Bound guest names and use the existing digest implementation to keep a stable AnyPS5 namespace, including long names and internal slashes. Preserve anonymous and Windows behavior, and record the separate unlink and guest mapping gaps.

Constraint: Builds and tests run only through the enrolled 191 compute service.
Rejected: Direct Linux guest names | cannot represent FreeBSD internal slashes and 1023-byte names.
Tested: Source review and diff checks; baseline job100619 accepted, result retrieval currently times out.
Not-tested: Runtime verification pending on191; full build, Windows and titles.
Confidence: medium
Scope-risk: narrow
2026-10-11 23:40:45 +02:00
Adrià 372fb03284
Merge pull request #3586 from jradelmo/feat/http-uri-authority-delimiter
fix(libSceHttp): retain authority delimiter for partial URI builds
2026-10-11 23:38:55 +02:00
Adrià c60f65a227
Merge pull request #3535 from sktharunbalaji13-cmd/contrib/libSceHttp2-invalid-id
fix(libSceHttp2): validate SSL setter handles
2026-10-11 23:37:50 +02:00
Adrià f5824092cf
Merge pull request #3545 from babyhuey/feat/posixforwebkit-fnmatch
feat(libScePosixForWebKit): implement fnmatch
2026-10-11 23:37:41 +02:00
Adrià 1342c4b9df
Merge pull request #3539 from MarcZX100/codex/agc-write-data-dst3-3534
fix(agc): accept WRITE_DATA destination 3 for memory fences
2026-10-11 23:36:57 +02:00
Adrià 0b7b479a04
Merge pull request #3576 from parl0v/refactor/agc-dcb-atomic-gds-0900
refactor(agc): name zARR5aCmkoY sceAgcDcbAtomicGds_0900
2026-10-11 23:36:55 +02:00
Adrià 24ba6b1764
Merge pull request #3577 from parl0v/refactor/audioin-pad-embedded-mic
refactor(audioin): name X+4jdIS75P0 sceAudioInIsPadEmbeddedMic
2026-10-11 23:36:48 +02:00
Adrià a672688e94
Merge pull request #3523 from XairRrR/fix/agc-default-unexported-pixel-inputs
fix(agc): read zero for pixel inputs of parameters the vertex stage does not export
2026-10-11 23:36:20 +02:00
Adrià 7de666a937
Merge pull request #3512 from LeandroLP23/fix/shader-mix-f16-directed-rounding
fix(shader): round v_fma_mixlo_f16 and v_fma_mixhi_f16 in every f16 rounding mode
2026-10-11 23:36:15 +02:00
Adrià 4d55bf10be
Merge pull request #3493 from AchrafReyani/feat/libkernel-ioctl
feat(libkernel): export _ioctl and getsid
2026-10-11 23:35:53 +02:00
Adrià 41f013f664
Merge pull request #3567 from DariusHQ/fix/libc-format-grouping-flag
fix(libc): accept the ' flag in Windows formatting
2026-10-11 23:34:57 +02:00
Adrià ac1c340392
Merge pull request #3571 from EdouardSence/feat/json-parser-stream-parse
feat(libSceJson2): add sce::Json::Parser::parse with a read callback
2026-10-11 23:34:48 +02:00
Adrià 3ccef6abcd
Merge pull request #3564 from Aathish-D/feat/libc-ftrylockfile
feat(libc): implement ftrylockfile
2026-10-11 23:34:00 +02:00
Adrià c892804260
Merge pull request #3560 from EdouardSence/feat/razorcpu-push-marker
feat(libSceRazorCpu): add sceRazorCpuPushMarker
2026-10-11 23:33:24 +02:00
Adrià e44b7cf78c
Merge pull request #3546 from AlxcBTW/fix/vertex-narrow-wave-entry-2
fix(recompiler): give wave64 vertex programs on 32-lane hosts a 32-lane s3
2026-10-11 23:33:16 +02:00
Adrià 9d5c6afcd6
Merge pull request #3559 from EdouardSence/feat/ngs2-report-handler-exports
feat(libSceNgs2): export sceNgs2ReportRegisterHandler and sceNgs2ReportUnregisterHandler
2026-10-11 23:33:12 +02:00
Adrià 62f8758711
Merge pull request #3544 from babyhuey/feat/libkernel-execv
feat(libkernel): export execv
2026-10-11 23:33:07 +02:00
Adrià c56ea3b343
Merge pull request #3537 from hugodearaujo/feat/ppsa15878-vr2-exports
feat(libs): declare the PS VR2 exports PPSA15878 imports
2026-10-11 23:32:40 +02:00
Adrià b2477d9804
Merge pull request #3530 from MarcZX100/codex/libkernel-inet-text-rules-3126
fix(libkernel): follow FreeBSD inet text rules
2026-10-11 23:32:18 +02:00
Adrià 28400c02d1
Merge pull request #3542 from BharatYadav007/bharat/libc-setlogmask
feat(libc): implement setlogmask
2026-10-11 23:32:17 +02:00
Adrià 039d21ead8
Merge pull request #3527 from Sanjaysrinivas/fix/agc-buffer-memory-recovery
fix(agc): reclaim idle buffers on allocation OOM
2026-10-11 23:30:03 +02:00
ivica00 cd814b8c6f fix(shader): return 0 for an 8-bit sRGB bilinear cube comparison
An 8-bit sRGB compare is already 0 for every texel, so the selected face cannot change the result.
2026-10-11 23:29:39 +02:00
Adrià d2e1f20edb
Merge pull request #3499 from blawesom/carry/ampr-cnd-signal
feat(libSceAmpr): implement _Cnd_signal and _Cnd_init_with_name
2026-10-11 23:29:11 +02:00
Adrià 59559c306c
Merge pull request #3496 from MarcZX100/codex/primstate-normalize-disabled-vgpr-3457
fix(agc): preserve hand-built user VGPR offsets
2026-10-11 23:29:06 +02:00
Adrià a9a34e91cc
Merge pull request #3412 from pushkarreddyy/feat/agc-draw-snapshot-cap
perf(libSceAgcDriver): cap draw input snapshot allocation size
2026-10-11 23:28:42 +02:00
Adrià 14a7e64dcd
Merge pull request #3485 from santhoshkumar-dev/codex/windows-path-traversal
fix(filesystem): reject invalid parent traversal on Windows
2026-10-11 23:24:37 +02:00
Adrià 90896b5cc9
Merge pull request #3462 from exefer/fix/libkernel-select-host-descriptors
fix(libkernel): select descriptors that are not sockets
2026-10-11 23:24:27 +02:00
Adrià 9865c57f76
Merge pull request #2261 from Sanjaysrinivas/feat/registered-ngg-workgroup
fix(agc): route registered NGG workgroups through mesh
2026-10-11 23:23:54 +02:00
Adrià Franch 7ca6b63905 docs(technical-debt): note the CA list stubs skip context validation
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 23:15:05 +02:00
LightStorm72 1d5f699439 fix(libSceHttp): return an empty CA list from sceHttpsGetCaList/sceHttpsFreeCaList 2026-10-11 23:15:05 +02:00
Adrià Franch 76d43c525e fix(libkernel): drop _ioctl, already exported by #3487
Co-authored-by: Achraf Reyani <noreply@users.noreply.github.com>
2026-10-11 23:06:10 +02:00
Achraf Reyani 6c7a2cbe69 feat(libkernel): export _ioctl and getsid
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:06:10 +02:00
Adrià 9d9f2cf094
Merge pull request #3516 from Feuris/carry/windows-udp-short-receive
fix(net): preserve truncated UDP receives on Windows
2026-10-11 23:05:37 +02:00
Adrià 68ac73f3df
Merge pull request #3452 from LeandroLP23/fix/kernel-windows-directory-rewind
fix(libkernel): rewind Windows directory descriptors on lseek
2026-10-11 23:05:29 +02:00
Adrià d80a52b75d
Merge pull request #3500 from notaxeltv/feat/tts2-unavailable-exports
feat(libSceTextToSpeech2): return EOPNOTSUPP from remaining speech exports
2026-10-11 23:04:31 +02:00
Adrià Franch 8e5091c2f0 docs(technical-debt): name the SPIR-V rule behind keeping the loop back edge
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 22:57:06 +02:00
hugodearaujo d5f11b156b fix(libSceUserService): report an unrestricted age level
sceUserServiceGetAgeLevel reported 0. On a PS5 (firmware 13.60) the
value is the age of the user's parental restriction (0, 7, 12 and 15
measured) and 0xFFFFFFFF without one, so 0 is a user restricted to age
0. A user who is not logged in returns 0x80960009 (not logged in) with or
without an output, before the null output check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:07:45 -03:00
Claude d358374ac8
fix(libc): throw for 16-bit wide scanf conversions on Linux
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
2026-10-11 20:07:20 +00:00
fma-rc ba9f903e3f
feat(shader): implement s_subvector_loop_begin and s_subvector_loop_end 2026-10-11 22:03:26 +02:00
Santhosh Kumar 17827dd9ab fix(filesystem): reject invalid parent traversal on Windows 2026-10-12 01:25:02 +05:30
AlxcBTW 99edf9435c fix(recompiler): read P10 of a flat input as the provoking vertex
A FLAT_SHADE input without pass-through that a pixel shader reads
through v_interp_mov_f32 P10 became an explicit per-vertex input and
read vertex 1 minus vertex 0. With the last provoking vertex the
pipeline then threw ("last provoking vertex with explicit per-vertex
flat interpolation is unsupported"), which stopped all three
ps5-opengl titles in the catalog.

ps5-opengl reads every flat input through P10 when GL's last-vertex
convention is in effect, and its driver passes the GL 4.6 CTS on a PS5
(#1413). Such a read now returns the provoking vertex's value, as P0
does, and only a P20 read keeps a flat input per vertex. The lane was
not measured on the console itself, so FragmentParameter records it
and a pipeline using the first provoking vertex throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:09:55 +02:00
Mouad-Scriptz-0 bc5bfd0ed6 feat(libkernel): export setuid, setreuid, setgroups and getgroups
`setuid`, `setreuid` and `setgroups` are absent imports of XPSemu
(PPSA97358) and PS5MC (PPSA99420) on `main`. The guest process is modelled
as root with ids 0, as `seteuid` and `setegid` already assume: `setuid`
accepts 0 and `setreuid` 0 or -1 per id and change nothing, any other id
throws. `setgroups` keeps the supplementary group list as FreeBSD's
`kern_setgroups` does (`NGROUPS_MAX` 1023, an empty list leaves the
effective group as the only entry, a first entry other than 0 throws) and
the new `getgroups` reports it. `guest_credentials` covers the accepted
ids, the default list, a set list, an empty list and the EINVAL/EFAULT
cases.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit d12b062074dcf64bff694800d77f7261adf6f59e)
2026-10-11 18:55:22 +00:00
Mouad-Scriptz-0 876c4ecacf test(recompiler): pin that an unwritten window register reads 0
Two more agc_driver_relative_indexing rows read a register of the window
the program never wrote, directly and through v_movrels_b32, and expect 0,
which the zeroed window array gives like an unwritten SSA register did;
the TechnicalDebt entry says the console's value is undefined.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 18:36:09 +00:00
xXPBSXx 471e12e484 fix(libSceCesCs): drop the unused module target and move the TechnicalDebt line
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 20:35:09 +02:00
xXPBSXx 4eb3340dcb fix(rudp): throw from sceRudpGetMaxSegmentSize and justify the success of the pump calls
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 20:31:52 +02:00
Adrià Franch 1462312ebf docs(savedata): record the inferred sceSaveDataConvert contract 2026-10-11 20:28:50 +02:00
Mouad-Scriptz-0 f9fd0f125c fix(recompiler): give out-of-range relative vector accesses the measured semantics
M0 is unsigned, so an index at or past the window reads v0 and drops its
write, v_swaprel_b32 writes neither side when either is out of range, and
the window array starts zeroed like unwritten SSA registers; the window
load counts as a lane source so a wave64 program's second half keeps its
own registers. agc_driver_relative_indexing runs in wave32 and wave64 and
pins the rows measured on gfx1035 in the review of #3856, and the
TechnicalDebt entry states the measured behaviour, the window's end at the
last named register and the sizes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 18:28:02 +00:00
Alex 95988c9c34 fix(shader): flush f16 denormals in unary, frexp and conversion ops per the float mode
The f16 unary ops, v_frexp_mant_f16, v_frexp_exp_i16_f16, the norm
conversions and v_cvt_f32_f16 read denormal halves as they are and
rounded denormal results as they are, whatever the denormal field of
FLOAT_MODE says. On RDNA2 a clear bit 0 flushes a denormal half input
to its signed zero and a clear bit 1 flushes a denormal half result.

One shared rule now drives all of them, and v_ldexp_f16 uses it for its
input too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 14:27:58 -04:00
Chad eedf7a2671 feat(savedata): implement sceSaveDataConvert
PPSA28416 calls it on its existing save at boot (after sceSaveDataDirNameSearch finds it) and aborted on the missing implementation. The call takes one parameter block: user id at +0, the directory name pointer at +8. Host saves have no size limit, so the conversion completes at once: an existing save returns OK, a missing one NOT_FOUND, an invalid name PARAMETER. The title polls sceSaveDataGetEventResult once afterwards and continues on 'no event'.
2026-10-11 13:23:58 -05:00
Adrià Franch 07af520c1c docs(technical-debt): move the vieBRwlh1Lw entry off the end of Functional
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 19:58:11 +02:00
Adrià Franch 896c958236 docs(technical-debt): record that sceSaveDataDirNameSearch rejects sort key 4
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 19:49:46 +02:00
Semir Kabir e92547a7a1 feat(libkernel): wake each listed address in _umtx_op UMTX_OP_NWAKE_PRIVATE 2026-10-11 17:48:06 +00:00
Yunus Shaikh 9b1e1ecccd fix(savedata): sort sceSaveDataDirNameSearch results by the requested key and order
The search returned saves in host directory order and ignored the condition's key and order. A title that asks for the newest save first (modification time, descending) got whichever directory the host listed first: the alphabetically first on NTFS, an arbitrary one on Linux. Sort by directory name, user parameter or modification time, reverse for a descending order, and reject unknown keys and orders with the parameter error, as shadPS4 does.
2026-10-11 10:46:53 -07:00
billythemenace2 e2bfacefa3 feat(libSceRudp): declare the calls PPSA06888 imports
PPSA06888 stops on main at start-up because its bundled
Media/Plugins/SceRudp.prx imports sceRudpEnableInternalIOThread2,
sceRudpGetOption and sceRudpGetRemoteInfo, which no library exports.

The signatures are unknown, so they are declared without parameters and
throw. The title does not call them during start-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:39:22 +01:00
Zayd Zaari 4d15f9ef24 fix(rtc): recognize additional measured named time zones
Add thirteen offsets measured repeatedly on PS5 firmware 13.42, keeping DST names ahead of their shorter prefixes. Cover case folding, prefix matching and a second valid date.

Written with AI assistance; validated against real hardware and the guest RTC tests.
2026-10-11 17:36:41 +00:00
LeandroLP23 c27e67ceb5 test(libSceLibcInternal): run guest_force_tls_destructor on Windows
sceKernelGetModuleInfoFromAddr has a Windows path since 77ef75c1d, so
_sceLibcInternalForceTlsDestructor finds each dso's module there too.
The test takes the other module's address with GetProcAddress where
Linux uses dlsym(RTLD_NEXT), and the TechnicalDebt entry no longer says
the call throws on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:31:41 +02:00
Daan Dehing 0418aaaad2 fix(agc): draw the complete rectangles of a rect-list draw with a partial last one
A rect-list draw whose count is not a multiple of 3 threw "incomplete rect-list
primitive". Rect lists are drawn as patch lists of 3 control points, and Vulkan
generates floor(vertexCount/3) patches, so the draw now records as is and the
trailing 1 or 2 vertices are left out. Palworld (PPSA23126) draws 4 vertices x 9
instances as a rect list when character creation opens (#3832).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:28:27 +02:00
gookie 73866db755 fix(pad): report special ports as not connected in scePadOpen
scePadOpen returned the standard pad's handle for a special port
(type 2) as well, and scePadGetHandle found it there. Both ports then
read the one input queue, so a press queued between two frames could be
drained by the special port's read and never reach the standard port.
PPSA16827 (Harmony's Odyssey) opens both ports for the initial user and
reads both every frame, also polling controller information and device
class data for the special one.

Special ports now return DEVICE_NOT_CONNECTED (0x80920007) from
scePadOpen, as scePadOpenExt already does because the host has no
special controller, and scePadGetHandle has no handle for them.
TechnicalDebt's scePadOpenExt entry now covers both calls.

guest_pad opens a special port before and after the standard one and
expects DEVICE_NOT_CONNECTED, and DEVICE_NO_HANDLE from scePadGetHandle
for the special port while the standard handle stays valid. It fails on
main.

PPSA16827 over 130 s of its title screen: 6812 scePadRead, 3408
scePadGetControllerInformation and 3406 scePadDeviceClassParseData calls
before, two reads of the same queue per frame; 2702 reads, one
information call and no parse calls after.
2026-10-11 19:26:30 +02:00
omurc4 d40189d707 feat(libSceVideoOut): export sceVideoOutAddBufferAttributeOption
Elden Ring Nightreign (PPSA25380) imports the function, which no library
exported, so the title failed to load. The option is ORed into the buffer
attribute and a null attribute throws. Options other than 0 and 8 still
throw when the buffers are registered.
2026-10-11 13:26:22 -04:00
Mouad-Scriptz-0 f8ed012e3e perf(recompiler): keep relatively addressed vector registers in a window array
`v_movrels_b32`, `v_movreld_b32`, `v_movrelsd_b32`, `v_movrelsd_2_b32`
and `v_swaprel_b32` lowered to a compare-and-select chain over every
register from the base to the program's last allocated register, so a
program addressing 154 registers 104 times turned 3176 ISA words into
649,515 SPIR-V words that Intel's compiler did not finish. The registers
from the lowest relative base up now live in a function-scope array per
invocation (`LoadVectorWindow`/`StoreVectorWindow`), so an indexed access
is one load or store; plain accesses to those registers go through the
same array, DPP-modified relative writes keep their `DppUpdateU32` merge,
an index past the window reads 0 and drops its write, and programs
without relative addressing are unchanged. The same program recompiles
to 392,333 words with 4,992 selects instead of 32,383.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 17:26:18 +00:00
hugodearaujo d1631862f5 fix(libkernel): report the operation mode the console reports
sceKernelGetOperationMode returned 0 for both values, which were
unknown. A payload on a PS5 (firmware 13.60) reads mode 2 and submode 0;
nothing past the two ints is written and the result register holds no
status, so the function now returns nothing. PPSA12544 logs both values
and ignores the result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:20:54 -03:00
David f4424b5f1e feat(libSceAgc): implement the vieBRwlh1Lw interpolant mapping update
Hollow Knight Silksong (PPSA12544) imports libSceAgc NID vieBRwlh1Lw
(#699). Its name is unknown: it is not in aerolib, and the
sceAgcUpdateInterpolantMapping label other projects give it hashes to
SbuY2jN+axQ.

OpenAGC (src/game_compat.c at 3c7e807, sceAgcUnknownVieBRwlh1Lw) reads
it from FW 11.60 as the dbOlWdppb4o transform with the same (regs, gs,
ps) arguments, without the identity tail: it writes one register per
pixel shader input, none for a pixel shader without inputs, and rejects
a null pixel shader. It now shares the dbOlWdppb4o path and throws for
the rejected arguments.

For is_f16 1 and 3 inputs whose default_value and default_value_hi
differ, OpenAGC takes DEFAULT_VAL from default_value_hi, while KytyPS5,
sharpemu and dbOlWdppb4o here take it from default_value; these inputs
throw. On every other input the dbOlWdppb4o values equal OpenAGC's.

agc_interpolant_mapping runs the dbOlWdppb4o vectors and OpenAGC's
enhanced-mapping vectors through it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 20:16:47 +03:00
object05 6f527fa956 test(shader): accept the split fma sum in F32DenormalFlush
agc_driver_f32_denormal_flush fails on RADV RENOIR (Mesa 26.2.4):

  lane 20 no float mode v_fma_f32 v14, v4, v5, v6 is 0x00800000, expected 0x00ffffff

The driver lowers Fma to a multiply and an add: the compiled shader has
v_mad_f32 and no v_fma_f32. The product 0x1fffffff * 0x1fffffff is below
2^-126 and is flushed before 0x00800000 is added. Lane 20 is the only
row with a tiny product and a non-zero addend. v_fma_f32 and v_fmac_f32
fail on it in all three float modes; every other check passes.

When both return that sum, the two values are not checked. FmaRounding
already leaves out its fused forms on a device that splits fma.
2026-10-11 19:10:52 +02:00
xXPBSXx f854e52b26 docs: place the PPSA07411 TechnicalDebt entry away from the end of the file
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:06:38 +02:00
Semir Kabir 33c6e825ab feat(libSceUsbd): declare the device and handle calls for the no-device path 2026-10-11 10:06:27 -07:00
xXPBSXx ed0ea5e66b docs: place the PPSA30601 TechnicalDebt entry away from the end of the file
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:06:24 +02:00
xXPBSXx d7bf16a054 fix(exports): export the calls PPSA30601 imports
PPSA30601 (Resonance: A Plague Tale Legacy) fails to load without these imports that no library exports. Their signatures are unknown, so they are declared without parameters and throw until they are implemented. Adds a TechnicalDebt entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 19:02:18 +02:00
screamm f51180973e feat(libSceAudioOut): implement sceAudioOutSysGetHdmiMonitorInfo
Surround Sound Studio (PPSA99051), catalog build on main a11c8f7f with
the flat-interpolation fix, stops 16 s in, before its first frame
(orishamir, #3581 comment 6109839314):

    sceAudioOutSysGetHdmiMonitorInfo not implemented

The call takes (type, out, size); out must be non-null, size exactly
0x180 and type 1 (HDMI) or 0x10 (sainsaji/PS5-Audio-Passthrough-Research
c3be9c2a, docs/FINDINGS.md section 3 and AGENTS.md:25, firmware 12.70).
Titles read the monitor name at +0x0B, the descriptor count at +0x94 and
8-byte descriptors from +0x98 (same, FINDINGS.md hardware log item 1 and
sample-app/src/platform/ps5/bitstream_out.cpp:92-128).

Audio reaches the host through SDL as PCM and there is no EDID, so type 1
with a 0x180-byte buffer reports a sink without a name or descriptors:
the buffer is zeroed and 0 is returned. Surround Sound Studio's
Passthrough page then lists no formats; EVO Player's code treats an empty
list like a negative return. A null buffer returns 0x80260004, as the
other AudioOut calls do. Type 0x10, other types and other sizes throw:
their results and error codes are not known.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 19:45:00 +03:00
Adrià Franch 28962787b3 docs(technical-debt): describe the v_sin and v_cos series fallback
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 18:44:14 +02:00
Semir Kabir 2124cfba5f feat(libkernel): report the process affinity from cpuset_getaffinity 2026-10-11 16:43:36 +00:00
xXPBSXx a03afed4c3 fix(exports): export the calls PPSA07411 imports
PPSA07411 (Resident Evil 4) fails to load without these imports that no library exports. Their signatures are unknown, so they are declared without parameters and throw until they are implemented. Adds one test and a TechnicalDebt entry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 18:35:00 +02:00
Adrià Franch 38cb3b12d1 docs(technical-debt): record the single source of sceAgcAcbAtomicGds_0900
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 18:32:21 +02:00
Semir Kabir 5f123fd1b2 feat(libSceFiber): add the underscore thread frame pointer export 2026-10-11 09:30:02 -07:00
Semir Kabir 54b9b93240 feat(libSceUlt): add underscore mutex and queue create exports 2026-10-11 09:29:28 -07:00
jagrat Singh 86bd3b6621 feat(libSceAcm): implement sceAcm_FFT and sceAcm_Panner 2026-10-11 21:40:58 +05:30
Adrià Franch 4f013785dd docs(debt): record unverified scePadSetVibrationMode mode 3
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 18:06:39 +02:00
David 60a7f28112 feat(libkernel): implement sceKernelAioSetParam
Dying Light 2 (PPSA02262) imports sceKernelAioSetParam (9WK-vhNXimw) from
its eboot. In #1794 tv7 reported on main b5f5362d3 + #2129 (2026-10-10):

  FAIL: unresolved ELF import -q-vbO859Tw from libSceVideoOut.prx

with "12 other imports are still unresolved on `main`. In the eboot,
`-q-vbO859Tw`, `GTfJ64qFCPw`, `vwtVpHQKelI` (no known names),
`sceKernelAioSetParam` and `sceNpWebApi2GetMemoryPoolStats`." The import
is observed; its position in the loader queue after the nameless NIDs is
predicted.

The function fills one SceKernelAioSchedulingParam (five 4-byte fields,
20 bytes): Orbital cc408367 tools/ida/db_types.json:1103, SharpProspero
5dfdb4b0 Interop/Kernel/KernelAio.cs ("Sets every field of param at
once") and ampr_emu cfa85df3 ps5/include/sce/_fs.h agree on
(param, schedulingWindowSize, delayedCountLimit, enableSplit, splitSize,
splitChunkSize). No source gives an error code, so a null struct and
values outside SharpProspero's maximums (window and delayed count 0..128,
split flag 0 or 1, sizes up to 0x1000000) throw. The engine does not use
the settings, as sceKernelAioInitializeImpl ignores its struct; this is
recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit e45a2b950afe594212db2764529ccae32f84be8c)
2026-10-11 15:50:42 +00:00
Jan Šlégl e753080391 fix(libkernel): count guest module segments against the flexible memory budget
sceKernelAvailableFlexibleMemorySize and the flexible maps counted only
explicit flexible mappings, so the full 448 MiB was reported while the
title's executable and modules were loaded. A title that derives its code
and data size from the budget minus the available size got an unsigned
underflow.

The segments of the main executable and of every .guest.prx module that
the title's ELF gives permissions now count, rounded to 16 KiB pages, as
shadPS4 maps every non-system module segment as flexible memory. The
relinker's own blocks and the host system libraries do not count. The
charge ends when a module is unloaded.

Refs #2883

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq
2026-10-11 17:48:05 +02:00
David 4c7d83a2bf feat(libSceHttp): implement sceHttpAbortWaitRequest and the unlimited sceHttpWaitRequest
Deathloop (PPSA01670) imports sceHttpAbortWaitRequest; Planet Coaster
(PPSA01736) and Palworld import sceHttpWaitRequest.

Epoll handles are kept in a registry with an abort flag, a destroyed flag
and a condition variable. A wait with a negative timeout blocks until
sceHttpAbortWaitRequest, sceHttpDestroyEpoll or the sceHttpTerm of the
last context wakes it; a bounded wait still returns 0 events. An abort
stays set and makes every later wait return SCE_HTTP_ERROR_ABORTED
(0x80431080); a wait woken by destroy or term returns 0 events.
sceHttpDestroyEpoll no longer frees a handle a waiter is blocked on.
sceHttpInit registers its context, and the epoll calls and sceHttpTerm
return BEFORE_INIT without a live context and INVALID_ID for an unknown
context or handle.

Behaviour and error codes: shadPS4 src/core/libraries/network/http.cpp
and http_error.h at a8a70da595da2a96e0410309472ba4a7eb558144.
Signature (void* eh): Orbital tools/ida/db_types.json at
b321fcdbd700cc02da1cb1ad25412781d5ec73c6 and SharpProspero
src/SharpProspero/Interop/Net/Http.cs at
60977b29103452b9681ae10c7a9011d44965bf16.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 766997df3f8329fd6e8e7aac2b5d83daf88c8292)
2026-10-11 15:40:17 +00:00
Adrià Franch 6293e6ae63 docs(technical-debt): cover the single-item NpEntitlementAccess info requests 2026-10-11 17:34:43 +02:00
JAB-dev e127a525d1 feat(libSceFont): implement sceFontCharacterGetSyllableStringState
The call was an unimplemented stub. It now writes syllable state 0 and
returns OK for every character outside the Thai block, where a PS4
firmware 11.00 libSceFont measures 1, 3 or 4; Thai characters throw as
not implemented. A null character or result returns
SCE_FONT_ERROR_INVALID_PARAMETER, and a null character writes 0 to a
non-null result, as measured. The signature follows SharpProspero.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 17:32:23 +02:00
exefer 3ae2583802 fix(libkernel): select descriptors that are not sockets 2026-10-11 17:25:32 +02:00
JAB-dev b576273225 fix(libSceFont): return the letter step of sceFontWritingRefersRenderStepCharacter through a pointer
The second argument is an out pointer to the writing's letter step, as
KytyPS5 and the SharpProspero bindings declare it. It was filled as a
letter step struct, which wrote 64 bytes over the caller's 8-byte
pointer. The letter step now lives in the writing and the call stores
its address, or null when there is no current step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 17:12:47 +02:00
virp-mta 4b91755d9a feat(libSceSigninDialog): complete offline sign-in dialog lifecycle 2026-10-11 19:11:37 +04:00
David 9ac583bddd feat(libSceAudioIn): implement sceAudioInHqOpen and sceAudioInAsyncOpen
Both open the same SDL capture port as sceAudioInOpen, so Input,
GetSilentState and Close work on their handles. HqOpen accepts only a
128-sample grain at 48 kHz (SharpProspero, KytyPS5); AsyncOpen returns
INVALID_SIZE above 384 samples (SharpProspero). Values the sources
disagree on throw. Format 0x10 still throws: only KytyPS5 accepts it.

Imported by FMOD-based titles, The Smurfs Dreams (PPSA21607) and Astro
Bot (PPSA21564); Ghost of Yotei (PPSA26344) calls sceAudioInOpen.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 16bfdf928d0a2da0b4473db2633a2e270538cbf5)
2026-10-11 15:03:16 +00:00
Adrià Franch c81ee9288c docs(technical-debt): record fstatvfs deviations from FreeBSD 2026-10-11 17:01:55 +02:00
MarcZX100 f942de360e test(libc): keep Windows unwind coverage within guest frames 2026-10-11 14:58:39 +00:00
Adrià Franch 9758607197 docs(technical-debt): record invalid-id returns of the other Http2 handle exports 2026-10-11 16:57:18 +02:00
Tharun Balaji 4337b43f54 fix(libSceHttp2): validate SSL setter handles 2026-10-11 16:57:12 +02:00
QRMOE a06728b566
docs(libc): update remaining strftime gaps
Record literal handling while retaining unimplemented padding and timezone gaps.

AI-assisted: yes
2026-10-11 16:53:00 +02:00
xXPBSXx abf6f06be4 fix(rudp): provide the calls PPSA03490 still lacks
PPSA03490 (Demon Slayer) imports sceRudpGetMaxSegmentSize, sceRudpProcessEvents, sceRudpNetFlush and sceRudpNetReceived, which no library exports. The first three answer by the library's initialised state; sceRudpNetReceived is declared without an implementation because its signature is unknown. Adds one test and TechnicalDebt entries.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 16:37:32 +02:00
LeandroLP23 d668b7c2b1 fix(shader): check NaN on the bits for ordered less-than and greater-than
On the AMD Windows driver 32.0.13058.8001 (Radeon 860M), a NaN compared
less than +infinity, or +infinity greater than a NaN, gives 1 when the
infinity reaches the shader as a constant, as in
agc_driver_f32_compare_constant's register operand case (#3536). The
same driver returns 1 for a NaN in an ordered not-equal (#825), which is
presumably what its compiler turns these compares into. FPOrdLessThan32
and FPOrdGreaterThan32 now AND their result with the integer NaN check
FPOrdNotEqual32 already uses, which gives the same result for every
input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1cfbde5d69fe3b5c0aa482d4ff3551f0e87c3915)
2026-10-11 14:36:11 +00:00
alfalfa-star 4d0d3c06e8 fix(recompiler): read NumWorkgroups in every mesh shader so RADV sizes its user data
RADV (Mesa 26.2.4, GFX12) updates the user SGPR count and draw-id flag
it uses for a mesh dispatch only when the bound mesh shader has the
grid-size/draw-id slot. A mesh shader reading neither NumWorkgroups nor
DrawIndex keeps the previous vertex pipeline's values: the dispatch
opens a 3-register SET_SH_REG, writes one value, and the CP parses the
following DISPATCH_MESH_DIRECT as register data. The gfx ring then
times out and the GPU is reset with VRAM lost.

Kena: Bridge of Spirits (PPSA01802) hits this on its layered volume
draws, which interleave with vertex draws in one command buffer.
Confirmed with RADV_DEBUG=hang (the dispatch header shows up as
SPI_SHADER_USER_DATA_GS_4) and the CP header history in the amdgpu
devcoredump.

Every mesh shader now loads NumWorkgroups.x and sets zero vertices
when it is 0, which no dispatch produces, so RADV gives it the
grid-size slot and writes as many values as it announces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:30:37 +02:00
Adrià Franch 4abf052341 docs(debt): record zero default for unexported pixel inputs 2026-10-11 16:23:32 +02:00
xXPBSXx 66165443c0 feat(libSceCesCs): add sceCesRefersUcsProfileCp1251 and sceCesMbcsUcsContextInit
PPSA15246 (Teardown) imports both from the module-named libSceCesCs-module and
stops at the loader without them. Cp1251 joins Cp1252 in sceCesSbcToUtf8 and
sceCesUtf8ToSbc; the context initializer succeeds without storing anything
because its layout is unknown (listed in TechnicalDebt.md).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 16:20:47 +02:00
EdouardSence b4b2e8843a docs(TechnicalDebt): list sceRazorCpuPushMarker under silent stubs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:59:53 +02:00
Scramblrrrr 363d17985e fix(relinker): lower legacy packed reciprocal register instructions 2026-10-11 10:58:14 -03:00
Ahir 48dcaace78 fix(shader): lock recompiler shared mutexes once when created
winpthreads initializes a statically initialized rwlock on its first
lock and fails a concurrent first lock with EINVAL, which
std::shared_mutex ignores, so two threads can hold the lock at once.
The source, binding plan and specialized module caches take their
first locks from several threads, so their mutexes now take and
release the lock in their constructor, as guest rwlocks do.

The GuestWriteWatch mutex the technical debt entry also named is in
the Linux-only watch, so it is not affected.
2026-10-11 19:22:13 +05:30
Sanjaysrinivas 3d31a8464a fix(agc): reclaim idle buffers on allocation OOM 2026-10-11 15:50:46 +02:00
pushkarreddyy c3db0b0d15 perf(libSceAgcDriver): cap draw input snapshot allocation size
In #3338, Ratchet & Clank: Rift Apart (PPSA01474) hits a 36 GB / 5 s
memcpy stall at frame ~380 right after intro logos because the GPU
worker thread is blocked copying multi-gigabyte storage buffers on every
draw snapshot miss (specifically a 3.01 GiB streaming range
0x118f800000+0xbc200000 and a 232 MiB range 0x1171258040+0xe7fffc0
across 130,000 draws).

ShaderResources::PrepareDrawBindings now caps both per-allocation and
cumulative draw input buffer snapshot copies at 64 MiB by default,
overridable via APS5_DRAW_SNAPSHOT_MAX_MIB. Inputs exceeding the threshold
skip snapshotting and bind directly in place, preventing multi-gigabyte
memory copies while preserving standard small uniforms and draw arguments.
Budget allocation prioritises earlier descriptor bindings in deterministic
pipeline layout order.

Adds drawSnapshotCapTests in core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
verifying individual and cumulative capping, cross-platform cache behavior on
watched and compared hosts, and direct observation of subsequent CPU writes
on in-place bound ranges exceeding the cap. Exercised via --draw-snapshot-cap-only
registered as agc_draw_snapshot_cap in libSceAgcDriver/CMakeLists.txt.
2026-10-11 19:11:56 +05:30
Josip Parlov 93f5220d11 refactor(audioin): name X+4jdIS75P0 sceAudioInIsPadEmbeddedMic 2026-10-11 15:36:25 +02:00
Josip Parlov 265c982eaa refactor(agc): name zARR5aCmkoY sceAgcDcbAtomicGds_0900 2026-10-11 15:33:55 +02:00
MarcZX100 afcaf91019 test(agc): cover hand-built VGPR register offset 2026-10-11 13:32:20 +00:00
Hannah Lyons 81e3e34637 test(libScePosixForWebKit): pin fnmatch bracket class syntax to FreeBSD 11 2026-10-11 09:31:23 -04:00
EdouardSence 95a92f35e1 feat(libSceJson2): add sce::Json::Parser::parse with a read callback
PPSA04540 (Rise of the Ronin) imports it. The characters the callback
returns are parsed as by the (text, size) overload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:28:58 +02:00
Adelmo Junior 5334bd178c fix(libSceHttp): retain authority delimiter for partial URI builds 2026-10-11 10:28:39 -03:00
JAB-dev 61a9f5dc14 feat(agc): render 1_5_5_5 UNORM color targets
CB_COLOR_INFO format 17 with UNORM and the standard component swap renders
into VK_FORMAT_A1R5G5B5_UNORM_PACK16, whose attachment and blend support
Vulkan requires. AMD keeps X in the low bits and Vulkan keeps R in the
high bits, so the exports are mapped with X and Z exchanged and the stored
bits follow the guest layout. PPSA06699 renders into this format.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 15:21:46 +02:00
Sanjaysrinivas 1fe527bbec fix(agc): route registered NGG workgroups
Defer registered NGG workgroup preparation until routing is known. Share the routing decision with static ABI resolution and draws. Gate the wave64 fixture on supported mesh subgroups; retain device-independent routing coverage.
2026-10-11 15:20:24 +02:00
DariusHQ bad19037a6 feat(libkernel): implement sendfile
PS5MC (PPSA99420) stops at start-up on sendfile. It follows FreeBSD 11:
headers, the file range and trailers go to a connected stream socket, the
file offset does not move, a non-blocking socket fails with EAGAIN after
a partial send, and *sbytes reports what was sent. The checks and the
point where *sbytes is written follow kern_sendfile.c.
2026-10-11 16:19:13 +03:00
DariusHQ b9fc448343 fix(libc): format positional arguments on Windows
The guest formatter threw on %n$ and *m$, which FreeBSD's vfprintf and
glibc accept. It now reads the arguments a numbered format names into a
table first, with the types their conversions give them, and follows
FreeBSD's rules for unnumbered conversions and unnamed arguments.
2026-10-11 16:19:13 +03:00
DariusHQ d9fe7ee614 fix(libc): accept the ' flag in Windows formatting
FreeBSD's vfprintf takes ' as the thousands-grouping flag. The Windows
formatter threw on it as an unsupported conversion. The guest's setlocale
only accepts the C locale, which has no thousands separator, so the flag
changes nothing: it is dropped before the host's printf sees it, and the
host's locale cannot add separators.
2026-10-11 16:19:12 +03:00
David 88cd5bbde5 fix(libSceAgc): accept a hand-built GE_USER_VGPR register offset in sceAgcCreatePrimState
EVO Player (PPSA99039), Jelly5 (PPSA99505), Emby5 (PPSA99515) and
Nuvio PS5 (PPSA99997) stop on main 0f863c10 with

  what():  sceAgcCreatePrimState: invalid user configuration register offsets

All four build their shader headers by hand (EVO-PLAYER-PS5
evo_agc_shader_header.c, ported from ps5-xash3d-halflife) and store the
ge_user_vgpr_en special at 0x25c (GE_USER_VGPR1, value 0) instead of
0x262 (GE_USER_VGPR_EN), as analysed in #3457. They run on the console.

OpenAGC's reconstruction of the FW 5.50 sceAgcCreatePrimState
(src/game_compat.c at 3c7e8072) copies the four special register pairs
verbatim without checking their offsets; KytyPS5's offset checks
(src/libs/agc.cpp at 16a7fe68) are EXIT_NOT_IMPLEMENTED guards. The
special is now copied at the offset the header stores, not moved to
0x262; the driver reads neither register. GE_CNTL, VGT_SHADER_STAGES_EN
and a used VGT_GS_OUT_PRIM_TYPE are still required at their own
offsets because the driver reads them there, and the error now names
the special and the offset found.

With the change all four titles get past sceAgcCreatePrimState and stop
in the shader recompiler (GetImageResource dword 3 is not a valid
runtime value), as #3457 reported for EVO Player.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit aeaa5080d9595305aa73e74d966f989c88b79839)
2026-10-11 13:19:03 +00:00