Skip to content

Instantly share code, notes, and snippets.

@detain
Last active February 13, 2024 19:42
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save detain/5df6710a16276c7ccbe0b326094dda14 to your computer and use it in GitHub Desktop.
Save detain/5df6710a16276c7ccbe0b326094dda14 to your computer and use it in GitHub Desktop.
MAME Notes on Setup with Multimedia/EXTRAs and mameinfo/highscores/history/etc

MAME

Setting up MAME

Create the ini files with the appropriate command:

mame -createconfig

Edit the mame.ini file created on the same folder of the emulator executable and add the corresponding paths. Example:

rompath                   roms;C:\PD\MAME ROMs;C:\PD\MAME CHDs;C:\PD\MAME SL ROMs;C:\PD\MAME SL CHDs
samplepath                samples;C:\PD\MAME EXTRAs\samples
artpath                   artwork;C:\PD\MAME EXTRAs\artwork
ctrlrpath                 ctrlr;C:\PD\MAME EXTRAs\ctrlr
cheatpath                 cheat;C:\PD\MAME EXTRAs\cheat
snapshot_directory        snap;C:\PD\MAME EXTRAs\snap;C:\PD\MAME EXTRAs\snap_SL

The cheat.7z, snap.zip, and snap_SL.zip archives in the root folder of the MAME EXTRAs are seen by MAME as folders.

For the cheats to work, you need to manually enable them. To do that, you have two options:

  1. Edit the mame.ini file (permanent change):
cheat                     1
  1. Start the emulator with the following command (must be done every time you play):
mame gamename -cheat

Edit the ui.ini file created on the same folder of the emulator executable and add the corresponding paths. Example:

historypath               history;dats;.;C:\PD\MAME EXTRAs\dats
categorypath              folders;C:\PD\MAME EXTRAs\folders
cabinets_directory        cabinets;cabdevs;C:\PD\MAME EXTRAs
cpanels_directory         cpanel;C:\PD\MAME EXTRAs
pcbs_directory            pcb;C:\PD\MAME EXTRAs
flyers_directory          flyers;C:\PD\MAME EXTRAs
titles_directory          titles;C:\PD\MAME EXTRAs
ends_directory            ends;C:\PD\MAME EXTRAs
marquees_directory        marquees;C:\PD\MAME EXTRAs
artwork_preview_directory "artwork preview;artpreview";C:\PD\MAME EXTRAs
bosses_directory          bosses;C:\PD\MAME EXTRAs
logos_directory           logo;C:\PD\MAME EXTRAs
scores_directory          scores;C:\PD\MAME EXTRAs
versus_directory          versus;C:\PD\MAME EXTRAs
gameover_directory        gameover;C:\PD\MAME EXTRAs
howto_directory           howto;C:\PD\MAME EXTRAs
select_directory          select;C:\PD\MAME EXTRAs
icons_directory           icons;C:\PD\MAME EXTRAs
covers_directory          covers;C:\PD\MAME EXTRAs

The hiscore plugin is for games that didn't save the score when the machine was turned off or unplugged (not all machines had NVRAM to keep their high scores):

plugins                   1
plugin                    hiscore

The contents of the MAME Multimedia torrent (soundtrack, videosnaps, and videosnaps_SL) can't be used by MAME; they are supposed to be used by frontends.

Setting up Software Lists on MAMEUI

The software which is in software lists is controlled by XML files found in the hash folder (defined by hashpath in mame.ini).

MAMEUI is a bit different than MAME: mame.ini is in the ini folder.

If nothing shows on the "SW Items" tab, then either the machine has no Software Lists, or the hash files were not found.

If the hash files exist, MAME will look for the Software Lists' files in the ROMs folder(s) defined by rompath in mame.ini, by default the roms folder.

Loose software are software that are not part of MAME's Software Lists (files that were picked up here and there).

The idea is to have a separate folder structure for them.

The root of the folder where these files are is by default the software folder (defined by swpath in mame.ini).

If you won't use loose software, you don't have to set up this folder.

In the GUI, this folder is called "Software File Base".

Make a subdirectory for each system, named however you want.

Let's say you have some extra Genesis ROMs, so in my case I have E:\DATA as my "Software File Base", then I have E:\DATA\Genesis for loose Genesis games.

So, right-click on the machine "Sega Genesis (USA, NTSC)", select Properties, click on the "Software" tab, insert the Genesis folder, click on OK.

Then click some other system then Genesis, and those extra ROMs will show up on the "SW Files" tab.

The main thing is that both "Software File Base", and the game's folder be set up and actually exist, and be different from each other. If you don't do that, nothing shows in "SW Files".

MAME EXTRAs and MAME Multimedia

  • Icons.zip: This file contains icons for every game in MameUI and the folder view on the far left. Place it in the \MameUI\icons folder, it can remain zipped to save slack HD space but the zip file must be named icons.zip.
  • Snap.zip: These are a series of files that contain in-game screenshots of every parent game in MameUI. Download the packs and extract their contents into the \MameUI\snap directory or combine their *.png contents into one large snap.zip file.
  • Titles.zip: This file can provide support for screenshots showing the titles of the game in MameUI, place in \titles directory.
  • Marquees.zip: This file can provide support for the marquee images that appear on the top of arcade machines, place in \marquees directory..
  • Cpanel.zip: This file can provide support for the images of arcade control panels, place in \cpanel directory..
  • PCB.zip: This file can provide support for the images of arcade printed circuit boards, place in \pcb directory..
  • Bkground.zip: This file contains numerous images that are used as the background for the MameUI GUI [beneath the game list, behind the screenshot/folder areas]. Download this file and extract its contents into the \MameUI\bkground directory. Choose a background image in the Options menu. To have it rotated randomly on MameUI launch, toggle the checkbox in the Options • Interface Options menu.
  • Flyers.zip: This file can provide support for the original flyers sent to arcade operators, exhorting them to buy the games, place in \flyers directory.
  • Cabinets.zip: These are a series of files that contain images of the actual physical arcade machines themselves. Download the packs and extract their contents into the \MameUI\cabinets directory or combine their *.png contents into one large cabinets.zip.
  • History.dat: This file contains the original game’s designer’s names, and assorted trivia. Place this file in the \MameUI folder alongside MameUI.exe. It will display if the history art tab is toggled, or if the history tab is not selected, it will display beneath snapshots.

This torrent is a compilation made by the Pleasuredome staff of files from different sources.

The files are used by the MAME emulator or by frontends. They improve the playing experience.

All the contents of this torrent can be obtained from the websites of the original authors.

From the very beginning, this torrent was made to be instantly usable while seeding back the contents.

Releases

The MAME EXTRAs, MAME Multimedia, and MAME EXTRAs Update torrents are usually released every two months, about two weeks after the MAME release. It's necessary to wait until all the content is up-to-date and made available by all the sources used. The 3 torrents are released together. Do not ask when or if a new version of this torrent will be released; it will be released when it's ready.

The VideoSnaps (short videos intended to be played by frontends as previews) and Soundtracks (in MP3 format) are actually part of the MAME EXTRAs, but due to the size, they are in a separate torrent named MAME Multimedia.

The MAME EXTRAs Update torrent has only the new files required to update both the MAME EXTRAs and MAME Multimedia torrents from one version to the next version.

  • artwork folder: contains bezels, control panels, marquees, instruction cards, backdrops, overlays, lamps, and LEDs
  • samples folder: zipped WAV files for systems that don't have audio emulated yet; see MAME Samples
  • cheat.7z: compilation of cheats

The dats folder has text files displayed by MAME or frontends. Its contents are:

  • command.dat: list of the commands (e.g. how to do a Hadouken in Street Fighter)
  • gameinit.dat: initialization procedures for games that are not playable on the first run
  • hiscore.dat: unofficial highest scores achieved
  • history.xml: history information text file in the new format as needed by MAME. There's a copy of this file in the history folder.
  • mameinfo.dat: information text file of arcade games
  • messinfo.dat: information text file of non-arcade games; also lists changes in "whatsnew" and SVN
  • scores3.htm: top scores with recording files for playback

The folders folder has INI files. Each INI file appears in MAME (or frontends) as one or more folders with systems inside according to specific criteria. Its contents are:

  • arcade.ini: arcade games
  • arcade_BIOS.ini: arcade games that require a BIOS to run
  • arcade_NOBIOS.ini: arcade games that don't require a BIOS to run
  • bestgames.ini: the best games
  • category.ini: systems in about 235 categories
  • catlist.ini: systems in about 224 categories (with slightly different criteria)
  • genre.ini: systems in about 28 categories
  • languages.ini: systems in about 16 languages
  • mess.ini: non-arcade systems
  • monochrome.ini: games with two colors in three categories: "Black and White Games," "Monochromatic Games," and "Vectorial Black and White"
  • Multiplayer.ini: how many players can play a system, simultaneously or alternately
  • screenless.ini: systems without video output
  • series.ini: lists series of games
  • version.ini: lists of games that were added on every MAME version

MAMEUI (a MAME derivative) users: put the history.xml file in the dats folder.

The other archives are used by the MAME emulator or frontends:

  • artpreview: artwork preview screenshots
  • bosses: boss (final and hardest enemy of a level) screenshots
  • cabinets: cabinets screenshots
  • covers_SL: covers of the Software List
  • cpanel: images of control panels
  • devices: images of electronic gadgets that are attached to main systems
  • ends: screenshot of the end of each game (when the game is completed)
  • flyers: scanned paper advertisement intended for wide distribution to promote the systems
  • gameover: screenshot of the game over message of every game
  • howto: screenshot of the general instructions that the games display
  • icons: icons of arcade games and the other systems
  • logo: screenshot of the logo of the company that created every game
  • manuals: manuals in PDF (usage and operational)
  • manuals_SL: manuals in PDF (usage and operational) of Software List
  • marquees: photos of the brand of the cab that is on the top of the cabinet, usually back-lit neon sign
  • pcb: Printed Circuit Board snapshots; photos of the motherboards of the systems
  • scores: screenshot of the default high score of every game
  • select: screenshot of one selection menu of every game (character, country, level, gun, tool, language, etc)
  • snap: in-game screenshots
  • snap_SL: in-game Software List screenshots
  • titles: title screenshots, usually taken when the name of the game is shown during attract mode
  • titles_SL: title screenshots of Software List, usually taken when the name of the game is shown during attract mode
  • versus: screenshot of the presentation of the characters that will play against each other
  • warning: screenshots of warnings displayed by the games

Data Plugin

The data plugin loads information from various external support files so it can be displayed in MAME. If the plugin is enabled, info is show in the Infos tab of the right-hand pane on the system and software selection menus. The info viewer can be shown by clicking the toolbar button on the system and software selection menus, or by choosing External DAT View from the main menu during emulation (this menu item will not appear if the data plugin is not enabled, or if no information is available for the emulated system).

To set the folders where the data plugin looks for supported files, choose Configure Options on the system selection menu, then choose Configure Directories, and then choose DATs. You can also set the historypath option in your ui.ini file.

Loading large data files like history.xml can take quite a while, so please be patient the first time you start MAME after updating or adding new data files.

The following files are supported:

history.xmlFrom Gaming-History (formerly Arcade-History)
mameinfo.datFrom MASH’s MAMEINFO
messinfo.datFrom progetto-SNAPS MESSINFO.dat
gameinit.datFrom progetto-SNAPS GameInit.dat
command.datfrom progetto-SNAPS Command.dat
score3.htmTop Scores from the MAME Action Replay Page
Japanese mameinfo.dat and command.datFrom MAME E2J
sysinfo.datFrom the defunct Progetto EMMA site
story.datFrom the defunct MAMESCORE site

If you install hi2txt, the data plugin can also show high scores from non-volatile memory or saved by the hiscore support plugin for supported games.

Note that you can only use a single file of each type at a time. You cannot, for example, use the English and Japanese mameinfo.dat files simultaneously.

The data plugin creates a history.db file in the data folder in the plugin data folder (see the homepath option). This file stores the information from the support files in a format suitable for rapid loading. It uses the SQLite3 database format.

Hiscore Support Plugin

The hiscore support plugin saves and restores high scores for games that did not originally save high scores in non-volatile memory. Note that this plugin modifies the contents of memory directly with no coordination with the emulated software, and hence changes behaviour. This may have undesirable effects, including broken gameplay or causing the emulated software to crash.

The plugin includes a hiscore.dat file that contains the information on how to save and restore high scores for supported systems. This file must be kept up-to-date when system definitions change in MAME.

High scores can be saved automatically either on exit, or a few seconds after they’re updated in memory. To change the setting, activate the main menu (press Tab during emulation by default), select Plugin Options, and then select Hiscore Support. Change the Save scores option by highlighting it and using the UI Left/Right keys, or clicking the arrows.

High score data is saved in the hiscore folder in the plugin data folder (see the homepath option). A file with a name corresponding the system short name (or ROM set name) with the extension .hi. For example, high scores for the game Moon Cresta will be saved in the file mooncrst.hi in the hiscore folder in your plugin data folder. The settings for the hiscore support plugin are stored in the file plugin.cfg in the hiscore folder in the plugin data folder (this file is in JSON format).

MAMEUI Installation

I've attached a screenshot to clarify something using the ROMs directory as an example. I believe this is what you were discussing earlier. Mameui64 by default looks at the "roms" folder first as it does for every other folder within Mameui64. You can delete this directory or specify an entirely new path over top of this directory. However, I believe you can also add additional ROM directories and Mameui64 will look for the Rom files in every directory specified. (I'll get to why I'd want to do this or may need to do this later on.) Does that sound accurate?  

image.thumb.png.9f0db62aec093ec39bea1f90c88a3fdc.png

Ok, moving on...

Now, I should be able to set a directory for my ROMs, CHDs and Software List ROMs under Options > Directories > Roms.  

Sound about right?
image.png.991405bd260898c88f16b43720960017.png

The next step: I need to set paths to the contents of these folders:

-MAME 0.194 EXTRAs
-MAME 0.194 Multimedia

Here's a screenshot of everything inside these folders: 

-MAME 0.194 EXTRAs:
image.thumb.png.99947a3a887403cd5fe4c805d1239a7d.png
-MAME 0.194 Multimedia:
image.thumb.png.75c13e8865887660c372d5f74271a93f.png

When looking inside the "EXTRAs" folder, I already have these folders within Mameui64. 
-artwork
-ctrlr
-dats
-folders
-samples 

Now, there are differences between the contents of these folders--as expected--since I'm adding new files to Mameui64. BUT there are also certain similarities (overlap). See screen captures. 

Artwork comparison:
image.thumb.png.27c57774edfc83943da88c9a7f90eff5.png
Samples comparison:
image.thumb.png.4cde742fcccebb105852ff60f3e17bc6.png

So, for the sake of these specific comparisons, do I keep the default Artwork and Samples directories while adding the new artwork and samples directories? I assume if so I can do this for everything in MAME EXTRAs and MAME Multimedia.

Now, if I was setting paths in "original" Mame with the mame.ini and the ui.ini files, this is how it would all come together. 

mame.ini file example: 

image.thumb.png.0903322a1cb88cb4c4411a43d1af54fc.png

ui.ini file example: 

image.thumb.png.2764a8a0e02574d711a38432658354b5.png

Hopefully these two examples give you a better understanding of what it is that I'm trying to do.

I realize this is a crazy long post, but I'd greatly appreciate a response because I've spent A LOT of time working on the content of this post and trying to come up with the best possible way I could explain this situation lol. This is why I felt that direct voice communications was a better option than back-and-forth forum posts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment