webstation-broker
DeveloperPython referenceemulatorsemulators.cemu

emulators.cemu.Cemu

Wii U via Cemu, driven by command line flags and config file patching.

Wii U via Cemu, driven by command line flags and config file patching.

Cemu has no control API, so the broker pins settings.xml before every launch (no update check, no Discord presence, no boot sound, no menubar), seeds the player-0 GamePad profile once, and boots the game fullscreen with -f -g. Cemu installs no signal handler, so the stop is a hard SIGTERM kill; that is safe because the game's own save data is already on disk the moment the game writes it.

There are no save states: persistence is the title save tree under usr/save in the virtual MLC, which is what the archive carries. At exit every file in the title save dirs written during the session gets its mtime refreshed so the delta dump ships those saves whole while other titles' saves stay filtered out. A resume slot is logged and ignored.

Attributes

attributename
= 'cemu'

Provider key, cemu.

attributedisplay_name
= 'Cemu'

Human-readable name.

attributesave_root
= MLC_DIR

The MLC directory the save subtrees hang off.

attributesave_subtrees
= ('usr/save',)

usr/save, the title save tree.

attributerom_extensions
= ROM_EXTENSIONS

Bootable formats, best first.

attributelog_path
= CEMU_LOG_PATH

The emulator log file.

attributeterm_timeout
= float(os.environ.get('CEMU_STOP_WAIT', '5'))

SIGTERM grace before SIGKILL (env CEMU_STOP_WAIT, default 5).

attribute_session_start
= 0.0

Functions

func__init__(self) -> None

Initialise the process handle and a zero session baseline.

paramself

Returns

None
funcprepare_restore(self) -> None

Stop a running Cemu so the archive can be extracted under it.

paramself

Returns

None
funcresolve_rom_file(self, path) -> Optional[Path]

The file Cemu should boot for path.

paramself
parampathPath

A ROM file, or a folder searched up to three levels deep.

Returns

typing.Optional

The file itself, the best-ranked bootable file in the folder, or None.

funclaunch(self, rom_path, resume_slot) -> None

Patch settings, seed the pad profile and boot the game fullscreen.

paramself
paramrom_pathPath

The file to boot.

paramresume_slotOptional[int]

Ignored with a log line; Cemu has no save states.

Returns

None
func_modified_title_saves(self) -> list[Path]

Title save dirs holding a file written while the session ran.

paramself

Returns

list

The usr/save/<titleHigh>/<titleLow> directories touched since launch.

funcsave_and_exit(self, slot) -> dict[str, Any]

Stop Cemu and mark this session's title saves for the dump.

paramself
paramslotint

Ignored; there are no save states.

Returns

dict

state_saved, state_slot and state_file, all None.

On this page