Main > Software Forum
How to compile MAME with only specific roms?
Haze:
There really are no benefits to this.
Performance doesn't change
Loading times only change if you have a terrible Antivirus that attempts to analyze the whole executable
If you care about a minimal list, then your frontend should be doing that; even if you strip out the non-arcade stuff you're going to have some questionable sets otherwise - it's something more suited to external lists, which frontends can use.
Even if you have a complete ROMset and only care about part of it storage is laughably cheap, even for SSD these days and that's overkill. You can buy 18TB spinning drives without breaking the bank.
The only MAME version you should ever really need is the latest official one which will always do the best possible job of anything you ask it; everything else (filters etc.) should be external.
Even in terms of overall MAME performance, not much has changed in the last 10 years; a new version with support for more systems performs just as well as a 10 year old version with support for fewer. My own development PC is 10 years old, and only now am I considering upgrading it because we want to be able to push MAME to the next level.
If anything it's kinda sad that MAME got stuck in requiring PCs from about 10 years ago.
fleskebacon:
I'm aware of all this. But with Mame being kind of a research project itself, I really enjoy compiling my own executable, and experimenting some on my own. I added and removed some other small features as well, and as an amateur it is quite satisfying to look a bit into the inner working of things like this.
So I gained a lot of knowledge and insight. Other than this, I achieved very little. But for me, these are huge benefits.
(And an SSD isn't at all overkill if you want a completely silent setup.)
ozfalcon:
This topic is still of interest (2025).
I agree with the comments in this thread. There really are no benefits to this. And it is satisfying to custom build for your own needs.
This is a small Linux bash script to generate a custom.flt file to use with SUBTARGET
(Be sure to check plugins and other Mame functionality with your custom builds)
GenerateSUBTARGET_0255+.sh
--- Code: ---#!/bin/bash
#
# Works with Mame 0255+ (After removal of arcade target)
# Generate flt file with target mainline version of mame.
# Manually place in /src/mame/zsystem.flt
# Compile with SUBTARGET=zsystem
# Get rom names from file
inputfile="romlist_R001.txt"
outputfile=${inputfile/txt/flt}
# Replace commas or vertical/horizontal whitespace
romlist=$(cat ${inputfile} |tr "," " "|tr [:space:] " ")
# 1. List rom source files (mame)
# 2. Remove rom name (awk)
# 3. Remove all whitespace (tr)
# 4. Sort source list (sort)
# 5. Remove duplicates (uniq)
../bin.sdlmame/sdlmame64.V0255.Mainline -listsource ${romlist} |awk '{$1= ""; print $0}'|tr -d [:blank:]|sort|uniq >${outputfile}
# 1. List rom source files (mame)
# 2. Remove rom name (awk)
# 3. Remove preceeding whitespace (sed)
# 4. Sort source list (sort)
# 5. Remove duplicates (uniq)
#mame -listsource ${romlist} |awk '{$1= ""; print $0}'|sed 's/[^ ]* *//'|sort|uniq >${outputfile}
--- End code ---
I was only able to use Mame 0255 out of the box (No workarounds) to generate and build subtarget.
Included is my game list file of about 220 titles and the generated custom.flt source file as a working example.
Notes:
1. Build the full mainline version of Mame first. Use this with the bash script to generate your rom source.flt list.
2. Rename and copy your mybuild.flt file into the /srs/mame/ folder.
3. Compile Mame with the SUBTARGET=mybuild option.
Navigation
[0] Message Index
[*] Previous page
Go to full version