RETROARCH(6)
๐ RETROARCH(6) ๐
okay so bestie, we're in the System Manager's Manual: retroarch section, page 6, and this is the whole vibe of retroarch. Buckle up, she's a long one. ๐
โจ NAME โจ
retroarch โ the reference frontend for the libretro API. periodt. ๐
โจ SYNOPSIS โจ
retroarch [rom file(s)] [OPTIONS]...
like. that's it. that's the whole shape of it. rom files go in, options go in, magic comes out. ๐ฆ
โจ DESCRIPTION โจ
so retroarch is the reference frontend for the libretro API, which is a whole thing. let me break it down.
libretro is basically an abstraction of a game system โ like, it's the concept of "a game system" without the console part attached. and literally any frontend can implement it. it's not locked to one thing, it's not gatekept, it's giving open energy. โจ
the libretro API itself? it's designed for games, emulators and multimedia. so yeah, games, but also everything adjacent. it's versatile like that.
and retroarch โ what does she actually do? she focuses on exposing needed functionality for the game system through command line and configuration files. that's the whole job. she's the interface, she hands you the controls, she doesn't overcomplicate it. ๐
oh and also โ she features a simple built-in UI. so if you don't wanna live in the terminal forever, you don't have to. she's got range. ๐
โจ EXAMPLE COMMANDLINE โจ
okay real examples, because reading is one thing and doing is another. ๐ธ
๐ Load content, using a specific libretro core and config file ๐
retroarch --config ~/.config/retroarch/retroarch.cfg --libretro /path/to/libretro/core.so /path/to/rom.rom --verbose
see how she's pointing at a config file, then a core, then the rom, then asking for --verbose? iconic sequencing. no notes. ๐
๐ No command line options will start RetroArch in menu mode ๐
retroarch
literally just. type it. that's all. no options, no arguments, and she opens up in menu mode. lowkey the easiest way in. ๐ซถ
๐ Start RetroArch in menu mode, with verbose logging ๐
retroarch --menu --verbose
same energy, but she's telling you everything while she does it. verbose logging hits different when something's being weird. ๐ฅ
โจ Menu โจ
this one's a mini-section so listen up:
Menu refers to the built-in GUI system for RetroArch. and here's the important part โ it is aimed at being controlled with a gamepad only. ๐ฎ
so like. keyboard people, don't come for her. she was built for the controller. that's the design choice. respect it. ๐
โจ DEFAULT CONTROLS โจ
bestie this is the whole section, don't blink: by default, only keyboard input is accepted.
that's it. that's the default. keyboard in, everything else is a you problem until you change it. ๐ญ
โจ GENERAL OPTIONS โจ
[rom file]โ bestie if you don't drop a rom file path on the command line, retroarch is gonna try to load a core with no rom at all. whichโฆ only works with some libretro cores, so don't be surprised. retroarch runs uncompressed content by default, but it can uncompress stuff in.zip/deflate format if that support got compiled in. which content types work totally depends on the libretro implementation you're using. iykyk ๐--help,-hโ prints the help text. that's it. that's the whole job. ๐ซถ--menuโ starts you directly in the in-game menu if it's enabled. does not need content or a libretro implementation to be set โ you can load those later from inside the menu. and fun fact: if you pass no arguments to retroarch at all, it's literally equivalent to calling retroarch with this as the only argument. ๐ธ--featuresโ prints the available features that got compiled into RetroArch, then exits. a little peek behind the curtain โจ-L PATH,--libretro PATHโ path to the libretro implementation you wanna use. this option overrides anything in a config file. heads up though: it's only available if RetroArch was compiled with dynamic libretro loading. ๐--save PATH,-s PATHโ overrides the path used for save ram (*.srm). (deprecated!) if you don't use this flag, the save ram path gets inferred from the rom path name and dropped in the same directory as the rom file, with the extension swapped out for.srm. ifPATHis a directory, RetroArch treats it as the save file directory, and the save file name gets inferred from the rom name.--savestate PATH,-S PATHโ overrides the path used for save states. (also deprecated!) without this flag, the save state path gets inferred from the rom path name, put in the same directory as the rom file, with the extension replaced by.state. ifPATHis a directory, RetroArch treats it as the save state directory, and the state file name gets inferred from the rom name.
โ ๏ธ lowkey important: save states are bound to the libretro implementation you're using. switch to a different libretro and you could invalidate that save state file. no take-backs. ๐
--fullscreen,-fโ always starts RetroArch in fullscreen. completely disregards whatever your configuration file says. main character energy, no notes ๐--config PATH,-c PATHโ sets the configuration file path. retroarch uses this path to load the config file. if it's not defined, retroarch goes hunting through platform-specific paths to find the config file./etc/retroarch.cfg(when installed), orretroarch.cfgin the source tarball, serves as a skeleton configuration file./etc/retroarch.cfgshould really only be a skeleton config, okay? ๐
Unix-like systems will look in $XDG_CONFIG_HOME/retroarch/retroarch.cfg first. if $XDG_CONFIG_HOME isn't defined, it's assumed to be $HOME/.config as per specification. then it tries $HOME/.retroarch.cfg. if both paths fail, RetroArch will try to create a new, default config file in $XDG_CONFIG_HOME/retroarch/retroarch.cfg (or the $HOME/.config default for $XDG_CONFIG_HOME). if all of that fails, default settings get assumed. and if RetroArch does create a new default config file, it'll attempt to load the skeleton config file /etc/retroarch.cfg and use that as a basis โ which lets distributions set up default paths for libretro cores and similar things. also: a config file does not need to define every possible option, only the ones you actually wanna override. ๐
If config_save_on_exit = true is set in the config file, RetroArch will overwrite the config file on exit. settings can be changed from within the menu. but beware bestie โ if RetroArch overwrites a config file, formatting, comments, etc. will be lost. if RetroArch creates a default config file, it'll have config_save_on_exit set automatically. ๐
Windows will look in retroarch.cfg in the same folder where retroarch.exe resides. a default config file will also be created in the same manner as Unix. ๐ฆ
--appendconfig PATHโ appends a different set of config files to the config file loaded in-c(or the default). multiple config files are delimited by','. every config file gets appended in order, where the key-value pairs of the next config file take priority over the old ones. stacked configs, slay โจ--subsystem SUBSYSTEMโ use a subsystem of the loaded libretro core. multiple content files are loaded as multiple arguments. if you need to skip content, use a blank ("") command line argument. content must be loaded in an order that depends on the particular subsystem being used โ so check the verbose log output to learn how a particular subsystem wants its content loaded. ๐--nodevice PORT,-N PORTโ disconnects an input device from port numberPORT. possible values forPORTare1to8. this may be needed for some odd games to run properly. if you set it explicitly here, it overrides the config file for that port. ๐ฎ--dualanalog PORT,-A PORTโ connects a DualAnalog controller into portPORT. possible values are1to8. if you set it explicitly here, it overrides the config file for that port. ๐น๏ธ--device PORT:ID,-d PORT:IDโ connects a generic input deviceIDinto portPORT. possible values for port are1to8. if set explicitly here, it overrides the config file for that port.IDis an unsigned number corresponding to the device for a libretro core. ๐--record PATH,-r PATHโ activates video recording of gameplay intoPATH. using a.mkvextension is recommended. the codecs used are(FFV1 or H264 RGB lossless (x264))/FLAC, which is suitable for processing the material further. film it, bestie ๐ฌ--recordconfig PATHโ sets the path to a config file for use during recording.--size WIDTHxHEIGHTโ lets you specify the exact output width and height of recording. this option overrides any configuration settings. the video input gets scaled with point filtering before being encoded at the correct size. ๐ธ--play-replay PATH,-P PATHโ play back a movie recorded in the.replayformat. the cart ROM and movie file need to correspond, and it also requires you to play back with the same libretro backend that was used for recording. no swapping, no cap ๐ซถ--record-replay PATH,-R PATHโ start recording a.replayvideo toPATHimmediately after startup. hit the ground running โจ--sram-mode MODE,-M MODEโMODEdesignates how to handle SRAM. the format of the second parameter is{no,}load-{no,}save. these two boolean values tell whether SRAM loading and SRAM saving should take place. note thatnoload-saveimplies that the SRAM will be overwritten with new data. ๐ญ--verbose,-vโ activates verbose logging. for the girlies who need to see everything ๐--host,-Hโ be the host of netplay. waits until a user connects. the host will always assume user 1. ๐--connect SERVER,-C SERVERโ connect to a host of netplay. will always assume user 2. ๐ฆ--frames FRAMES,-F FRAMESโ sync frames to use when using netplay. more frames allow for more latency, but require more CPU power. setFRAMESto0to have perfect sync.0frames is only suitable for LAN. defaults to0. ๐--port PORTโ network port used for netplay. this defaults to55435. this option affects both TCP and UDP.--spectateโ if netplay is used, it'll go into a spectator mode. spectator mode lets one host live stream game playback to multiple clients. essentially, clients receive a live streamed replay movie file. clients can connect and disconnect at any time, and thus cannot interact as user 2. for spectating mode to work, both host and clients need to use this flag. ๐--command CMDโ sends a command over UDP to an already running RetroArch application, and exits. the command is formatted as"COMMAND;HOST;PORT".HOSTandPORTare both optional."COMMAND;HOST"will setPORTto the"network_cmd_port"default setting. if only"COMMAND"is used,HOSTandPORTwill be assumed to be"localhost"and"network_cmd_port"respectively. and the available commands get listed if"COMMAND"is invalid. ๐ก--nick NICKโ pick a nickname for use with netplay. this is purely cosmetic, and only serves to help users identify each other. ๐--ups PATCH,-U PATCHโ attempts to apply an UPS patch to the current content image. no files are altered. if this flag isn't specified, RetroArch will look for a.upsfile with the same basename as the content specified. โจ--bps PATCHโ attempts to apply a BPS patch to the current content image. no files are altered. if this flag isn't specified, RetroArch will look for a.bpsfile with the same basename as the content specified. ๐--ips PATCHโ attempts to apply a IPS patch to the current content image. no files are altered. if this flag isn't specified, RetroArch will look for a.ipsfile with the same basename as the content specified.
โ ๏ธ heads up: RetroArch cannot perform any error checking on whether patching was successful, because of how IPS works. it's just like that sometimes ๐ญ
--xdelta PATCHโ attempts to apply an Xdelta patch to the current content image. no files are altered. if this flag isn't specified, RetroArch will look for a.xdeltafile with the same basename as the content specified. only available if RetroArch was built with Xdelta support. ๐ฆ--no-patchโ disables all kinds of content patching. periodt. ๐-D,--detachโ detach from the current console. this is currently only relevant for Microsoft Windows. ๐ธ
๐ธ ENVIRONMENT ๐ธ
ok so bestie</p> listen โ retroarch is obsessed with these little environment variables ๐ and if you set one, it literally overrides whatever the matching config file option says. it's giving "env var said it first, periodt" ๐
LIBRETRO_DIRECTORYโ tells RetroArch which directory to go dig through for core and info files, and it overrides thelibretro_directoryconfiguration file option. ๐ฆLIBRETRO_ASSETS_DIRECTORYโ points RetroArch at the directory where it should look for assets, and it overrides theassets_directoryconfiguration file option. ๐LIBRETRO_AUTOCONFIG_DIRECTORYโ this one tells RetroArch where to find controller auto-configuration files, and it overrides thejoypad_autoconfig_dirconfiguration file option. ๐ฎโจLIBRETRO_CHEATS_DIRECTORYโ the directory where RetroArch hunts down cheat files, and it overrides thecheat_database_pathconfiguration file option. ๐LIBRETRO_DATABASE_DIRECTORYโ where RetroArch looks for database files, and it overrides thecontent_database_pathconfiguration file option. ๐๏ธLIBRETRO_SYSTEM_DIRECTORYโ the directory RetroArch searches for system files, and it overrides thesystem_directoryconfiguration file option. ๐LIBRETRO_VIDEO_FILTER_DIRECTORYโ tells RetroArch where the video filters live, and it overrides thevideo_filter_dirconfiguration file option. ๐LIBRETRO_VIDEO_SHADER_DIRECTORYโ where RetroArch goes looking for video shaders, and it overrides thevideo_shader_dirconfiguration file option. ๐ฅ
no cap, every single one of these is a straight-up override โ the env var wins, the config file option just has to sit there and take it ๐
and that's a wrap on the whole page, bestie!! ๐ซถ this was RETROARCH, version dated January 20, 2025, filed under RETROARCH(6) โ you read the whole thing, which is genuinely main character energy, go take a nap and drink some water ๐ง๐ โญ
๐ฆ where this page comes from
- alpine 3.24: retroarch-doc 1.22.2-r1 ยท GPL-2.0-only
- arch rolling: retroarch 1.22.2-5 ยท GPL-3.0-only
- fedora 43: retroarch 1.22.0-20.fc43 ยท GPL-3.0-or-later and GPL-2.0-only and CC-BY-3.0 and CC-BY-4.0 and CC0-1.0 and BSD-2-Clause and BSD-3-Clause and Apache-2.0 and MIT
- fedora 44: retroarch 1.22.0-20.fc44 ยท GPL-3.0-or-later and GPL-2.0-only and CC-BY-3.0 and CC-BY-4.0 and CC0-1.0 and BSD-2-Clause and BSD-3-Clause and Apache-2.0 and MIT
- nixos 26.05: retroarch-bare 1.22.2
- nixpkgs unstable: retroarch-bare 1.22.2
- ubuntu resolute: retroarch 1.22.2+dfsg-2ubuntu1 ยท GPL-3.0-or-later
- ubuntu stonking: retroarch 1.22.2+dfsg-2ubuntu1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms