You may want to edit an emulator, or add an emulator to the list of systems recognized by mGalaxy.
The easiest way to do this is to make a request on the forum but if you want to do it by yourself we will see in the following how to proceed.
These tutorials will deal with the creation of an emulator, but if you know the principle, you should also be able to edit an emulator with full knowledge.
Creating an emulator #
The list of emulators is in the file “mGalaxy\Data\Definition\Emulators.xml” This file is to be opened with a text editor. Here is how an emulator is defined:The “Emulator” tag #
In the first line, 2 attributes:
- name: will receive the name of the emulator.
- hidden: whose value can be “true” or “false” will allow to define if we want to launch the emulator with its interface non-visible (“true”) or visible (“false”).
Some emulators allow it, others not, so it is to be tested beforehand.
The “System” tag #
Included in the “Systems” tag are the system(s) emulated by this emulator, with the following attributes:
- name: the exact name of the system as defined in the “Systems.xml” file
- option: additional information, if needed
- script: whose value can be “true” or “false” will allow to define if you want to launch the emulator through a script (“true”) or not (“false”).
- cmd: the command line to send to the emulator
- extensions: the list of file extensions allowed by this emulator, separated by a “|”.
Let’s take a closer look at the command line.
Almost all emulators can be launched from the command line. These commands can be found on the official website or in the documentation of the emulator.
mGalaxy uses this practice and will therefore address the emulator, sending it option requests (such as ‘start in full screen’) as well as the path to the game to launch.
For ease of use, the best approach is probably to first test the emulator with a batch file
…and when everything works perfectly, replace what needs to be replaced.
The “Requirement” tag #
The value of this tag is a text containing the prerequisite information for launching the emulator.
This text can contain text formatting tags, such as:
On the other hand, it cannot contain any of the special signs reserved for the XML language. These signs will have to be replaced manually or by means of an online tool, such as https://codebeautify.org/xml-escape-unescape