Reference · Day-to-day usage
AnyPS5 usage reference
The platform guides walk you through a first conversion once. This page is what you come back to afterwards: the folder rules, what each option is for, what the exit codes mean, and what to redo when a new release appears.
The runtime folder
A converted program is an ordinary Windows or Linux executable, and it finds everything it needs by position on disk. Three things have to be in the right place:
game/
├── app.elf (or app.exe) <- the converted program
├── libs/ <- AnyPS5's own .prx system libraries
│ └── ... <- on Windows, plus 3 MinGW runtime DLLs
└── app0/
├── sce_module/ <- the converted bundled modules
└── ... <- the game's data files libs/- AnyPS5's own system libraries, from the release archive for your operating system or from a source build. Nothing else belongs here. Putting an original PS5 module in this folder is the usual cause of Windows error 193.
app0/-
The game's data, plus the converted bundled modules the relinker wrote into
app0/sce_module/. Leave those where the relinker put them. - The program itself
-
Sits beside both folders. The default library lookup path is
$ORIGIN/libs, which means "a folder calledlibsnext to me", so moving the executable alone breaks it.
Invoking the relinker
The relinker takes options, one input file and one output path. The input must be a plain ELF: files still
inside a SELF container are rejected. v0.1.2 looks for the bundled modules in a folder named
sce_module or sce_modules next to the input, and converts them as well, printing
one Guest module: line each.
./relinker-v0.1.2 source/eboot.elf game/app.elf .\relinker-v0.1.2.exe --windows source\eboot.elf game\app.exe
Linux ELF is the default output format even when the output file is named .exe, so
--windows is not optional on Windows. Running the tool with no arguments prints the usage line
and exits with an error; --help prints the same text deliberately.
Exit codes
| Code | What it means |
|---|---|
| 0 | The conversion finished. It says nothing about whether the game runs. |
| 1 | The arguments were invalid. Running the relinker with no arguments prints its usage line. |
| 2 | The conversion failed. The reason is printed before the tool exits. |
With --autorun the exit code you see can be the converted program's own exit status instead, so
do not read it as a conversion result.
Options by purpose
Grouped by what you are trying to change. Everything here is in v0.1.2 except the last group:
--linux-fixed-base is the one option the main branch has and the release does not. For the
per-option view, checked against the argument parser, see the
option table on the main guide.
Output format
--windows | Write a Windows PE executable instead of the default Linux ELF. |
|---|---|
--macos | Write an x86-64 macOS program. No macOS binaries ship in any release. |
--windows-gui | Use the Windows GUI subsystem, so no console window opens. Needs --windows. |
--windows-fixed-base <address> | Set a fixed image base address for the Windows output. |
Processor
--to-intel | Rewrite the AMD-only instructions found in the files so they run on Intel. v0.1.2 also lowers SHA-256, MONITORX, MWAITX and CLZERO. |
|---|---|
--to-rosetta | Like --to-intel, plus instructions Rosetta lacks. |
Where files come from and go
--rpath <path> | Where the program looks for the system libraries. Default: '$ORIGIN/libs'. |
|---|---|
--sce-module-path <path> | Read the bundled modules from another parent folder. |
--exclude-sce-module <file> | Leave one of the bundled modules out of the conversion, by file name. |
--module-dir <dir> | Convert modules from an extra folder too, such as engine plugins. |
--executable <path> | Name the main executable explicitly by path. |
Diagnostics
--help | Print the usage text and exit. |
|---|---|
--windows-diagnostics | Add start-up dependency diagnostics. Needs --windows. |
--trace-imports | Print a trace of the imports as the relinker resolves them. |
--trap-sdk-syscall-stubs | Trap the SDK syscall stubs the game links against. |
--registry | Write a .registry.json next to each converted file for the import audit tool. |
--autorun | Start the converted program immediately and report its exit code. |
unused-filter=0|1|2 | How aggressively unused system imports are filtered. No leading dashes. Default 0. |
Main branch only
--linux-fixed-base <address> | Load the Linux output at a fixed base: a 64 KiB-aligned address from 0x10000 to 0x7fffffff0000. Conflicts with --windows, --macos and --lazy-binding. Not in v0.1.2. |
|---|
Environment variables
Set these in the shell that starts the converted program, not when converting.
ANYPS5_GPU-
Pick a Vulkan device by part of its name. Without it, AnyPS5 takes the first suitable device and prefers a
dedicated card over integrated graphics. The candidate names are printed at start-up.
dedicated card over integrated graphics. The name is compared without regard to case, and the candidates
are printed at start-up in the
Physical device candidatelines. If no usable device contains your text, the start fails and the error lists the device names. ANYPS5_PRESENT_MODE-
How the window presents. The default is vertical sync (
fifo); the accepted alternatives arefifo_latest_ready,mailboxandimmediate, which stop the game waiting for the display.fifo_latest_readyandmailboxstill show whole frames at the display's refresh and drop the ones in between, whileimmediatepresents at once and can tear. Any other value fails the start, as does a mode the surface does not offer (fifo_latest_readyneedsVK_KHR_present_mode_fifo_latest_readyor its EXT form). Flips stay paced at 59.94 Hz in every mode. ANYPS5_LANGUAGE- The console language a game reads. The default is English (United States), which is number 1; the documented numbers run from 0 to 30 (0 Japanese, 2 French, 3 Spanish, 4 German, 8 Russian, 11 Chinese (Simplified), 21 Arabic, and so on). An empty value behaves like an unset one, and any other value stops the game at its first language query with an error naming the variable.
ANYPS5_SYSTEM_FONTS-
Where the console's system fonts are read from. Games that open a system font set need font files in an
anyps5-fonts/directory beside the converted program, and this variable points at a different directory. Console font files are used under their own names; failing that, openly licensed Noto substitutes are used when present. With neither, opening a system font set fails and the game shows no text in those fonts — which is why a game can render its menus with every label blank.
ANYPS5_GPU=radeon ./app.elf $env:ANYPS5_GPU = 'RTX'
.\app.exe
A Wayland compositor can stop delivering frames to a window it is not showing, for example one on another
workspace. The documentation gives Hyprland with the NVIDIA driver as the example: a fifo
swapchain then presents about once per second, while fifo_latest_ready and
immediate keep the game at its normal rate.
When a new release ships
A converted program is tied to the libraries it was built against, so an upgrade is not a drop-in replacement
of libs. The safe routine is short:
-
Download the new pair
The relinker and the system-library archive from the same release, and check both hashes.
-
Convert the game again
From the original plain-ELF files, into a new output folder. Keep the old folder until the new one works.
-
Rebuild the runtime folder
Extract the new libraries into
libsand copy the game's data intoapp0next to the freshly converted modules.
The current release is v0.1.5. Our download page tracks the files in it; the games list records which build each reported result was produced on, which is often the difference between two reports of the same game.
Sources: USAGE.md, INPUT_MAPPING.md and the v0.1.2 argument parser.