How cemu-project/cemu works
Project type and purpose
• Cemu is a native desktop application (Wii U emulator) written in C/C++.
• It’s a monolithic emulator with multiple subsystems: CPU, GPU, OS service emulation, audio, input, filesystem, GUI, networking, etc.
• The README confirms: “Cemu is a Wii U emulator… runs games, homebrew… Windows, Linux, macOS.”
File structure
• Top-level:
• cmake/, CMakeLists.txt, vcpkg.json – build system & package management
• dependencies/ – third-party libraries (Discord RPC, h264, gamemode, etc.)
• src/ – all emulator code, broken into logical modules (Cafe, Cemu, Common, audio, config, gui, input, resource, tools, util, etc.)
• bin/, dist/ – runtime resources, profiles, translations, packaging scripts
• Notice clear layering under src/:
• “Cafe” – Wii U CPU (Espresso), GPU (Latte), filesystem, game patch and profile
• “IOSU” & “OS” – emulated OS services and libraries
• “audio” – host audio backends (Cubeb, XAudio2, DirectSound)
• “input” – host and emulated controller layers
• “gui” & “imgui” – UI implemented with wxWidgets and ImGui backends (OpenGL/Vulkan)
• “Cemu” – glue code: expression parser, file cache, Discord presence, napi, networking (nex)
• “util” & “Common” – platform abstraction, threading, memory mapping, crypto, XML, etc.
Architecture extraction from README
• Core emulator engine → runs CPU & GPU subsystems
• GUI front-end → user interacts via windows, dialogs, debug views
• External Services → graphics (OpenGL/Vulkan/DX), audio APIs, input APIs, networking (nex), filesystem
• Configuration & resource loader → parses XML, .ini, embedded resources
Detail
• Every major subsystem even if internal (e.g., FileCache, DownloadManager, ExpressionParser).
• Inter-module calls and shared utilities (e.g., ExceptionHandler, SysAllocator).
• Avoid over-simplification: Cemu is a complex layered emulator, so it pays off to show all layers.