Commit Graph
20967 Commits
Author SHA1 Message Date
Rookie f71434eec8 docs(libSceCesCs): keep the Big5 debt entry within the length limit 2026-10-25 12:46:25 +00:00
Rookie 78540129bc fix(libSceCesCs): encode the Big5 box-drawing duplicates into their lower cells as the console does 2026-10-25 12:46:17 +00:00
Rookie 22e5cd7e1a fix(libSceCesCs): decode KS X 1001 cell 0xA2E8 as U+327E as the console does 2026-10-25 12:46:16 +00:00
Adrià 4017310678 Merge pull request #9175 from rooklz/feat/cescs-tombc
feat(libSceCesCs): encode UCS-2, UTF-8, UTF-16 and UTF-32 characters into any MBCS profile
2026-10-25 13:43:27 +01:00
4ab16365fb fix(libc): check the guest read on macOS and pin the setitimer order
GuestCopyIn_nid_no_patch fell through to a plain memcpy on macOS, so an
unreadable pointer was dereferenced in the host. Read with
mach_vm_read_overwrite and require KERN_SUCCESS and a full copy, the
mirror of the mach_vm_write branch in GuestCopyOut_nid_no_patch and of
CopyGuestBytes.

The test now also checks the order FreeBSD 11.4 uses in sys_setitimer
(sys/kern/kern_time.c:803-808): the new timer is set first and the old
value is copied out afterwards, so a failing copyout reports EFAULT and
leaves the timer armed. The macOS branch has not been run.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: AdnanKhan-ak47 <[email protected]>
2026-10-25 13:40:56 +01:00
Dean 03b96b9241 Merge pull request #10783 from Queuse/codex/check-compile-phase-options
fix(check-compile): check syntax in preprocessing commands
2026-10-26 01:37:15 +13:00
Dean 746609b979 Merge pull request #9930 from Queuse/codex/net-protocol-readback
feat(net): expose stream and datagram protocol
2026-10-26 01:35:49 +13:00
Adrià ab0d7a52a0 Merge pull request #9395 from Gruzzberry/docs/windows-guest-file-names
docs(debt): record the guest file names Windows does not create like FreeBSD
2026-10-25 13:35:15 +01:00
MarcZX10 de8f156b98 test(agc): copy guest bytes from every unaligned source offset
Add agc_copy_guest_bytes, which copies 0 to 80 bytes from each of the eight source offsets with GuestMemory::CopyGuestBytes and checks the copied bytes and the bytes on both sides of the destination. In an ANYPS5_ENABLE_ASAN build with -fsanitize=undefined and UBSAN_OPTIONS=halt_on_error=1 it fails on the misaligned load without the previous commit; other builds check the memcpy path.
2026-10-25 12:31:37 +00:00
MarcZX10 5d2db13558 fix(agc): read unaligned guest words through a one-byte-aligned type in the ASan copy
The ANYPS5_ENABLE_ASAN build of CopyGuestBytes reads the guest source eight bytes at a time through a volatile const std::uint64_t pointer, but the source has no alignment guarantee, which is undefined behavior. UBSan reports it from agc_driver_pm4, agc_driver_graphics and agc_driver_graphics_maps_fallback: 'load of misaligned address ... for type volatile const uint64_t, which requires 8 byte alignment'. Read through a local alias of std::uint64_t with gnu::aligned(1) and gnu::may_alias instead. GCC still emits one unaligned 8-byte load per word, and builds without ANYPS5_ENABLE_ASAN, which use memcpy, are unaffected.
2026-10-25 12:31:37 +00:00
Adrià 460d46c4e8 Merge pull request #9172 from hypermoist/fix/kernel-sys-firmware-constants
fix(libkernel_sys): return what the firmware returns from 20 calls it does not implement
2026-10-25 13:31:30 +01:00
MarcZX10 89af2b225e test(libSceConvertKeycode): check the keyboard type lookup at both int32 limits at compile time
LookUp is constexpr, so static_assert evaluates it for INT32_MIN and INT32_MAX in a constant expression, where signed overflow is an error. With the previous 32-bit subtraction the test file no longer compiles ('overflow in constant expression'); the existing runtime case for 0x80000000 only showed the overflow under UBSan.
2026-10-25 12:31:23 +00:00
MarcZX10 db8d2bc1c9 fix(libSceConvertKeycode): look up keyboard types without signed overflow
LookUp subtracted the first mapped type, 16, from the UserService keyboard type in 32 bits, which overflows for keyboard types below INT32_MIN + 16; sceConvertKeycodeGetImeKeyboardType passes the type it read from UserService. Compute the index in 64 bits. Every type still maps to the same IME keyboard type, and types outside the table still map to 0.
2026-10-25 12:31:23 +00:00
JJenkx 70edff29ed fix(tools): normalize Windows report paths before overlap checks 2026-10-25 08:31:10 -04:00
Himansh Raj 873f79ea9c Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 18:00:47 +05:30
JAB-devandClaude Sonnet 5.5 ef6f00b33b test(libSceNgs2): keep the mastering gain test's waveforms alive while it renders
The test's chain helper built its PCM vector as a local and handed the sampler a
pointer into it, so every render read freed memory. Windows left the old samples
in place; Linux overwrote them and the first case rendered 0.1875 instead of 16.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 14:29:44 +02:00
Yunus Shaikh 2deb5f9ed9 feat(libSceRudp): implement sceRudpSetMaxSegmentSize
Take the 16-bit segment size Vita3K and RPCS3 declare. As in Vita3K,
the call answers NOT_INITIALIZED before sceRudpInit and NOT_ACCEPTABLE
while any context exists, and otherwise stores the size.
sceRudpGetMaxSegmentSize keeps the 1410 measured on a PS5: Vita3K leaves
the getter unimplemented, so no source says it reports a stored size.
2026-10-25 05:27:46 -07:00
JAB-devandClaude Sonnet 5.5 0abe9d8f4b Merge main into fix/ngs2-mastering-gain-ps5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 14:21:57 +02:00
Yunus Shaikh 3eceb81ad0 fix(libSceNpManager): follow the measured NpManagerInt getter checks
BunnyFl measured firmware 13.42 libSceNpManager.sprx for the eleven
NpManagerInt getters. They now take the measured arguments and refuse
as measured: user id -1 or a null required pointer gives
INVALID_ARGUMENT, the authorization calls also refuse their value and
mode ranges (0x80550004 for the mode), and the PSNO URI form refuses
its size (0x80550011) and a URI of 0x2000 bytes or more (0x80550005).
Past the checks they keep main's offline signed-out answer for any
request id, and the tests take their request ids from the NpManagerInt
request table.
2026-10-25 12:20:58 +00:00
Yunus Shaikh 4e9ad120a8 Merge branch 'fix/npmanager-idmapper-measured-v2' into fix/npmanager-int-getters-measured
# Conflicts:
#	core/libs/tests/GuestNpManager.cpp
2026-10-25 12:20:58 +00:00
Adrià 29ce6d87eb Merge pull request #8735 from hamb3r/perf/agc-compute-prewarm
perf(agc): prebuild compute pipelines and prewarm dispatch shaders ahead of execution
2026-10-25 13:20:12 +01:00
Adrià a8b199d103 Merge pull request #7618 from mrfelek/perf/stage-swept-write-only
perf(agc): stage written-only buffer elements a dispatch sweeps on discrete GPUs
2026-10-25 13:19:08 +01:00
Adrià FranchandClaude Sonnet 5.5 e3ccd46f26 test(libkernel): use the public Api headers in the swapcontext test
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 13:14:04 +01:00
Yunus Shaikh 9345b1fe88 fix(libSceNpManager): follow the measured IdMapper checks and NpManagerInt request table
BunnyFl measured firmware 13.42 libSceNpManager.sprx. The IdMapper
account-id lookups take seven arguments: a request id of 0 or less
gives 0x80553085, then user id -1, a null pointer or a value outside
1 to 1000 gives 0x80553083, and past the checks they answer signed out
as main's offline model does. IdMapper abort and delete refuse a
request id of 0 or less with 0x80553085, and IdMapper requests get a
counter of their own instead of the sceNpCreateRequest pool.

NpManagerInt requests sit in a 64-slot table of their own: the 65th
live request gives 0x80559D05, delete gives 0x80559D0A for an id the
table does not hold, and abort answers from the offline service.
2026-10-25 12:13:08 +00:00
Yunus Shaikh be3f208b02 fix(libSceNet): answer sceNetInitParam and a null sceNetConfigGetIfFlags as measured
BunnyFl measured both calls in firmware 13.42 libSceNet.sprx, run in an
emulator on the module itself. sceNetInitParam returns 0x80410116 for a
null parameter. The first non-null call copies the first 32 bytes of the
parameter and returns 0, and every later call returns 0x80410110, with a
null parameter and after sceNetTerm too, because the flag is never
cleared. sceNetConfigGetIfFlags returns 0x8041130E for a null flags
pointer before anything else. Both replace throws that stood in for the
unknown answers.

The first successful sceNetInitParam still marks the library initialized,
as sceNetInit does here, because the other calls check it. The module
reads only bit 0 of the stored copy's first word, to raise the pool limit
of sceNetPoolCreate from 32 to 128; that limit is recorded as not
modelled, as sceNetPoolCreate here has none.
2026-10-25 05:11:17 -07:00
jacob6769 69405e15f9 Merge remote-tracking branch 'origin/main' into fix/libressl-digest-version-paths
# Conflicts:
#	docs/dev/debt/libSceLibreSsl.md
2026-10-25 21:11:02 +09:00
boykopovar e3db6dacf7 docs(nid): remove executable patching debt entry 2026-10-25 15:05:11 +03:00
Adrià FranchandClaude Sonnet 5.5 3bf3f7928b fix(libkernel): declare swapcontext in libkernel's Api.hpp
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 13:04:17 +01:00
David 5881575782 refactor(libkernel): export swapcontext from libkernel directly
The PS5 3.20 export lists have swapcontext in libkernel as well as
libkernel_sys, and on Windows a libkernel import never reaches
libkernel_sys. The assembly entry in UserContext.cpp now is
swapcontext_nid_postfix, and the libkernel_sys jump stub is gone.
2026-10-25 13:04:08 +01:00
David ad0d4f5995 feat(libkernel_sys): implement swapcontext 2026-10-25 13:04:08 +01:00
boykopovar 1cf017b189 feat(nid): add executable import patching with optional sce filter 2026-10-25 15:03:02 +03:00
Bram910 c265e51abf Merge main into fix/call-site-hint-prefixes 2026-10-25 13:01:17 +01:00
JJenkx 2fc4ca2fd0 test(libc): reject host log fallback in large acoshf inputs 2026-10-25 07:53:43 -04:00
JJenkx 0e895b55be test(libc): cover acoshf positive results across rounding modes 2026-10-25 07:53:11 -04:00
JJenkx c05345f529 fix(libc): preserve acoshf log and reciprocal evaluation 2026-10-25 07:52:32 -04:00
Jade'sG 2a45d721f6 fix(tools): stabilize overlapping SELF region selection 2026-10-25 19:45:03 +08:00
Dean a5a780eaaa Merge pull request #10071 from atharvjairath/feat/libressl-cipher-metadata
feat(libressl): implement cipher metadata queries
2026-10-26 00:42:49 +13:00
Slick Daddy 16507a99f8 perf(shader): skip redundant sort/unique on single-element otherReads 2026-10-25 14:41:31 +03:00
verusferro ffd8b6f8ae feat(libSceSpSysCallWrapper): forward sceSpPthreadMutexattrSetprioceiling
Firmware 13.60's libSceSpSysCallWrapper.sprx jumps to libkernel's
scePthreadMutexattrSetprioceiling, which libkernel now implements, so the
wrapper forwards to it like the 47 other wrappers in the library. The
library's debt file held only this entry and is removed.
2026-10-25 14:39:49 +03:00
Adrià c2e087b2a6 Merge pull request #7049 from blawesom/followup/6510
fix(libkernel): retire an EV_ONESHOT note through its delete callback and follow Windows $Deleted paths
2026-10-25 12:38:21 +01:00
Adrià a703a18496 Merge pull request #10046 from jotitadev/fix/agc-moltenvk-tessellation-pipeline-cache
fix(agc): create tessellation pipelines without the pipeline cache on MoltenVK
2026-10-25 12:38:16 +01:00
Dean cdcbd55134 Merge pull request #10787 from 00xDisaster/feat/libc-dinkumware-divide
feat(libc): implement _Divide, _FDivide, _Recip and _FRecip
2026-10-26 00:36:31 +13:00
thibautandClaude Opus 5.5 be81531d69 perf(shader): take an exact f32 path for 16-bit interpolation and v_fma_mix
FPInterpolateF32 and FPInterpolateF16 (v_interp_p1ll/p1lv/p2_f16, v_fma_mix*)
were always emulated in f64, or in 64-bit integers without Float64. Each
interpolation function now computes the result in f32 first and calls the exact
function only when that result is not provably exact.

The f32 path uses no Fma, as Vulkan does not require it to be fused: the product
is a Veltkamp-Dekker two-product, the sum with the base a TwoSum, the error terms
are added with round to odd (Boldo-Melquiond), every operation NoContraction.
It is taken when each input is zero or has a biased exponent in [24, 241] (base
[24, 251]) and the product exponents sum to [174, 377]: every intermediate value
is then a multiple of 2^-126 below 2^126, so none is a denormal a device could
flush and none overflows. A zero result takes its sign from the IEEE rule on the
bits. f16 results are rounded from the f32 bits, on the normal and the subnormal
f16 grid, unless the f32 result is an inexact f16 midpoint; directed f16
rounding keeps the exact path.

agc_driver_interpolation_modes gains 8192 chains of 64 f32 and f16
interpolations over all 32 float modes and a --benchmark of 65536 lanes x 4096
chained interpolations: RTX 4090 Float64 path 10.24 -> 2.05 ms (f32) and
9.91 -> 2.19 ms (f16), integer path 3.58 -> 2.03 / 3.65 -> 2.20 ms; Intel UHD 770
(integer path) 176.6 -> 33.6 / 178.4 -> 56.4 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017SNUYRd7sRKZrMYpquAsnU
2026-10-25 12:34:48 +01:00
roboterspinne 2ac9311745 fix(relinker): reject nonzero GLOB_DAT and JUMP_SLOT addends in Linux output
The Linux output copied a nonzero r_addend of GLOB_DAT and JUMP_SLOT
relocations unchanged into DT_RELA and DT_JMPREL, while the Windows,
macOS and guest module paths refuse it. The x86-64 psABI computes both
types as S, but glibc before f8587a61892c applies S+A when binding
eagerly, so the result depended on the host glibc and, for JUMP_SLOT,
on the binding mode. The Linux patcher now refuses such an entry in all
three Linux modes with the Windows message and the unrebased r_offset.
Entries with a zero addend are emitted as before.
2026-10-25 12:32:48 +01:00
Himansh Raj 3a1d61c5d4 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 17:00:47 +05:30
xXPBSXxandClaude Sonnet 5.5 c8430e739c fix(libkernel): fail gettimeofday, getitimer, setitimer and the sceKernel time getters with EFAULT on an unusable pointer
These wrote their result through the caller's pointer in place, or read
the itimerval of setitimer without a check, so a pointer into unmapped
memory crashed the host. Build the result locally and copy it out with
the checked write (and read the setitimer value with a checked read),
failing with EFAULT as FreeBSD 11.4 does: copyout in sys_gettimeofday
(sys/kern/kern_time.c:646 and 651) and sys_getitimer (kern_time.c:745),
copyin (kern_time.c:803) and copyout (kern_time.c:808) in sys_setitimer.

getrlimit and getrusage are left to #8986 and #8988, which cover the same
family for those two calls.

Builds on fix/output-structs-efault, which adds GuestCopyOut_nid_no_patch.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 12:22:40 +01:00
Yossi Yadgar 866ab27a80 docs(debt): clarify unverified console identity behavior 2026-10-25 13:11:03 +02:00
Ahmad Mujahid 11b193cf35 fix(prx): build and export the stubs that eight libraries never shipped
The 2026-10-21 split PRs added Export.cpp stub files to seven libraries
that have their own CMakeLists.txt, so core/libs/CMakeLists.txt never
adds Export.cpp for them and no target compiled the 101 stubs. A title
that imports one fails to load instead of throwing on the call.

Ngs2, Ngs2.native and AvPlayer.native build with hidden visibility, so
their stub files also need default visibility. libSceNgs2 already
compiled PendingExports.cpp, but its 6 stubs stayed local.
2026-10-25 15:10:46 +04:00
thepoppfish 464c48b17b fix(tools): require module suffixes for filename aliases 2026-10-25 14:10:33 +03:00
Adnan Khan 0924ce7c38 fix(libkernel): keep the Nop header guard wrap-free 2026-10-25 16:40:31 +05:30