Author Topic: mGalaxy as a Movie player!  (Read 5235 times)

ra226

  • Newbie
  • *
  • Posts: 12
    • Email
Re: mGalaxy as a Movie player!
« Reply #3 on: March 20, 2016, 10:07:01 PM »
Nice!  VLC's great, I might have guessed there'd be a one-time re-mapping of escape key for quit.

mgalaxy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1168
    • Email
Re: mGalaxy as a Movie player!
« Reply #2 on: March 20, 2016, 06:11:01 PM »
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: (xml) [Select]
<Cmd id="0" name="VLC" value="--fullscreen --global-key-quit=&quot;Esc&quot; &quot;%path\%file%ext&quot;"/>

ra226

  • Newbie
  • *
  • Posts: 12
    • Email
mGalaxy as a Movie player!
« Reply #1 on: March 20, 2016, 05:57:56 PM »
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]
<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=&quot;Esc&quot; &quot;%path\%file%ext&quot;" />
    </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]
<?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
« Last Edit: March 21, 2016, 01:01:26 AM by ra226 »