Commit Graph

5652 Commits

Author SHA1 Message Date
Dean 61b8742b6b
Merge pull request #4515 from AlxcBTW/perf/host-import-join
perf(agc-driver): join the imports of adjacent large ranges when a buffer is bound across them
2026-10-14 05:55:27 +13:00
Dean 9baec8793f
Merge pull request #3870 from yash27git/clean/Direct-Memory-Exception
fix(libkernel): harden DirectMemory validation and tests
2026-10-14 05:55:11 +13:00
Dean 40047f46bd
Merge pull request #4377 from MarcZX100/codex/carry-pthread-atfork-3628
feat(libkernel): implement pthread_atfork registration
2026-10-14 05:54:54 +13:00
Adrià 9d0a41d5a1
Merge pull request #4611 from EagleBearerYS/fix/libscenet-epoll-out
fix(libSceNet): sceNetEpollWait takes 2 as the OUT event
2026-10-13 17:51:30 +02:00
Adrià 3e8d0793b7
Merge pull request #4588 from Nixitov/feat/libkernel-host-hardware
feat(libkernel): report the host SoC and CPU temperature
2026-10-13 17:49:54 +02:00
Adrià 67e86d93d5
Merge pull request #4250 from shahulmubeen-a/perf/shader-byte-buffer-stores
perf(shader): store 8- and 16-bit buffer components as bytes
2026-10-13 17:47:54 +02:00
Adrià Franch 0265f33636 fix(libc): choose the acosf NaN bits instead of the host libm
FreeBSD msun e_acosf.c returns (x-x)/(x-x) for |x| > 1 and NaN inputs: the
x86 default NaN 0xffc00000, or the quieted input NaN. std::acos left it to the
host libm, and guest_math failed on the runner's glibc 2.39.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 17:46:18 +02:00
Adrià 091c136ba6
Merge pull request #5223 from Nixitov/feat/libc-float-math
feat(libc): implement the missing float rounding and classification exports
2026-10-13 17:43:06 +02:00
Adrià 6679168360
Merge pull request #5210 from ErenYeager1836/carry/libkernel-coredump-user-file
feat(libkernel): answer the coredump user-file attach calls
2026-10-13 17:42:50 +02:00
Adrià e6fae88a42
Merge pull request #4684 from XairRrR/fix/agc-acquire-without-waiting
fix(agc): drop a presentation instead of waiting for a swapchain image
2026-10-13 17:36:29 +02:00
Adrià 068ab2aba6
Merge pull request #4638 from MarcZX100/codex/carry-win-getdents-throw-3327
fix(libkernel): throw for oversized directory entries
2026-10-13 17:32:31 +02:00
Adrià 6629c09392
Merge pull request #4619 from MiniRML/fix/nid-version-requirement-chains
fix(nid): bound version requirement chains to their section
2026-10-13 17:31:25 +02:00
Adrià 765661581b
Merge pull request #4613 from EagleBearerYS/fix/libscenet-copied-address-length
fix(libSceNet): report copied socket address lengths
2026-10-13 17:30:34 +02:00
Adrià c35bc4b92c
Merge pull request #4612 from EagleBearerYS/fix/libscenet-epoll-ident
fix(libSceNet): report the registered socket as the epoll event ident
2026-10-13 17:30:05 +02:00
Adrià 2f6ae9fc88
Merge pull request #4610 from EagleBearerYS/fix/libscenet-sce-socket-timeouts
fix(libSceNet): take 0x1105 and 0x1106 as the send and receive timeouts
2026-10-13 17:28:11 +02:00
Adrià 9c4686321b
Merge pull request #4604 from MiniRML/fix/nid-gnu-hash-geometry
fix(nid): validate GNU hash geometry before rewriting
2026-10-13 17:26:25 +02:00
Adrià 284cb63dc9
Merge pull request #4601 from MiniRML/fix/nid-pe-export-references
fix(nid): resolve PE reference exports through their ordinals
2026-10-13 17:26:06 +02:00
Adrià 9c05bf25f5
Merge pull request #4585 from jagrat04/feat/libkernel-cpuset-affinity-errors-pr
feat(libkernel): return ESRCH and EINVAL for unsupported cpuset affinity targets
2026-10-13 17:23:01 +02:00
Adrià 382c451acf
Merge pull request #4564 from MiniRML/fix/nid-windows-unicode-paths
fix(nid): preserve Unicode paths on Windows
2026-10-13 17:19:00 +02:00
Adrià c422b57fb3
Merge pull request #4672 from milescoviello/carry/lseek-pipe-windows-4670
fix(libkernel): fail lseek on a pipe with ESPIPE on Windows
2026-10-13 17:13:35 +02:00
Adrià 7e4edf509a
Merge pull request #4616 from EagleBearerYS/fix/libc-strtod-quiet-nan-windows
fix(libc): return the default quiet NaN from the strtod family
2026-10-13 17:11:55 +02:00
Adrià cba01c87d1
Merge pull request #4614 from EagleBearerYS/fix/libscenet-getsockname-unbound-windows
fix(libSceNet): name an unbound socket with the zero address on Windows
2026-10-13 17:11:20 +02:00
Nixitov 00f0589101 feat(libc): implement the float rounding and classification exports
PPSA99611 imports ceilf, floorf, truncf, isnan and isinf from libc.prx and stops at start-up on main. Implement them next to the existing double forms: the rounding results delegate to the standard library like the other float exports, and isnan/isinf reuse the __isnan/__isinf helpers isnanf already uses.
2026-10-13 17:09:47 +02:00
Adrià 8bf10e51f4
Merge pull request #4554 from queeeef/fix/agc-sampled-dcc-key-writers
fix(agc): wait for recorded writes over a sampled texture's DCC keys before reading them
2026-10-13 17:04:12 +02:00
Adrià d67a9e5a45
Merge pull request #4553 from Nixitov/feat/fchmodat
feat(libkernel_sys): implement fchmodat
2026-10-13 17:03:44 +02:00
Adrià 1a217cd4a3
Merge pull request #5204 from ErenYeager1836/carry/appcontent-addcont-enqueue-download
feat(libSceAppContent): implement sceAppContentAddcontEnqueueDownload
2026-10-13 17:02:04 +02:00
Adrià a74f2efe84
Merge pull request #5097 from TideOPL/fix/ancillary-layer-export
fix(shader): read the ancillary render target index from Layer when the draw exports it
2026-10-13 17:01:11 +02:00
Adrià 3b94f923a5
Merge pull request #4633 from QRMOE/fix-libc-wcsxfrm-truncation
fix(libc): terminate truncated wcsxfrm results
2026-10-13 17:00:13 +02:00
Adrià fffe7351ad
Merge pull request #4625 from QRMOE/fix-libc-strtok-exhausted-state
fix(libc): clear exhausted strtok continuation state
2026-10-13 16:59:43 +02:00
Adrià 72a8e67122
Merge pull request #4621 from MiniRML/fix/nid-elf-shared-string-roles
fix(nid): preserve each ELF string consumer independently
2026-10-13 16:59:13 +02:00
Adrià 60fb618708
Merge pull request #4551 from eljackjoestar-cmd/codex/preserve-color-slice-xor
fix(agc): preserve array slice XOR in color target views
2026-10-13 16:52:35 +02:00
Adrià c496fd530f
Merge pull request #4546 from codingreapermaps/feat/libc-call-trace-runtime
feat(libc): record traced import calls on Windows
2026-10-13 16:51:55 +02:00
Adrià f2c314e902
Merge pull request #4577 from Moaziz667/fix/prime-remaining-host-mutexes
fix(agc,shader): prime the remaining host shared mutexes
2026-10-13 16:45:17 +02:00
Adrià b4d76ba609
Merge pull request #4556 from Amoenus/codex/fix-inactive-covered-centroid
fix(agc): admit inactive covered-centroid mode
2026-10-13 16:43:05 +02:00
screamm 204355cc64
feat(libkernel): answer the coredump user-file attach calls
sceCoredumpAttachUserFile (5nc2gdLNsok) and
sceCoredumpAttachMemoryRegionAsUserFile (MEJ7tc7ThwM) get the
signatures of Orbital's db_types.json (cc408367) and SharpProspero's
KernelSystem.cs (5dfdb4b0): (uint32_t userValue, const char* path) and
(uint32_t userValue, const void* mem, size_t size, const char* name).

The handler is never invoked here, so both return
SCE_COREDUMP_ERROR_NOT_IN_COREDUMP_HANDLER (0x81180003, shadPS4
coredump_error.h e0a46675) and attach nothing; a null path or name and
a null, empty or wrapping region throw because the order of the
console's checks is unknown.

Carried from @screamm with author attribution preserved.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 20:11:39 +05:30
Adrià ffa2a6ecd3
Merge pull request #4550 from MiniRML/fix/nid-buffer-validation
fix(nid): validate buffer ranges and string terminators
2026-10-13 16:41:04 +02:00
Adrià 69b4ca5d9b
Merge pull request #4215 from Mouad-Scriptz-0/fix/agc-flip-eop-event
fix(libSceAgcDriver): raise the graphics end-of-pipe event from flip packets
2026-10-13 16:39:04 +02:00
Shahul Mubeen A 066a8fbe30 perf(shader): store 8- and 16-bit buffer components as bytes in compute
A formatted store of an 8- or 16-bit component into a bound buffer
patched the dword around it with a compare-exchange loop (writeBuffer
in SpirvRuntimeBuffer.cpp). Ghost of Yotei's light-culling compute
pass (program 0x800038be00, 240x135 groups per frame) stores millions
of such components per dispatch and took 426 ms of GPU time per
dispatch on an RTX 4070 Ti SUPER.

Compute stores now go through a byte view of the bound buffers
(buffers_u8, an aliased declaration of the buffers binding, defined
on the first narrow store): one OpStore per byte under
StorageBuffer8BitAccess, which the shader device profile already
requires. Without the capability, and in every other stage, the
compare-exchange path remains: the draw-time validator accepts only
u32 and u64 aliased views. Loads, dword stores and stores through
GPU-selected descriptors (BDA) are unchanged.

Ghost of Yotei (PPSA26344 02.002.000), Windows 11, RTX 4070 Ti SUPER,
logo phase: that dispatch 426 -> 10.7 ms of GPU time, 1.9 -> 11 fps.

agc_formatted_buffer_byte_stores compiles a formatted 8_8_8_8 store
as compute with and without StorageBuffer8BitAccess and as a vertex
shader with it, and checks the byte view, the byte stores, the
compare-exchange loops and the fallbacks. agc_driver_formatted_store_unaligned
executes 8- and 16-bit formatted stores at misaligned offsets,
including stores that cross a dword, and checks every byte of the
output including the untouched neighbours.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 16:36:56 +02:00
Adrià e0d388fa28
Merge pull request #4555 from Xabilimon1/fix/macos-build-libkernel-getrlimit
fix(libkernel): build the fcntl status flags and the getrlimit test on macOS
2026-10-13 16:36:38 +02:00
David fdfe2204aa feat(libSceAppContent): implement sceAppContentAddcontEnqueueDownload
The signature (uint32_t service label, const NpUnifiedEntitlementLabel*)
follows SharpProspero Interop/AppContent/AppContent.cs (5dfdb4b0). dlc_emu
dlc_content.cpp (fcf69b16) answers NOT_FOUND for a label that is not a
known add-on and PARAMETER for a null label. No add-on content is ever
installed here, as sceAppContentAddcontMount and sceAppContentGetAddcontInfo
already model, so every non-null label answers NOT_FOUND and nothing is
queued. dlc_emu's nonzero-padding check is left out, as sibling functions
do not check it and no console source confirms it.

Carried from @screamm with author attribution preserved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:33:45 +02:00
Adrià b478fbbb1c
Merge pull request #5191 from p3n1cillin/claude/carry-chroot
feat(libkernel_sys): add chroot that keeps the guest root
2026-10-13 16:33:00 +02:00
Adrià 9dac817b19
Merge pull request #4548 from coltken95/fix/libc-printf-nan
fix(libc): print NaN without a sign in the guest printf formatter
2026-10-13 16:31:34 +02:00
Nixitov 0f73f5f057 feat(libkernel): report the host SoC and CPU temperature
PPSA99058 and PPSA99420 import sceKernelGetCpuTemperature and sceKernelGetSocSensorTemperature and stop at start-up on main. Read the host CPU/package, board and NVMe sensors (hwmon/thermal on Linux, the ACPI thermal zones and the storage temperature property on Windows) and report an unsupported sensor with EINVAL.
2026-10-13 16:30:07 +02:00
Adrià 80e70b4292
Merge pull request #4408 from santhoshkumar-dev/codex/agc-render-target-vertex-aliasing
fix(agc): exclude skipped vertex records from target alias checks
2026-10-13 16:29:52 +02:00
Adrià b0d41be1ff
Merge pull request #4283 from MarcZX100/codex/carry-guest-thread-stacks-3283
fix(libkernel): place Linux guest thread stacks inside application area
2026-10-13 16:28:18 +02:00
Adrià ef42c5f2af
Merge pull request #5183 from p3n1cillin/claude/carry-clock-settime
feat(libkernel): add clock_settime with FreeBSD argument checks
2026-10-13 16:27:05 +02:00
eljackjoestar-cmd 13818efc3b fix(agc): preserve array slice XOR in color target views 2026-10-13 16:25:05 +02:00
TideOPL de5279bc0c fix(shader): serialize the pixel layer export flag from request version 23
main allocates request version 22 to the tessellation patches per group, so a version 22 request has no layer export byte.
2026-10-13 15:23:21 +01:00
Adrià 146f171549
Merge pull request #4271 from eljackjoestar-cmd/codex/reclaim-source-ir
perf(shader): reclaim unreachable cached source IR values
2026-10-13 16:22:26 +02:00
Daan Dehing a910dee09f fix(agc): wait for recorded writes over a sampled texture's DCC keys before reading them
textureClearKeys reads the keys through a raw pointer, past the flush hook, so writes the
recorder holds for the key range are not in the bytes yet. A title that clears the keys of a
target with a kernel and samples it in the same batch had its keys read from the memory's
previous contents: in Palworld (PPSA23126) these were the float data of a reused heap, so the
keys read as mixed and the texels were read as stored.

When the keys read do not decode (not uncompressed, not a clear the format can fill),
WaitForKeyWriters answers from the pending fills and stores it knows, or waits for the batch
that writes the keys, and the keys are read again. Keys that decode are used as before.

RunSampledKeysBehindKernel (agc_driver_dcc_keys_first_write): key memory holding float bytes,
then the 0000 clear kernel recorded without a wait; the sampled texture's keys read Clear0000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:18:50 +02:00