MKMAMEDB(1)

NAME
mkmamedb - create database for use by ckmame

SYNOPSIS
mkmamedb [-fhtuV] [-C types] [-F format] [-o dbfile] [-x pattern] [- -all-sets] [- -detector xml-file] [- -directory-cache] [- -exclude pattern] [- -format format] [- -hash-types types] [- -help] [- -list-available-dats] [- -list-dats] [- -list-sets] [- -mia-games] [- -no-directory-cache] [- -only-files pattern] [- -output dbfile] [- -prog-description description] [- -prog-name name] [- -prog-version version] [- -roms-unzipped] [- -set pattern] [- -skip-files pattern] [- -use-description-as-name] [- -use-temp-directory] [- -version] [[rominfo-file | directory | -] ...]

DESCRIPTION
mkmamedb converts ROM set descriptions from one format to another.

If no argument is given, mkmamedb reads the ckmamerc(5) config file and checks if it needs to update the default database.

When a rominfo-file is specified, it is used as input file; if the argument is -, mkmamedb expects the database on standard input (stdin).

When a directory is specified, the files in that directory are checksummed and written to the database.

The default output file is mame.db. You can override it with the -o option or the MAMEDB environment variable.

Supported input formats are:
•   CMPro dat file
•   MAME XML file
•   MESS Softlist XML file
•   Romcenter dat file
•   ckmame(1) database format
•   directory of zip archives
•   directory with subdirectories (with -u); each sub-directory is taken as a game
Supported output formats are:
•   ckmame(1) database format
•   CMPro dat file
•   Logiqx XML dat file
•   mtree(8) file

The CMPro file format is described at http://www.logiqx.com/FAQs/CMPro.shtml, the DTD for MAME xml can be found in PREFIX/share/doc/ckmame/.

  OPTIONS
mkmamedb supports the following options:

- -all-sets
    Do the action for all configured sets.

-C types, - -hash-types types
    A comma separated list of hash types to compute when creating a ROM set description from a directory of zip archives. Supported hash types are: crc, md5, sha1. Default are all.

- -detector xml-file
    Use CMPro XML header skip detector description from file. This overrides any detectors given in the file itself. mkmamedb looks for the detector in the input file (if it is a zip file) or the directory of the input file.

- -directory-cache
    When mkmamedb is used to create a database from an input directory, it will by default write a .ckmame.db database file to it, caching the directory contents' hashes in it so that consecutive re-runs are faster. When mkmamedb finds such a database, it only computes the hashes for the files that have changed since the last run.

-F format, - -format format
    Specify output format. Supported formats are cm (clrmamepro dat file), dat (XML datfile), db ((ckmame) 1 database), and mtree ((mtree) 8 file). The default is cm.

-f, - -force
    Create database even if it is not out-of-date.

-h, - -help
    Display a short help message.

- -no-directory-cache
    Turn off - -directory-cache.

-o dbfile, - -output dbfile
    Write to database dbfile instead of the default “mame.db”.

- -list-available-dats
    List the names of all dats found in the configured dat directories.

- -list-dats
    List dats configured for the selected set.

- -list-sets
    List all configured sets.

- -mia-games file
    Mark ROMs from games listed in file as mia, except if their name matches “delete-unknown-pattern”.

- -only-files pattern
    When reading files from the file system as input, only accept files matching the shell glob pattern.

- -prog-description description
    Set description for the program the ROM info is from.

- -prog-name name
    Set name of the program the ROM info is from.

- -prog-version version
    Set version of the program the ROM info is from.

- -set pattern
    Run mkmamedb for all sets matching pattern.

- -skip-files pattern
    When reading files from the file system as input, skip files matching the shell glob

-t, - -use-temp-directory
    Create the output in a temporary directory and move it to the real output when finished. This might speed up the creation e.g. of mame.db when your current working directory is on a slow file system.

-u, - -roms-unzipped
    ROMs are files on the disk. Each game is represented by a directory instead of a ZIP archive. Only relevant when creating a database based on file system contents.

- -use-description-as-name
    Use the value of the “description” field instead of the “name” field as game name.

-V, - -version
    Display program name and version number.

-x pat, - -exclude pat
    Exclude games with names matching pat from the created database.

ENVIRONMENT

MAMEDB
    Location for the database file. Can be overridden with the -o option. Defaults to “mame.db”.

FILES

.mkmamedb.db
    Directory cache file for - -directory-cache

EXAMPLES
Get an input file for mkmamedb(1) from MAME and convert it to the internal database format:

    # mame -listxml | mkmamedb -

SEE ALSO
ckmame(1), dumpgame(1), ckmamerc(5)

AUTHORS
-nosplit mkmamedb was written by Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>.