Commit Graph
7963 Commits
Author SHA1 Message Date
orezraeyandClaude Opus 5.5 aee2004a9c Merge main into fix/libkernel-sync-on-address-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 11:56:06 -03:00
KernelPanicNT 0858e024fb feat(libkernel_sys): implement lchmod
lchmod forwards to fchmodat with AT_FDCWD and AT_SYMLINK_NOFOLLOW, as
FreeBSD 11.4's sys_lchmod does. On Linux and Windows, which cannot change
the mode of a symbolic link itself, a symbolic link throws instead of
succeeding without a change.
2026-10-21 14:54:33 +00:00
fma-rc b069757f4e fix(tools): keep TLS symbols out of the code map, validate relocation tags and disassemble every executable segment 2026-10-21 16:52:05 +02:00
SimoneandClaude Opus 5.5 7129b6956b feat: run the common-dialog state machine in four dialog libraries
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:49:52 +02:00
fma-rc 72f397a374 feat(tools): name a relinked module's imports, stubs and exports in its disassembly 2026-10-21 16:46:55 +02:00
thuanquangandClaude 0bd8f6188a fix(agc): draw triangle strips through a geometry program with the last provoking vertex
An RX 6700 XT hands a geometry shader odd strip triangle i as
(i+1, i, i+2) with the last provoking vertex, which is the order the
translator already uses, and since #7374 last mode takes the flat
outputs of the program's primitives from their last index. Keep the
last-mode refusal for fans only, which reach the program as
(i+1, i+2, 0) while the hardware gives (0, i+1, i+2). TEKKEN DARK
RESURRECTION (PPSA31371) stops on such a strip draw.

Co-Authored-By: Claude <[email protected]>
2026-10-21 21:41:01 +07:00
NikoandClaude Opus 5.5 27c3f6ba2d feat(libSceCesCs): add 27 single-byte code page profiles
sceCesRefersUcsProfile threw for every code page except 1250, 1251 and
1252. Twenty-seven more now return a profile that sceCesSbcToUtf8,
sceCesUtf8ToSbc and the MBCS context conversions accept: ISO 8859-1,
-2, -4, -5, -9, -10, -13, -14, -15 and -16, code pages 437, 737, 775,
850, 852, 855, 860, 861, 862, 863, 865 and 866, KOI8-R, KOI8-U and
Windows 1254, 1256 and 1258.

SingleByte.hpp holds the high half of each table, taken from the
public mapping files at unicode.org: ISO8859, Microsoft's PC tables,
VENDORS/MISC for KOI8 and Microsoft's best-fit tables for 1254, 1256
and 1258, the same source and derivation as the existing Cp1250 table,
whose high half equals bestfit1250's byte table. Bytes 0x00-0x7F are
unchanged in all of them, and every table maps its 256 bytes to 256
distinct BMP characters. The three existing profiles keep their
tables; one lookup now serves them all.

Profiles whose public table leaves bytes undefined (ISO 8859-3, -6, -7,
-8, -11, code pages 857, 864, 869), maps bytes to private use (874,
1253, 1255, 1257) or has no public table here still throw.

guest_ces checks that each new profile is a distinct, stable pointer,
four bytes per table against the source, a round trip of every byte
through sceCesSbcToUtf8 and sceCesUtf8ToSbc, UNASSIGNED_CODE for a
character outside the table, and a KOI8-R string through an MBCS
context in both directions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:36:05 +02:00
dantdmdarealguy 38f8c806b7 docs(build): run the Python tools with python or py -3 on Windows 2026-10-21 09:28:38 -05:00
NikoandClaude Opus 5.5 d16be88e39 feat(libSceAudioOut): return 0 from sceAudioOutSetMainOutput like the firmware stub
sceAudioOutSetMainOutput threw "not implemented". In firmware 12.70
the export is `xor eax,eax; ret` (PS5-Audio-Passthrough-Research,
docs/FINDINGS.md line 25 at cf3c921): it reads no argument, changes
nothing and returns 0. It now does the same, defined in AudioOut.cpp
next to the Sys output calls.

Its parameters stay unknown and other firmware versions are
unverified. The debt file records this under Silent stubs, which
check_conventions requires for an export that returns a constant,
in place of the function's unknown-signature line.

The audio_out_sys test checks that the call does not throw and
returns 0; on main both checks fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:25:58 +02:00
NikoandClaude Opus 5.5 673ff23c5b feat(libkernel_sys): export _openat
_openat now opens files as openat does. It reads the mode argument only
when O_CREAT is set, as openat and _open do, and calls openat with the
same descriptor, path, flags and mode, so it returns the same
descriptors and errors.

The PS5 3.20 libkernel_sys export list (DNNDHH/PS5-3.20_Libs) has
_openat, NID bGVEgWXy6dg, as well as openat (A8Yk5AhNDck). In FreeBSD
11.4, _openat is the openat system call stub (lib/libc/sys/Makefile.inc,
amd64/SYS.h) and only libthr's openat adds a cancellation point
(thr_syscalls.c). openat here is not a cancellation point, so
forwarding to it leaves _openat without one, as in FreeBSD.

The openat debt entry now names _openat and no longer says that
O_NOFOLLOW is ignored: open, and so openat, has returned EMLINK for
O_NOFOLLOW on a symbolic link since 9421484572.

The kernel_sys test opens a file through a directory descriptor with
_openat and reads it back, creates one with O_CREAT, O_EXCL and mode
0600, checks outside Windows that it has mode 0600, reopens it for
writing, and checks EEXIST, EINVAL, EBADF and ENOTDIR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:25:53 +02:00
NikoandClaude Opus 5.5 3e1b0f5aa4 feat(libSceLibcInternal): export __inet_ntoa_r
The PS5 3.20 export inventory of libSceLibcInternal lists
__inet_ntoa_r next to inet_ntoa_r, and no AnyPS5 library exported it,
so a title importing it could not resolve it. It now runs inet_ntoa_r:
FreeBSD 11.4's arpa/inet.h names the function __inet_ntoa_r, and
inet_ntoa.c makes inet_ntoa_r a weak alias of it.

__inet_addr, __inet_aton and __inet_ntoa are in the same inventory,
but libc already exports them and the relinker also looks up
libSceLibcInternal imports in libc, so they are not added here.

guest_inet_address formats an address through __inet_ntoa_r into a
buffer of exactly the text's size, and checks that a buffer one byte
short is returned unchanged with ENOSPC and that inet_ntoa's buffer is
left alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:25:51 +02:00
hypermistandClaude Opus 5.5 44cc6ecb12 fix(libs): return what the firmware returns from 29 more calls it does not implement
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 03:15:51 +13:00
Dean 2c4b116da9 Merge pull request #7729 from milescoviello/fix/one-sample-depth-iter
fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample depth target
2026-10-22 03:14:54 +13:00
Maz f638400709 fix(savedata): queue conversion completion events 2026-10-21 18:07:54 +04:00
orezraeyandClaude Opus 5.5 038d9a97d7 fix(libSceAgcDriver): return the console's workload stream registration errors
Measured on firmware 13.60: registering an id outside 1 to 31 or one
already registered returns 0x8a6c0033, checked before a null stream,
which returns 0x8a6c0035; unregistering an id outside 1 to 31 returns
0x8a6c0033 and one that is not registered 0x8a6c003a.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 11:06:19 -03:00
Adrià f90a3f7297 Merge pull request #8523 from MarrasFederico/feat/kqueue-read-on-kqueue
feat(libkernel): watch a kqueue with EVFILT_READ
2026-10-21 16:03:30 +02:00
SebastianandClaude Opus 5.5 9497840de5 feat(libkernel): implement named POSIX semaphores
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QnkpF2oEMofseVz9Z7WEAC
2026-10-21 13:58:38 +00:00
Federico Marras 3c242fdd81 feat(libSceNgs2.native): map ATRAC9 waveform blocks as the module does in sceNgs2CalcWaveformBlock 2026-10-21 15:57:30 +02:00
Adrià 663de1ab21 Merge pull request #8516 from Felipebmaitan/feat/rudp-context-options
feat(libSceRudp): retain and query context options
2026-10-21 15:56:00 +02:00
Adrià 1b5d7021a3 Merge pull request #8471 from NoOverflow/feat/libSceNpAuth-a-variants
feat(libSceNpAuth): implement sceNpAuthGetAuthorizationCodeA and sceNpAuthGetIdTokenA
2026-10-21 15:52:56 +02:00
Adrià 145223c440 Merge pull request #8488 from orezraey/feat/playgo-set-language-mask
feat(libScePlayGo): store the language mask scePlayGoSetLanguageMask sets
2026-10-21 15:52:50 +02:00
Daniele Giovane f6d0623216 feat(libkernel_sys): implement pthread attribute and initial-thread queries 2026-10-21 15:50:39 +02:00
Evgeniy KazarinandClaude Opus 5.5 d6e270ea9f fix(libc): stop write-protecting resident runs on Windows
A clean resident run was made read-only so that the next collect
could skip GetWriteWatch, and the first guest store into it was
resumed on the guest thread. The exception frame Windows builds for
that fault overwrites the System V red zone below rsp (#361), which
is what #5596 removed for singly mapped direct memory. Resident runs
are now never armed and are collected with GetWriteWatch only.

Refs #9136

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 21:43:56 +08:00
orezraeyandClaude Opus 5.5 39cc6af2b1 fix(libkernel): compare the search start before rounding it
Measured on firmware 13.60: a start whose rounding to 16 KiB overflows
finds nothing, and of two equal free ranges the lowest is returned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 10:41:28 -03:00
Federico Marras 9cde6f6fb5 Merge remote-tracking branch 'upstream/main' into feat/ngs2-calc-vag-block 2026-10-21 15:41:02 +02:00
orezraeyandClaude Opus 5.5 4319a7a5e7 fix(libkernel): match sceKernelAvailableDirectMemorySize arguments to PS5
Measured on firmware 13.60: an alignment that is not zero or a power of
two returns EINVAL before anything else; bounds with nothing between
them return ENOMEM, a negative start searches from the bottom, only the
start is rounded up to 16 KiB and the end is used as given; null outputs
are skipped; errors leave both outputs untouched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 10:39:19 -03:00
KernelPanicNT 9f5640af66 fix(libSceNgs2): return the custom rack creation errors
sceNgs2RackCreate and sceNgs2RackCreateWithAllocator now return the firmware's errors for a custom rack whose buffer count is outside 1 to 4 or below the submixer's max_inputs, whose module buffer id is at or above the count, or whose submixer has more than 37 channels, and for the state sizes of the Gain, Reverb and PitchShift modules, the Reverb option size and word, and the PitchShift option word. Racks that pass these checks with one of these modules or Convolution, with more than one buffer, more than 8 channels or a submixer max_inputs other than 1 or 2 still throw, and so does sceNgs2RackQueryBufferSize for the rejected options.
2026-10-21 13:35:52 +00:00
Adrià 80565c5942 Merge pull request #8431 from juanpimg/feat/prx-declare-ps5-3.20-exports-tier2
feat(prx): declare the missing PS5 3.20 system exports in the next tier of libraries
2026-10-21 15:32:51 +02:00
Adrià 1ae3f38d9e Merge pull request #8400 from slider/feat/libkernel-mutex-np
feat(libkernel): add mutex ownership, relative lock and spin/yield accessors
2026-10-21 15:32:34 +02:00
Federico Marras 428cd4e3ee feat(libSceNgs2.native): parse 8-, 24- and 32-bit PCM and float waveforms 2026-10-21 15:32:32 +02:00
Adrià f62069e840 Merge pull request #8363 from MarrasFederico/feat/video-recording-p-status
feat(libSceVideoRecordingP): report a recorder that is never open in sceVideoRecordingGetStatus
2026-10-21 15:32:27 +02:00
Adrià 5bd9912658 Merge pull request #8317 from hypermoist/feat/agc-static-buffers
feat(libSceAgc): implement static buffers and qwords
2026-10-21 15:32:19 +02:00
Federico Marras 2e706ed2e1 feat(libSceNgs2.native): map VAG waveform blocks in sceNgs2CalcWaveformBlock 2026-10-21 15:28:54 +02:00
Federico Marras 4fb70223dd fix(libSceNgs2.native): report one ATRAC9 frame as the parsed decoder delay 2026-10-21 15:26:05 +02:00
SimoneandClaude Opus 5.5 c020ce8934 feat(libSceCesCs): implement generic MBCS character, Shift-JIS code and JIS X 0213 helpers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:24:37 +02:00
SimoneandClaude Opus 5.5 f974e91f08 feat(libSceCesCs): convert GBK and EUC-CN through the CP936 table
Add the GBK (CP936) and EUC-CN profiles, their scalar conversions to
and from UTF-8, UTF-16, UTF-32 and UCS-2, and accept both profiles in
the MBCS string conversions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:24:24 +02:00
SimoneandClaude Opus 5.5 79fe0b903c feat(libSceCesCs): add UTF-16 and UTF-32 forms of the SBC and MBCS string conversions
Implement sceCesSbcTo{Ucs2,Utf16,Utf32}* and their inverses, and the
UTF-16 and UTF-32 MBCS string conversions and length queries, on the
existing single-byte, CP932 and CP51932 profiles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:23:56 +02:00
simonbronkandClaude Opus 5.5 3990593a19 feat(libSceCesCs): implement Shift-JIS and EUC-JP scalar conversions
Implement the single-character conversions between the CP932 and
CP51932 profiles and UTF-8, UTF-16, UTF-32 and UCS-2 in both
directions, and the Shift-JIS to JIS X 0208 row/cell arithmetic.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:23:34 +02:00
orezraeyandClaude Opus 5.5 c416e3aca3 feat(libkernel): implement shared event flags and sceKernelCloseEventFlag
Measured on firmware 13.60: attribute 0x100 makes a flag openable by
name, and only such flags can be opened. Each open returns a new handle
on the same flag, which sceKernelCloseEventFlag releases. Closing a
creator handle and deleting through an opened one return EPERM. Two live
shared flags cannot share a name, names of 32 or more bytes return
ENAMETOOLONG, and a missing name returns ESRCH. After the creator
deletes the flag, an opened handle polls and waits with EACCES and sets,
clears and cancels with no effect.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 10:17:32 -03:00
1a74a6cdd9 fix(shader): keep a v_writelane lane known across computed-index window stores
fdfawef324 notes that current LLVM spills SGPRs into VGPRs it allocates like any other
register, so one window register can be an ordinary register early in a
program and hold spill lanes later. ReadLaneEliminator only followed a
spilled lane across M0-indexed window stores for slots never used as
ordinary registers, so RESIDENT EVIL 4 (PPSA07411) and LEGO Horizon
Adventures (PPSA14632) kept their reloaded descriptors as run-time
values and stopped. A known lane can only come from a v_writelane chain,
so keep it across a computed-index store instead; a constant-index store
of the slot still ends the spill. This is fdfawef324's suggestion on
#6277.

That such a store misses the spill cannot be proven for these programs,
so it is checked at run time where a replaced read depends on it: a
backward liveness over each slot and lane whose known value a replaced
read used puts a WindowLaneGuard before every computed-index store at
which that lane is live, and the guard records a WindowLaneSpill fault
when the store changes that lane of the slot. The driver reads the fault
buffer back for every program with such a guard and reports the dispatch
or draw as failed, so a broken assumption is no longer silent. This also
covers the pure spill slots main already folds.

Co-authored-by: fdfawef324 <[email protected]>
Co-Authored-By: Claude <[email protected]>
2026-10-21 20:17:08 +07:00
JJenkx 4f76eb75ce feat(agc): apply register and exported sizes to mesh points 2026-10-21 09:13:32 -04:00
milescovielloandClaude Opus 5.5 f71ead79e9 docs(agc): put the vertex point list entry's gaps first and shorten it
The entry was twice the 1000-character limit, led with the behaviour
rather than the gaps, and named a title. It now lists what throws and
what is inferred first, and names no title.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:13:32 -04:00
milescovielloandClaude Opus 5.5 f3433b0a11 fix(agc): keep the written point size above zero
Vulkan needs PointSize above zero. A PA_SU_POINT_SIZE of 0 without
USE_VTX_POINT_SIZE, and a PA_SU_POINT_MINMAX maximum of 0 with it, now
throw. With USE_VTX_POINT_SIZE the clamp's lower bound is at least the
smallest positive float, so an exported size of 0 or less, which a
clamp minimum of 0 lets through, is written as a positive value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:13:31 -04:00
milescovielloandClaude Opus 5.5 e7ea490325 feat(agc): draw point lists on the vertex path with their point size
A point list routed through the vertex path was refused, and so was
PA_CL_VS_OUT_CNTL.USE_VTX_POINT_SIZE on it. OliSe Player (PPSA01153)
stops on the latter with two of its MilkDrop presets.

The vertex path now draws point lists as Vulkan points. The vertex stage
writes PointSize: the misc export's X clamped to PA_SU_POINT_MINMAX when
USE_VTX_POINT_SIZE is set, and the PA_SU_POINT_SIZE height otherwise.
The point state travels in the recompile request (version 31) and the
cache and draw keys. Non-square register sizes, inverted clamps, point
sprite texture coordinates and, without largePoints, sizes other than
one pixel throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:13:09 -04:00
Dean 27bcd6a29e Merge pull request #8162 from savvaniss/fix/windows-runtime-module-start
fix(relinker): start Windows runtime modules the executable needs when the title loads them
2026-10-22 02:10:11 +13:00
Romans Pokrovskis b4fbf24d1e feat(agc): upload individual multisample image samples 2026-10-21 16:06:59 +03:00
Romans Pokrovskis b8297adab9 feat(agc): add fragment-preserving R_X and Z_X layouts 2026-10-21 16:06:32 +03:00
orezraeyandClaude Opus 5.5 b779496315 fix(libkernel): match event flag attributes and error results to PS5
Measured on firmware 13.60: create accepts attribute bits 0x1, 0x2, 0x10,
0x20 and 0x100 and rejects 0x1|0x2; wait and poll ignore mode bits outside
the match and clear fields; EPERM, ECANCELED and EACCES write 0 to the
result pattern.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:56:48 -03:00
Dean 74bdc3a3a7 Merge pull request #8110 from savvaniss/feat/np-account-signed-out
feat(libSceNpManager): answer the PS4 account and presence queries for a signed-out user
2026-10-22 01:54:31 +13:00
Dean fdf22f9546 Merge pull request #7911 from savvaniss/fix/agc-release-mem-system-counter
fix(agc): name the RELEASE_MEM system counter instead of GDS data
2026-10-22 01:54:27 +13:00