Use Retroarch as a faux-screensaver to show off your ROM collection.
This tool loads Retroarch via it's command line interface, specifying a libretro core and a random ROM file from a provided directory, runs for five minutes, then resets with another random ROM file. When controller input is detected, the reset time is moved to 10 minutes from last input to allow gameplay.
The tool requires three arguments:
- Retroarch Path: The location you installed Retroarch to
- Core Path: The path of the libretro core you want to use for the screensaver (at this time the screensaver only supports one system at a time)
- ROM Directory: The location of the ROM files you want the screensaver to cycle through
And takes one optional argument:
- Timeout: How long each game should run before loading the next
pygame 2.5.2 (SDL 2.28.3, Python 3.12.0)
Hello from the pygame community. https://www.pygame.org/contribute.html
usage: Retroarch-Screensaver.py [-h] [-t TIMEOUT] [--version] retroarch_bin rom_dir core_file
positional arguments:
retroarch_bin Retroarch binary
rom_dir ROM file directory
core_file Libretro core file
options:
-h, --help show this help message and exit
-t TIMEOUT, --timeout TIMEOUT
Time between game changes
--version show program's version number and exit
The only python library outside of the standard library used is pygame
version
2.5.2. This is required "pick up and play" functionality, and has been tested
with SDL 2.28.3.
This can be built for executable distribution using PyInstaller
, I use the
following command to build it in my environment:
python -m PyInstaller Retroarch-Screensaver.py