AnyPS5 Guides

Set up AnyPS5 on Windows

Set up AnyPS5 on Windows with matching libraries, the --windows relinker option and a consistent runtime folder. Diagnose errors 193 and 126 and missing DLLs.

Reviewed ·

Relink for the correct platform

Use the Windows relinker and Windows-native library archive, or build both from the same source tree. The --windows flag selects PE output; naming the output app.exe does not select Windows by itself. Place the input’s bundled modules in sce_module/ or sce_modules/ beside the input ELF, or provide their parent with --sce-module-path.

Terminal / example
.\relinker-v0.1.2.exe --windows .\source\input.elf .\runtime\app.exe
cd .\runtime
.\app.exe

Read the error before replacing files

Error 193 usually indicates the wrong binary format: do not put original PS5 libraries in libs/. Error 126 can mean a missing dependent DLL, not only a missing named PRX. Custom builds need matching libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll in libs/. The release archives include their matching runtime dependencies.

Run from a terminal and preserve the earliest error. For direct-memory allocation failures, check total system commit and page-file configuration before blaming the GPU. Do not copy unrelated DLLs from download sites or change the global PATH to hide a dependency mismatch.

Runtime-loaded game modules on current main

v0.1.2 USAGE documents repeated --module-dir for game modules outside sce_module/, such as Unity Media/Modules and Media/Plugins. Pass each directory explicitly, preserve the module layout and pair the relinker with its libraries. These options do not verify a title or justify deprecated skip-module, syscall-check or lazy-binding workarounds.

Verify the folder and first launch

After conversion, compare the output against the runtime layout in the getting-started guide. Do not move only app.exe and leave its generated game modules behind. Resources must remain under app0/ in the layout expected by the game, while AnyPS5 host libraries belong under libs/. Changing the current working directory can make relative resources disappear even when the executable itself starts. Quote paths containing spaces when running commands in your shell.

If the window opens without responding, test simple keyboard input and one controller separately before blaming rendering. v0.1.2 includes #5580 for the vendor-HID enumeration hang in #1042; DirectInput-only devices remain a limitation. Keep the earliest error and peripheral list. For black output, record shader/presentation errors and the build rather than calling it a DLL problem.

Keep conversion and startup diagnostics

--windows-diagnostics adds dependency diagnostics and --registry writes import registries. Use matching tools and libraries and inspect the earliest loader error. Zero absent imports does not rule out throwing stubs, memory faults or presentation failures. These options are documented in the v0.1.2 USAGE file.

Terminal / example
.\build\core\relinker\relinker.exe --windows --windows-diagnostics --registry .\source\input.elf .\runtime\app.exe

Select the libraries to trace on Windows

The v0.1.2 usage document specifies --windows --trace-imports and APS5_TRACE_CALLS as a comma-separated library list or all. Without the variable, calls are not recorded. Abort/crash reports retain the last 64 calls and 32 most-called imports, not arguments or a complete execution trace. --lazy-binding conflicts with this conversion mode. Use matching libraries; --windows-fixed-base is an address-placement diagnostic, with failure if that address is occupied.

Terminal / example
relinker --windows --trace-imports source/eboot.elf runtime/app.exe
cd runtime
$env:APS5_TRACE_CALLS = 'all'
.\app.exe

Windows HID fix is included in v0.1.2

#1050 closed in favour of #5580, which merged as d7bb2fee3 at 01:02 UTC and is an ancestor of the v0.1.2 tag. It disables DirectInput joystick enumeration by default to address the reproduced vendor-HID hang before video output. XInput and HIDAPI remain available; DirectInput-only controllers are not detected and were not tested. SDL_DIRECTINPUT_ENABLED can override the default. This is a device-specific startup fix, not a game compatibility result.

Keep the title’s original metadata and ELF modules

Preserve app0/sce_sys/param.json from your own title, including its titleId and localized titleName. Main uses it for metadata and directory creation; do not change budgets to imitate another report. For import_audit.py --modules use original unwrapped ELF modules, plus every generated registry as positional input. Converted .guest.prx files on Windows are PE output, not those audit inputs.

Optional app0 archive on current main

Current main reads optional app0.zar beside app0/, rooted at app0. Loose files win; keep the executable, sce_module and sce_sys loose. Besides kernel read/seek/stat, reviewed main supports APR file resolution/reads, read-only fopen, access and sceNgs2ParseWaveformFile through the archive. It does not provide arbitrary archive-path operations, merged directory listing or writes. An unreadable archive stops at access. Keep a working loose-file setup and the exact build; these later additions are not established for v0.1.5.

Warm pipeline replay has its own cache

Later main records pipelines.journal and replays the newest4096 entries. Graphics retention starts1024 and grows to4096 for replay/reused evictions; APS5_PIPELINE_STORE_ENTRIES fixes the count when set. This is a count bound, not a memory budget. Replay threads default to half the CPU threads;0 records only. APS5_NO_PIPELINE_JOURNAL =1 disables it; MAX_MIB remains1024. Different GPU/driver resets the journal; warm cache is not a gameplay FPS guarantee. v0.1.3 keeps its original behavior.

Collect bounded stall evidence

Current-main APS5_PM4_RING keeps16 submissions per queue by default, up to512 dwords each; 0 disables, maximum4096. APS5_STALL_WATCHDOG_SECS defaults to0; a positive value up to86400 dumps once per stalled wait and continues waiting. It is distinct from the Windows aborting hang dump. Invalid settings stop at submission. The new TRACING reference lists diagnostic switches; tracing changes timing, so retain an ordinary control run.

Choose PlayGo answers by title

After v0.1.2, merged #6236 adds APS5_PLAYGO_UNLISTED_CHUNKS for dumps without playgo-chunk.dat and playgo-scenario.json. Unset still stops on unknown nonzero IDs. installed helps High on Life save loading; absent ends the Sifu and Demon Slayer searches. installed can make Demon Slayer allocate without end. Metadata-bearing dumps are unaffected. These are emulator observations, not console validation; preserve the exact tested build.

Larger caches can reduce performance

Current main dynamically budgets sampled textures and storage images against available device memory. Leave APS5_TEXTURE_CACHE_MIB unset unless a same-card measurement supports overriding it: oversized caches can spill to host memory and slow PCIe reads. Shader-cache current-version entries have no size cap and are not aged out; monitor free disk space. Large host-import budgets and experimental settle-floor patches are also hardware/title-specific, not universal FPS settings.

Touchpad input and dependency diagnosis

Current main pad_input.py accepts touch-left/touch-right. Default keyboard touch halves are Backspace/Tab; L2 is now bound to R/mouse X1. Import audit now follows host-library dependencies transitively and accepts literal ELF symbol names before hashed NIDs. A passing audit proves dependency discovery, not correct API behavior or gameplay. Profiling and trace buffers alter timing/memory; retain ordinary control runs.

Explicit module roots and backup files

Current main accepts a title with no standard module directory only when --module-dir is explicit; homebrew root libraries can use --module-dir . without empty placeholder folders. The CLI skips a backup ELF only beside another ELF with the same SONAME; a lone ELF backup beside a SELF still converts. Keep original relative module paths and matching runtime libraries.

Read the performance overlay in context

Post-v0.1.2 main adds F10 or ANYPS5_OVERLAY=1, with tl/tr/bl/br positions. FPS counts every present, including black/loading frames. PROFILED marks runs with GPU/draw profiling: compare against an ordinary control. GPU timings overlap and can exceed frame time; RAM excludes shared direct memory. The overlay adds a render pass, not an FPS boost. Invalid nonempty settings stop at first presentation.

Local trophies have explicit limits

Current main stores unlocks in _trophy/<userid>_<label>.txt and statistics in .stats.txt, using original trophy/UDS UCP data. Only latest uint32/uint64 statistics and simple event rules are supported. Missing data uses placeholders; icons still throw. No trophy notifications, callbacks or PSN sync. Corrupt saved records stop rather than silently reset; retain a backup when reporting a failure.

Bound Windows crash stack diagnostics

APS5_CRASH_STACK_BYTES accepts decimal or hexadecimal up to1048576 bytes. It expands stack and pointed-object diagnostics, not a crash fix. Review logs for personal paths and captured memory before sharing, and keep build/driver details with the earliest exception.

Include toolchain DLLs in a Windows self-build

After building libs, copy libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll from that toolchain beside the patched PRX files. The runtime loader does not search PATH for these dependencies; error126 can occur even when the named PRX exists. Release archives already include them. Keep Unity guest modules in their original relative folders, not libs.

Later main: module initialization boundaries

With --module-dir, reviewed main maps required modules at startup. Linux starts extra-directory modules only on explicit load with the title’s arguments. Windows starts a deferred module after its deferred dependencies with the same arguments; dependencies needed from outside those directories initialize at startup, and the first explicit load also starts remaining dependency providers best effort. macOS starts executable/module dependencies eagerly. These rules differ from older builds; converting all files alone does not prove correct initialization.

Later main: choose a compatible Windows exception toolchain

CMake now checks exception capabilities instead of requiring only one compiler distribution. MSYS2 UCRT64 GCC16.2.0-6 supports System-V SEH; WinLibs15.2r7 uses DWARF with -fno-asynchronous-unwind-tables. Use separate build directories and matching gcc/g++/DLLs. Scoop standalone GCC15.2 cannot build the runtime: SjLj fallback or incompatible SEH fails the required ABI handlers. Relinker-only builds are a narrower scope; a converter build does not validate game runtime.

Later main: a missing converted module is an error, not a library substitute

A title can load a module after startup. Current main reports “[module] dlopen: … was not relinked” once per file, returns a load error and lets the title continue; a later null fault may follow. Add that module directory with --module-dir and keep the generated guest module in app0. Original PS5 PRX files do not belong in Windows libs/. This does not prove every missing-module crash has the same cause.

Later main: unwrap padding limit

The SELF unwrapper refuses more than64MiB total alignment padding before allocating output. This counts padding across file-backed and empty segments, not their data bytes. Refusal preserves input and an existing output. It does not decrypt encrypted content, and it is a current-main boundary rather than a new v0.1.3 release.

Later main: map a module before starting it

Convert Unity’s extra directories with --module-dir Media/Modules --module-dir Media/Plugins, retaining originals and each printed Guest module output. Later Linux main maps needed modules at startup but starts extra-directory modules only on explicit load, with the title’s arguments. Windows/macOS initialization rules differ. Lost in Play and Coffee Talk provide bounded setup follow-ups, not a universal null-call fix; keep matching relinker/runtime builds.

Later main: a local patch advisor

suggest_patches.py requires Python3.11+, an explicit param.json, local catalog and relinker. It matches title/version and target-file hashes, then invokes --verify-patches; it never downloads or applies a patch. Multiple valid entries yield no recommendation. Hashes identify bytes, not trust or playability. Keep catalog files outside the input directory to avoid automatic patch discovery, and repeat the same module/additional-executable options during conversion.

Later main: explicit Windows red-zone conversion

--frame-red-zone is Windows-only and opt-in. It gives supported leaf functions stack frames so host-delivered exceptions do not overwrite live System-V red-zone values. Bounds require .eh_frame; absent metadata fails, unsupported leaves are reported, and patches overlapping framed sites are refused. It is not a general crash fix, Linux flag or proof that an older patched GTA run now works unchanged.

Later main: confirm the allocator actually loaded

With APS5_MIMALLOC set, Windows loads mimalloc.dll and mimalloc-redirect.dll from matching libs/. If either is absent it silently keeps the C runtime heap; a variable alone does not prove which allocator ran. Preserve compiler/runtime pairing and measure a specific scene rather than assuming a universal FPS gain.

Later main: preferred image placement

The lowest Windows ELF load page now prefers0x400000, with PE headers at0x3f0000. Ordinary output keeps relocations and can move if occupied;--windows-fixed-base removes relocations and fails if its exact aligned address is occupied. Bundled modules retain DYNAMIC_BASE. This differs from earlier0x140000000 preferred PE bases; reconvert only when testing that change, not to reinterpret old reports.

Follow the generated module layout

Current main prints app0/<module folder>/<name>.guest.prx. Its dynamic loader explicitly chooses the converted sibling; GAME_TESTING now says keep the original beside it. Silt’s earlier2dc8e456 report removed originals to avoid its older resolver: preserve that recipe with its version. New module-parent scanning suggests --module-dir for matching unconverted modules but cannot report unreadable files. A clean scan is not proof every runtime load exists.

Import tracing and its platform limits

Current main documents --trace-imports for Windows, Linux and macOS output; --lazy-binding remains incompatible. APS5_TRACE_CALLS selects libraries or all; unset means no recording. Linux and macOS print these records on abort, with no crash report. Conversion support or a tracing flag does not establish an official macOS runtime release. Match the documentation and library files to your actual build.

Fullscreen and two overlay pages

Current main adds F11 fullscreen and F10 cycling off → page1 → page2 → off. ANYPS5_FULLSCREEN starts at desktop resolution when nonempty and not0; it is not a game render-resolution override. ANYPS5_OVERLAY accepts only0/1/2; positions are tl/tr/bl/br. Page2 uses one-second intervals and instrumentation has overhead. Inclusive CPU phases and overlapping GPU ranges cannot be added; missing counters are omitted, not zero. System commit/limit is not process RSS; Linux reports a limit only with strict overcommit=2. Flip/present/drop/repeat counts describe different events. These main features are not established as part of unchanged v0.1.3.

Treat converted programs as ordinary host applications

Converted programs run with your host account’s permissions; conversion does not recreate the console sandbox. Keep sensitive files separate and use a restricted account or isolation when appropriate. Current main’s APS5_USB_STORAGE_PASSTHROUGH is opt-in and exposes host-mounted USB FAT/exFAT volumes writable; unset it scans no volumes and exposes no USB device. This option is not required by every game. --version prints the build identity and exits; it does not test a game. The online converter now follows CLI backup/SONAME skip rules. A destination directory that already exists is rejected before writing.

The Windows documentation now matches its preferred address

Main accepts APS5_TRACE_EVENTS from1 to4194304, default262144. A current event is40 bytes: 10 MiB per default thread buffer or160 MiB at maximum, allocated before the window opens, plus formatting memory. More capacity can still overflow; dropped events remain a qualification limit. Compute-pipeline --inspect needs VK_KHR_pipeline_executable_properties, reports driver counters and null milliseconds, and cannot be treated as a compile benchmark. Runtime capture stops optionally at128 records or256 MiB while the title continues; captured shaders are not reference game pixels. Windows’ usage prose now agrees on the lowest ELF page’s default0x400000, resolving the earlier documentation discrepancy; fixed-base placement is not a general FPS or isolation setting.

Patch catalogs: structure, file matches and runtime are different checks

Current main documents Python 3.11+ tools/validate_patch_catalog.py --catalog <directory>. It checks catalog structure, paths, hashes covered by entries and duplicate IDs, without reading game files, downloading or applying anything. Exit0 means structurally valid, including an empty catalog; exit2 means invalid. Only relinker --verify-patches checks actual target parsing and byte matches. Optional tested records distinguish verification/conversion/launch/gameplay, with passed/failed/partial results and contributor-provided evidence; the advisor does not independently confirm those claims. A higher revision does not automatically win: replace an older same-build ID instead of leaving two verified duplicates. These current-main tools are not a new official runtime release; Check the selected release documentation before using this source feature.

Keep runtime metadata and diagnose explicit input-file errors

Keep the title’s original app0/sce_sys/param.json, including titleId and localizedParameters/titleName. Main falls back to param.sfo only when JSON is absent; absent or malformed metadata can stop title/window setup. Startup creates data/, and download0/ for nonzero downloadDataSize, only from valid metadata. A named ANYPS5_INPUT_CONFIG file that is missing or unreadable is an error; invalid mapping lines name the file and line. Built-in bindings apply when neither a default input file nor an explicit setting exists. These behaviors are pinned to current main, not retroactively assigned to older reports. For launcher tests, distinguish its front end, account flow, downloaded client and actual game scene.

Preview conversion without writing output

v0.1.5 supports relinker --dry-run. Supply the intended output path. It checks conversion and prepares the outputs in memory without creating files or testing write permissions. It cannot be combined with --autorun or --verify-patches. Use a separate run to verify startup.

Output class, display and frame limits are different settings

Reviewed main documents APS5_OUTPUT_RESOLUTION=WxH: both dimensions below 3840×2160 select the 1080p VideoOut class; otherwise it reports the 2160 class. This does not force internal rendering resolution, and some games ignore it. ANYPS5_DISPLAY_INDEX chooses a connected SDL display by zero-based index. ANYPS5_FPS_LIMIT accepts 0.5–1000000 with at most three decimals; 0/empty/unset disables it. A cap cannot accelerate a slow game or exceed its output cadence. These settings are absent from v0.1.4’s usage attachment; preserve the actual tested commit.

Preserve title metadata before overriding startup answers

Main now accepts decimal ID lists such as APS5_PLAYGO_UNLISTED_CHUNKS=0,1, only when both original PlayGo metadata files are absent. Existing scenario JSON takes precedence; this cannot repair an incomplete dump. installed and absent are title-specific diagnostics, not universal fixes. Windows now starts extra-directory modules only when explicitly requested or needed transitively by modules outside extra; mapping a module is not starting it. Keep the exact source revision and test save loading separately.

Capture the host before changing runtime policy

v0.1.4 documents ANYPS5_LOG_FILE=<path>: it duplicates executable stdout/stderr to an append-only file, without filename expansion. It does not collect relinker output or separate trace files. Opening failure stops startup with status 1; there is no size limit. Reviewed main adds ANYPS5_HOST_REPORT=1 after GPU selection, including a report before a missing-feature failure. Review paths and title output before sharing logs; redaction is not a guarantee. A missing-feature list diagnoses that device/build, not whole-game compatibility.

Other reviewed-main policies remain opt-in: ANYPS5_FREE_SPACE=host checks the save volume when creating a new save; fixed is the default and console behavior is unmeasured. A default-sized 16384-block save needs 1 GiB. APS5_GAME_MODE=on/auto requests host performance mode, off by default; a request is not a measured speed gain. ANYPS5_PSN_DIALOGS=show adds a host notice while retaining the same cancellation result, not PSN access. Record each policy and keep real save/load tests separate.

Local run reports and missing milestones

v0.1.5 writes anyps5-report.json locally at supported exits. A kill, crash or abort can leave no file. Windows requires guest exit or _exit in this release, and Windows/Linux omit the loaded and started milestones. Review the file before sharing it. A submitted frame can still be black, and the report does not detect mixed library builds.

Check the game’s resource layout before renderer diagnosis

A converted executable does not guarantee a complete game layout. Astro Bot’s latest report restores missing args.txt and app0/data mapping without changing code; Sea of Stars and Smurfs reports restore files hidden in a repack. Compare with your own original title layout and preserve originals. Do not copy another title’s command line or treat promotional images, present counts or resource-audit success as gameplay validation. Version/environment details still belong to each report.

List only add-ons included in your copy

Later main reads anyps5-entitlements.ini beside the executable, or the ANYPS5_ENTITLEMENTS path: one included add-on label per line, up to 16 characters; # and ; begin comments. Unlisted labels are reported not installed. Some titles wait rather than proceed without an expected add-on. A loading spinner alone does not identify missing data, and declaring a label neither supplies content nor proves a DLC test. Keep this source behavior separate from v0.1.4.

Trace the actual host module name

With --trace-imports, later main labels an import lacking a library name by the host module containing its function, such as libSceAvPlayer.native. Select that filename in APS5_TRACE_CALLS rather than a guest alias. Trace collection, a clean audit and a missing error are diagnostics; preserve actual build, platform and reached scene before claiming a fix.

Original sources

Related guides