emulators.cemu
Cemu (Wii U) launcher: settings.xml patching, gamepad profile seeding, and SIGTERM shutdown.
Cemu (Wii U) launcher: settings.xml patching, gamepad profile seeding, and SIGTERM shutdown.
Cemu has no control API and no save states. Persistence is the game's own
save data, written to host files under the virtual MLC
(mlc01/usr/save/<titleHigh>/<titleLow>/user/<persistentId>). Cemu installs
no signal handler, so SIGTERM is a hard kill; saves are already on disk.
A first launch with no settings.xml opens a modal Getting Started dialog, so a minimal config is seeded before every launch. Cemu creates the default account (0x80000001) itself on first boot, so save paths line up across containers without the account store traveling.
Cemu applies its built-in controller mapping only through the GUI, so the broker seeds a Wii U GamePad profile for player 0 bound to the selkies virtual pad. Cemu addresses SDL controllers by joystick GUID, and SDL >= 2.24 folds a CRC16 of the device name into that GUID, so the profile carries one controller node per GUID variant; the one that matches binds.
attributelog= logging.getLogger(__name__)attributeROM_ROOT= Path(os.environ.get('ROM_ROOT', '/romm'))Library root a resolved ROM must live under (env ROM_ROOT, default /romm).
attributeCONFIG_DIR= Path(os.environ.get('CEMU_CONFIG_DIR', _xdg_dir('XDG_CONFIG_HOME', '.config')))Cemu's config directory (env CEMU_CONFIG_DIR, default $XDG_CONFIG_HOME/Cemu).
attributeDATA_DIR= Path(os.environ.get('CEMU_DATA_DIR', _xdg_dir('XDG_DATA_HOME', '.local/share')))Cemu's user data directory (env CEMU_DATA_DIR, default $XDG_DATA_HOME/Cemu).
attributeSETTINGS_PATH= CONFIG_DIR / 'settings.xml'The settings.xml patched before every launch.
attributePROFILE_PATH= CONFIG_DIR / 'controllerProfiles' / 'controller0.xml'The player-0 controller profile the broker seeds.
attributeMLC_DIR= Path(os.environ.get('CEMU_MLC_DIR', str(DATA_DIR / 'mlc01')))The virtual MLC holding save data (env CEMU_MLC_DIR, default DATA_DIR/mlc01).
attributeSAVE_DIR= MLC_DIR / 'usr' / 'save'Where title save directories live inside the MLC.
attributeCEMU_LOG_PATH= Path(os.environ.get('CEMU_LOG_PATH', '/config/cemu.log'))The emulator log file (env CEMU_LOG_PATH, default /config/cemu.log).
attributeROM_EXTENSIONS= ('.wua', '.wux', '.wud', '.wuhb', '.iso', '.rpx', '.elf')Formats Cemu boots directly, best first; a folder holding several candidates picks by this order.