2305 Commits
Author SHA1 Message Date
Dean a3aeaf884b Merge pull request #5608 from hossiendehghan989/fix/videoout-unknown-nid-ynw9xk5inwo
fix(libSceVideoOut): export unknown Onimusha import NID
2026-10-14 20:17:13 +13:00
Dean 3152609030 Merge pull request #5454 from mohammad-alosta/feat/libc-swprintf-s
feat(libc): implement swprintf_s
2026-10-14 20:12:15 +13:00
hossiendehghan989 5dc7111924 fix(libSceVideoOut): export unknown Onimusha import NID 2026-10-14 20:04:08 +13:00
Dean d8888df9b2 Merge pull request #5075 from SandstromPL/fix/ajm-opus-mono-family-255
fix(ajm): accept Opus mapping family 255 for a mono stream
2026-10-14 19:38:43 +13:00
Dean 4a34ebd5fa Merge pull request #4962 from fdfawef324/feat/libScePad-unknown-zBsgF0q8DIM
feat(libScePad): declare the unknown import zBsgF0q8DIM
2026-10-14 19:38:31 +13:00
Dean f87799aa3a Merge pull request #5061 from p3n1cillin/claude/getdtablesize
feat(libkernel): add getdtablesize
2026-10-14 19:33:57 +13:00
Dean d000959a6c Merge pull request #5313 from Raghav314/perf/agc-msaa-fill-host-only
perf(agc): do not store a compute fill a multisampled target takes as its clear
2026-10-14 19:28:50 +13:00
Dean a94675fb17 Merge pull request #5039 from YossiYad/fix/agc-sample-array-target-layer
fix(agc): sample a slice-0 array color target as a 2D texture through its image
2026-10-14 19:20:40 +13:00
Dean bfad46ed30 Merge pull request #4878 from nikowolf123/perf/windows-import-hint
perf(agc): compare Windows direct imports only after a write-watch mark
2026-10-14 19:20:14 +13:00
Dean a308b823d6 Merge pull request #5366 from codingreapermaps/feat/convert-keycode-get-character
feat(libSceConvertKeycode): implement sceConvertKeycodeGetCharacter for the US layout
2026-10-14 19:17:43 +13:00
Dean 043f420c87 Merge pull request #5348 from MathiasDevelopes/codex/pr-fiber-active-stack-range
fix(fiber): report the stack used by the executing fiber
2026-10-14 19:17:16 +13:00
Dean 591d39c393 Merge pull request #5005 from fdfawef324/feat/recompiler-aperture-source-values
feat(recompiler): read the scalar aperture sources as values
2026-10-14 19:16:56 +13:00
Dean 6546a33944 Merge pull request #4728 from Ondra97/codex/fix-fdopen-access-mode
fix(libc): reject incompatible fdopen access modes on Windows
2026-10-14 19:06:55 +13:00
Dean ea53213fd4 Merge pull request #4674 from zaydzaari/research/kernel-system-version-size-1342
fix(libkernel): accept measured system version record values
2026-10-14 19:06:34 +13:00
Dean 9858d27be7 Merge pull request #4673 from milescoviello/fix/scenet-msg-dontwait
fix(libSceNet): accept MSG_DONTWAIT in the send and receive calls
2026-10-14 19:06:13 +13:00
Dean f38b70b5e8 Merge pull request #4777 from MarcZX100/codex/ngs2-patch-to-rack-4334
fix(ngs2): resolve voice patches to rack handles
2026-10-14 19:05:53 +13:00
Yossi Yadgar 70d7497a27 docs(debt): note the array layer views of slice-0 color targets 2026-10-14 18:56:46 +13:00
NikoandClaude Opus 5.5 83787e692a perf(agc): compare Windows direct imports only after a write-watch mark
On Windows every direct host import leaves the write watch, and a storage
image over it compares its whole surface with its guest-byte copy at every
collect epoch. #4432 measured 7-8.6 s of every 10 s in those compares on a
GTA V scene, with 98% of the compared surfaces unchanged.

Tracker blocks that leave the watch now keep their write-watch marks as a
hint. Leaving the watch gives a block a fresh hint stamp, and
UntrackedHint walks a range of such blocks, at most once per collect epoch
and thread, stamping the blocks whose pages a CPU store marked; it
returns the newest stamp of the range. compareUntracked puts that stamp in
its memo key in place of the collect epoch, so an image is compared again
after a mark in its range, a driver store, a mapping change or a recorded
GPU write. The byte compare still decides whether anything changed: a mark
the driver makes without a CPU store costs one compare and drops nothing.
Nothing else reads the hint. Collects, Watched, UnchangedSince,
ChangedBlocks and NewestStamp still treat those blocks as untracked, and
Linux is unchanged.

agc_driver_dcc_keys_first_write refreshes an imported storage image over
50 collect epochs with no store: it compared the image 50 times before and
0 times now. A CPU store is still uploaded on the next refresh, and a store
of the bytes already there costs one compare and keeps the pending
results. agc_write_tracking checks the hint itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:56:27 +13:00
Dean e46c695054 Merge pull request #5657 from oneandonlydean/fix/storage-save-at-unwatch
fix(agc): save the guest bytes of pending storage results when their range leaves the write watch
2026-10-14 18:23:11 +13:00
Dean c9ee728a7c Merge pull request #3925 from eliasbruno124-dev/fix/http2-direct-wait
fix(http2): allow completion waits without an event queue
2026-10-14 18:19:42 +13:00
Dean ac35f596cc Merge pull request #5193 from 0xRickx/fix/libsceopusdec-narrowband
fix(libSceOpusDec): decode narrowband SILK packets
2026-10-14 18:12:32 +13:00
Dean d4efd33978 Merge pull request #4895 from fdfawef324/feat/agc-index-attributes-indirect
feat(agc): execute INDEX_ATTRIBUTES_INDIRECT (PM4 0x91)
2026-10-14 18:12:18 +13:00
Dean Galvin db4fd5f29c fix(agc): take the GPU lock when saving pending storage results before the range leaves the write watch
A draw made outside the GPU lock (agc_driver_recorded_kept_bytes) imports a target's memory and leaves the watch there; the hook threw instead of saving. It now takes the lock, as FlushPending does.
2026-10-14 18:04:20 +13:00
Dean 75690a117e Merge pull request #4237 from MarcZX100/codex/carry-fixed-base-3043
fix(relinker): load Windows executables at a fixed low base
2026-10-14 17:49:45 +13:00
Dean Galvin e56a7c2351 fix(agc): save the guest bytes of pending storage results when their range leaves the write watch
On Windows, singly mapped direct memory is private since #5596, so its host
import is a direct import that leaves the write watch instead of a shared
alias that stays watched. A storage image whose results were pending when
its memory was imported had no saved guest bytes, and storing them threw.

GuestMemory now calls a hook before Unwatch and before an ImportWatched
that does not stay watched. Every image with results pending over the
range saves the guest bytes of its pending units that have none, then
collects and records the pieces the keep rule leaves to the CPU for the
writes the watch saw. The next store and Refresh leave those pieces to the
CPU and compare the rest with the saved bytes. A map-time import made
without the GPU lock is deferred to the locked retry when pending results
overlap the range.
2026-10-14 17:43:41 +13:00
Dean Galvin bf6b6c0a17 docs(relinker): describe fixed-base default for Windows executables 2026-10-14 17:39:48 +13:00
Dean ee50655414 Merge pull request #5109 from pushkarreddyy/feat/libkernel-foreign-module-protect
feat(libkernel): support sceKernelMprotect on foreign guest module images on Windows
2026-10-14 17:26:42 +13:00
Dean 718ae1355c Merge pull request #4903 from ErenYeager1836/carry/fstat-guest-socket
fix(libkernel): report socket status from fstat on a guest socket
2026-10-14 17:26:23 +13:00
Dean 1c95691fb5 Merge pull request #5290 from veosett/codex/allocator-failure-results
fix(libc): return allocation failures to guest callers
2026-10-14 17:26:13 +13:00
Dean 6fad06c19e Merge pull request #4669 from milescoviello/fix/scenet-unspec-disconnect
fix(libSceNet): dissolve a datagram association on connect to AF_UNSPEC
2026-10-14 17:25:39 +13:00
Dean 6ed374413e Merge pull request #4681 from milescoviello/fix/alias-trailing-slash
fix(libc): keep a trailing slash on paths under a mount alias
2026-10-14 17:25:15 +13:00
ThatsLeo 9828710a38 feat(videoout): implement sceVideoOutGetOutputStatusWithVrr
Writes the 80-byte status described in #2746: the sceVideoOutGetOutputStatus
fields followed by zeros, with the documented codes for a null status and an
unknown handle.

(cherry picked from commit e893efad2d0a7b90243d07bf6669cc9b5f540432)
2026-10-14 16:37:40 +13:00
Dean a14ae8e232 Merge pull request #5186 from p3n1cillin/claude/carry-fioclex
fix(libkernel): handle FIOCLEX and FIONCLEX in ioctl
2026-10-14 16:31:08 +13:00
Dean f5cda839ec Merge pull request #4717 from Ondra97/codex/fix-relro-unused-filter
fix(relinker): map standalone RELRO in unused import filtering
2026-10-14 16:05:01 +13:00
milescovielloandClaude Opus 5.5 472437a703 fix(libkernel): report socket status from fstat on a guest socket
fstat on a guest socket descriptor passed the guest number to the host,
which has no such descriptor, and threw ("FillFileStat: fstat failed for
fd 268435460"); sceKernelFstat returned EBADF. FreeBSD fills the stat
buffer for a socket through soo_stat (sys/kern/sys_socket.c):

	bzero((caddr_t)ub, sizeof (*ub));
	ub->st_mode = S_IFSOCK;
	...
	if ((sb->sb_state & SBS_CANTRCVMORE) == 0 || sbavail(sb))
		ub->st_mode |= S_IRUSR | S_IRGRP | S_IROTH;
	ub->st_size = sbavail(sb) - sb->sb_ctl;
	...
	if ((sb->sb_state & SBS_CANTSENDMORE) == 0)
		ub->st_mode |= S_IWUSR | S_IWGRP | S_IWOTH;

and pru_sense_null (sys/kern/uipc_socket.c) adds
st_blksize = so->so_snd.sb_hiwat.

fstat and sceKernelFstat now answer a guest socket from the socket
table: S_IFSOCK, the read bits until the receive side is shut down and
drained, the write bits until the send side is shut down, st_size from
the bytes queued and st_blksize from the send buffer size, other fields
zero. shutdown records which side it closed. A closed socket descriptor
returns EBADF. The differences from the console (peer shutdown, the
host's FIONREAD and SO_SNDBUF, socketpair identity) are listed in
TechnicalDebt.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:34:16 +05:30
Dean Galvin 46989a7d8a docs(libkernel): keep the memory protection bits entry 2026-10-14 16:00:06 +13:00
milescovielloandClaude Opus 5.5 65d56b3147 fix(libSceNet): dissolve a datagram association on connect to AF_UNSPEC
sceNetConnect() on a connected datagram socket rejected an address
whose family is AF_UNSPEC (a null address) with EINVAL before touching
the socket, so the socket stayed connected: sceNetGetpeername() still
reported the old peer and datagrams from any other sender were dropped
by the host.

FreeBSD 11.4 disconnects a connected datagram socket first and only then
looks at the address. sys/kern/uipc_socket.c, soconnectat():

	 * If protocol is connection-based, can only connect once.
	 * Otherwise, if connected, try to disconnect first.  This allows
	 * user to disconnect by connecting to, e.g., a null address.
	 */
	if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING) &&
	    ((so->so_proto->pr_flags & PR_CONNREQUIRED) ||
	    (error = sodisconnect(so)))) {

udp_disconnect() (sys/netinet/udp_usrreq.c) clears the peer and keeps
the local port. connect(2): "Datagram sockets may dissolve the
association by connecting to an invalid address, such as a null
address." libkernel's connect gets the same change in #4498.

A connected datagram socket given an address whose family byte is 0 is
now disconnected on the host first (AF_UNSPEC on Linux, a zeroed
address of the socket's family on Windows), and the call then fails
with EINVAL as before. Linux also drops an ephemeral local port on that
disconnect, so the port is bound again on the wildcard address, which
is what FreeBSD leaves. A host failure during the disconnect is
returned as the call's error. Stream sockets keep the previous path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 02:58:42 +00:00
Dean f265cd5593 Merge pull request #5234 from AnthonyClemens/fix/agc-integer-tessellation-partitioning
fix(agc): accept integer tessellation partitioning
2026-10-14 15:55:50 +13:00
Dean 970316ae04 Merge pull request #4704 from AlxcBTW/feat/input-mouse-look
feat(input): turn mouse speed into a smooth right-stick tilt
2026-10-14 15:55:08 +13:00
Dean fcb30fd977 Merge pull request #5219 from pushkarreddyy/feat/agc-dcb-event-write-address
feat(libSceAgc): ignore address argument on non-sample-dump events in sceAgcDcbEventWrite
2026-10-14 15:54:22 +13:00
Dean 0fb2f6c89a Merge pull request #4988 from babyhuey/feat/scenet-so-error
fix(libSceNet): report SO_ERROR from sceNetGetsockopt
2026-10-14 15:53:49 +13:00
Dean 3e4fe4ce31 Merge pull request #5596 from tibzejoker/port/pr-637-main
fix(libc): track writes to singly mapped direct memory without faults on Windows
2026-10-14 15:53:44 +13:00
pushkarreddyy 516b06f945 feat(libkernel): support sceKernelMprotect on foreign guest module images on Windows 2026-10-14 08:19:25 +05:30
Dean d1b3aa1372 Merge pull request #5195 from SandstromPL/fix/relinker-sce-code-analysis-extent
fix(relinker): keep code analysis inside the code extent of PS4 executables
2026-10-14 15:49:02 +13:00
Dean a7836b1495 Merge pull request #5094 from bubblegg/fix/savedata-save-size
fix(savedata): report a save's size as the mount that created it gave
2026-10-14 15:47:32 +13:00
Dean 94f96c8e2c Merge pull request #5255 from Nesyth/fix/libkernel-apr-read-past-eof-v2
fix(libkernel): zero-fill APR reads that reach the end of the file
2026-10-14 15:44:14 +13:00
Dean a21d73733c Merge pull request #5133 from SandstromPL/fix/savedata-search-other-title
fix(savedata): return no saves for a search with another title's ID
2026-10-14 15:41:58 +13:00
fdfawef324andClaude Opus 5.5 dd3c13ffd7 feat(agc): execute INDEX_ATTRIBUTES_INDIRECT (PM4 0x91)
The driver had no handler for the PFP INDEX_ATTRIBUTES_INDIRECT packet,
so a submission with it threw "opcode is not known in the reference".
The packet now reads the 16-byte record at attribute_base +
attribute_index * 16 when it executes and loads INDEX_BASE,
INDEX_BUFFER_SIZE and INDEX_TYPE from it as the direct packets do.
The packet encoding follows PAL's BuildIndexAttributesIndirect and the
record layout PAL's IndexAttribIndirect (gfx9Chip.h, c5e80007).
indirect_mode 1, reserved bits and record index types above 3 throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:41:57 -04:00
fdfawef324andClaude Opus 5.5 babc68df74 feat(libScePad): declare the unknown import zBsgF0q8DIM
PPSA03671 fails to load because no library exports NID zBsgF0q8DIM from
libScePad. The NID database has no name for it and no candidate pad name
hashes to it, so it is exported under its NID as
scePadUnknown_zBsgF0q8DIM, declared without parameters, and throws when
called. Adds an Unknown function info entry to the libScePad debt file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:40:37 -04:00
fdfawef324andClaude Opus 5.5 dc1c12a612 feat(recompiler): read the scalar aperture sources as values
Reading src_shared_base, src_shared_limit, src_private_base or
src_private_limit (scalar source codes 235-238) refused the shader since
#1940, because their values were unknown. They now read as the 64-bit
apertures that the flat routing from #1190 classifies: a base is the
aperture's high dword over a low dword of 0, a limit is the same high
dword over 0xffffffff (shared 0x80000000, private 0x70000000).

A 64-bit read (s_mov_b64, a 64-bit VALU source, a wave64 lane mask)
gets the whole value and a 32-bit read gets the low dword. A flat
pointer built from the high dword therefore reaches LDS or scratch, and
64-bit compares against the limits order as on the hardware. The flat
routing and the reads share one definition of the two high dwords.

Sources: LLVM SIRegisterInfo.td (aperture registers are 64-bit, their
low 32 bits are always 0 for a base and -1 for a limit) and
getSegmentAperture in AMDGPULegalizerInfo.cpp and SIISelLowering.cpp
(a 64-bit read whose high half is the aperture); the RDNA 2 ISA guide,
sections 5.2, 5.8 (SH_MEM_BASES holds 16-bit bases) and 9.3; the KFD's
MAKE_LDS_APP_LIMIT (limit = base | 0xffffffff); the gfx1030 and gfx1035
readouts on #1190 and #3803. The PS5's two high dwords stay inferred,
as the shader technical debt records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:39:49 -04:00