====== Customize ES Systems ====== EmulationStation displays systems based on a file called ''es_systems.cfg''. In other distributions, this is typically the only file. However, in Batocera FIXME and higher, the ''/userdata/system/configs/emulationstation/es_systems_.cfg'' can be used as an overlay to the original ''/usr/share/emulationstation/es_systems.cfg'' file. 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 Python) thus rely on you. This is really only suitable if you never intend on updating Batocera again. 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 '''' (for example: ''/usr/lib/python2.7/site-packages/configgen/emulatorlauncher.py'' which is calling an older Python version), it will need to be updated accordingly. In general, it is recommended to avoid using a custom '''' and to just use the default one. ===== Modify an existing system with a new system-specific "es_systems_.cfg" file ===== You can create a file named ''es_systems_.cfg'' where '''' 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: 3DO Interactive Multiplayer 3do Panasonic - Sanyo - Goldstar 1993 console /userdata/roms/3do .iso .chd .cue python /usr/lib/python3.9/site-packages/configgen/emulatorlauncher.py %CONTROLLERSCONFIG% -system %SYSTEM% -rom %ROM% 3do 3do opera 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 '''', ''es_systems_.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). Batocera is smart enough to //only// apply the changes you make. Such as, if the only thing you need to change for a system is its ROM path, you can use the following in your ''/userdata/system/configs/emulationstation/es_systems_pico8.cfg'': pico8 /userdata/roms/pico8real 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: Megadrive hacks megadrive Sega 1988 console /userdata/roms/megadrivehacks .bin .gen .md .sg .smd .zip .7z python /usr/lib/python3.9/site-packages/configgen/emulatorlauncher.py %CONTROLLERSCONFIG% -system %SYSTEM% -rom %ROM% megadrive megadrivehacks blastem genesisplusgx genesisplusgx-wide picodrive The '''' and '''' 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 '''', you'll have to manually specify your default emulator in ''batocera.conf''. For instance if you were defining a new system with ''cps1'' then the following would be added to ''batocera.conf'': cps1.emulator=libretro cps1.core=fbneo 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. You must use a unique '''' 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. Despite '''' 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. 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). <--