Commit Graph
6874 Commits
Author SHA1 Message Date
Dean 6a6a35fdf5 Merge pull request #7965 from frankea/ps5-measured-1340
fix(libs): values measured on a PS5 (firmware 13.40) from inside retail games
2026-10-23 06:18:10 +13:00
xXPBSXxandClaude Sonnet 5.5 ff2b4ba4cc fix(libkernel): report EPIPE for a stream send on a connection the peer closed on Windows
sosend_generic fails a send on a socket that can send no more with EPIPE
before it looks at so_error. Winsock reports the same send as WSAECONNABORTED
or WSAECONNRESET, which reached the guest as ECONNABORTED or ECONNRESET.
A stream send now maps both to EPIPE. The send-after-close checks of
guest_tcp, guest_socket_read_write and guest_socket_pair run on Windows too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-22 19:09:29 +02:00
Retr0 124dc3b3ac feat(libkernel): answer kern.boottime in sysctl and sysctlbyname
FreeBSD 11.4 serves kern.boottime ({CTL_KERN, KERN_BOOTTIME}) from
sysctl_kern_boottime in sys/kern/kern_tc.c as a read-only 16-byte struct
timeval, so a size query reports 16, a short buffer gets a partial copy
and ENOMEM, and a write gets EPERM from sysctl_root. sysctl, sysctlbyname
and sysctlnametomib now answer it with the guest CLOCK_REALTIME minus
CLOCK_UPTIME, taken at the first read and kept. HotSpot reads it while
writing its error report, which aborted with "unsupported MIB 1.21".
2026-10-22 20:04:05 +03:00
Retr0 be4fd86249 fix(libkernel): disconnect a connected datagram socket on connect to port 0
FreeBSD 11.4's soconnectat() (sys/kern/uipc_socket.c) disconnects a
connected socket of a protocol without PR_CONNREQUIRED before it calls
pru_connect. udp_disconnect() and udp6_disconnect() drop the peer and
reset the local address, then in_pcbconnect_setup() and in6_pcbladdr()
fail port 0 with EADDRNOTAVAIL, so the socket is left unconnected.
connect to port 0 on a connected datagram socket now dissolves the
association through the AF_UNSPEC disconnect path before failing with 49,
where it kept the old peer. Stream sockets keep EISCONN.
2026-10-22 20:00:13 +03:00
Dean e5c5329251 Merge pull request #8099 from LuisAguilarDev/fix/agc-stencil-clear-absent-plane
fix(agc): ignore a stencil clear on a target without a stencil plane
2026-10-23 05:43:36 +13:00
LeandroLP23andClaude Opus 5.5 1bf43f9b02 fix(recompiler): read P20 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 P20 and not P10 stayed an explicit per-vertex
input and read vertex 2 minus vertex 0. For a flat value that is the same
on every vertex the difference is 0, and with the first provoking vertex
nothing refused it.

ps5-opengl lowers every flat input to a load of one vertex: vertex 1
(P10) by default, which #4030 reads as the provoking vertex, and vertex 2
(P20) for triangles when GL's flatshade_first is set. SuperTuxKart's
deferred point lights are drawn that way, so all twelve flat inputs of
pointlight.frag read 0, the attenuation 0 * -inf was NaN, nothing was
discarded, and the starting-line referee's light quad blacked out the
scene behind it (#8364).

A P20-only read now returns the provoking vertex's value, as P10 and P0
do. The lane was not measured on the console either, so FragmentParameter
records it and a pipeline using the last provoking vertex throws. An input
read through both P10 and P20 keeps its per-vertex differences.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 18:37:47 +02:00
Dean 751b2881ae Merge pull request #8871 from thuanquang/fix/msaa-enable-clear-lines
fix(agc): draw line lists and strips into a multisampled target with MSAA_ENABLE clear
2026-10-23 05:20:48 +13:00
Romans Pokrovskis b8c6a94572 chore(agc): refresh PR 7948 on current main 2026-10-22 19:13:40 +03:00
PacukaandClaude Opus 5.5 795c390339 fix(libSceAgc): take the semaphore address second in Acb/Dcb MemSemaphore
PPSA03396 calls sceAgcAcbMemSemaphore and sceAgcDcbMemSemaphore as
(cb, address, waitForMailbox, signalType, operation). Both read the
address from the fourth argument instead, so the call aborted with
"null or misaligned address 0x1".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 18:11:12 +02:00
orezraeyandClaude Opus 5.5 d34f5c9181 Merge main into fix/libkernel-msync-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:09:58 -03:00
JAB-devandClaude Sonnet 5.5 611db84ca5 fix(libSceAudioOut): validate the debug state id and size in sceAudioOut2SetSystemDebugState
sceAudioOut2SetSystemDebugState accepts only the loudness debug state (id 1, 8-byte param); other ids and sizes return the invalid param error and a null pointer returns the invalid pointer error. The one debug state the console also accepts, id 0x20 with a 4-byte param, throws.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-22 18:09:35 +02:00
Alvaro 7fe0013eac feat(libSceJxr): implement PKFree as jxrlib does 2026-10-22 18:07:02 +02:00
JAB-devandClaude Sonnet 5.5 b939663075 fix(libSceNgs2): return the SDK pan error codes from sceNgs2PanInit
An unsupported speaker count returns 0x804A8451, a unit angle other than 360 or 2*pi with angles returns 0x804A8450 and a null work returns 0x804A8010, leaving the work untouched, instead of throwing.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-22 18:01:40 +02:00
Queuse f696ec8809 docs(net): keep independent option entries apart 2026-10-22 12:55:52 -03:00
Adrià 8499ea52e5 Merge pull request #8499 from xXPBSXx/fix/sendto-port-zero
fix(libkernel): fail sendto to port 0 from an unbound IPv4 datagram socket with EADDRNOTAVAIL
2026-10-22 17:54:00 +02:00
Queuse 1ffb6a7163 docs(net): avoid shared debt insertion point 2026-10-22 12:47:45 -03:00
Adrià 093149c5bd Merge pull request #8483 from xXPBSXx/fix/poll-peer-close-pollin
fix(libkernel): report a stream whose peer closed as readable in poll on Windows
2026-10-22 17:44:27 +02:00
Queuse 8dea78c490 docs(net): classify keepalive behavior debt 2026-10-22 12:25:35 -03:00
Queuse f555d351c8 Merge remote-tracking branch 'origin/main' into codex/net-buffer-validation 2026-10-22 12:23:03 -03:00
Queuse b6ac65c2cb Merge remote-tracking branch 'origin/main' into codex/net-keepalive 2026-10-22 12:20:36 -03:00
Yunus Shaikh 32a95a35dd fix(hmd): answer handle 0 before sceHmdInitialize only below SDK 4.50
BunnyFl's firmware 13.42 check shows that the distortion, wide-near and
2D VR command queries give NOT_INITIALIZED for handle 0 before
sceHmdInitialize only when the title's compiled SDK version is below
4.50. From 4.50 the library first checks state it sets up when it
starts, which isn't measured, so handle 0 before initialization now
throws there, as it does after initialization and as all six queries
do on main. The SDK version is read from the process parameters, as
libSceHmd2 does.

guest_hmd checks handle 0 before initialization at SDK 0x044fffff and
0x04500000.

Source: https://github.com/boykopovar/AnyPS5/pull/9577#issuecomment-6343495321 (BunnyFl)
2026-10-22 08:19:34 -07:00
Shahul Mubeen AandClaude Opus 5.5 b5cccd5628 docs(libSceAgc): record that the console's register list alignment is unmeasured
sceAgcCbSetShRegistersDirect and sceAgcCbSetUcRegistersDirect now accept
a list at any byte address because PPSA26344 passes lists at 1 mod 4.
The debt entry names that title evidence and states that how the console
reads such a list is not measured, so the host behaviour is not taken for
a measured console contract.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:49:06 +05:30
bluandClaude Opus 5.5 e9e345fbf3 docs(libkernel_sys): record that link follows longer link chains on Windows
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 07:54:59 -07:00
David a81f89fa6b Merge remote-tracking branch 'origin/main' into feat/agc-barycentric-rect-list
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/execution/PixelBarycentricEmulation.cpp
#	docs/dev/debt/shader.md
2026-10-22 18:26:03 +04:00
Kraken bf787dc895 chore(libkernel): merge current main for timed join integration 2026-10-22 15:25:35 +01:00
Dean b7d1d47a5f Merge pull request #8083 from DavidSamir/feat/agc-barycentric-tessellation-strips
feat(agc): draw triangle strips through the barycentric tessellation stages
2026-10-23 03:22:55 +13:00
Retr0 f04af479e6 test(libkernel): require EINPROGRESS from a nonblocking connect in progress
FreeBSD 11's kern_connectat fails a nonblocking connect that is still
connecting with EINPROGRESS (36), a second one while it is still
connecting with EALREADY, and soconnectat fails one on a connected
stream socket with EISCONN. On Windows connect has reported
WSAEWOULDBLOCK as EINPROGRESS since 79e162110, but the poll test still
accepted EAGAIN (35) and the socket error numbers debt entry still
listed the gap. Require 36 in the poll test and cut the stale sentence.
2026-10-22 16:59:54 +03:00
StoneDC 35d36eabbc feat(libSceUlt): implement sceUltConditionVariableCreate and condition variable option initializers 2026-10-22 21:57:38 +08:00
hypermist 105c0102a6 Merge remote-tracking branch 'upstream/main' into feat/sp-syscall-wrapper-forwards 2026-10-23 02:55:02 +13:00
ntamas94andClaude Opus 5.5 2d1ecaf29e fix(libSceRtc): reject a negative source tick in sceRtcFormatRFC2822
Measured on a PS4 (firmware 10.71) for the review of the zone-shift
overflow: sceRtcFormatRFC2822 returns 0x80B50003 for UINT64_MAX with +1
and +1439 minutes and for 2^64 - 1 minute with +1, where the shifted tick
lands in year 1. The console returns 0x80B50008 when the shifted tick is
past 9999 as a signed value (2^63 with -1 minute) and otherwise 0x80B50003
when the source or the shifted tick is negative as a signed value
(2^63 with 0, 0 with -1); the tick after 9999 with -1 minute still formats.

sceRtcFormatRFC3339 does wrap on the console: UINT64_MAX with +1 minute
returns 0 and writes 0001-01-01T00:00:59.99+00:01, as the implementation
already does. Tests now cover both.

Written with AI assistance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 15:52:23 +02:00
Dom3005andClaude Opus 5.5 4892b71494 docs(debt): match the Windows directory descriptor entry to the code
d31e28308 made getdents and getdirentries throw on a name above the
one-byte d_namlen limit, and #8591 made getdirentries report the entry
index of its block through basep. The libkernel entry still described
ENAMETOOLONG and a basep of 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 15:52:04 +02:00
ntamas94andClaude Opus 5.5 3cf419d4ea fix(libSceRtc): handle out-of-range time values as the PS4 does
Measured on a PS4 (firmware 10.71) with an OpenOrbis homebrew that loads a
probe PRX calling libSceRtc; every output starts as a sentinel, so stores
and their width are visible.

- sceRtcSetTime_t takes the low 32 bits of its argument as unsigned seconds
  and returns 0 for every value: -1 is 2106-02-07 06:28:15, 2^32 + 1 is
  1970-01-01 00:00:01 and -2^31 is 2038-01-19 03:14:08. sceRtcGetTime_t
  stays 64-bit (2106-02-07 06:28:16 is 2^32).
- sceRtcGetTime_t before 1970 and sceRtcGetWin32FileTime before 1601 store
  0 and return 0x80B50008. Field validation still comes first and leaves
  the output unchanged (1969-13-01 returns 0x80B50009).
- sceRtcSetTick and sceRtcSetWin32FileTime have no upper limit: the tick
  after 9999-12-31 23:59:59.999999 is 10000-01-01 and the file time
  2^64 - 1 is 60056-05-28 05:36:10.955161. sceRtcGetDayOfWeek accepts
  years past 9999 (10000-01-01 is 6).
- sceRtcFormatRFC3339 returns 0x80B50008 when the zone-shifted tick is
  outside years 1 to 9999. sceRtcFormatRFC2822 returns 0x80B50003 when it
  is negative as a signed value and 0x80B50008 when it is past 9999.

The PS5-measured cases of GuestRtc.cpp that the probe repeated (RFC 3339
and RFC 2822 parsing, named and military zones, DOS time, TickAdd) give the
same results on the PS4. The three expectations changed here (SetTick past
9999, SetTime_t(-1), RFC 2822 at the limit with +1 minute) came from
commits that cite no measurement. Not yet confirmed on PS5.

Written with AI assistance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 15:51:03 +02:00
Federico Marras a242637da4 Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into docs/ajm-instance-signature-sources 2026-10-22 15:47:23 +02:00
Federico Marras 06f25300f9 Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/system-service-app-title-id 2026-10-22 15:43:43 +02:00
Federico Marras d5d453c229 Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/net-get-sock-info6 2026-10-22 15:43:20 +02:00
Federico Marras 73822f3fea Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/http-memory-pool-stats 2026-10-22 15:42:59 +02:00
Federico Marras a75002323d Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/audio-out-mastering 2026-10-22 15:42:17 +02:00
Federico Marras b655a905ba Merge branch 'feat/ngs2-calc-atrac9-block' into feat/ngs2-atrac9-module-loops 2026-10-22 15:39:16 +02:00
Federico Marras d20d4cb60e Merge branch 'feat/ngs2-calc-vag-block' into feat/ngs2-calc-atrac9-block 2026-10-22 15:38:23 +02:00
Yunus Shaikh f045da9026 Merge main into feat/libscehmd-no-headset-queries 2026-10-22 06:36:43 -07:00
Federico Marras 5d6a00842f Merge branch 'feat/ngs2-system-option-codes' into feat/ngs2-system-create-arguments 2026-10-22 15:35:09 +02:00
Federico Marras ac0ef4f214 Merge branch 'feat/ngs2-system-option-codes' into feat/ngs2-system-rate-grain-codes 2026-10-22 15:34:17 +02:00
Rookie f0e63df885 feat(libSceNpManager): answer the user ID account queries for a signed-out user
sceNpCheckNpAvailabilityA, sceNpGetAccountLanguageA,
sceNpGetParentalControlInfoA and sceNpGetAccountDateOfBirthA return
SIGNED_OUT without writing, like sceNpGetAccountCountryA. The game
presence queries report OFFLINE. A null pointer or user id -1 is
INVALID_ARGUMENT, and the request forms refuse request id 0 and an
unknown request as sceNpSetGamePresenceOnline does. Signatures and
checks follow shadPS4 and Orbital; sceNpIsPlusMember keeps throwing.
2026-10-22 14:33:49 +01:00
Rookie 4951eee5ed fix(libc): compute acosf with FreeBSD msun's algorithm, as the console's libc.prx does 2026-10-22 14:33:15 +01:00
Rookie b6dc6a5d4d feat(libSceVideodec): implement sceVideodecQueryResourceInfo
Validate the configuration and resource information as
sceVideodecCreateDecoder does, map the configuration the same way and
report the memory and frame buffer requirements that
sceVideodec2QueryDecoderMemoryInfo gives for it.
2026-10-22 14:32:24 +01:00
Federico Marras 845000aaf8 Merge branch 'feat/ngs2-system-reset-option' into feat/ngs2-system-option-codes 2026-10-22 15:32:04 +02:00
MarcZX10 26ea36f114 feat(libSceSsl): implement full-buffer send and receive 2026-10-22 13:31:21 +00:00
Federico Marras 926310ee8d Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/ngs2-waveform-frame-info 2026-10-22 15:28:56 +02:00
Federico Marras aa642c46a2 Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/ngs2-render-buffer-codes 2026-10-22 15:26:36 +02:00
Federico Marras 8accc665b1 Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/ngs2-parse-pcm-depths 2026-10-22 15:24:48 +02:00