Author Topic: Creating a new system  (Read 3952 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 1072
    • Email
Creating a new system
« Reply #1 on: October 21, 2016, 05:38:50 AM »
In this tutorial I will explain you how to create a new (non already existing) system.
I will take here the example of the 'Oric-1' computer

1. Preparing elements

1. Choose a name for the new system. This name will be used throughout the whole process. Here we choose "Oric-1".
2. Create an icon for the new system. The icon should be a 200x150 pixels .png file. Its name should be "icon.png".
3. Go to "mGalaxy\Data\BaseSystems" and create a new folder called that name: "Oric-1"
4. Place the icon inside the "mGalaxy\Data\BaseSystems\Oric-1" folder

2. Editing

1. Open "mGalaxy\Data\BaseSystems\BaseSystems.xml" with a text editor.
2. At the end of the document, just before the "</Emulators>" ending tag, paste this block of code:

Code: XML
  1. <System type="[1]">
  2.    <Name ss="[2]" em="[3]" tgdb="[4]" gb="[5]">[6]</Name>
  3.    <Emu selected="[7]">
  4.       <Cmd hidden="false" name="[8]" value="[9]"/>
  5.    </Emu>
  6.    <Extensions>[10]</Extensions>
  7. </System>

Line 1: System type
Code: XML
  1. <System type="[1]">
Replace [1] with the system type. The available types are: Arcade, Computer, Console
The Oric is a computer, so we edit this way:  <System type="Computer">

Line 2: ID's on web databases and system name
Code: XML
  1. <Name ss="[2]" em="[3]" tgdb="[4]" gb="[5]">[6]</Name>
Replace [2] with the ID for that system on ScreenScraper (optional)
Replace [3] with the ID for that system on EmuMovies (optional)
Replace [4] with the ID for that system on TheGamesDB (optional)
Replace [5] with the ID|ShortName for that system on GiantBomb (optional)
Replace [6] with the system name we have chosen for the folder: Oric-1

If you don't know the exact ID for that system , leave it empty ("")
<Name ss="" em="" tgdb="" gb="">Oric-1</Name>
I do know some ID's for that system. So the line will finally look like this:
<Name ss="131" em="143" tgdb="" gb="">Oric-1</Name>

Line 3: Selected emu index
Code: XML
  1. <Emu selected="[7]">
Choose a name for the emulator. You choose exactly the name you want here! (it could be "Oricutron_win32_v12") Do as you want...but that name will be the same for [8]!

Line 4: Emulator index, command window visibility, emulator name, command line
Code: XML
  1. <Cmd hidden="false" name="[8]" value="[9]"/>

hidden="false": indicates whether or not the command window will be hidden when launching game (visible (default) is "false", hidden is "true")

Replace [8] with the name you've chosen for the emulator (the name chosen for [7]).
Replace [9] with the full command line to launch a rom.

Composing the command line
Well...This is the hardest step of this tutorial!
The goal is to give the full command line structure to the emulator!

If we were to launch a game from a command window (or .bat file) we would have something like this:
Code: [Select]
"C:\Program Files (x86)\Oricutron_win32_v12\oricutron.exe" "D:\ROMS\Oric\Hunchback (UK) (19xx).tap" --fullscreenThe path to the emulator, then the path to the rom file to open with that application, finally some possible options (in this case, an instruction to force display to full screen. List of available commands for Oricutron:

mGalaxy will know about the application path and folder path made in mGalaxy_Runway! So, we do not want here to hard code those paths but just give mGalaxy the structure for the rom path (the reason being that some emus for instance won't request the extension info..while some other do!) and command option!
The way to achieve this is to use text symbols (also called 'variables').
The path to the rom folder is symbolized by: %path
The name of the file is symbolized by: %file
The extension for the file is symbolized by: %ext
The whole thing has to be surrounded by double quotes. A double quote is symbolized by: &quot;
Finally you can give the command line options if needed.
So, the line will look like this:
<Cmd hidden="false" name="Oricutron" value="&quot;%path\%file%ext&quot; --fullscreen"/>

Sometimes the emulator is missing an essential function like going to full screen or exiting with the 'Escape' key (which is requested by mGalaxy)!
In that case (and this is the case for our Oric-1 example!) this is not the emulator that will be launched but a script that will behave as an intermediary between mGalaxy and the emulator.
If this occurs, you don't have to change a thing in the path/file/extension/command info that you've previously given!! The only thing is to add "[Script]" to the emulator name: name="Oricutron [Script]"
This being done, mGalaxy knows that he will have to search for a script (with the same name: Oricutron [Script]) in "mGalaxy\Data\Scripts\"
Writing a script should be part of another tutorial so we won't go further on the topic here!

Line 5
Code: XML
  1. </Emu>
Nothing to edit

Line 6: Allowed file extensions
Code: XML
  1. <Extensions>[10]</Extensions>
Replace [10] with a list of all allowed file extensions for that system (coma separated).
Here we will have:

Line 7
Code: XML
  1. </System>
Nothing to edit

The final block of code should now look like this

Code: XML
  1. <System type="Computer">
  2.    <Name ss="131" em="143" tgdb="" gb="">Oric-1</Name>
  3.    <Emu selected="Oricutron [Script]">
  4.       <Cmd hidden="false" name="Oricutron [Script]" value="&quot;%path\%file%ext&quot; --fullscreen"/>
  5.    </Emu>
  6.    <Extensions>.dsk,.tap</Extensions>
  7. </System>

3. Reporting

Come here on the forum, and share your new system info so that we can include it to mGalaxy! ;)
« Last Edit: June 07, 2017, 04:43:10 PM by mgalaxy »