Author Topic: Tutorial: Using MAME  (Read 14039 times)

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Tutorial: Using MAME
« on: December 12, 2017, 03:02:03 PM »
Using MAME for emulation within RetroFE requires a bit of background:

MAME emulates machines: arcade machines, console machines, handheld console machines, home computer machines, etc. Each of these, whether that's Pacman or SNES or the NMS8250 MSX computer is considered a separate machine. Machines in MAME are launched as follows:
mame64.exe <machine name>
e.g.
mame64.exe pacman
mame64.exe snes
mame64.exe nms8250
The roms required for this should be placed in MAME's rompath, defined in the mame.ini file.

Some of these machines, like the SNES and NMS8250, allow software to be loaded. MAME has two methods to do this:
1. Software lists, XML files placed in MAME's hash directory.
2. Direct call.

Games from the software list can be called by adding the name of the software after the machine, e.g.
mame64.exe snes sturrican
The roms required for this should be placed in MAME's rompath, defined in the mame.ini file.

Games from a direct call need to be called using the type of software, e.g. -cart, -cart1/cart2 (if more than one cartridge slot is available), -floppy, etc. followed by the path to the file, e.g.
mame64.exe snes -cart "C:\RetroFE\collections\Super Nintendo Entertainment System\roms\Super Turrican.zip"
Since you use the complete path to the software here, these files can be outside the rompath defined in the mame.ini file.


A launcher configuration for MAME arcade games could look something like this:
executable = emulators\MAME\mame64.exe
arguments = "%ITEM_NAME%"

A launcher configuration for SNES games using direct calls could look something like this:
executable = emulators\MAME\mame64.exe
arguments = snes -cart "%ITEM_FILEPATH%"

A launcher configuration for MSX games using software lists could look something like this:
executable = emulators\MAME\mame64.exe
arguments = nms8250 "%ITEM_NAME%"


I've taken the liberty of creating a downloadable set for you to take a look at: https://mega.nz/#!jBMyxTaS!dPgNjfq9BJN3ScY5RlhLscgLa7wdejIUlBBXNdMQEss
It contains a working and configured MAME emulator (0.192) with a set of collections (containing settings.conf files) and corresponding launcher configurations for Windows and Linux. Perhaps this can help you get started using MAME for emulating a wide variety of systems.

The SPY

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Tutorial: Using MAME
« Reply #1 on: May 05, 2020, 05:37:58 AM »
Just new to RetroFE but am enjoying it so far.  One issue I found with MAME and Calling a Console and then it's Cartridge was getting a custom bezel/overlay for that Game. IE for Vectrex most of the games don't look right or are designed to work with a coloured overlay, and even with the correct artwork installed I couldn't find a way to Call MAME and tell it which "artwork" video option to use inside the artwork. MAME would always just use the last Overlay Selected.

So my work around was to compile  my own MAME Artwork with a custom lay file for each of the Vectrex ROMs and edit the RetroFE launcher file as follows

arguments = vectrex -cart "%ITEM_FILEPATH%" -override_artwork "%ITEM_NAME%"

This causes MAME to use my custom Artwork rather than the standard Vectrex Artwork. 
Im not 100% sure this is the right approach as this wasn't the easiest to get working and time consuming to create all the files.
But if this is the only way to get MAME to have a separate Bezel per "Console Rom" I would consider making a script to pull the "Bezel project" files down and convert them to MAME Artwork files.

Also Happy to share my Vectrex "artwork" files if someone tells me the correct place to post them

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Tutorial: Using MAME
« Reply #2 on: May 05, 2020, 07:36:21 AM »
It's actually a pretty good way of doing it. Alternatively you could put all that artwork in one vectrex set, and use the -view option. I wouldn't mind having a copy of that artwork btw; perhaps I can set up a part in the download section where bezels etc. can be found. I have quite a few of my own as well. :)

The SPY

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Tutorial: Using MAME
« Reply #3 on: May 06, 2020, 01:49:11 AM »
Thanks Pieter, I was having trouble getting the -view option to work, which is why I went down the override path. but have now figured it out the -view and how to get it to behave with the launcher script, So I think I'll repackage the artwork back into the 1 file, I think that will be easy for me to manage going forward. Yes please set up a Bezel area and I'll upload my files as I make them.

With the correct "view" naming  in the .lay file I can now use the -view in my launcher as follows

arguments = vectrex -cart "%ITEM_FILEPATH%" -view "%ITEM_NAME%"
this will display the correct overlay
or
arguments = vectrex -cart "%ITEM_FILEPATH%" -view  "%ITEM_NAME% 16x9"
and this will use the overlay with a bezel



bodbod

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +1/-0
    • View Profile
    • Don't be a sheep, Do It Yourself !
Re: Tutorial: Using MAME
« Reply #4 on: January 11, 2022, 03:30:43 PM »
Hi there,

i am tweaking a bit my arcade machine and it s like i am new to it again, one quick question about mame, where is the line which tell to mame to use the same control config as per the front end retrofe.

basically i can navigate through my retroFE interface but when i launch the games with MAME emulator, the controls are off.

Thanks !

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Tutorial: Using MAME
« Reply #5 on: January 11, 2022, 05:58:14 PM »
The two are separate configuration files. MAME controls are handled by the ctrl setting, the .cfg files, and can be edited from the MAME menu as well. Just press tab and edit the controls.

bodbod

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +1/-0
    • View Profile
    • Don't be a sheep, Do It Yourself !
Re: Tutorial: Using MAME
« Reply #6 on: January 11, 2022, 07:06:47 PM »
thx for the quick response Pieter, ok i ll give a try then via the interface and see how it changes the file then so that i can edit directly.
So i was not that far from finishing reconfiguring the whole thing to get it working fully !

cheers and long life to retro FE !