Advanced RetroArch Settings

You might want to check if the option you want to change has already been implemented into EmulationStation! Most game-related settings are in GAME SETTINGS, but some RetroArch-specific options may be in the DEVELOPER menu.

With ordinary distributions (such as installing RetroArch on Windows), RetroArch is configured by adding/editing lines in retroarch.cfg. Batocera generates and replaces the lines in this file with every emulator launch, so the better option is to let Batocera know which RetroArch options you would like to use. Most of these settings can instead be changed within EmulationStation. Exceptions will be noted.

For options not already implemented into ES, you can change the file /userdata/system/batocera.conf and add the following keys if needed. Most RetroArch settings not mentioned in the default batocera.conf can be edited and saved from within RetroArch itself (accessed by pressing [HOTKEY] + South button (B SNES) while in-game in a Libretro core), these will be saved to /userdata/system/configs/retroarch/retroarchcustom.cfg (with core options being saved to retroarch/cores/retroarch-core-options.cfg instead), however the vast majority of RetroArch settings will be overridden by Batocera at emulator launch.

In order to use the configuration generator to create a RetroArch setting (letting Batocera know which value is being used, avoiding it being overwritten), follow the global.retroarch.retroarch_setting=value syntax. Batocera supports the massive majority of RetroArch's settings, but for the few that it doesn't (such as bleeding edge new features or obscure/forgotten ones), those settings can still be adjusted by editing them directly into /userdata/system/configs/retroarch/retroarchcustom.cfg as they will not be overwritten (at least, until Batocera supports them as well).

The following section enables an automatic translation of in-game dialogs in your language. So it's possible to play Japanese game titles without hassle. Available from GAMES SETTINGSAI GAME TRANSLATION

## Enable RetroArch AI game translation service

Auto apply cheats selected by the user.

## Auto apply cheats selected by the user

Take a screenshot of the savestate. For when you have many savestates and don't remember which is which… now in RetroArch its thumbnail will be a screenshot of the moment you saved! This has become the default setting in Batocera. Not available as an ES option.

## Take a screenshot of the savestate

Hide the welcome message in Retroarch. Having to wait for 3 secs before the message goes away is really boring. This has become the default setting in Batocera. Not available as an ES option.

## Hide the welcome message in Retroarch

Allow any RetroPad to control the menu. This changes nothing in 1 player mode, but it's a dream to disable when you have friends who don't know the emulators or young children… Only Player 1 (YOU) can use RetroArch options like savestate, change slot, rewind, etc. A much better gaming experience. Not available as an ES option.

## Allow any RetroPad to control the menu (Only the player 1)

Swap the OK and CANCEL buttons on Retroarch menu. Many users have SNES gamepads and in EmulationStation, B is OK and A is NO. And in RetroArch, buttons are inverted, and not really convenient. Not available as a menu option.

## Swap the Ok and the CANCEL button on Retroarch menu

Enable OSD (on-screen display) messages. Retroarch shows users some important messages, like Savestate, Screenshot, RetroAchievements, etc. They look beautiful on badges. But sometimes, it shows other less important messages, like your name when you connect to RetroAchievements. Those messages look like crappy yellow text lines, not like the badges. This option hides these messages but not the badges. This has become the default option in Batocera. Not available as an ES option.

## Enable usage of OSD messages (Text messages not in badge)

This will enable variable refresh rate for compatible displays. This sync your display's refresh rate to the emulated console's display rate (unlike traditional v-sync that will simply delay the frames until the display is ready). Only compatible on displays that explicitly have support for “variable refresh rate” (most of them don't). Now available as an ES option.

## Enables syncing to exact content framerate (variable refresh rate, G-sync, Freesync, etc.)

Not all games are created equal… in terms of decibels they produce. Use the following to adjust the volume output by a particular game (use negative numbers to reduce its volume instead):

## Adjusts the volume for the game SydMead's TerraForming (USA).chd in the pcenginecd folder to be 10 decibels louder than usual.
pcenginecd["SydMead's TerraForming (USA).chd"].retroarch.audio_volume = "10.000000"

When you turn on the SYSTEM SETTINGSFRONTEND DEVELOPER SETTINGSSHOW FPS, you may notice in RetroArch specifically the FPS counter is very unresponsive… this is because the default interval is set to update once every two and a half seconds. To change this to update every 10 ms:


It might be worth checking if the option you want to set is already available in the ADVANCED SYSTEM OPTIONS first! You can quickly access this for your system by pressing [SELECT] in the system's game list.

In order to set specific core options (ones that are saved to /userdata/system/configs/retroarch/cores/retroarch-core-options.cfg (may cause conflicting issues, advanced users only) use the global.retroarchcore.<core name>_<core option>=value syntax (takes priority over other settings, even settings that are normally required to be adjusted to run games, be warned). For example: global.retroarchcore.genesis_plus_gx_region_detect=pal would set the region to PAL for games run with GenesisPlusGX.

Although you can use global. to apply the core option to all systems that core supports, it might be wise to specify the system you want to apply it to (considering that most cores only support a single system anyway).

Each core option is (usually) unique to the core, you can see what terminology it uses with the following:

  1. Launch a game and go into the RetroArch Quick Menu and navigate to the core's options ( [HOTKEY]+South button (B SNES)Core Options (this used to be labelled simply Options in older versions of RetroArch)).
  2. Edit your options if you want to, and then go to Manage Core OptionsSave Content Directory Options.
  3. Check the newly created file at /userdata/system/.config/retroarch/config/<core name>/<system>.opt

    You may need to turn on “Show hidden folders” in your file manager to see this folder.

  4. Transplant those options to batocera.conf by appending them with global.retroarchcore. first. It's okay to enclose the values in double-quotes like RetroArch does (eg. = "value") or not include any double-quotes like Batocera does (eg. = value).
  5. Delete the /userdata/system/.config/retroarch/config/<core name>/<system>.opt file (or just Delete Content Directory Options (which has replaced Save Content Directory Options from earlier)).

To run with our previous example, I would:

  1. Launch “Shaq Fu” for the Sega Megadrive, mash [HOTKEY]+South button (B SNES) and then go into the Options menu.
    Shaq Fu is the penultimate fighting game. RetroArch's core options menu.
  2. Change the System region option from “auto” to “pal”.
    Adjusting various options in the core option menu. You can also use left/right to change options quickly.
  3. Go into Manage Core Options and then Save Content Directory Options.
    Saving the option file in the manage core options menu. This button changes to allow you to delete the option file later.
  4. Check the option file that was created at /userdata/system/.config/retroarch/config/Genesis Plus GX/megadrive.opt
    There he is!
  5. Take a gander at the option I set, and note that it is genesis_plus_gx_region_detect = "pal".
  6. Open up batocera.conf and add global.retroarchcore.genesis_plus_gx_region_detect = "pal" to it.
  7. Delete the megadrive.opt file.

All my Mega Drive games now run at PAL speeds, as they should be. ;-)

But unfortunately PAL isn't considered "hardcore" :(

This is for if you'd like to reconfigure the default keyboard bindings for all systems emulated by a libretro core (such as if you don't have a controller to use or you're in an all-in-one device like a netbook). Setting this will prevent you from using a controller configured from ES in libretro cores until you undo this. Not available as an ES option.

Keep in mind that this is just translating your keyboard to the RetroPad. The RetroPad is independent of the system and will be assigned to the appropriate system controls when that emulator is booted up. You can read more about that and its philosophy here.

Open your /userdata/system/batocera.conf file and add the following lines as appropriate to it. Here is an example of the default bindings:

# Face buttons

# D-pad

# Shoulder buttons

# Start and Select
global.retroarch.input_player1_select = rshift
global.retroarch.input_player1_start = enter

# Left analog

# Right analog

# Analog buttons

# The Hotkey

If you'd like your keyboard bindings to only apply to a particular system, replace the global part with the shortname for your system (eg. psx for the Sony PlayStation).

It must be stressed that this is only for libretro cores; this does nothing for standalone emulators! Refer to this page for more info.

If you were looking for how to change the functions of your handheld's function keys, refer to this page instead.

The hotkey combos that Batocera offers are nice, but what if you wanted to bind a hotkey action directly to an unused button (such as putting fast-forward on the unused [R2] button for GBA games)? This is for that. Once again, keep in mind this will only affect libretro cores, not standalone emulators.

Open your /userdata/system/batocera.conf file and add the following lines:

## The hotkey enable button. Equivalent to Batocera's [HOTKEY]. Making this "nul" will disable the requirement for holding the hotkey first to activate commands with button presses.

Keep in mind that you really should specify the system you want to make the edits for by replacing global. with <system shortname>. applicable to that system (eg. psx.retroarch.<setting> for the Sony PlayStation). Otherwise, more complicated systems that utilize buttons which you assign to hotkey functions here will activate their button commands instantly without first pressing the hotkey, interrupting gameplay.

You'll have to figure out what your internal button names are using evtest from the terminal/ssh session. Here is a list of the common Batocera names (using an Xbox 360 controller):

RetroArch bindings that are marked “?” are unknown or depend on controller hardware/drivers/ES settings outside Configure a Controller.

Event code RetroArch binding Type Label Notes
304 0 BTN SOUTH South button (B SNES)
305 1 BTN EAST East button (A SNES)
307 3 BTN NORTH North button (X SNES)
308 2 BTN WEST West button (Y SNES)
310 9 BTN TL [L1], can also appear as “pageup”
311 5 BTN TR [R1], can also appear as “pagedown”
317 ? BTN THUMBL [L3], pushing the left stick in
318 ? BTN THUMBR [R3], pushing the right stick in
0 ? ABS X Horizontal axis of the left stick
1 ? ABS Y Vertical axis of the left stick
2 ? ABS Z [L2], Left analog trigger
3 ? ABS RX Horizontal axis of the right stick
4 ? ABS RY Vertical axis of the right stick
5 ? ABS RZ [R2], Right analog trigger
17 h0up/h0down ABS HAT0Y D-pad up/down, value -1 for up, 0 for neutral, 1 for down
16 h0left/h0right ABS HAT0X D-pad left/right, value -1 for left, 0 for neutral, 1 for right

BTN = Button, ABS = Absolute position (commonly analog sticks, but also includes analog triggers and the D-pad (yep, the D-pad is just a virtual analog stick)).

Then add/edit the following lines as appropriate to batocera.conf. Here is a non-exhaustive list of RetroArch input commands (with the default buttons for an Xbox 360 controller):

## Exit the current emulator. Equivalent to [HOTKEY]+[START].

## Open RetroArch's Quick Menu. Equivalent to [HOTKEY]+[SOUTH].
## Save current state to the selected slot. Equivalent to [HOTKEY]+[WEST].
## Load the state from the selected slot. Equivalent to [HOTKEY]+[NORTH].
## Reset the emulated system (can cause bugs with certain settings/games). Equivalent to [HOTKEY]+[EAST].
## Increase the currently selected save state slot. Equivalent to [HOTKEY]+[D-PAD UP].
## Decrease the currently selected save state slot. Equivalent to [HOTKEY]+[D-PAD DOWN].

## Toggle the AI translation service. Equivalent to [HOTKEY]+[R1]
## Fast-forward (hold). Equivalent to [HOTKEY]+[D-PAD RIGHT]
## Rewind. Equivalent to [HOTKEY]+[D-PAD LEFT]
## Take a screenshot. Equivalent to [HOTKEY]+[L1].
## Next shader. Equivalent to [HOTKEY]+[R2].
## Previous shader. Equivalent to [HOTKEY]+[L2].

## Hotkey (for holding). Setting this to anything but nul will re-enable the combo requirement.
## Eject the virtual disc.
## Select the next disc.
## Select the previous disc.
## Toggle the FPS display.
## Advance one frame.
## Slow-motion (hold).
## Record movie toggle.
## Netplay watch toggle.
## Netplay host toggle.
## OSK toggle.
## Pause emulation.
## Input recording toggle.
## Runahead toggle.
## Streaming toggle.
## Fast-forward toggle.
## Slow-motion toggle.
## Turbo default button.

If you'd like to be able to open the Quick Menu with an alternative button combo, you can utilize any of RetroArch's built-in combos:

## Only open the RetroArch Quick Menu with the hotkey command.
## Open the RetroArch Quick Menu with Down + Y + L1 + R1.
## Open the RetroArch Quick Menu with L3 + R3.
## Open the RetroArch Quick Menu with L1 + R1 + Start + Select.
## Open the RetroArch Quick Menu with Start + Select.
## Open the RetroArch Quick Menu with L3 + R1.
## Open the RetroArch Quick Menu with L1 + R1.
## Open the RetroArch Quick Menu by holding Start for 2 seconds.
## Open the RetroArch Quick Menu by holding Select for 2 seconds.
## Open the RetroArch Quick Menu with Down + Select.
## Open the RetroArch Quick Menu with L2 + R2.

By default, Batocera will have the [Esc] key on the keyboard bound to immediately exiting RetroArch. In order to revert this to behave similarly to RetroArch's default behavior, modify the following lines in system/configs/retroarch/retroarchcustom.cfg to the following:

input_enable_hotkey = "shift"
input_menu_toggle = "f1"

Using this, you can now access the Quick Menu even if you only have a keyboard! How neat.

Batocera will not change these specific variables. So as long as you don't do a factory reset, this setting will persist.

  • advanced_retroarch_settings.txt
  • Last modified: 4 months ago
  • by cs