MiSTer-devel / Main_MiSTer

Main MiSTer binary and Wiki
GNU General Public License v3.0
3.06k stars 331 forks source link

Feature Request: MGL: Relative path to MGL file #556

Open kwinsch opened 2 years ago

kwinsch commented 2 years ago

Fist thank you for the implementation and all these awesome features on MiSTer!

I played around with the newest merge https://github.com/MiSTer-devel/Main_MiSTer/commit/ed1ec99688034e92d84cde41593a46a82979235a , which adds the mgl loader functionality. While using and testing the feature, I found the following possible weakness, that might limit the use cases for the mgl files.

Behavior: The path seems always be relative to '/media/fat/games'.

Expected Behavior:: The path defaults to '/media/fat/games', but can be defined relative to the mgl file. This would allow the creation of dedicated GamePack archives which distributes the mgl launcher files and the corresponding roms. I find this extremly useful to make custom collections like all Sonic games for Genesis etc. It might even make sense to include some rbf's in this scheme for some special cases.

_GamePacks
|-- game-pack1-folder
        |-- game1.mgl
        |-- game2.mgl
        | _games
              |-- snes/game1
              |-- genesis/game2

I also managed to create a little python game launcher for windows and configure it as an emulator in Launchbox. It copies the rom and mgl over per scp and the launch it using ssh root@<MISTER_IP> 'echo "load_core /media/fat/_mgl/game.mgl" > /dev/MiSTer_cmd'

Overall, very cool feature @sorgelig !

sorgelig commented 2 years ago

mgl is not main way to load games. You need to understand it. It's just a helper to use original ROM loads over OSD. There is a standard of ROMs root per core. So core has home directory and there is no plans to change it. ROMs must be visible through standard ROM browser in the core. It should NOT be an exclusive to mgl. I may suggest you to create symbolic links to other folders if you want a different physical location.

kwinsch commented 2 years ago

I understand your point of view. Nevertheless, it would be a very neat feature. If I load a core from the OSD, I am always able to select a game outside of the dedicated ROM root of that core using the OSD file selector menu.

From all the discussions in the Discord and other Retro Gaming forums, there is a real need for easy to navigate, graphical game launchers that are compatible with children's thinking and who might not yet able to read. The latest approach on the launcher side is to mount a NAS folder over /media/fat/games, as long as the launcher on the PC/tablet is active. What I can say is, that my little niece is loving the Launchbox functionality!

The feature here is mainly to describe the possibility of game packs. So that some games can be curated and send to a friend to play without worrying to copy many files around or to have all games already in the correct path under /media/fat/games/

kwinsch commented 2 years ago

After reading more code, I just found out that there is a work around to achieve what I want:

<mistergamedescription>
    <rbf>_console/genesis</rbf>
    <file delay="2" type="f" index="0" path="../../_MGL/Sega - Sonic/__games/Sonic The Hedgehog 2 (World) (Rev A).md"/>
</mistergamedescription>

It basically jumps out of /media/fat/games/genesis to /media/fat/ with '../../'