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, log_line_sep='=', log_line_length=100)[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.
log_line_length (int, optional) – Line length of log. Defaults to 100
- 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
- print_summary(rom_dict)[source]
Log out a nice summary of what ROM has been chosen here
- Parameters:
rom_dict (dict) – the ROM dictionary to summarize
- 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)