Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Best way to move specific Mame roms?  (Read 7132 times)

0 Members and 1 Guest are viewing this topic.

Meph

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
  • Last login:May 13, 2024, 08:04:40 pm
Best way to move specific Mame roms?
« on: June 26, 2013, 09:20:29 am »
I have played around with mame over the years but never got serious about a build until now.  I made a 2 player bartop for my 4&5 year old kids.  I want to run a limited rom list.  The PC I am using in it has a small hard drive (30GB).  I would like to have a nice mame list along with NES, SNES, Daphne, etc so I need to trim my rom directories.  I am using Mala as my front end and am learning to use that.  So are there any programs out there that will allow me to create a game list and then move those specific roms to a specified directory?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:June 13, 2024, 01:06:22 pm
  • ...
Re: Best way to move specific Mame roms?
« Reply #1 on: June 26, 2013, 10:10:09 am »
For MAME, Romlister can create a batch file that will move the roms.  http://www.waste.org/~winkles/ROMLister/

Keep in mind you might need some bios roms or sound board roms for the games to run.
Pacman will need the parent, puckman.

Not sure about the console roms, but those don't take up much space anyway.

Meph

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
  • Last login:May 13, 2024, 08:04:40 pm
Re: Best way to move specific Mame roms?
« Reply #2 on: June 26, 2013, 10:29:28 am »
Thank you very much.  I have been using Romlister all along to generate my lists but I always output to a mala file.  I never looked at outputting it to a batch file.  That is exactly what I was looking for.  Thanks.

edekoning

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 591
  • Last login:November 10, 2022, 02:21:38 pm
Re: Best way to move specific Mame roms?
« Reply #3 on: June 26, 2013, 10:38:03 am »
I have a bunch of python scripts that I used for managing/reducing mame/no-intro romsets. They roughly do the following:
-clean the mame.xml from roms you do not have
-convert the mame.xml/controls.ini/nplayers.ini/catver.ini to a csv file for easy filtering in a spreadsheet program of choice; I prefer this to using Romlister
-copy/move/delete roms and related files (artwork, chd, etc) based on a filtered csv file (takes parent roms into account) or Romlister output (save a rom names only list)
-clean no-intro romsets of crap (hacks, prototypes, old versions, etc) and keep one rom per game based on a region preference list (needs a no-intro dat file)

Note that these are all python scripts, so no gui! Anyway if you are interested I can clean them up this weekend and upload them.
« Last Edit: June 26, 2013, 10:43:03 am by edekoning »

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: Best way to move specific Mame roms?
« Reply #4 on: June 26, 2013, 10:58:24 am »
@edekoning, I'd be interested in taking a peek at your python scripts.  Have some myself that deal with visual pinball but not mame itself atm.

edekoning

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 591
  • Last login:November 10, 2022, 02:21:38 pm
Re: Best way to move specific Mame roms?
« Reply #5 on: June 27, 2013, 03:01:33 am »
Ok I'll upload them coming weekend.

05SRT4

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1092
  • Last login:June 14, 2024, 11:01:29 pm
  • Check out my Pow Pow
Re: Best way to move specific Mame roms?
« Reply #6 on: June 27, 2013, 03:28:52 am »
I to would like to check these scripts out, thank you.  :cheers:

Brian74

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1089
  • Last login:March 10, 2024, 01:55:58 pm
  • Yep... I built that!!
Re: Best way to move specific Mame roms?
« Reply #7 on: June 27, 2013, 01:03:35 pm »
Ditto!

Sent from my Nexus 7 using Tapatalk 2

         

edekoning

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 591
  • Last login:November 10, 2022, 02:21:38 pm
Re: Best way to move specific Mame roms?
« Reply #8 on: June 30, 2013, 03:48:15 pm »
Ok here they are, and I'll spare you the usual disclaimer ;) Anyway, these scripts require python 3.x and have only been tested by me on Windows. Don't hesitate with bugs / remarks / suggestions / help.



Let start with the most simple one; cleaning the mame.xml file of games for which you do not have a rom.

usage: mame_xmlcleaner.py [-h] [--debug] rompath input output

Makes a copy of mame.xml that is stripped of all information about non-
existing roms. The script makes a line-by-line copy, using regular expressions
to match the start and end of each game section. As a result, the input XML
needs to be properly formatted. Meaning each start and end XML element must be
placed on its own line. The only exception being XML elments without children.
This script will also output all roms that were not present in mame.xml

positional arguments:
  rompath     path to a folder containing roms
  input       input MAME XML file path
  output      cleaned MAME XML file path

optional arguments:
  -h, --help  show this help message and exit
  --debug     output debug information




Next up is converting the, possibly cleaned, mame.xml file into a CSV file. Note that the top of the scripts contains two containers that basically define what data is converted: xml_elements, xml_attributes. Feel free to comment out stuff that you are not interested in, or add stuff that is missing.

usage: mame_xml2csv.py [-h] input output

Outputs game information from the mame.xml file in csv format. Also uses
catver.ini, nplayers.ini, controls.ini if available. The main purpose of this
script is to allow for fast game searching and filtering using your
spreadsheet program of choice. The script is setup in such a way that it can
be easily changed to collect only that data that you are interested in.

positional arguments:
  input       input MAME XML file path
  output      output CSV file path

optional arguments:
  -h, --help  show this help message and exit




Using the csv file, you can use a spreadsheet program of choice to perform filtering. If you save the result you can then use this script to copy/delete/move the corresponding roms and related files. The script will also work with a 'rom names only' list as saved by Romlister. The only downside of this is that you will not be able to process parent roms, as that information is not present. Note that if you do not specify -d/-c/-m the script will just output all matching files and folders. Always do this 'dry-run' first to examine what files the script will process.

usage: mame_filemgr.py [-h] [-p] [-r] [-d | -c path | -m path] [--debug]
                       romlist source

Copy / move / delete roms and related files. Only those files that correspond
to roms listed in an input file are processed. This list can be a csv file as
generated by mame_xml2csv.py, or a 'rom names only' list as generated by
Romlister.

positional arguments:
  romlist               csv file containing rom names; requires a header with
                        column 'name' (configurable at the top of the script)
                        or assumes the first column contains rom names
  source                directory containing roms and related files (images,
                        videos)

optional arguments:
  -h, --help            show this help message and exit
  -p, --parents         include parent roms; requires 'romlist' to contain
                        columns with parent rom names (configurable at the top
                        of the script)
  -r, --recursive       recursively process sub-directories of 'source'
  -d, --delete          delete all matching files
  -c path, --copy path  copy all matching files to specified path
  -m path, --move path  move all matching files to specified path
  --debug               output debug information




And a script for reducing no-intro rom sets. This script will need a 'dat-o-matic parent/clone' text file that matches (as close as possible) your romset. You can download these from http://datomatic.no-intro.org/. Any roms that you have, but that are not listed in the 'parent/clone' file are output by this script. If this happens the romset and 'parent/clone' list are probably of different versions.

usage: romset_cleaner.py [-h] -r order [-i] -p path [-c path]
                         (--no-intro | --goodset) [--debug]
                         rompath

Reduce rom sets by keeping only a single rom per game title, based on a user
supplied region preference; Bios files are always kept, and all crap
(beta/hacks/prototypes/etc) is always discarded. Note that roms are never
actually removed, instead all roms that should be kept are either output or
copied to a separate folder.

positional arguments:
  rompath               folder containing roms

optional arguments:
  -h, --help            show this help message and exit
  -r order, --region order
                        region preference, where W=World, U=USA, E=Europe,
                        J=Japan, O=Other; used to pick a single region for
                        each rom, f.e. J,E would pick the Japan version over
                        the Europe version, all other (non-listed) regions are
                        discarded
  -i, --inverse         inverse the result; shows all non-matching roms
  -p path, --pc-list path
                        dat-o-matic parent/clone txt file
  -c path, --copy path  copy all matching roms to specified path
  --no-intro            use no-intro naming convention
  --goodset             use goodset naming convention (not yet implemented)
  --debug               output debug information

« Last Edit: June 30, 2013, 03:51:30 pm by edekoning »