emulators.dolphin
Dolphin (GameCube/Wii) launcher: ROM resolution, hotkey save states, and boot-time resume.
Dolphin (GameCube/Wii) launcher: ROM resolution, hotkey save states, and boot-time resume.
Dolphin has no control socket, but it takes every setting it needs on the
command line: -C writes into the layered config, so nothing here has to
patch an INI, and -s loads a state file by path at boot, so a resume that
is already on disk never depends on a keystroke landing. What is left is the
mid-session save, which only the hotkey can reach; the broker runs as the
same user as the session, so xdotool talks to Xwayland directly.
Save states are not thumbnailed here. The frame comes off the streamed canvas in the browser, which is the only capture that cannot stall the emulator.
attributelog= logging.getLogger(__name__)attributeROM_ROOT= Path(os.environ.get('ROM_ROOT', '/romm'))Root of the RomM library mount (env ROM_ROOT, default /romm).
A resolved disc image must sit under it; candidates resolving outside are discarded.
attributeUSER_DIR= Path(os.environ.get('DOLPHIN_USER_DIR', '/config/.local/share/dolphin-emu'))Dolphin's user directory, passed with -u (env DOLPHIN_USER_DIR).
attributeSTATE_DIR= USER_DIR / 'StateSaves'Directory Dolphin writes its .sNN save states into.
attributeCONFIG_DIR= USER_DIR / 'Config'Directory holding Dolphin's INI files, where the pad bindings are seeded.
attributeDOLPHIN_LOG_PATH= Path(os.environ.get('DOLPHIN_LOG_PATH', '/config/dolphin.log'))Log file the broker tails for this emulator (env DOLPHIN_LOG_PATH, default /config/dolphin.log).
attributeSTATE_SLOT= int(os.environ.get('DOLPHIN_STATE_SLOT', '1'))The one slot the broker works in (env DOLPHIN_STATE_SLOT, default 1).
RomM holds the library of states, so a requested slot resolves to this one and the routes echo the effective slot.
attributeGC_SLOT_A_DEVICE= 8EXIDeviceType::MemoryCardFolder, the GC slot A device pinned at launch.
It keeps saves as loose .gci files under GC/<region>/Card A rather than
one .raw card image.
attributeSAVE_KEY= f'shift+F{STATE_SLOT}'xdotool key for saving the working slot; Dolphin's own default is Shift+F<n> for slot n.
attributeLOAD_KEY= f'F{STATE_SLOT}'xdotool key for loading the working slot; Dolphin's own default is F<n> for slot n.
attributeSTATE_WAIT= float(os.environ.get('DOLPHIN_STATE_WAIT', '20.0'))Seconds a save state has to land on disk after the save hotkey (env DOLPHIN_STATE_WAIT, default 20).
attributeRESUME_LOAD_WAIT= float(os.environ.get('DOLPHIN_RESUME_LOAD_WAIT', '90.0'))Seconds a deferred resume waits for a state file to arrive (env DOLPHIN_RESUME_LOAD_WAIT, default 90).
attributeRESUME_LOAD_SETTLE= float(os.environ.get('DOLPHIN_RESUME_LOAD_SETTLE', '5.0'))How long the window has to be up before a hotkey is worth sending (env DOLPHIN_RESUME_LOAD_SETTLE).
Dolphin maps its window before the core is running, and a load that early is dropped. Defaults to 5 seconds.
attributeVIDEO_BACKEND= os.environ.get('DOLPHIN_VIDEO_BACKEND', 'OGL')Video backend passed with -v (env DOLPHIN_VIDEO_BACKEND, default OGL).
OGL over Vulkan by default: RADV on the integrated AMD parts these containers run on has been the less reliable of the two.
attributeROM_EXTENSIONS= ('.rvz', '.wia', '.gcz', '.iso', '.gcm', '.ciso', '.wbfs', '.wad', '.dol', '.elf')Discs Dolphin boots, best first.
A folder holding several candidates picks the compressed image over the raw one beside it.