MGL files are used as a custom method to load games directly from the MiSTer FPGA's Menu core.
They can be placed in the root of the SD card to show up in the top of the menu, or in a menu folder. A menu folder is a regular folder with an underscore (
_) in front that will display in the menu. You can create your own menu folders.
Not all cores support MGL files, though all the most popular cores do. Console support is good, but computer cores generally don't work well with them, unless they have some mechanism to auto-boot a loaded game.
MGLs are simple XML files with the file extension
.mgl. Whatever name you give to an MGL file (excluding the extension) is what will be shown for its entry in the menu. E.g.
My Favorite Game.mgl will display in the menu as
My Favorite Game.
Example MGL files:
rbf: Relative path to the core's RBF file from the SD root, excluding its file extension and timestamp.
setname: Sets a core's name to this value, changing its games folder and config file.
file: The file to be loaded into the core and its launch arguments.
delay: Amount of seconds to wait before load/mount.
ffor load file to memory or
sfor mount file.
index: Pointer to slot where file is loaded in core.
path: Path to game file relative to the core's games folder.
reset: Triggers a reset on the core. You probably don't need to use this.
delay: Amount of seconds to wait before reset.
file tags must be present.
file tag can be used more than once in an MGL. Useful for cores that have multiple file slots.
setname tag is optional. It will make a core temporarily point to a different games folder and config file. Useful for cores which play multiple systems, or often need to toggle between different configurations.
index attributes depend on what values were configured by the core's developer. See below for how to check those.
If a core pops up the OSD menu after loading the game or the game doesn't load, try increasing the
Some MGL arguments for common cores:
|Famicom Disk System||_Console/NES||2||1||f|
|Game Boy (Color)||_Console/Gameboy||2||1||f|
|Game Boy Advance||_Console/GBA||2||1||f|
A more comprehensive list of MGL arguments documented by Wizzo can be found here.
Arcade cores cannot be launched using MGL files. If you want to make a shortcut to an arcade core elsewhere in the menu, you'll instead have to symlink (symbolic link) it there.
For example, either through SSH or the console (press
F9 from the menu):
This would make a shortcut to an arcade core in the root of the MiSTer menu. It can also be done with menu subfolders.
Take note of the second line, symlink'ing the
cores folder. You have to do this once for each folder you want to symlink MRA files into.
Finding MGL Arguments
If the core you are looking for isn't in these lists, you can either test out the combinations yourself, or you can look at the code on GitHub for the core to figure out the values directly.
For example, to get the values for the TurboGrafx-16 core, you can take a look at the file TurboGrafx16.sv on GitHub to find the index numbers and file types supported by that core.
First find the section that starts with
parameter CONF_STR and in that section look for the file type you are launching. In this case it will be
"S0,CUECHD,Insert CD;". Notice the S0, that is the "s" type with index of 0.
See the Core Configuration String page for detailed information on this format.