Commit Graph
320 Commits
Author SHA1 Message Date
ChronyyxandClaude Opus 5.5 c697fb0ba9 feat(relinker): frame red-zone leaves whose prologue or exit is shorter than a jump
--frame-red-zone replaces a leaf's prologue and each exit with a 5-byte jump
to a stub, so it skipped leaves whose pushes or pop-and-ret exit were shorter
than that, and leaves with neither pushes nor an allocation. A short prologue
now takes in the straight-line instructions after it and a short exit those
before it, re-encoded in the stub with the moved displacement. Widening stops
at branches, rets, RIP-relative instructions, pushes and pops, and the leaf is
skipped when a branch targets the instructions taken in or the first
instruction of a widened prologue, or when a leaf without pushes pushes or
pops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 02:47:12 -04:00
frankea ad9a0c8ef9 fix(libkernel): report 12 GiB of direct memory, as a PS5 does
sceKernelGetDirectMemorySize returns 0x300000000 inside Gran Turismo 7 (PPSA01317) on a PS5 with firmware 13.40. DIRECT_MEMORY_SIZE was 13824 MiB.
2026-10-24 22:11:58 -04:00
milescovielloandClaude Opus 5.5 a938dd8f20 feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
A traced run that ends without a crash or an abort never reports which
imports it called. With APS5_TRACE_CALLS_FILE set, the first traced import
starts a thread that rewrites that file every 10 seconds with every import
called so far, most called first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 00:15:39 +00:00
thibautandClaude Opus 5.5 ad047899bb perf(agc): grow the pipeline store from 1024 up to 4096 entries
The graphics pipeline store kept a fixed 1024 entries and the pipeline journal replayed at most
1024 records, and a replayed pipeline that found the store full was dropped. A title whose
working set is larger rebuilt the rest at the draw on every run, and evicted pipelines it kept
using were rebuilt again and again.

The bound now starts at 1024 and doubles up to 4096: a journal replay that does not fit grows it
instead of dropping the pipeline, and so does eviction churn (a ghost list of evicted keys, checked
every bound/32 evictions: more than half of them came back). It never shrinks during a run;
APS5_PIPELINE_STORE_ENTRIES still fixes it. The journal loads its last 4096 records by default
(APS5_PIPELINE_JOURNAL_ENTRIES). Resident pipelines are bounded by count, not bytes.

agc_driver_recorder_tests --benchmark-pipeline-store-memory [count] (opt-in, not registered)
builds count graphics pipelines with one fragment module each through CachedPipeline and prints
process private bytes and VK_EXT_memory_budget heap usage before and after: with the triangle
shaders about 59 KiB host and no device memory per pipeline on an RTX 4090, 100 KiB host and
8 KiB device-local on a UHD 770.

Tests: agc_pipeline_store_growth (fails on main), agc_pipeline_store_fixed_bound,
agc_pipeline_store_replay_growth (replays on one thread: the mock Vulkan is not thread-safe).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017SNUYRd7sRKZrMYpquAsnU
2026-10-25 02:02:41 +02:00
Dean c4446bbb09 Merge pull request #9332 from rooklz/fix/windows-console-base
fix(relinker): prefer 0x400000 for Windows executables
2026-10-25 12:57:28 +13:00
WhiteAssassins dbe74bf422 fix(tools): guide users through verified patch choices 2026-10-24 15:24:38 -04:00
WhiteAssassins 20f1039d89 feat(tools): list verified patch catalog entries 2026-10-24 14:52:36 -04:00
SlugZero 58a1bcc5a3 feat(pad): support up to 4 controllers with dynamic user discovery
- Track up to 4 pad slots in libScePad with per-slot inputs, outputs, sensor fusion, and deadbands
- Support dynamic user login/logout events and multi-user registration in libSceUserService
- Map SDL controllers 0-3 to Players 1-4 in libSceVideoOut while preserving Player 1 keyboard and mouse composition
- Add test coverage for multi-controller pads and multi-user services
2026-10-24 19:21:15 +02:00
Adrià d01070d6c3 Merge pull request #5640 from EagleBearerYS/feat/relinker-frame-frameless-leaves
feat(relinker): frame red-zone leaves without a frame pointer by moving their rsp operands
2026-10-24 18:14:53 +02:00
Rookie 39df8e081c fix(relinker): prefer 0x400000 for Windows executables 2026-10-24 15:58:35 +01:00
Dean a8c8b8117b Merge pull request #8900 from WhiteAssassins/feat/patch-advisor
feat(tools): recommend verified local game patches
2026-10-25 03:51:47 +13:00
roboterspinne 5362dcaaf0 fix(relinker): validate every entry of the Linux run path
LinuxElfPatcher wrote --rpath into DT_RUNPATH unchanged, so an empty
entry (an empty value, a leading or trailing colon, or a double colon)
reached the output, where glibc searches the working directory for it,
while the macOS and Windows outputs reject empty run paths. The guest
module rule that each entry is absolute or begins with $ORIGIN only
looked at the start of the whole value, so "$ORIGIN/libs:" or
"$ORIGIN:relative/libs" passed. The Linux patcher now rejects an empty
entry with the message the macOS patcher uses, the guest rule checks
every colon-separated entry, and USAGE.md says so.
2026-10-24 12:16:08 +00:00
Adrià b84322da6a Merge pull request #7918 from Kernel-Hunter/fix/rosetta-xsaveopt
fix(relinker): rewrite XSAVEOPT to XSAVE under --to-rosetta
2026-10-24 14:14:59 +02:00
Claude 3d0b24843d docs(usage): state that converted titles run without a sandbox
A converted title runs with the user's permissions, and its executable is not randomized on any host: Linux loads it at a fixed address unless the deprecated --lazy-binding is used, Windows without DYNAMIC_BASE, and macOS without MH_PIE. Say so next to the host requirements.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E7j2SYGtKCiPHcU9SwUSjh
2026-10-24 10:42:05 +00:00
Adrià 0210d3b878 Merge pull request #8909 from dantdmdarealguy/docs/usage-mimalloc-dlls
docs(usage): name the mimalloc DLLs a self-built Windows libs/ needs
2026-10-24 11:29:00 +02:00
Karim Masmoudi ce6c2a0c66 fix(relinker): rewrite XSAVEOPT to XSAVE under --to-rosetta
XSAVEOPT raises an illegal instruction under Rosetta on an M5 running
macOS 27.0.1, as XSAVEC does, while XSAVE and XRSTOR save and restore
x87, SSE and AVX state in the standard format. The PS5's Zen 2 has
XSAVEOPT, so code built for it can use the instruction without a CPUID
check.

XSAVEOPT differs from XSAVE only in the init and modified optimizations:
it may skip writing state that is in its initial configuration or
unchanged since the last XRSTOR from the same area. XRSTOR restores the
same state from the area XSAVE writes, so --to-rosetta rewrites
XSAVEOPT (NP 0F AE /6, memory operand) to XSAVE (/4) in place, keeping
the prefixes and the operand, as RDSEED becomes RDRAND. CLWB (66 0F AE
/6), MFENCE, UMONITOR, UMWAIT and the Intel target are left alone.
XSAVEC is not converted: it writes the compacted format.

The converter tests check the rewrite for the plain, REX.W,
RSP-relative, extended-base, RIP-relative and FS-relative forms, check
that the neighbouring 0F AE encodings are not taken, and execute the
rewritten XSAVEOPT64 followed by XRSTOR on YMM3 in the x86-64 build.
The --to-rosetta integration test now covers XSAVEOPT as well.
2026-10-24 11:01:44 +02:00
Dean ec3ea2f558 Merge pull request #6586 from JJenkx/fix/linux-runtime-module-start
fix(loader): defer Linux runtime module starts until requested
2026-10-24 19:54:29 +13:00
Dean 5540852c54 Merge pull request #9241 from veosett/codex/audit-sdk-symbol-names
fix(tools): flag qualified imports exported only under a NID
2026-10-24 14:21:32 +13: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
JJenkx adf0176d3a fix(loader): preserve SDK startup in browser conversions 2026-10-23 11:15:40 -04:00
Santhosh Kumar 3bcd89e10e fix(agc): reclaim idle images safely during cache creation
Forward new-image recovery permission through AllocateImageMemory while preserving host-memory fallback and allocated-type reporting. Reuse held cache locks only at safe construction points, retain caller-held sampled textures and pending storage results, and try resource-cache removal without waiting.

Count released Vulkan allocations and saturate the reclaim reserve. Cover sampled/storage allocation failures, host fallback after image recovery, bounded attempts and overflow. Remove stale conflict markers and unrelated debt, and refresh the recorded validation.
2026-10-23 16:37:26 +02:00
Dean 5e9f4b8966 Merge pull request #9832 from johandavidcm/fix/libkernel-dlopen-unrelinked
fix(libkernel): fail dlopen of an unrelinked module without the Windows Bad Image dialog
2026-10-23 23:18:00 +13:00
Kovalev Vladislav 46ff145113 fix(tools): flag qualified imports exported only under a NID 2026-10-23 12:18:57 +06:00
Yunus Shaikh a376e37b88 fix(relinker): decode each red-zone leaf over its whole FDE range 2026-10-23 05:22:26 +00:00
Yunus Shaikh 542cb30f70 docs(relinker): describe the operand stubs and refused patches of --frame-red-zone
The debt entry no longer says that a leaf with an rsp operand that
cannot move in place is skipped. A new entry says that such an operand
moves to a stub, when the leaf is still skipped, and that a game patch
over a framed site or a moved displacement is refused. The USAGE row
says the same in short.
2026-10-23 04:50:13 +00:00
Yunus Shaikh a665ef2dfb docs(relinker): describe the per-leaf shift and sub allocations of --frame-red-zone 2026-10-23 03:45:27 +00:00
Yunus Shaikh ff16118b63 Merge branch 'main' into feat/relinker-frame-frameless-leaves-next 2026-10-23 03:13:53 +00:00
raghav314andClaude Opus 5.5 c0dbd1871c perf(agc): draw finisher pipeline (APS5_DRAW_PIPELINE)
The second half of a pipelined draw (stage materialization, cache insert,
enqueue) runs on a finisher thread, overlapping the next draw's packet
work; draws whose stages could write memory are held back. Commits skip
work whose inputs did not change since the last commit, color metadata
passes are ordered through the pipeline, resource and storage-image proofs
are reused within one collect epoch until a write breaks them, and a shape
entry is refreshed in place at the second sight of the same read user words.
APS5_VERIFY_DRAW_PIPELINE checks reused proofs against a full check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 03:46:57 +05:30
Dean d2b1c3edd5 Merge pull request #9079 from JJenkx/feat/pad-input-chords
feat(tools): press several buttons together from pad_input.py
2026-10-23 11:09:00 +13:00
Dean 44ce348a74 Merge pull request #9291 from veosett/codex/self-alignment-padding
fix(tools): bound total SELF alignment padding
2026-10-23 09:40:16 +13:00
Adrià da750e65c0 Merge pull request #9354 from xXPBSXx/docs/input-mapping-overlay-default
docs(input): list the F10 performance overlay in the default bindings table
2026-10-22 20:22:54 +02:00
Johan David dc84bec7b9 fix(libkernel): fail dlopen of an unrelinked module without the Windows Bad Image dialog
On Windows, dlopen passed a module that was never relinked to LoadLibraryExW, which raised the
modal Bad Image hard-error dialog and blocked the calling thread until someone answered it. The
load now runs with SEM_FAILCRITICALERRORS set for that thread only, so it fails at once with the
same result as before. Every failed load is reported once per file on stderr with a [module]
prefix; a file that exists with no relinked .guest.prx names the relinker's --module-dir option.
2026-10-22 13:05:34 -05:00
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
Adnan Khan f3dcf6d8be fix(relinker): skip unreadable candidates and fold case for --windows in the needed-module report 2026-10-22 14:02:37 +05:30
Adnan Khan 00d6b33126 feat(relinker): report needed modules shipped outside the module directories 2026-10-22 12:48:19 +05:30
xXPBSXxandClaude Sonnet 5.5 949737625b docs(input): list the F10 performance overlay in the default bindings table
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 21:00:50 +02:00
Rookie 123ba70839 fix(relinker): load Linux executables at 0x400000 by default 2026-10-21 19:25:33 +01:00
SueryandClaude Opus 5.5 7ae3fc8c22 feat(libSceVideoOut): open the display window fullscreen with ANYPS5_FULLSCREEN
A launcher that shows games fullscreen can set ANYPS5_FULLSCREEN instead of
pressing F11 after the window appears. The window opens with
SDL_WINDOW_FULLSCREEN_DESKTOP, the same mode F11 switches to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017Dqgm9nUKygsXzr6poJsHJ
2026-10-21 14:03:29 -04:00
Kovalev Vladislav da1d9407ed fix(tools): bound total SELF alignment padding 2026-10-21 23:23:52 +06: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 505943c4ef feat(tools): press several buttons together from pad_input.py
Some titles wait for a chord on their title screen: RollerCoaster Tycoon
Adventures Deluxe (PPSA17330) asks for L1 + R1. The command file already
carries a button bit field, but the helper accepted one name. Names joined
by '+' are now combined into one command; unknown names, duplicates and
release in a chord are rejected without touching the command file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 07:55:36 -04:00
WhiteAssassins 087cf11045 fix(tools): continue after relinker candidate errors 2026-10-21 05:16:06 -04:00
WhiteAssassins efab492f4f fix(tools): verify local relinker and isolate bad catalog entries 2026-10-21 05:05:36 -04:00
WhiteAssassins c9fe159e6d docs: clarify local patch advisor usage 2026-10-21 04:51:59 -04:00
WhiteAssassins 21481b3cd4 test(tools): verify patch advice with real relinker 2026-10-21 04:37:58 -04:00
dantdmdarealguy e2b5a3e9d4 docs(usage): name the mimalloc DLLs a self-built Windows libs/ needs 2026-10-21 00:40:55 -05:00
WhiteAssassins 05f005e341 feat(tools): verify additional executables in patch advisor 2026-10-21 01:35:06 -04:00
WhiteAssassins 04ec954284 feat(tools): recommend verified local game patches 2026-10-21 01:05:51 -04: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 <[email protected]>
2026-10-20 20:25:31 -04:00