Commit Graph
7981 Commits
Author SHA1 Message Date
babyhuey 4a5ce8a094 fix(libc): adopt the guest SDK allocator only when the title replaces the heap
A bundled libc.prx can export the ten allocator NIDs while forwarding
them to HLE, so adopting its exports for a title whose replacement
table is empty sends HLE allocations back into themselves. Keep the
default heap in that case, as before the guest SDK adoption.
2026-10-19 08:39:37 -04:00
ebosido444-ai 943b7007c9 fix(agc): resolve a relocated AGC header whose arrays hold the registered bytes
A title can relocate a registered shader header, and the register, special and
semantic arrays it points at, into memory of its own and resolve the ABI with
that copy (Astro's Playroom, PPSA01325, #2914). SameHeader accepted such a copy
only while every pointer inside it stayed put, so a moved array left the
resolution throwing "refers to a replaced shader header".

Accept the copy when every array it names still holds the registered bytes: the
registered header then decodes what the copy describes, nothing is copied and
ShaderSnapshot stays immutable. A copy whose arrays differ or are unreadable
still throws.
2026-10-19 14:36:11 +02:00
Owes Mehboob 33cd848ba9 docs(debt): drop implemented functions from unknown-signature lists 2026-10-19 14:34:26 +02:00
valenciana-nc f7fd9dbf9f fix(libkernel): check recvmsg guest copies on macOS 2026-10-19 06:33:13 -06:00
valenciana-nc 7ef31e91cf fix(libkernel): check only the guest bytes recvmsg reads and writes 2026-10-19 06:33:13 -06:00
Nithishvelan M f677163eec feat(libSceSysmodule): implement sceSysmoduleUnloadModuleInternalWithArg
Add sceSysmoduleUnloadModuleInternalWithArg to match the existing
sceSysmoduleLoadModuleInternalWithArg export. Decrement the module load
count on valid internal IDs, check module existence in kModuleTable,
and set the return pointer when provided.

Add unit test coverage in GuestSysmodule for invalid values, unloaded
modules, successful argument unload, and unknown IDs. Update technical
debt documentation.
2026-10-19 17:57:40 +05:30
akkadbakkad89andDevin eac14403cc docs(libs): add debt notes for the six declared system libraries
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-19 12:26:39 +00:00
Adrià Franch 3881028d43 docs(dev): fix the PowerShell log redirection and add the device-lost and abort notes 2026-10-19 14:26:07 +02:00
felekandClaude Opus 5.5 822ad04809 docs(dev): drop the draft notice from the game testing guide
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-19 14:25:53 +02:00
felekandClaude Opus 5.5 9702cd0ea7 docs(dev): fold testers' notes from #6622 into the game testing guide
Adds what testers reported in the Q&A thread and what our own runs
showed: confirming the GPU and the cache state, AC power and refresh
rate, the Windows exit code of an uncaught exception, Windows session
and scheduled-task start, Unity module placement and the MinGW DLLs,
a section on measuring performance, and the report fields.
Drops APS5_NO_MOUSE_CAPTURE, which main no longer has.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-19 14:25:53 +02:00
mrfelekandClaude Opus 5.5 7914eb8ca7 docs(dev): take the tested GPU from the log's selection line
A report names the GPU as the log's `Selected GPU name=` line shows it, since AnyPS5 can fall back to llvmpipe without presentation support or pick another adapter on Windows (suggested by odntht on #6627).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-19 14:25:53 +02:00
mrfelekandClaude Haiku 5.5 e4a071f695 docs(dev): add a game testing guide
Draft guide for running a title on AnyPS5: the build and conversion steps,
the environment variables to set for each run, what to read in the log and
the exit code, how to tell a stall from a crash, Windows-specific notes, and
what to include when reporting a result. Maintainers are asked what they need
from it in the Q&A discussion linked from the page.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-19 14:25:53 +02:00
akkadbakkad89andDevin 7ccf4da486 fix(prx): align declarations to the PS5 3.20 export inventory and add debt notes
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-19 12:25:10 +00:00
milescovielloandClaude Opus 5.5 74a6bdaa01 feat(agc): take a full DCC fill of a resident multisampled target as its fast clear
A multisampled DCC color target imports its uniform DCC fast clear on
first use and then refuses any later change to its color, DCC or CMASK
memory. Titles built on the PS5 Mesa stack fast-clear such a target
every frame with two buffer fills, the CMASK to 0xcc (FMASK cleared,
color expanded) and the DCC to a uniform clear key, so the second
frame stopped on "writes to a resident multisampled DCC target or its
metadata are not implemented".

The fills of a resident DCC target's metadata are now noted. When a
fill covered the whole DCC range since the last use and the range holds
its key once pending writes land (LandedUniformMetadataByte, which
reads the bytes directly rather than through the resident read guard),
the next use clears every sample to that key's color, as the import
does, and takes the new DCC and CMASK generations. A CMASK written
since must have been filled whole too. Partial fills, other keys,
CMASK-only writes and any write to the color memory are still refused.
Fills of a DCC target's CMASK no longer go to the CMASK-only fast-clear
tracker, which refused the expanded code 0xcc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:23:44 +00:00
billybobpicklioandClaude Opus 5.5 73983f1c29 perf(agc): queue CPU-path indirect draws on the draw pipeline
An indirect draw drained queue 0's draw pipeline on entry and recorded every
record on the worker, so titles that draw mostly through DRAW_INDIRECT,
DRAW_INDEX_INDIRECT and DRAW_INDEX_INDIRECT_MULTI got no overlap between the
worker's capture of one draw and the committer's recording of the previous.

The draw now drains only when its records or its count overlap a write still
queued on the pipeline. Records drawn inline drain first, so they stay in
order, and the last drawn record is queued like a direct draw, carrying its
write ranges. APS5_NO_PIPELINED_INDIRECT=1 restores the drain on every
indirect draw.

agc_driver_pipelined_indirect_draw holds the committer with a blocking item and
checks that two indirect draws queue behind it and draw what a direct draw
does, and that a draw whose record a queued label writes waits for it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 14:23:10 +02:00
Dean 8982791bc3 Merge pull request #7654 from ionut27001/fix/libkernel-sysarch-i386-bases
fix(libkernel): answer sysarch I386_GET_FSBASE, I386_GET_GSBASE and undefined operations as measured on a PS5
2026-10-20 01:22:09 +13:00
Adrià c0607cc4bc Merge pull request #6871 from hugodearaujo/fix/audioout2-speaker-angles
fix(libSceAudioOut): report the front left speaker at +30 degrees, as the console does
2026-10-19 14:19:16 +02:00
Adrià 74eec319ca Merge pull request #6822 from ErenYeager1836/feat/libSceRtc-component-accessors
feat(libSceRtc): implement component getters and setters with range validation
2026-10-19 14:16:05 +02:00
Adrià 54e4adde5b Merge pull request #6860 from Amoenus/codex/fix-legacy-haptic-output-main82
fix(audio): route legacy vibration PCM with per-port timing
2026-10-19 14:10:57 +02:00
Adrià 2b049317b8 Merge pull request #6850 from Ondra97/codex/fix-f64-compare-denormals
fix(shader): honor f64 comparison input denormal mode
2026-10-19 14:05:45 +02:00
Adrià ebf1a90270 Merge pull request #6825 from hugodearaujo/fix/report-implied-read-protection
fix(libkernel): report the read bit of every write bit in a mapping's protection
2026-10-19 14:04:45 +02:00
Adrià 5c6c65232b Merge pull request #6844 from al3w0f205/feat/hmd2-firmware-exports
feat(libSceHmd2): export missing firmware functions from database
2026-10-19 14:03:46 +02:00
Adrià 980da5090d Merge pull request #6842 from milescoviello/fix/scripting-heap-own-blocks
fix(libc): give the scripting heap hooks blocks from libc's own heap
2026-10-19 14:03:41 +02:00
xxLnolan 30454880de fix(libc): implement PAF mspace memalign 2026-10-19 13:59:05 +02:00
Alex ColliniandClaude Opus 5.5 1d8acd1eda fix(agc): skip a periodic pipeline cache save while a pipeline creation holds the cache
The saver thread took the snapshot lock with a blocking exclusive lock. Behind
a pipeline creation that runs for minutes (an NVIDIA compile of a 1.5M-word
compute pipeline), the queued writer made the shared_mutex hold every later
pipeline creation on every queue until the compile ended. The periodic save now
tries the lock and waits for the next interval when it is busy; SaveNow and the
teardown save still wait.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 13:57:50 +02:00
alfalfa-starandClaude Opus 5.5 4be9dfe394 docs(agc): list APS5_NO_SPACE_STAMP_ONCE in the environment table
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 13:55:05 +02:00
Savvanis SpyrosandClaude Opus 5.5 c92f09d1d5 docs(debt): name no title in the SCE code gap entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 14:53:58 +03:00
Nithishvelan M 2165427879 feat(libc): implement std::_Throw_bad_optional_access
PPSA26578 (issue #7624) imports _ZSt26_Throw_bad_optional_accessv (NID
KwzEip7m6TM) from libc, and its bundled libc.prx does not export it,
causing the process to exit with 0xC0000139 (GetLastError: 127).

Implement std::bad_optional_access type record and vtable deriving from
std::exception, thrown through ThrowPlain, with what() returning
"bad_optional_access", and add unit test coverage in ExceptionRuntime.
2026-10-19 17:22:27 +05:30
Dean 6762694735 Merge pull request #7761 from angleboyndn-stack/fix/libc-secure-string-destination-limits
fix(libc): reject oversized secure string destinations
2026-10-20 00:52:00 +13:00
thuanquangandClaude Opus 5.5 01ed9192ed fix(shader): flush v_add_f64 and v_mul_f64 denormals by the f64 field
v_add_f64 and v_mul_f64 ignored the FLOAT_MODE f16/f64 denormal field.
On RDNA2 (gfx1031) bit 6 clear flushes both inputs to a zero of their
sign, and bit 7 clear flushes a sum below 2^-1022 and a product whose
exact value rounded to 53 significant bits with an unbounded exponent
is below 2^-1022. The product test scales one source by 2^64 and
compares the host product with 2^-958.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:49:58 +07:00
ionut27001andClaude Opus 5.5 dca67ae477 fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5
In a payload process on a PS5 (firmware 12.70),
sysctlbyname("kern.rng_pseudo") answers a size query with 64 and gives
at most 64 bytes per call, up to a 65536-byte buffer. A buffer smaller
than 64 bytes gets as many bytes as its length and a null length gets
none, both with -1 and ENOMEM; a null buffer with a null length returns
0, and errno is kept when the call succeeds. Here the whole buffer was
filled, a size query threw and the length was never changed. The 64
random bytes are now drawn only for a read that passes both a buffer
and a length.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 14:49:39 +03:00
Adrià bbb45463c7 Merge pull request #6849 from al3w0f205/feat/audiopropagation-firmware-exports
feat(libSceAudioPropagation): export missing firmware functions from database
2026-10-19 13:46:36 +02:00
Adrià 87aee045df Merge pull request #6821 from JJenkx/fix/point-context-sdk-defaults
fix(agc): initialize point size and limits from SDK defaults
2026-10-19 13:45:12 +02:00
Adrià 2b6c1112b8 Merge pull request #6763 from SP4C3B4R-8/perf/windows-draw-input-copies
perf(agc): copy draw inputs on NVIDIA's Windows driver instead of binding host imports in place
2026-10-19 13:45:06 +02:00
Adrià db73af3506 Merge pull request #6831 from ErenYeager1836/fix/savedata-sync-memory-init-check
fix(libSceSaveData.native): return error for uninitialized sceSaveDataSyncSaveDataMemory
2026-10-19 13:43:56 +02:00
Adrià 77b3edf32a Merge pull request #6841 from Sevthered/feat/ajm-pcm-resample
feat(ajm): resample interleaved s16 PCM through codec 23
2026-10-19 13:38:50 +02:00
Adrià 62e946f114 Merge pull request #6833 from ErenYeager1836/feat/libkernel-sysconf-limits
feat(libkernel): support _SC_ARG_MAX, _SC_OPEN_MAX and _SC_IOV_MAX in sysconf
2026-10-19 13:37:44 +02:00
David f673abe047 docs(debt): record the macOS RLIMIT_NOFILE at load in libkernel.md 2026-10-19 13:35:03 +02:00
thuanquangandClaude Opus 5.5 abea1bc710 fix(shader): flush f64 floor, ceil, fract and frexp denormal inputs
v_floor_f64, v_ceil_f64, v_fract_f64, v_frexp_mant_f64 and
v_frexp_exp_i32_f64 ignored the FLOAT_MODE f16/f64 denormal field. On
RDNA2 (gfx1031) bit 6 clear flushes a denormal input to a zero of its
sign, so v_ceil_f64 of 2^-1074 is 0 instead of 1, and bit 7 clear
flushes the denormal result v_fract_f64 gives for a positive denormal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:34:17 +07:00
xXPBSXxandClaude Sonnet 5.5 0b8c849f55 docs(agc): record the queue 0x20 label wait that holds another slot's address
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 13:32:36 +02:00
xXPBSXxandClaude Sonnet 5.5 7d5089a7fb docs(debt): record the CMASK clear pass fault on AMD without pipeline libraries
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 13:31:58 +02:00
milescovielloandClaude Opus 5.5 1f63ba35af docs(agc): say where PS_ITER_SAMPLE alone still throws and which memory accesses can differ
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:28:30 +00:00
Adrià 3691f6ffc2 Merge pull request #6826 from hugodearaujo/fix/page-table-stats-console
fix(libkernel): count page-table entries the way the console does
2026-10-19 13:24:22 +02:00
RengundomandClaude Opus 5.5 88f8184102 fix(trace): write the benchmark file safely and off the presenter
Review of the benchmark report:

- The file is written to `<name>.tmp` and moved over the previous one, so a
  crash or kill during a rewrite keeps the last complete report.
- A dedicated writer keeps only the newest pending snapshot, so two reports
  can no longer be joined into one file when the writer falls behind.
- The report is formatted on the writer thread. The presenter hands over the
  kept intervals, which are shared and never copied, so the interval that
  closes no longer pays for formatting every earlier one.
- Hosts that are not x86 or report no CPU brand string leave the host fields
  out instead of failing every summary line.
- A `contentVersion` that is not a string, or does not fit, is left empty
  instead of failing the title's metadata.
- Tests cover the 240-interval rotation and `intervals_dropped`, the
  newest-only writer, the pending write on stop and the atomic replace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 06:21:04 -05:00
Adrià f6eeca4f5f Merge pull request #6786 from fdfawef324/claude/agc-indirect-args-stale
fix(agc): wait for address-based writers before reading indirect dispatch arguments
2026-10-19 13:16:24 +02:00
akkadbakkad89 8f3849e791 fix(prx): correct the offline NP WebAPI error code and list silent stubs 2026-10-19 11:16:04 +00:00
hugodearaujo bec9850112 feat(agc): record GPU checkpoints through VK_AMD_buffer_marker 2026-10-19 08:15:43 -03:00
muteburrito 3dc2ecba0b test(relinker): characterize embedded code data scanning 2026-10-19 16:39:04 +05:30
Lindamea1andClaude Opus 5.5 d8baccc195 feat(libSceNetCtl): declare sceNetCtlGetInfoV6
libSceNetCtl exports sceNetCtlGetStateV6, sceNetCtlRegisterCallbackV6
and sceNetCtlUnregisterCallbackV6 but not sceNetCtlGetInfoV6 (NID
Jy1EO5GdlcM). Dragon Ball Xenoverse 2 (PPSA08587) imports it, and an
import that no system library exports stops a title before its entry
point: on Linux ld.so refuses the relinked executable with "undefined
symbol: Jy1EO5GdlcM", and on Windows the entry stub prints "FAIL:
unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx" and raises
0xC0000139. The title's tester reports that it does not call the
function before its loading screen.

It is a Sony network-control call with no FreeBSD counterpart, and
neither its parameters nor the IPv6 info layout are known, so it is
declared without parameters and throws through
NotImplemented_nid_no_patch, as CONTRIBUTING.md asks of exports that
cannot be implemented. The gap is recorded in
docs/dev/debt/libSceNetCtl.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:07:45 +01:00
Adrià 97d5d7a52a Merge pull request #6737 from fogydes/fix/libkernel-eventflag-deletion-and-multiwaiter-race
fix(libkernel): prevent use-after-free on event flag deletion and multi-waiter race
2026-10-19 13:05:18 +02:00