diff --git a/Using-command-line.md b/Using-command-line.md new file mode 100644 index 0000000..6e1503e --- /dev/null +++ b/Using-command-line.md @@ -0,0 +1,141 @@ +## CLI +At its core, RetroArch is a command-line application. Getting familiar with the command-line helps you understand the design principles of RetroArch. + +## Load a ROM and libretro core + retroarch -L /path/to/libretro/core.so game.rom + +### Get verbose logging output +To get a better idea on what's going on, use `--verbose` flag as well. +If you want to report a bug, it is **vital** that this log is included. + +### Use a config file +By default, RetroArch looks for a config in various places depending on OS: + +- **Linux/OSX**: `$XDG_CONFIG_HOME/retroarch/retroarch.cfg`, then `~/.config/retroarch/retroarch.cfg`, then `~/.retroarch.cfg`, and finally, as a fallback, `/etc/retroarch.cfg`. +- **Windows**: `retroarch.cfg` in same folder as `retroarch.exe`, then `%APPDATA%\retroarch.cfg`. + +To override this, use `retroarch --config customconfig.cfg`. If you have some special options you want to store in separate config files you can use `retroarch --config baseconfig.cfg --appendconfig specialconfig.cfg`. See man-page and/or `--help` for detail. + +To help creating configs with a GUI, RetroArch-Phoenix is a suitable frontend. +The config file with all options are documented [here](https://raw.github.com/Themaister/RetroArch/master/retroarch.cfg). On Linux and OSX, it is normally installed to `/etc/retroarch.cfg`. On Windows releases you'll find it in the directory along with `retroarch.exe` after a fresh zip extraction (it quickly gets overwritten). + +## `retroarch --help` +Use it. You'll probably discover some features you didn't think about. + =================================================================== + RetroArch: Frontend for libretro -- v0.9.9-wip1 -- + + Compiler: GCC (4.8.0) 64-bit + Built: Apr 29 2013 + =================================================================== + Usage: retroarch [rom file] [options...] + -h/--help: Show this help message. + --menu: Do not require ROM or libretro core to be loaded, starts directly in menu. + If no arguments are passed to RetroArch, it is equivalent to using --menu as only argument. + --features: Prints available features compiled into RetroArch. + -s/--save: Path for save file (*.srm). Required when rom is input from stdin. + -f/--fullscreen: Start RetroArch in fullscreen regardless of config settings. + -S/--savestate: Path to use for save states. If not selected, *.state will be assumed. + -c/--config: Path for config file. + By default looks for config in $XDG_CONFIG_HOME/retroarch/retroarch.cfg, + $HOME/.config/retroarch/retroarch.cfg, + and $HOME/.retroarch.cfg. + --appendconfig: Extra config files are loaded in, and take priority over config selected in -c (or default). + Multiple configs are delimited by ','. + -L/--libretro: Path to libretro implementation. Overrides any config setting. + -g/--gameboy: Path to Gameboy ROM. Load SuperGameBoy as the regular rom. + -b/--bsx: Path to BSX rom. Load BSX BIOS as the regular rom. + -B/--bsxslot: Path to BSX slotted rom. Load BSX BIOS as the regular rom. + --sufamiA: Path to A slot of Sufami Turbo. Load Sufami base cart as regular rom. + --sufamiB: Path to B slot of Sufami Turbo. + -N/--nodevice: Disconnects controller device connected to port (1 to 8). + -A/--dualanalog: Connect a DualAnalog controller to port (1 to 8). + -m/--mouse: Connect a mouse into port of the device (1 to 8). + -p/--scope: Connect a virtual SuperScope into port 2. (SNES specific). + -j/--justifier: Connect a virtual Konami Justifier into port 2. (SNES specific). + -J/--justifiers: Daisy chain two virtual Konami Justifiers into port 2. (SNES specific). + -4/--multitap: Connect a SNES multitap to port 2. (SNES specific). + -P/--bsvplay: Playback a BSV movie file. + -R/--bsvrecord: Start recording a BSV movie file from the beginning. + -M/--sram-mode: Takes an argument telling how SRAM should be handled in the session. + {no,}load-{no,}save describes if SRAM should be loaded, and if SRAM should be saved. + Do note that noload-save implies that save files will be deleted and overwritten. + -H/--host: Host netplay as player 1. + -C/--connect: Connect to netplay as player 2. + --port: Port used to netplay. Default is 55435. + -F/--frames: Sync frames when using netplay. + --spectate: Netplay will become spectating mode. + Host can live stream the game content to players that connect. + However, the client will not be able to play. Multiple clients can connect to the host. + --nick: Picks a nickname for use with netplay. Not mandatory. + --command: Sends a command over UDP to an already running RetroArch process. + Available commands are listed if command is invalid. + -r/--record: Path to record video file. + Using .mkv extension is recommended. + --recordconfig: Path to settings used during recording. + --size: Overrides output video size when recording with FFmpeg (format: WIDTHxHEIGHT). + -v/--verbose: Verbose logging. + -U/--ups: Specifies path for UPS patch that will be applied to ROM. + --bps: Specifies path for BPS patch that will be applied to ROM. + --ips: Specifies path for IPS patch that will be applied to ROM. + --no-patch: Disables all forms of rom patching. + -X/--xml: Specifies path to XML memory map. + -D/--detach: Detach RetroArch from the running console. Not relevant for all platforms. + +## `retroarch --features` +If you're unsure if a particular feature is compiled in, this helps: + + Features: + SDL: + SDL drivers: yes + Threads: + Threading support: yes + OpenGL: + OpenGL driver: yes + KMS: + KMS/EGL context support: yes + EGL: + EGL context support: yes + OpenVG: + OpenVG output support: no + XVideo: + XVideo output: yes + ALSA: + audio driver: yes + OSS: + audio driver: yes + Jack: + audio driver: yes + RSound: + audio driver: yes + RoarAudio: + audio driver: yes + PulseAudio: + audio driver: yes + DirectSound: + audio driver: no + XAudio2: + audio driver: no + zlib: + PNG encode/decode and .zip extraction: yes + OpenAL: + audio driver: yes + External: + External filter and plugin support: yes + Cg: + Cg pixel shaders: yes + libxml2: + libxml2 XML parsing: yes + SDL_image: + SDL_image image loading: yes + FBO: + OpenGL render-to-texture (multi-pass shaders): yes + Dynamic: + Dynamic run-time loading of libretro library: yes + FFmpeg: + On-the-fly recording of gameplay with libavcodec: yes + FreeType: + TTF font rendering with FreeType: yes + Netplay: + Peer-to-peer netplay: yes + Python: + Script support in shaders: yes