Page 1 of 1

mGalaxy as a Movie player!

Posted: Sun Mar 20, 2016 10:57 pm
by ra226
I wasn't going to bug you with a feature request for this since I think it's kind of out of scope, but... I realized I could actually implement it myself!  Thanks to the XML-based architecture, I was able to add another "Emulator" (in this case, VLC player) and feed it custom "roms" (.m4v files).  If anyone else would like mGalaxy to double as a Movie Player, here's what I did:

- Install VLC player if you haven't (www.videolan.org/vlc)
- Go to your mGalaxy\Data folder and copy the "Multi-system [MAME]" folder, renaming the copy to "Movie"
- Make a backup copy of mGalaxy\Data\Systems.xml, then edit Systems.xml in a text editor (I used Notepad++)
- Copy the following new "System" into the document (just add it right before the first System, or after the last, or whatever), changing USERNAME to your user folder:

Code: Select all

<System Type="Arcade">
    <Name>Movie</Name>
    <AppPath>C:\Program Files (x86)\VideoLAN\VLC\vlc.exe</AppPath>
    <RomPath>C:\Users\USERNAME\Videos</RomPath>
    <SnapPath>C:\Users\USERNAME\Videos\snaps</SnapPath>
    <VidPath />
    <Emu selected="0">
      <Cmd id="0" name="VLC" value="--fullscreen --global-key-quit="Esc" "%path\%file%ext"" />
    </Emu>
    <Extensions>.m4v</Extensions>
    <Active>True</Active>
    <Script>False</Script>
    <Database>True</Database>
  </System>
- Now go into your mGalaxy\Data\Movie folder and edit xmlout.xml.  The format should look like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<dbase name="Video" version="">
  <game name="StarWars4" cloneof="">
    <description>Star Wars Episode IV - A New Hope</description>
    <genre />
    <players />
  </game>
  <game name="StarWars5" cloneof="">
    <description>Star Wars Episode V - The Empire Strikes Back</description>
    <genre />
    <players />
  </game>
  <game name="StarWars6" cloneof="">
    <description>Star Wars Episode VI - Return of the Jedi</description>
    <genre />
    <players />
  </game>
</dbase>
- This assumes you have the original trilogy of Star Wars in your Users\USERNAME\Videos folder and have named them StarWars4.m4v, StarWars5.m4v, etc.  Just change/add "game" entries to match file names.
- Optionally, take a screenshot of each, put them in Videos\snaps

The end result is a Movie "Emulator" which launches the movie full-screen in VLC, and exits back to mGalaxy when you hit your Escape key, just like any other emulator.  About all its missing is a new icon.png file (right now it comes up as the MAME icon).

I hope this is useful to some people out there, and thanks to the devs for making the app easily extendable!

NOTE: updated based on comments

Re: mGalaxy as a Movie player!

Posted: Sun Mar 20, 2016 11:11 pm
by mgalaxy
Thanks for sharing your experience with other users!!
This system is part of the next mGalaxy version by the way!

Just wanted to add that there's a way to 'force' quit with escape key by using this option in command line: --global-key-quit="Esc"
Which gives:

Code: Select all

<Cmd id="0" name="VLC" value="--fullscreen --global-key-quit="Esc" "%path\%file%ext""/>

Re: mGalaxy as a Movie player!

Posted: Mon Mar 21, 2016 3:07 am
by ra226
Nice!  VLC's great, I might have guessed there'd be a one-time re-mapping of escape key for quit.