Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
emulationstation:customize_systems [2021/10/07 05:07] – added help info to template file atariemulationstation:customize_systems [2022/06/05 14:44] (current) – [Customize ES Systems] clarify + future proof explanation of updating es_systems atari
Line 1: Line 1:
 ====== Customize ES Systems ====== ====== Customize ES Systems ======
  
-EmulationStation displays systems based on a file called ''es_systems.cfg'', located at ''/usr/share/emulationstation''. In the past, you had to edit this file and use the command ''batocera-save-overlay''This had issues when updating as all overlays have to be removed, meaning you'd have to redo these steps every update.+EmulationStation displays systems based on a file called ''es_systems.cfg''. In other distributionsthis is typically the only file. However, in Batocera FIXME and higher, the ''/userdata/system/configs/emulationstation/es_systems_<custom_name>.cfg'' can be used as an overlay to the original ''/usr/share/emulationstation/es_systems.cfg'' file.
  
-Batocera FIXME introduced the ability to copy the file to ''/userdata/system/configs/emulationstation/es_system.cfg'' and edit it there, however this meant you would have to compare and copy the file every update, as well as appending your changes and working out if something had broken (as Batocera adds new systems nearly every major release and changes the launch methods for other systems too).+<WRAP center round info> 
 +If preferred, the entire file can be overridden by instead using ''/userdata/system/configs/emulationstation/es_systems.cfg''. Be careful if doing this, as the entire notion of maintaining this file as Batocera upgrades its internals (namely Pythonthus rely on youThis is really only suitable if you never intend on updating Batocera again. 
 +</WRAP>
  
-Batocera FIXME now treats extra ''/userdata/system/configs/emulationstation/es_systems_<custom_name>.cfg'' as overlays to the original ''/usr/share/emulationstation/es_systems.cfg'' file. This has the benefit of only requiring you to maintain the list of //your// personally added system entriesas opposed to needing to scour through the entire document every update.+<WRAP center round important> 
 +Whenever Batocera is upgraded, its version of Python used may also change. This means if you are using an ''es_systems.cfg'' which manually defines the ''<command>'' (for example: ''<command>/usr/lib/python2.7/site-packages/configgen/emulatorlauncher.py</command>'' which is calling an older Python version)it will need to be updated accordingly.
  
-<WRAP center round important> +In generalit is recommended to avoid using a custom ''<command>'' and to just use the default one.
-If you upgrade from a previous Batocera version to **v31** or higheryou **need to update** your ''es_systems*.cfg'' files to reflect the change of Python version. As you can see below, starting with Batocera **v31**, the location for the emulator launcher is ''/usr/lib/python3.9/site-packages/configgen/emulatorlauncher.py'' and not ''/usr/lib/python2.7/site-packages/configgen/emulatorlauncher.py'' as it used to be in previous versions. There is no Python 2.7 on Batocera **v31** or higher.+
 </WRAP> </WRAP>
  
-===== Create a new system-specific ES systems CFG file =====+===== Modify an existing system with a new system-specific "es_systems_<custom_name>.cfg" file =====
  
 You can create a file named ''es_systems_<custom_name>.cfg'' where ''<custom_name>'' is a name you wish to use for it. This file needs to follow the same conventions as the original ''es_systems.cfg'', but does not need to include the entirety of the file. For example:  You can create a file named ''es_systems_<custom_name>.cfg'' where ''<custom_name>'' is a name you wish to use for it. This file needs to follow the same conventions as the original ''es_systems.cfg'', but does not need to include the entirety of the file. For example: 
Line 52: Line 54:
 </file> </file>
  
-would only affect the 3DO system on your Batocera, with the rest of the systems still referring to ''/usr/share/emulationstation/es_systems.cfg'' for their system CFG. When both files contain the same systems, ''es_systems_<custom_name>.cfg'' will take priority.+would only affect the 3DO system on your Batocera, with the rest of the systems still referring to ''/usr/share/emulationstation/es_systems.cfg'' for their system CFG. When both files contain the same ''<name>'', ''es_systems_<custom_name>.cfg'' will take priority.
  
 In case you'd like to have complete control over ES systems CFG, you can still use the two previous methods to completely override it (ie. using overlays or copying the entirety of ''es_systems.cfg'' to ''/userdata/system/configs/emulationstation/es_systems.cfg'' without appending a custom system name to its filename). In case you'd like to have complete control over ES systems CFG, you can still use the two previous methods to completely override it (ie. using overlays or copying the entirety of ''es_systems.cfg'' to ''/userdata/system/configs/emulationstation/es_systems.cfg'' without appending a custom system name to its filename).
Line 68: Line 70:
 </file> </file>
  
-Here, it'll use the folder ''/userdata/roms/pico8real/'' to look for Pico-8 games instead of the regular one.+Here, it'll use the folder ''/userdata/roms/pico8real/'' to look for Pico-8 games instead of the regular one, and use the rest of the configuration from the ''/usr/share/emulationstation/es_systems.cfg'' file. 
 + 
 +===== Create a new system ===== 
 + 
 +The method above can also be applied to make a brand new system in place of editing an already existing one. For instance, you might want to create a new "megadrivehacks" system intended for Megadrive/Genesis ROMhacks. 
 + 
 +Create a ''/userdata/system/configs/emulationstation/es_systems_megadrivehacks.cfg'' file that contains the following: 
 + 
 +<file xml es_systems_megadrivehacks.cfg> 
 +<?xml version="1.0"?> 
 +<systemList> 
 +  <system> 
 +        <!-- The custom name of this system. --> 
 +        <fullname>Megadrive hacks</fullname> 
 +        <!-- Keep the name the same for the system you are basing it off it, saving you work later. --> 
 +        <name>megadrive</name> 
 +        <manufacturer>Sega</manufacturer> 
 +        <release>1988</release> 
 +        <hardware>console</hardware> 
 +        <!-- Specify your new path. --> 
 +        <path>/userdata/roms/megadrivehacks</path> 
 +        <extension>.bin .gen .md .sg .smd .zip .7z</extension> 
 +        <command>python /usr/lib/python3.9/site-packages/configgen/emulatorlauncher.py %CONTROLLERSCONFIG% -system %SYSTEM% -rom %ROM%</command> 
 +        <!-- Since this is used only for scraping, it's safe to leave it as default. You'll probably have to be providing your own metadata for ROMhacks anyway. --> 
 +        <platform>megadrive</platform> 
 +        <!-- Change the theme to use the custom assets instead. --> 
 +        <theme>megadrivehacks</theme> 
 +        <!-- Leave the emulators the same. --> 
 +        <emulators> 
 +            <emulator name="libretro"> 
 +                <cores> 
 +                    <core>blastem</core> 
 +                    <core default="true">genesisplusgx</core> 
 +                    <core>genesisplusgx-wide</core> 
 +                    <core>picodrive</core> 
 +                </cores> 
 +            </emulator> 
 +        </emulators> 
 +  </system> 
 +</systemList> 
 +</file> 
 + 
 +The ''<name>'' and ''<platform>'' paths in this example are kept the same such that they can still use the defaults as specified by Batocera. If you really want to use a unique ''<name>'', you'll have to manually specify your default emulator in ''batocera.conf''. For instance if you were defining a new system with ''<name>cps1</name>'' then the following would be added to ''batocera.conf'': 
 + 
 +<code> 
 +cps1.emulator=libretro 
 +cps1.core=fbneo 
 +</code> 
 + 
 +These default emulators can also be defined in the ''/usr/share/batocera/configgen/configgen-defaults.yml'' and/or ''/usr/share/batocera/configgen/configgen-defaults-arch.yml'' system defaults file. 
 + 
 +<WRAP center round tip> 
 +You must use a unique ''<name>'' field when adding a new system if you wish to keep the old one in addition. However, if using duplicate shortnames is a necessity and you still want the new and old system to exist simultaneously, you can also put both systems in a single CFG file. 
 +</WRAP> 
 + 
 +<WRAP center round info> 
 +Despite ''<core default="true">'' being specified in the ''es_systems_megadrivehacks.cfg'' file, Batocera doesn't actually use this as the default when launching an emulator. It instead looks for its own list of defaults for its configgen. 
 +</WRAP> 
 + 
 +In case you're making a brand new system with brand new emulators/parameters, refer to [[:coding_rules#how_to_add_an_emulator|the developer documentation]] instead. 
 + 
 +===== Older Batocera versions ===== 
 + 
 +--> Click to reveal# 
 + 
 +EmulationStation displays systems based on a file called ''es_systems.cfg'', located at ''/usr/share/emulationstation''. In the past, you had to edit this file and use the command ''batocera-save-overlay''. This had issues when updating as all overlays have to be removed, meaning you'd have to redo these steps every update. 
 + 
 +Batocera FIXME introduced the ability to copy the file to ''/userdata/system/configs/emulationstation/es_system.cfg'' and edit it there, however this meant you would have to compare and copy the file every update, as well as appending your changes and working out if something had broken (as Batocera adds new systems nearly every major release and changes the launch methods for other systems too). 
 + 
 +<--
  
  • emulationstation/customize_systems.1633576070.txt.gz
  • Last modified: 3 years ago
  • by atari