Writing dir2dats
"dir2dat" refers to DATs that have been automatically created based on files in an input directory. DATs generated this way are not typically useful as-is, they usually require some hand editing after creation.
Igir can create these DATs with the igir dir2dat
command. Example:
dir2dat rules
Igir uses the following rules when creating dir2dat DAT files:
-
A DAT file will be created for every input path.
If multiple input paths overlap, such as:
then ROMs can appear in multiple resulting dir2dat files.
Note
You can use the
--dat-combine
option to create only one DAT even when multiple input paths are provided.
- Each input path's basename will be used for the DAT's name.
Here are some examples:
Input path DAT name --input "ROMs"
ROMs
--input "ROMs/NES"
NES
--input "ROMs/SNES/*"
SNES
--input "ROMs/SNES/**/*"
SNES
- Archive files will be treated as a single game, with every archive entry being a separate ROM.
This is consistent with how the
igir zip
command works, and with what MAME expects.
-
The input file's basename (without extension) will be used for the game name.
Warning
This will cause input files with the same basename to be grouped together!
Combining with other options
Once DATs have been generated from input files, they are processed the same as any other DAT file. That means:
- Parent/clone information may be inferred from game names.
If your input files are in some kind of standard naming convention (e.g. No-Intro, Redump, or TOSEC), then parent/clone information can be inferred for 1G1R preferences.
Parent/clone information also allows for merging & splitting of ROM sets.
-
ROM filter options can be applied.
If your input files are in some kind of standard naming convention (e.g. No-Intro, Redump, or TOSEC) that contains region, language, or other tags, then ROM filter options can be applied.
- Filename extensions can be corrected.
See ROM Output Options for more information.
Alternative tools
It is unlikely that any ROM tool, including Igir, will ever meet every person's exact DAT creation needs.
SabreTools is a great tool for DAT management that offers many complex options for DAT creation, filtering, merging, and splitting.