| Both sides previous revision Previous revision Next revision | Previous revision |
| advanced_retroarch_settings [2022/07/11 04:28] – reorganise headers, add fps update interval atari | advanced_retroarch_settings [2025/07/22 08:13] (current) – [Core options] The information about the location of the system.opt files was outdated for v41 hankerde |
|---|
| 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. | 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]'' + {{:wiki:south.png?nolink&20|South button (B SNES)}} while in-game in a Libretro core), these will be saved to ''/userdata/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. | 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]'' + {{:wiki:south.png?nolink&20|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/configs/retroarch/retroarchcustom.cfg'' as they will not be overwritten (at least, until Batocera supports them as well). | 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'' [[:batocera_conf_syntax|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). |
| |
| ===== Examples ===== | ===== Examples ===== |
| </WRAP> | </WRAP> |
| |
| 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. | 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. |
| |
| <WRAP center round tip> | <WRAP center round tip> |
| |
| Each core option is (usually) unique to the core, you can see what terminology it uses with the following: | Each core option is (usually) unique to the core, you can see what terminology it uses with the following: |
| - Launch a game and go into the RetroArch **Quick Menu** and navigate to the core's options ( ''[HOTKEY]''+{{:wiki:south.png?nolink&20|South button (B SNES)}} -> **Options**). | - Launch a game and go into the RetroArch **Quick Menu** and navigate to the core's options ( ''[HOTKEY]''+{{:wiki:south.png?nolink&20|South button (B SNES)}} -> **Core Options** <wrap lo>(this used to be labelled simply **Options** in older versions of RetroArch)</wrap>). |
| - Edit your options if you want to, and then go to **Manage Core Options** -> **Save Content Directory Options**. | - Edit your options if you want to, and then go to **Manage Core Options** -> **Save Content Directory Options**. |
| - Check the newly created file at ''system/.config/retroarch/config/<core name>/<system>.opt'' <WRAP center round help> | - Check the newly created file at ''/userdata/system/configs/retroarch/config/<core name>/<system>.opt''<WRAP center round important> |
| You may need to turn on "Show hidden folders" in your file manager to see this folder. | For earlier versions of Batocera, these files were located 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.</WRAP> |
| </WRAP> | |
| - 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''). | - 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''). |
| - Delete the ''system/.config/retroarch/config/<core name>/<system>.opt'' file (or just **Delete Content Directory Options** (which has replaced **Save Content Directory Options** from earlier)). | - Delete the ''/userdata/system/configs/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: | To run with our previous example, I would: |
| - Change the **System region** option from "auto" to "pal".\\ {{:screenshot-2021.10.07-17h58.20.jpg?direct&600|Adjusting various options in the core option menu. You can also use left/right to change options quickly.}} | - Change the **System region** option from "auto" to "pal".\\ {{:screenshot-2021.10.07-17h58.20.jpg?direct&600|Adjusting various options in the core option menu. You can also use left/right to change options quickly.}} |
| - Go into **Manage Core Options** and then **Save Content Directory Options**.\\ {{:screenshot-2021.10.07-17h48.35.jpg?direct&600|Saving the option file in the manage core options menu.}} {{:screenshot-2021.10.07-17h48.42.jpg?direct&600|This button changes to allow you to delete the option file later.}} | - Go into **Manage Core Options** and then **Save Content Directory Options**.\\ {{:screenshot-2021.10.07-17h48.35.jpg?direct&600|Saving the option file in the manage core options menu.}} {{:screenshot-2021.10.07-17h48.42.jpg?direct&600|This button changes to allow you to delete the option file later.}} |
| - Check the option file that was created at ''system/.config/retroarch/config/Genesis Plus GX/megadrive.opt''\\ {{:option_file.png?direct&500|There he is!}} | - Check the option file that was created at ''/userdata/system/configs/retroarch/config/Genesis Plus GX/megadrive.opt''\\ {{:option_file.png?direct&500|There he is!}} |
| - Take a gander at the option I set, and note that it is ''%%genesis_plus_gx_region_detect = "pal"%%''.\\ {{:option_strings.png?direct&500|Excellent.}} | - Take a gander at the option I set, and note that it is ''%%genesis_plus_gx_region_detect = "pal"%%''.\\ {{:option_strings.png?direct&500|Excellent.}} |
| - Open up ''batocera.conf'' and add ''%%global.retroarchcore.genesis_plus_gx_region_detect = "pal"%%'' to it. | - Open up ''batocera.conf'' and add ''%%global.retroarchcore.genesis_plus_gx_region_detect = "pal"%%'' to it. |
| |
| {{ :screenshot-2021.10.07-18h03.17.jpg?direct&600 |But unfortunately PAL isn't considered "hardcore" :(}} | {{ :screenshot-2021.10.07-18h03.17.jpg?direct&600 |But unfortunately PAL isn't considered "hardcore" :(}} |
| | |
| | ===== All other non-core RetroArch settings ===== |
| | |
| | <WRAP center round alert> |
| | This will break Batocera's ability to alter configuration files for RetroArch. This can cause issues such as losing the ability to change any settings from EmulationStation's menus, a future update resulting in failure to launch the system, no ability to change which controller is being used, etc. |
| | |
| | The better option is to [[#advanced_retroarch_settings|configure these settings from batocera.conf as written above]], as that allows Batocera to acknowledge the changed settings and then continue functioning normally. |
| | |
| | Only continue with this if you understand that the burden of configuration maintenance will now fall onto you. |
| | </WRAP> |
| | |
| | If the settings are not in the core options, you will notice these are not persisted by saving a core options config. Settings outside of core options must be saved with an override instead. |
| | |
| | Once you have set the settings as you want them to, in RetroArch's menu navigate to **Quick menu** -> **Overrides** and then select the type of override you want to make. Although making an override at all is not recommended, you can reduce interruption by keeping the override as small as possible, so try to aim for "game", then "content directory" if that's not expansive enough, and finally "core" if needed for every game ran by that system's core. |
| | |
| | {{:screenshot-2024.09.27-12h42.08.png?700|}} |
| | {{:screenshot-2024.09.27-12h43.21.png?700|}} |
| |
| ===== Reconfiguring the Keyboard for RetroArch ===== | ===== Reconfiguring the Keyboard for RetroArch ===== |
| </WRAP> | </WRAP> |
| |
| Open your ''/system/batocera.conf'' file and add the following lines as appropriate to it. Here is an example of the default bindings: | Open your ''/userdata/system/batocera.conf'' file and add the following lines as appropriate to it. Here is an example of the default bindings: |
| |
| <file> | <file> |
| 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. | 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 ''/system/batocera.conf'' file and add the following lines: | Open your ''/userdata/system/batocera.conf'' file and add the following lines: |
| |
| <file> | <file> |
| |
| <code> | <code> |
| retroarchSettings.save('input_enable_hotkey', '"shift"') | input_enable_hotkey = "shift" |
| retroarchSettings.save('input_menu_toggle', '"f1"') | input_menu_toggle = "f1" |
| </code> | </code> |
| |