Commit Graph
7963 Commits
Author SHA1 Message Date
thuanquangandClaude 17c723d8fa docs(libc): correct stale rmdir, nanf and bad_optional_access debt statements
Co-Authored-By: Claude <[email protected]>
2026-10-24 07:59:41 +07:00
Danigamer05 38582fca52 fix(pngdec): honor the 16-bit input attribute 2026-10-24 02:59:36 +02:00
Himansh Raj e836e519a8 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 06:20:19 +05:30
Adrià 11d6efa06c Merge pull request #9305 from tibzejoker/fix/bit-exact-reciprocal
feat(shader): bit-exact RDNA v_rcp_f32 behind APS5_EXACT_RCP
2026-10-24 02:47:43 +02:00
xXPBSXxandClaude Opus 5.5 81e18a469a docs(debt): note that the zero gap before REWIND packets stays unwritten
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:47:28 +02:00
Danigamer05 aaa33a3f3e fix(keyboard): preserve raw keys and ignore the Kana LED 2026-10-24 02:46:30 +02:00
Ethan Barr ce6865fc0d perf(agc): pipeline queue-0 DMA_DATA by default
Queue-0 DMA_DATA packets drained the draw pipeline unless APS5_PIPELINE_DMA was set, so the packet worker waited on the committer at every small immediate store. Kena PPSA01746 issues 17-23k DMA_DATA packets per 10 s and 11329 of its 20134 pipeline drains per 10 s are opcode 0x50. enqueueDmaPacket now queues DMA_DATA stores and fills unconditionally, and keepsDrawPipeline keeps the pipeline for a copy or fill whose source and destination miss every queued write. The APS5_PIPELINE_DMA switch and its documentation are removed and the tests run the default path.
2026-10-24 02:35:37 +02:00
Dom3005andClaude Opus 5.5 dd6220698a fix(libkernel): change O_APPEND on a Windows file through fcntl
fcntl(F_SETFL) threw when it changed O_APPEND on a Windows file. The
guest flag already chooses WriteAtEnd, but a descriptor opened with
O_APPEND also carries the CRT's append flag, so _write kept appending
after the guest cleared it. F_SETFL now replaces the CRT descriptor of
every descriptor sharing the open file's status with a duplicate handle
opened with or without _O_APPEND, as libc fdopen does for append mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:28:14 +02:00
JJenkxandClaude Opus 5.5 4fe55c1fbc test(libc): cover powf NaN pairs and pin the msun 9.0.0 revision
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:17:22 -04:00
JJenkxandClaude Opus 5.5 a29bf781c8 fix(libc): compute powf like the libc.prx that titles ship
powf returned the host pow, except for base 1, so its last bit and errno
depended on the host: on Windows the bits differ from titles' libc.prx on
3,171,678 of 100,001,089 sampled argument pairs. That libc.prx is the
older form of FreeBSD msun's e_powf.c: a NaN argument returns x + y, so
powf(1, NaN) is NaN rather than 1, and (+-1)**+-inf is NaN. It sets EDOM
for a negative base with a non-integer exponent and ERANGE only in its
final overflow and underflow returns.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:17:22 -04:00
JJenkxandClaude Opus 5.5 8b83c68aad fix(libc): compute exp2f with FreeBSD msun's algorithm, as titles' libc.prx does
exp2f returned the host exp2, so its last bit and errno depended on the
host: on Windows the bits differ from the libc.prx that titles ship on
213,306,266 of the 2^32 floats. That libc.prx is msun's s_exp2f.c, setting
ERANGE only in its overflow and underflow branches. The port gives the same
bits and errno as PPSA07923's, PPSA05916's and PPSA13934's copies for every
argument.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:16:32 -04:00
dantdmdarealguy 80bcb4bd24 docs(environment): correct the crash indirect memory, log timestamp, language and label flush rows 2026-10-23 19:14:56 -05:00
dantdmdarealguy 0c5e45e9f3 docs: describe the converted module output the relinker prints
The relinker stopped printing a 'Guest module:' line for each converted
module in 56c2a5318; it reports 'Converted modules: N' and lists the
.guest.prx files under app0/ in its runtime layout tree. GAME_TESTING.md
and USAGE.md still told readers to use the files printed as 'Guest module:'.
2026-10-23 19:14:55 -05:00
SuarezPM 9c3ffcf5b0 feat(shader): support 64-bit image atomics through keyed image tables
Table T#s keyed at runtime feeding image_atomic64_* now lower to
OpAtomic* on the table Atomic64View instead of faulting, mirroring
the 32-bit path: gate, dedup identity, binding flags and view
selection. Packed formats and BY element counts still fault; hosts
need VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT for the view format.
2026-10-23 21:14:39 -03:00
SamandClaude Opus 5.5 a70e108a03 fix(agc): capture memory committed during the frames and count flips per thread
The recorder took its ranges once, at the snapshot, so a title that
committed memory during the captured frames replayed submissions from
memory the capture never had. Each memory delta now adds the allocations
the registry gained since the last one as new ranges with their nonzero
64 KiB blocks, and the header counts them as late_ranges.

A submission ended a captured frame when the driver's flip count changed
while it was being submitted, and the count was global, so a submission
that overlapped another thread's flipping one ended the frame as well.
The count is now kept per thread.

agc_driver_frame_replay copies its second frame from a block committed
during the capture, and agc_driver_frame_capture_eop checks that a flip
submitted on another thread leaves this thread's count unchanged; both
fail without the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 268525d612 fix(agc): keep replayed memory, tokens and outputs faithful to the capture
- Order memory deltas and video output registration before the next
  recorded call, and serialize the deadlock breaker with delta application
- Capture the blocks holding shader code with each shader delta
- Reserve explicit and automatic EOP flip tokens under one lock
- Record video output unregistration so replay can close and reopen a handle
- Clear already mapped ranges before restoring the snapshot so elided zero
  blocks replay as zero

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 dbe034fdf8 fix(agc): end a captured frame once per EOP flip
An EOP flip reservation also ended a frame, and so did the submission
whose EOP release carries the reserved token, so a title flipping with
EOP releases counted each displayed frame twice: a capture of N frames
stopped after about N/2 and could start between the reservation and
the submission that flips. The reservation is now only recorded; a
frame ends at a CPU flip or at a submission that flips.

agc_driver_frame_capture_eop reserves and submits six EOP flips with
APS5_FRAME_CAPTURE_FRAMES=3 and checks that the capture starts after
the first flipping submission and holds three frames of one reservation
and one submission each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 95d2a76583 feat(agc): capture frames at the driver boundary and replay them offline
APS5_FRAME_CAPTURE=<dir> makes the AGC driver record a few frames of a
title: the shader registrations and ABI resolutions, video output and
EOP flip reservations it made since it started, a snapshot of every
readable guest allocation (the title image included) taken at a frame
boundary once the driver is idle, and for the next frames each
submission, flip and suspend point with the thread that made it, its
serial progress and the guest pages the write tracker saw the CPU write
before it. At the end it stores the presented display buffers as
reference images. APS5_FRAME_CAPTURE_AT_FLIP, _TRIGGER and _FRAMES pick
the frames.

agc_frame_replay maps the captured memory at its addresses and replays
the calls of each captured thread on a thread of its own, in captured
order, through the current build of the driver with no title running.
It paces GPU work to the in-flight depth the title had, releases GPU
waits that the title's CPU threads released without calling the driver
(AgcDriverAwaitedWaits), and reports frame times, released waits and
how closely the replayed display buffers match the references.

Tests: agc_frame_capture (file format) and agc_driver_frame_replay
(two captured frames of CPU writes and DMA copies replayed and
compared). Docs: BUILD.md, ENVIRONMENT.md and the libSceAgcDriver debt
file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
JAB-devandClaude Sonnet 5.5 db06672a36 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/ngs2-pan-ps5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 02:08:01 +02:00
orezraeyandClaude Opus 5.5 974e0a89f2 fix(libc): follow the console's week rule and write composites part by part
%U and %W take the weekday as (tm_wday + 7) % 7 and (tm_wday + 6) % 7
with the C remainder, which fits the PS5 rows of libSceLibcInternal.sprx
and of the libc.prx titles ship. A composite conversion is written part
by part, each part all or nothing. %G, %g and %V throw for a tm_yday
past the year and a tm_wday below -6, where no rule fits the console.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 21:06:30 -03:00
JAB-devandClaude Sonnet 5.5 b307813438 test(libSceNgs2): pin the PS5 pan codes, NaN LFE level and radian wrap throw
The tests now check the SDK values of the pan error constants, that 0 params leaves the output untouched, that a NaN param angle keeps its LFE level with 7 speakers, and that a param one float below the first speaker in radians throws. The throw messages and the debt entry say the PS5 module did not return within 60 s for those inputs instead of claiming it never returns.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 02:06:01 +02:00
Himansh Raj d468863885 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 05:30:38 +05:30
Adrià 798c908fc4 Merge pull request #9068 from frankea/table-callee-range
fix(shader): link table callees that together exceed s_call_b64 range
2026-10-24 01:58:48 +02:00
Retr0 d44d5685eb fix(libkernel_sys): resolve linkat paths relative to a directory descriptor 2026-10-24 02:58:00 +03:00
Dean 98768fd542 Merge pull request #10188 from Felipebmaitan/feat/jobmanager-compute-storage
fix(libSceJobManager): batch compute completion in caller storage
2026-10-24 12:56:53 +13:00
Dean c4c368b84b Merge pull request #10353 from ntamas94/fix/ps4-json2-array-assign
feat(libSceJson2): implement sce::Json::Array::operator=
2026-10-24 12:55:05 +13:00
Dean 46b8d61206 Merge pull request #10068 from xdCloudy/feat/libSceCamera-pending-exports
feat(libSceCamera): declare 106 PS5 3.20 exports
2026-10-24 12:54:09 +13:00
Dean 5211b744ba Merge pull request #8942 from enfuego27826/feat/libscezlib-requests
feat(libSceZlib): support several outstanding requests and timed waits
2026-10-24 12:53:40 +13:00
Dean d8b73e3644 Merge pull request #9273 from DavidSamir/feat/libkernel-sys-pselect
feat(libkernel): implement pselect over select
2026-10-24 12:53:12 +13:00
Dean d284c98b2e Merge pull request #10001 from MarcZX10/codex/libc-coshf-msun
fix(libc): follow msun for coshf
2026-10-24 12:52:24 +13:00
Queuze 897bf2ef6c fix(libc): attach missing standard streams to NUL 2026-10-24 00:51:42 +01:00
p3nicillinandClaude Opus 5.5 02cf85ef89 fix(libc): open NUL on standard descriptors without a stream on Windows
A Windows process started without a standard handle, such as a detached
process or a --windows-gui executable started from Explorer, has
descriptors 0 to 2 whose _get_osfhandle is -2. fcntl then threw on their
unknown file type, which stopped Halo: Combat Evolved (PPSA99500) at
start-up. Open NUL on each of them when libc loads, as Linux and macOS
already open /dev/null on a closed standard descriptor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 00:51:42 +01:00
orezraeyandClaude Opus 5.5 9402457fb7 Merge fix/libkernel-multicast-membership-measured-ps5 into fix/libkernel-socket-receive-flags-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:50:51 -03:00
Himansh Raj cb87c6028f Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 05:19:58 +05:30
Yunus Shaikh 3e3808e55b fix(agc): rewatch only a settled import's own pages
rewatchSettledImports passed an import's 64 KiB-rounded span to
Rewatch. For an import whose size is not a block multiple the span's
last block holds pages past the allocation, the walk fails on them, and
the import stayed compared for good. Pass the import's own pages; the
shared-block and live storage image checks still use the block span.
2026-10-24 01:49:43 +02:00
Yunus Shaikh bef24410af fix(agc): settle a pending import before the FMASK checks of an initial multisampled DCC import
#7948 requires the FMASK of an eight-fragment DCC target to be
write-watched at the initial import and at each reuse. On Windows an
FMASK in a host import whose deferred settle has not run yet is still
compared, so the target is refused with "native FMASK contents require
watched guest memory" after the previous commit has settled its color and
metadata ranges.

Call WatchedAfterSettle for the FMASK range at both checks, as the initial
import already does for the color, DCC and CMASK ranges. A range that is
unwatched without an import awaiting its read is still refused, and
nothing changes off Windows.

Four-sample targets take no FMASK range, so this changes nothing for them.

Refs https://github.com/boykopovar/AnyPS5/issues/9724
2026-10-24 01:49:43 +02:00
Yunus Shaikh 44141f9aaf fix(agc): settle a pending import synchronously before an initial multisampled DCC import
Rush 2 Recompiled (PPSA69423) and Wave Race 64 Recompiled (PPSA69424)
stop on Windows with "initial multisampled DCC contents require watched
guest memory" (https://github.com/boykopovar/AnyPS5/issues/9724). Their
multisampled color target lives in a 784 KiB host import made at map
time. An import under 1 MiB stays compared until a later lookup reaps
its deferred settle read, and the titles draw to the target first.

When an initial multisampled DCC import needs a range whose import still
waits for its settle read, submit that read now if it is still wanted,
wait for its fence and return the import to the write watch before the
check. This builds on #8527's ordering: the read goes through its
main-queue batch with barriers around it, so it runs after every earlier
main-queue access, and the wait happens under the GPU mutex that
submission holds.

An import that is not a whole number of 64 KiB blocks, such as these
titles' 0xc4000 bytes, never got a deferred read, and Rewatch refuses a
range that does not start and end on a block. Such an import now waits
for this path alone. It returns to the write watch with its partial
blocks whole, each stamped as a CPU store, unless another compared
import or a live storage image shares them.

Imports that stay compared for any other reason still do, an explicitly
unwatched range is still refused, and APS5_NO_DEFERRED_SETTLES still
keeps these imports compared.
2026-10-24 01:49:43 +02:00
Retr0 68db53d7a5 fix(libkernel): fail sendfile with EINVAL for a file that is not a regular file 2026-10-24 02:44:14 +03:00
Dean 2ace103a9c Merge pull request #10275 from orezraey/fix/libscenet-inet-pton-ex-measured-ps5
fix(libSceNet): convert sceNetInetPton text and null outputs as measured on a PS5
2026-10-24 12:43:38 +13:00
Dean 0884fab4b1 Merge pull request #8995 from dantdmdarealguy/fix/env-reference-environmentnumber
fix(tools): read the EnvironmentNumber environment reader in env_reference
2026-10-24 12:40:38 +13:00
Himansh Raj 481366247c Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-24 05:10:15 +05:30
Adrià 06596f3bdf Merge pull request #9017 from TheSovietWaffle/fix/recompiler-stencil-replay-exec-copy
fix(recompiler): accept EXEC copies in stencil replay masks
2026-10-24 01:23:52 +02:00
MaxandClaude Opus 5.5 3ddaa64707 fix(libkernel): return EINVAL for the semaphore arguments the console rejects
The prosper console oracle measured SCE_KERNEL_ERROR_EINVAL for creating
a semaphore with an initial count above the maximum, a maximum of 0, a
negative initial count or a null name, for polling 0 or more than the
maximum, and for signalling 0. These threw, or polled past the maximum
returned EBUSY, and signalling 0 succeeded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 01:18:34 +02:00
JAB-dev f6f7b24164 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/ngs2-pan-ps5 2026-10-24 01:16:05 +02:00
orezraeyandClaude Opus 5.5 60135e8855 Merge main into fix/libkernel-aio-limits-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:06:53 -03:00
orezraeyandClaude Opus 5.5 3b962f06ed Merge main into docs/libc-memmem-memccpy-exports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:05:29 -03:00
Queuze 4f6358a918 chore: sync contribution #9523 with main 2026-10-23 20:02:18 -03:00
Queuze a2cd79cd2b chore: sync contribution #9525 with main 2026-10-23 20:02:17 -03:00
Queuze b2aafa368e chore: sync contribution #9542 with main 2026-10-23 20:02:17 -03:00
Queuze 2a7c73eb2f chore: sync contribution #9930 with main 2026-10-23 20:02:16 -03:00