Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sorting and 1G1R

sort-roms moves games between the system directory, 1G1R and Trash, according to your settings.

  • Regions mode keeps every game from the REGIONS_ALL regions in the system directory.
  • 1G1R mode keeps one game per Parent-Clone group in 1G1R, elected by REGIONS_ONE order and the PREFER_* settings.
  • Hybrid mode does both: the 1G1R election, plus every remaining game from the REGIONS_ALL regions.

Discarded games always go to Trash. Regions use TOSEC’s two-letter codes, and ZZ, the unknown region, works as a catch-all in REGIONS_ALL.

The 1G1R election

By default, the election only considers games you own. REGIONS_ONE_STRICT makes it follow your preferences regardless, so a missing game shows as wanted instead of being replaced. 1G1R is useful even without a Parent-Clone DAT: it separates the games you play from, say, Japanese originals kept for translation patches.

Without Parent-Clone data

Without Parent-Clone data, as in Redump’s DATs, every game is a group of its own. INFER_CLONES groups such a system’s games by title instead, leaving out of a name its regions, languages, versions, release status, and the flags that only tell editions apart: budget lines and reissues, limited editions and bundles, serials, ring codes, and demos. A game’s disc number and any other flag stay, so Game (Europe) (Disc 2) is grouped with Game (USA) (Disc 2), and Game (USA) (Bonus Disc) has a group of its own. These groups have no parent, so PREFER_PARENTS doesn’t apply to them.

Clone lists

A clone list imported with import-clone-lists adds to these groups: the titles it names as one game share a group, whatever their names, a filter moving a region’s release to another, and within a region its priorities elect a release before the PREFER_* settings do, a lower number first. A title naming an edition, as Game (Premium Box), takes precedence over one naming the game for that edition’s releases.

Language first

LANGUAGE_FIRST lifts language above region in the election, on the order set by PREFERRED_LANGUAGES:

  • A release shipping a preferred language beats one in a higher-ranked region.
  • A release whose languages the DAT doesn’t tell stays below a preferred one, but above a release that ships only unwanted ones.
  • A release speaking no preferred language is kept rather than trimmed, so a game whose only release is a language you didn’t ask for still makes 1G1R.

The LANGUAGES filter takes no part in a language-first election; set the language order with PREFERRED_LANGUAGES, which ranks and nothing else. With LANGUAGE_FIRST off, or PREFERRED_LANGUAGES empty, the region order rules.

Arcade systems

Arcade systems sort by set type instead: see Arcade.

Settings

SettingDescriptionDefault
REGIONS_ALLRegions for which to keep every game, unordered (eg: US,EU,JP)
REGIONS_ONERegions for 1G1R, by order of preference (eg: US,EU)
REGIONS_ALL_SUBFOLDERSSubfolders for games: none or alphanone
REGIONS_ONE_SUBFOLDERSSubfolders for 1G1R games: none or alphanone
REGIONS_ONE_STRICTElect 1G1R games whether you own them or notfalse
REGIONS_ALL_ARCADEArcade set types for the main directory: bios, parent, clone
REGIONS_ONE_ARCADEArcade set types for the 1G1R directory: bios, parent, clone
INFER_CLONESGroup games by title for 1G1R when their DAT has no Parent-Clone datafalse
PREFER_PARENTSFavor parents in the 1G1R electiontrue
PREFER_REGIONSFavor games released in more (broad) or fewer (narrow) regions, or neither (none)none
PREFER_VERSIONSFavor new or old revisions, or neither (none)new
PREFER_FLAGSFlags to favor in the 1G1R election (eg: Rumble Version)
DISCARD_CATEGORIESDAT categories to discard (eg: Demos,Coverdiscs)
DISCARD_FLAGSFlags to discard (eg: Virtual Console)
DISCARD_RELEASESReleases to discard (eg: Beta,Proto)
LANGUAGESLanguages to keep, for games that list theirs (eg: En,Ja)
LANGUAGE_FIRSTRank the language a game ships above its region in the 1G1R election, instead of filtering by LANGUAGESfalse
PREFERRED_LANGUAGESThe language order for that election, most wanted first (eg: Fr,En)
GROUP_SUBSYSTEMSPut every variant of a system in the same directorytrue
GAME_SUBFOLDERSPut games in folders named after them: never, multiple (those stored as several files) or alwaysnever

sort-roms --regions and --1g1r override REGIONS_ALL and REGIONS_ONE for one run.