ROM 1G1R Preferences
Igir offers many options for generating "one game, one ROM" (1G1R) sets.
What is 1G1R?
When you provide Igir with DATs that contain parent/clone relationship information (or when Igir can accurately infer parent/clone relationships), Igir can apply preferences such that you only end up with one preferred copy of a game.
Taking The Legend of Zelda: Ocarina of Time as an example, No-Intro has catalogued many versions:
Legend of Zelda, The - Ocarina of Time (USA)
Legend of Zelda, The - Ocarina of Time (USA) (Rev 1)
Legend of Zelda, The - Ocarina of Time (USA) (Rev 2)
Legend of Zelda, The - Ocarina of Time (USA) (GameCube)
Legend of Zelda, The - Ocarina of Time (USA) (Beta)
Legend of Zelda, The - Ocarina of Time (USA) (LodgeNet)
Legend of Zelda, The - Ocarina of Time (Europe) (En,Fr,De)
Legend of Zelda, The - Ocarina of Time (Europe) (En,Fr,De) (Rev 1)
Legend of Zelda, The - Ocarina of Time (Europe) (GameCube)
Legend of Zelda, The - Ocarina of Time (Europe) (Beta) (2003-02-13) (GameCube)
Legend of Zelda, The - Ocarina of Time (Europe) (Beta) (2003-02-21) (GameCube) (Debug)
Zelda no Densetsu - Toki no Ocarina (Japan)
Zelda no Densetsu - Toki no Ocarina (Japan) (Rev 1)
Zelda no Densetsu - Toki no Ocarina (Japan) (Rev 2)
Zelda no Densetsu - Toki no Ocarina (Japan) (GameCube, Zelda Collection)
Zelda no Densetsu - Toki no Ocarina GC (Japan) (GameCube)
If your goal is just to play the game, you really only need one copy of it. 1G1R rules help you define which copy suits your preferences best.
1G1R is particularly helpful when building a ROM collection for a device with limited storage space, or when paging through many ROMs is cumbersome (see the --dir-letter options for help with this).
Order of operations
1G1R rules are applied against DATs before any ROM matching happens. This has the effect that given the same DATs and same 1G1R rules, Igir will deterministically choose the same preferred version every time. Your input ROMs have no bearing on how 1G1R rules are applied.
Note
If no DATs are provided, Igir will infer DATs from the input files, and then infer parents among those games.
Tip
Filters and 1G1R preferences are applied before generating fixdats and dir2dats, allowing you to generate DATs for your exact needs!
Preference options
The --single option is required to use any of the --prefer-* options on this page.
Multiple --prefer-* options below can be specified at once (and you probably want to!), and they will be applied in the same order as the headings in this page (highest priority to lowest priority).
Prefer game names
Prefer games if their DAT name (or filename if not using DATs) matches a regular expression.
Regex flags can be optionally provided in the form /<pattern>/<flags>.
Example
Prefer Wii, Wii U, or Switch versions of a ROM:
Tip
Regex negative lookaheads can be used to define what game names you want to avoid. For example, you can prefer to not choose Nintendo virtual console copies with the option:
Prefer ROM filenames
Prefer games if any of their ROM filenames matches a regular expression.
Regex flags can be optionally provided in the form /<pattern>/<flags>.
Note
This option is for preferring ROM filenames as they appear within DATs. See --prefer-filename-regex <pattern|filename> for preferring input filenames.
Prefer verified
Prefer games that contain [!] in their name over those that don't.
See filtering unverified dumps for more information about "verified" and "unverified" ROM dumps.
Prefer good
Prefer games that don't contain [b] or [b#] in their name over those that do.
See filtering bad dumps for more information about "good" and "bad" ROM dumps.
Prefer language
Prefer games of certain languages over those in other languages. Multiple languages can be specified, in priority order, with commas between them. See the --help message for the full list of understood languages.
If a game doesn't have language information specified in its name, the region's primary language will be used.
Prefer region
Prefer games from certain regions over those from other regions. Multiple regions can be specified, in priority order, with commas between them. See the --help message for the full list of understood regions.
Example
Prefer games from the USA (highest priority), "world," and then Europe (lowest priority):
Example
Prefer games from Germany (highest priority), Europe, and then "world" (lowest priority):
Prefer revision
Prefer newer or older revisions, versions, or ring codes of a game.
Revisions can be numeric or alphabetical:
Frogger (Europe) (En,Fr,De,Es,It,Nl) (GB Compatible)
Frogger (USA) (Rev 1) (GB Compatible)
Frogger (USA) (Rev 2) (GB Compatible)
MSR - Metropolis Street Racer (Europe) (En,Fr,De,Es)
MSR - Metropolis Street Racer (Europe) (En,Fr,De,Es) (Rev A)
MSR - Metropolis Street Racer (Europe) (En,Fr,De,Es) (Rev B)
Versions can be semantic (v[major].[minor].[patch]):
F1 World Grand Prix for Dreamcast v1.011 (1999)(Video System)(JP)(en)[!]
F1 World Grand Prix for Dreamcast v1.000 (1999)(Video System)(PAL)(M4)[!]
F1 World Grand Prix v1.006 (2000)(Video System)(US)(M4)[!]
Ring codes can be numeric:
Prefer retail
Prefer games that are considered "retail" releases over those that aren't.
See filtering only retail for more information on what games are considered "retail."
Prefer parent
Prefer games that DATs consider the "parent" of other game clones, over the clones themselves.
Note
It is unlikely you will often use this option, it is more likely other preference options will accomplish what you want.