RetroPie-Setup  4.8.7
runcommand.sh File Reference

runcommand launching script More...

Detailed Description

runcommand launching script

Usage

runcommand.sh VIDEO_MODE COMMAND SAVE_NAME

or

runcommand.sh VIDEO_MODE _SYS_/_PORT_ SYSTEM ROM

Video mode switching is supported on X11, KMS and Raspberry Pi (legacy graphics) systems

Automatic video mode selection (all):

Automatic video mode (Raspberry Pi legacy graphics):

Manual video mode selection (Raspberry Pi legacy graphics):

Manual video mode selection (KMS):

Manual video mode selection (X11):

Note
Video mode switching only happens if the monitor reports the modes as available (via tvservice) and the requested mode differs from the currently active mode

Additionally it is possible to pass in the current screen resolution (selectable in the runcommand menu) to the emulator to be launched. The respective variables are %XRES% and %YRES% which will be replaced with the specific values as the placeholders %ROM% and %BASENAME% (see below). For example it is possible to set –displaysize=%XRESx%YRES% in emulators.cfg` if an emulator has a command line switch to set the resolution.

If _SYS_ or _PORT_ is provided as the second parameter for the runcommand.sh script, the commandline will be extracted from /opt/retropie/configs/SYSTEM/emulators.cfg with %ROM%, %BASENAME% being replaced with the ROM parameter. This is the default mode used when launching in RetroPie so the user can switch emulator used as well as other options from the runcommand GUI.

If SAVE_NAME is included, that is used for loading and saving of video output modes as well as rendering backend settings for the current COMMAND. If omitted, the binary name is used as a key for the loading and saving. The savename is also displayed in the video output menu (detailed below), so for our purposes we send the emulator module id, which is somewhat descriptive yet short.

On launch this script waits for two seconds for a key or joystick press. If pressed the GUI is shown, where a user can set video modes, default emulators and other options (depending what is being launched).