ROMChooser

ROMChooser uses a number of logic steps to decide a best ROM from the list. These are things like region, language, priority, and various ROM category flags. For more details on how we choose a “best” ROM, see 1G1R.

For more details on the ROMChooser arguments, see the config file documentation.

API

class romsearch.ROMChooser(platform, game, config_file=None, config=None, default_config=None, regex_config=None, logger=None)[source]

ROM choose tool

This works per-game, per-platform, so must be specified here

Parameters:
  • platform (str) – Platform name

  • game (str) – Game name

  • config_file (str, optional) – Path to config file. Defaults to None.

  • config (dict, optional) – Configuration dictionary. Defaults to None.

  • default_config (dict, optional) – Default configuration dictionary. Defaults to None.

  • regex_config (dict, optional) – Configuration dictionary. Defaults to None.

  • logger (logging.Logger, optional) – Logger instance. Defaults to None.

filter_by_list(rom_dict, key, key_prefs)[source]

Find file with highest value in given list. If there are multiple matches, find the most updated one

get_best_rom_per_region(rom_dict, region_preferences)[source]

For each individual region, get an overall best ROM

get_best_roms(files, rom_dict)[source]

Get the best ROM(s) from a list, using a scoring system

run(rom_dict)[source]

Run the ROM chooser

run_chooser(rom_dict)[source]

Make a ROM choice based on various factors

This chooser works in this order:

  • Removing any demo files

  • Removing any beta files

  • Removing anything where the language isn’t in the user preferences

    (for files with no language info, this will skipped)

  • Removing anything where the region isn’t in the user preferences

  • Get some “best version”, via:
    • Revision number

    • Version number

    • Some kind of special name to indicate an improved version

  • Finally, if we only allow one region, parse down to a single region (first in the list)