219 Commits
Author SHA1 Message Date
Dean 830ccd121f Merge pull request #9303 from oneandonlydean/fix/getdents-app0-symlink-type
fix(libkernel): report app0 symlinks as their target type in getdirentries
2026-10-23 02:19:24 +13:00
Rookie 123ba70839 fix(relinker): load Linux executables at 0x400000 by default 2026-10-21 19:25:33 +01:00
Dean Galvin 58ad4eda77 fix(libkernel): report app0 symlinks as their target type in getdirentries
On Linux sceKernelGetdirentries copied the host d_type, so a directory under app0 that is a host symlink was listed as a link, and a title that only descends into directory entries skipped it. Inside the app0 tree, report a symlink (or an entry of unknown type) as the type of its target; links elsewhere, and dangling links, stay links.
2026-10-22 06:20:04 +13:00
Dean 27bcd6a29e Merge pull request #8162 from savvaniss/fix/windows-runtime-module-start
fix(relinker): start Windows runtime modules the executable needs when the title loads them
2026-10-22 02:10:11 +13:00
JJenkxandClaude Opus 5.5 3316ca3b24 feat(libc): list the reporting thread's own calls in the call trace report
The crash and abort reports printed the last 64 traced calls of the whole
process, so a thread that loops on a traced import (a mutex lock/unlock
pair, a profiler marker) pushes the calls of the faulting thread out of the
report. The ring already keeps the last 65536 calls with their thread.

CopyThreadCallTrace_nid_no_patch returns the most recent calls of one
thread from that ring, oldest first, and both reports (Windows crash and
abort, Linux abort) list up to 32 of them for the reporting thread after
the process-wide list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:25:31 -04:00
Dean Galvin 143ed02750 Merge branch 'main' into #7417
Resolve docs/dev/debt/libc.md: keep main's _Throw_Cpp_error entry and this branch's call tracing entry.
2026-10-21 06:33:59 +13:00
Dean 083a3be61c Merge pull request #8058 from HQasper/claude/project-thread-md0z38
feat(libSceFont): open the other script files of a system font set
2026-10-21 06:26:24 +13:00
Dean 1a3a1b2e0e Merge pull request #3998 from MrMha/feat/controller-timelines
feat(pad): queue timed controller button sequences
2026-10-21 04:08:30 +13:00
Adrià 4cfcb003de Merge pull request #7862 from parl0v/fix/storage-budget-sampled-reserve
fix(agc): reserve only the sampled textures alive from the storage image budget
2026-10-20 16:45:56 +02:00
Adrià 576b4b94b2 Merge pull request #7873 from whamre/feat/hang-dump-stack-candidates
feat(libc): list stack return address candidates in the hang dump
2026-10-20 16:20:04 +02:00
Savvanis Spyros 079e6ca316 Merge remote-tracking branch 'origin/main' into fix/windows-runtime-module-start 2026-10-20 15:27:06 +03:00
Josip Parlov 321460a4ed fix(agc): reserve only the sampled textures alive from the storage image budget
StorageTextureBudget reserved the larger of the sampled textures alive
and their 2 GiB floor. The sampled budget already reserves
TextureCacheBudget, at least the storage cap, for the storage cache, so
on an 8 GB card the two caches each kept the other's maximum: with
3936 MiB used outside the caches on a 7189 MiB budget and 49 MiB of
sampled textures, the storage budget came out at 306 MiB and sat at its
512 MiB floor while about 2.7 GB of the budget stayed free.

The storage budget now reserves the sampled textures alive and gives
room back as they grow, at its next read. Where they hold 2 GiB or more
the budget is unchanged.
2026-10-20 13:09:20 +02:00
Adrià 5b2654a28b Merge pull request #6771 from XairRrR/fix/pipeline-cache-version
fix(agc): keep the Vulkan pipeline cache file with its shader cache version
2026-10-20 11:07:49 +02:00
Adrià 7faab0aea9 Merge pull request #4891 from dantdmdarealguy/feat/screenshot-hotkey
feat(agc,videoout): save the displayed frame as a PNG with a screenshot key
2026-10-20 10:40:02 +02:00
Ethan Barcus a8e06fb008 Merge branch 'main' into feat/trace-bench-fields 2026-10-20 02:57:23 -05:00
dantdmdarealguy e3125e43af feat(agc,videoout): save the displayed frame as a PNG with a screenshot key
F12 (the new Screenshot input action) requests a capture of the next
presented display buffer. The presenter records it with the existing
APS5_DUMP_FRAMES GPU readback at full resolution, and the frame dump
writer thread encodes it with decoder_png into anyps5-screenshots/
beside the executable, or ANYPS5_SCREENSHOTS.
2026-10-20 00:28:39 -05:00
Savvanis SpyrosandClaude Opus 5.5 45cc02c49c fix(relinker): start Windows runtime modules the executable needs when the title loads them
A --module-dir module that only the executable needs was initialized by
the Windows entry stub with no start arguments, so a later
sceKernelLoadStartModule with arguments found it started and its
module_start never saw them. Unity's mono-ps4.sprx keeps those
arguments for the plugins it loads. Such a module is now deferred like
any other runtime module: mapped at startup and started, with its
arguments, when the title loads it. Modules another guest module needs
are still started at startup, and Linux and macOS are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 03:57:24 +03:00
Ishmam Ahmed 78634fb0a9 feat(relinker): support --trace-imports for Linux output
The Linux entry stub now passes each traced import through libc.prx's
TraceImport_nid_no_patch before it calls the guest entry, and stores the
returned thunk in the import's slot. The same imports are traced as on
Windows: functions bound through a PLT slot or a GOT slot, without an
addend, and not weak. TraceImport_nid_no_patch is bound eagerly through
an added GLOB_DAT relocation, so a libc.prx without it fails at load.
Each slot's page is made writable with mprotect first, so slots inside a
PT_GNU_RELRO range can be replaced.

--trace-imports now requires libc.prx among the libraries on Linux too,
and is refused with --macos.
2026-10-19 22:56:03 +01:00
Adrià 965dc2d78c Merge pull request #7298 from eliyarson/feat/videoout-telemetry
feat(videoout): write pad and present telemetry to APS5_VIDEOOUT_TELEMETRY_DIR
2026-10-19 20:40:04 +02:00
Claude bff194647a feat(libSceFont): open the other script files of a system font set
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 18:31:56 +00:00
Adrià e90a1d1802 Merge pull request #7685 from MarcZX10/codex/docs-vr-support-limitations
docs: explain current VR support limitations
2026-10-19 19:38:39 +02:00
Adrià a2071e1609 Merge pull request #7592 from CPritch/docs/usage-app0-symlinks
docs(usage): say that app0 must not contain symbolic links on Linux
2026-10-19 19:35:42 +02:00
MarcZX10 2a7e1b46eb docs: explain current VR support limitations 2026-10-19 14:43:14 +00:00
Adrià 3647fcc68a Merge pull request #7370 from klosixgaming-arch/docs/system-fonts-boot
docs(usage): say what happens without system fonts and where to get them
2026-10-19 15:42:02 +02:00
Eli Yarson b8607f4ced feat(videoout): write pad and present telemetry to APS5_VIDEOOUT_TELEMETRY_DIR
APS5_VIDEOOUT_TELEMETRY_DIR=<directory> appends one JSON object per line to <directory>/videoout.jsonl: a contract line for the run (commit and pid), a pad line whenever the published pad state changes in its buttons, sticks, L2 or R2, a present line after the first present and every 30 after that with the count and rate the window title shows, and a drops line with the number of lines the writer discarded, reported every ten seconds while it grows and once at a normal exit. A bounded queue of 4096 lines and one writer thread batch the file, so neither the present nor the input path waits for it; a pad change that the full queue refused stays pending for a later publish, and the frame count moves from UpdateTitle's function-static to DisplayWindow so the input path can name the present it belongs to.

Without the variable no file is opened and no thread is started: a present or an input update costs one call that checks a guard variable and returns null.
2026-10-19 15:27:49 +02:00
Adrià Franch c8cc0380d0 docs(usage): move display resolution section below the relinker paragraphs it was splitting from Runtime layout 2026-10-19 14:48:42 +02:00
MarcZX100 4c3fca7e66 docs(usage): explain video output resolution 2026-10-19 14:48:42 +02:00
WernerandClaude Opus 5.5 2ac433e3cb feat(libc): list stack return address candidates in the hang dump
The Windows crash report walks every other thread's rbp chain only, so
a thread waiting inside ntdll or in code built without frame pointers
showed no frames at all. For a thread whose chain yields fewer than two
frames, scan the 32 KiB above its rsp while it is suspended and print
up to 24 words that point at executable memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T86KdkUbEv7m5hrCbPbkAp
2026-10-19 13:24:02 +02:00
David a29f7d0799 docs(relinker): describe --macos-fixed-base 2026-10-19 10:32:50 +02:00
eth-j17andClaude Opus 5.5 ca4303a155 feat(trace): record host, title and per-frame benchmark data
The summary line names the CPU, its thread count, physical memory and,
with param.json, the title ID, name and content version.

APS5_TRACE_BENCH=1 with APS5_TRACE_SUMMARY_EVERY rewrites
aps5-bench-<commit>-<pid>.json.gz at each interval with the time between
every two presents, so reports can be recomputed and checked from raw
frame times. param.json's contentVersion is read when present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 01:01:13 -05:00
MrMha c72ccac3e6 feat(pad): queue timed controller button sequences 2026-10-19 07:58:16 +04:00
klosixgaming-arch 4e50cece90 docs(usage): say what happens without system fonts and where to get the substitutes
The paragraph said a game shows no text without the font files. A title that asserts on the sceFontOpenFontSet result stops at boot instead, so say both, and say where the Noto Sans substitutes come from.
2026-10-19 03:15:13 +00:00
XairRrR 907c9cd1b6 fix(agc): keep the Vulkan pipeline cache file with its shader cache version
The pipeline cache file lived in the shader cache root and every run
merged its pipelines into it, so pipelines built from SPIR-V of earlier
recompiler versions were never dropped. The file only grew (965 MB for
PPSA05684 after a few recompiler changes) and the driver loads all of
it into host memory at device creation.

The file now sits in the directory of the current shader cache source
version, next to the variants it was built from.

AI-assisted: yes
2026-10-19 03:53:56 +02:00
EdouardSenceandClaude Opus 5.5 d71853cf25 feat(pad): add a Shake input that swings the reported motion while held
Some titles stop on a prompt to shake the controller, which keyboard players
and controllers without motion sensors cannot answer. While the Shake input is
held (X by default), the composed pad state reports motion with the
acceleration and angular velocity flipping sign every 50 ms; a controller's own
sensor data is used otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 01:16:53 +02:00
Adrià eb1a15b5cc Merge pull request #6314 from eliyarson/feat/relinker-game-patches
feat(relinker): add conversion-time game patches
2026-10-19 00:37:51 +02:00
Adrià 8a456334f6 Merge pull request #6240 from ArjenS-LA/fix/guest-registry-weak-imports
fix(relinker): preserve weak imports in guest module registries
2026-10-19 00:06:30 +02:00
AlxcBTW f0ec9bd2a0 Merge remote-tracking branch 'origin/main' into pr/input-analog-keys 2026-10-18 22:27:23 +02:00
Dean effb7d2d5a Merge pull request #7498 from AlxcBTW/pr/input-slow-mice
fix(libScePad): smooth a slow-reporting mouse over its measured report interval
2026-10-19 09:22:19 +13:00
Dean ce396a5d41 Merge pull request #7497 from AlxcBTW/pr/input-default-l2
feat(libScePad): bind L2 to R and the first mouse side button
2026-10-19 09:22:11 +13:00
Dean 65b0ad288b Merge pull request #7496 from AlxcBTW/pr/input-capture-hotkey
feat(libScePad): toggle mouse capture with F7 beside the middle button
2026-10-19 09:21:58 +13:00
Adrià fd58ca321e Merge pull request #6190 from devavijitsingh/feat/web-batch-conversion
feat(web): convert multiple app ZIPs as one bundle
2026-10-18 22:18:18 +02:00
Eli Yarson 346b0a92ca feat(relinker): add conversion-time game patches
A per-game relinker-patches.toml (or --patches) replaces verified bytes in
the input executable and bundled modules before conversion. Entries are
checked against the expected bytes and against every in-place writer,
the ELF header range and relocation targets. An <output-stem>.patches.toml
manifest records the applied entries, and --verify-patches checks an input
or a converted output. With no patch file the output is unchanged.
2026-10-18 14:57:13 -03:00
Dean c3591adf97 Merge pull request #7510 from AlxcBTW/pr/crash-stack-words-v4
feat(libc): dump the faulting thread's stack words in Windows crash reports
2026-10-19 06:52:21 +13:00
AlxcBTW 5dbdd6b797 Merge main into pr/input-analog-keys 2026-10-18 18:51:35 +02:00
Karim Masmoudi 57e52c1f03 fix(relinker): report processor 0 from RDTSCP under --to-rosetta
Rosetta sets RDTSCP's ECX to its constant TSC_AUX, 0xAAAAAAAB, which is
not a processor index. --to-rosetta already makes RDPID return processor
0 for the same reason, so code reading the processor through RDTSCP saw
a different value from code reading it through RDPID.

--to-rosetta now moves RDTSCP into an optional stub that runs the
instruction unchanged and then loads 0 into ECX with a MOV, which
leaves the counter in EDX:EAX and the flags as they were. A site with no
movable instruction after it for the jump is kept, as for RDPID. The
Intel target and a plain relink are unchanged.
2026-10-18 18:27:15 +02:00
CPritch 94b9432d01 docs(usage): say that app0 must not contain symbolic links on Linux 2026-10-18 17:05:49 +01:00
Yunus Shaikh 0172d28496 Merge main into feat/videoout-performance-overlay 2026-10-18 05:08:24 -07:00
AlxcBTW 127ee82f02 feat(libc): dump the faulting thread's stack words in Windows crash reports
APS5_CRASH_STACK_BYTES=<n> prints n bytes of stack words from rsp after the
stack return address candidates, then eight words at every distinct stack word
that points at readable, non-executable memory outside the thread's stack.
Off when the variable is unset, empty or 0.
2026-10-18 12:20:10 +02:00
AlxcBTW 06ca6a066b fix(libScePad): smooth a slow-reporting mouse over its measured report interval 2026-10-18 11:00:03 +02:00
AlxcBTW 367d46e480 feat(libScePad): bind L2 to R and the first mouse side button 2026-10-18 11:00:02 +02:00