Cemu - Wii U emulator
Go to file
Cynthia 896c4ab7da allow coreinit.exit to actually "exit"
fixes #1960

this commit implements one particular approach for exiting emulation
when the RPX being emulated calls `coreinit.exit`. I don't believe
this might be the best way long term, but it seemed to be the best
way given the state (and my knowledge of the codebase). This threads
through 'End Emulation' (normally a debug only feature in the Cemu
menu) into one more spot in the codebase, when `coreinit.exit` is
called. Why did we go this way?

Stopping PPC Emulation _while_ the emulator is actively executing
an instruction (the call to `coreinit.exit`) seemed like a path of
el derado everytime i tried it. calling `Shutdown`, or `ShutdownTitle`
is not ideal because it doesn't do things like update status in
discord or any of the other window actions, and they lock up because
the emulator is already running the coreinit instructions (even if
you launch it in a delayed thread, the PPC emulator is still doing
stuff).

so the only way to get this to somewhat work is _to reach out to the
window system_. So I threaded through an `EndEmulation` request, which
started off just calling `EndEmulation` that already existed. There is
a note on that function about how it memory leaks if called repeatedly,
and it's "not finished". However, this seemed better than looping
forever, or just crashing with a debug assert. At least you still have
a semi-functional window (even if memory is leaking), and a log window
you can investigate?

However, just calling endemulation didn't exit when Cemu was launched
from the command line (my goal), it just returns to the main Cemu
window. To make Cemu usable as a command line app that you can fire
and forget, I threaded a new variable through, that when end emulation
is called and the title was launched with `-g`, or `-t`, it just closes
cemu altogether. this allows my CLI commands to "just work"
2026-06-23 11:17:45 -07:00
.github CI: Disable fail-fast for macOS builds (#1901) 2026-05-07 13:44:07 +02:00
bin Update translation files 2024-12-07 07:14:20 +00:00
cmake Linux: Allow connecting Wiimotes via L2CAP (#1353) 2024-12-07 12:02:40 +01:00
dependencies ih264d: Fix color inaccuracy on aarch64 (#1954) 2026-06-11 22:23:18 +02:00
dist Linux/CI: Add ARM AppImage (#1711) 2025-10-24 04:34:06 +02:00
src allow coreinit.exit to actually "exit" 2026-06-23 11:17:45 -07:00
.clang-format Enforce LF line endings 2026-03-24 04:15:04 +01:00
.gdbinit debugging: Add GDB pretty printers for common types (#1957) 2026-06-17 18:24:09 +02:00
.gitattributes Enforce LF line endings 2026-03-24 04:15:04 +01:00
.gitignore Implement proc_ui.rpl + stub SYSSwitchToEManual() to avoid softlocks 2024-04-30 23:29:15 +02:00
.gitmodules Add Metal backend (#1287) 2025-12-06 17:14:25 +01:00
boost.natvis PowerPC recompiler rework (#641) 2025-04-26 17:59:32 +02:00
BUILD.md build+input: Make SDL optional (#1895) 2026-05-09 15:27:26 +02:00
CMakeLists.txt build: Make CMake ask for fmt 12.1 instead of 9 (#1953) 2026-06-11 15:38:44 +02:00
CMakeSettings.json Code cleanup 2023-10-01 11:46:26 +02:00
CODING_STYLE.md UI: Replace to_wxString and wxHelper::FromUtf8 with wxString::FromUTF8 (#1752) 2025-12-23 15:37:01 +01:00
LICENSE.txt Expand readme with links and description 2022-08-23 02:37:05 +02:00
README.md README.md: Add LLM policy 2026-06-10 17:28:55 +02:00
vcpkg.json vcpkg: Update vcpkg + update to SDL 3.4.10 (#1943) 2026-06-03 20:14:36 +02:00

Cemu - Wii U emulator

Build Process Discord Matrix Server

This is the code repository of Cemu, a Wii U emulator that is able to run most Wii U games and homebrew in a playable state. It's written in C/C++ and is being actively developed with new features and fixes.

Cemu is currently only available for 64-bit Windows, Linux & macOS devices.

Other relevant repositories:

Download

You can download the latest Cemu releases for Windows, Linux and Mac from the GitHub Releases. For Linux you can also find Cemu on flathub.

On Windows, Cemu is available both as an installer and in a portable format, where no installation is required besides extracting it in a safe place.

The native macOS build is currently purely experimental and should not be considered stable or ready for issue-free gameplay. There are also known issues with degraded performance due to the use of MoltenVK and Rosetta for ARM Macs. We appreciate your patience while we improve Cemu for macOS.

Pre-2.0 releases can be found on Cemu's changelog page.

Build Instructions

To compile Cemu yourself on Windows, Linux or macOS, view BUILD.md.

Issues

Issues with the emulator should be filed using GitHub Issues.
The old bug tracker can be found at bugs.cemu.info and still contains relevant issues and feature suggestions.

Contributing

Pull requests are very welcome. For easier coordination you can visit the developer discussion channel on Discord or alternatively the Matrix Server. Before submitting a pull request, please read and follow our code style guidelines listed in CODING_STYLE.md.

If coding isn't your thing, testing games and making detailed bug reports or updating the (usually outdated) compatibility wiki is also appreciated!

Questions about Cemu's software architecture can also be answered on Discord (or through the Matrix bridge).

AI generated contributions:

We ask that all code submitted is written and understood by a human. You can use AI for planning, designing, reviewing and for asking questions about the codebase, but the code itself needs to be written by you. As a small exception you can use intellisense-style AI code autocompletion for pure boilerplate code as long as it's only a small part of your submission. To further clarify, when we ask for "human written" that excludes letting an AI write the code and then paraphrasing it. In other words, we are asking for human effort.

Why this policy exists:

We have relatively low reviewing capacity and requiring human-written code increases the quality and trustworthyness of submitted pull requests. There are also general concerns with AI usage in emulation:

  • LLMs tend to make up solutions that work on the surface but are generally not accurate in the emulation sense
  • There is evidence that LLMs have been trained on leaked proprietary SDKs and we cannot verify the origin of the knowledge. This is especially a problem for core emulation logic

Please keep these points in mind when contributing to Cemu. Contributions that do not follow this policy may be rejected.

License

Cemu is licensed under Mozilla Public License 2.0. Exempt from this are all files in the dependencies directory for which the licenses of the original code apply as well as some individual files in the src folder, as specified in those file headers respectively.