Author Topic: How to make mGalaxy work with other emulators  (Read 7837 times)

paulanderson

  • Newbie
  • *
  • Posts: 10
Re: How to make mGalaxy work with other emulators
« Reply #2 on: July 09, 2012, 12:34:42 PM »
Very nice tip indeed, going to go and try this out now , thanks! :)

towersofasia

  • Newbie
  • *
  • Posts: 1
How to make mGalaxy work with other emulators
« Reply #1 on: July 09, 2012, 11:27:33 AM »
I've tried many multi-emulator frontends but found none were as nice looking or snappy as mGalaxy. Unfortunately, as all of you already know, mGalaxy is MAME only. However, with a little bit of trickery I have managed to make it work with other emulators.



To get mGalaxy to launch other emulated games, we have to trick it into thinking it's a MAME game. The following might seem like a lot of steps, and does require some technical skills, but once you have it setup, adding games for other emulators is quite straightforward.
 
(1) First, you need to create a new mame.exe, which mGalaxy will call instead of the existing one. So, rename the existing mame.exe to something else, such as mame64.exe. Then, using a text editor, create a bat file with the following code:
 
cd c:\emulators\mame
launcher.bat %~1 %~2 %~3 %~4 %~5 %~6

 
This assumes your MAME and mGalaxy installation is in c:\emulators\mame. Save this file as mame.bat
 
(2) Make an executable version of this bat file called mame.exe. I recommend this utility:
http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html
 
(3) Now create another bat file (saved as launcher.bat in your mame folder) with the code below. We will come back to how to edit this file later.
 
if %1==resevil goto psx
 
rem default MAME launch
ECHO calling mame64 %1 %2 %3 %4 %5 %6 >run.log
cd c:\emulators\mame
mame64 %1 %2 %3 %4 %5 %6
goto end
 
:psx
ECHO calling epsxe.exe %1.bin >run.log
taskkill /F /IM mGalaxy.exe
cd C:\emulators\psx
epsxe.exe -nogui -loadbin games\%1.bin
cd c:\emulators\mame
start /B /MAX mGalaxy.exe
goto end
 
:end

 
(4) Now you have mGalaxy ready to launch other emulators! Test it out with MAME by calling mame.exe [mamerom] from a command prompt. If it launches MAME properly, then now let's add a PSX game.
 
(5) You need to take one of your PSX (or other emulator) roms and create a dummy zip file in your /roms folder. At this point it is a good idea to simplify the names of your PSX roms. So if you have a PSX rom named Resident.Evil.1.0.56.bin, rename this to resevil.bin. Then create an empty zip file called resevil.zip and place this in your /mame/roms folder.
 
(6) Copy the image (snapshot/artwork) for your PSX game to the /mame/snap folder. This should be a PNG file and have the same name as the rom name e.g. resevil.png
 
(7) Your game should now appear in mGalaxy. To make mGalaxy launch the game, edit launcher.bat and add an if statement to redirect to the PSX emulator. As you can see this was already done. After adding more games you would have something like this at the top of launcher.bat:
 
if %1==resevil goto psx
if %1==risk goto psx
if %1==wargames goto psx

 
(8 ) Locate your xmlout.xml (this is the games library database). For Windows 7, it should be located in c:\users\{username}\AppData\Roaming\mGalaxy\xmlout.xml. Add a new entry for your game as follows:
 
<game name="resevil" romof="resevil">
               <description>Resident Evil</description>
</game>

 
(9) Done! You may have noticed that in launcher.bat I am shutting down mGalaxy on launching a PSX game and restarting once you exit.  Without this I get unstable behaviour where the game starts in the background. If anyone finds a way to avoid this please let me know.