From 568872b3ffa33a71b8de9fcad76e9bd7c6d0972f Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sat, 4 Oct 2025 11:03:35 -0300 Subject: [PATCH 01/18] android: support extra cmake args via -PYUZU_ANDROID_ARGS * also move externalNativeBuild/cmake/argurments to main defaultConfig Signed-off-by: Caio Oliveira --- docs/build/Android.md | 1 + src/android/app/build.gradle.kts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/build/Android.md b/docs/build/Android.md index c8ff3a3b1e..f511f71370 100644 --- a/docs/build/Android.md +++ b/docs/build/Android.md @@ -33,6 +33,7 @@ Eden by default will be cloned into - 4. Navigate to `eden/src/android`. 5. Then Build with `./gradlew assembleRelWithDebInfo`. 6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`. +7. You can pass extra variables to cmake via `-PYUZU_ANDROID_ARGS="-D..."` ### Script A convenience script for building is provided in `.ci/android/build.sh`. The built APK can be put into an `artifacts` directory via `.ci/android/package.sh`. On Windows, these must be done in the Git Bash or MinGW terminal. diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index c85da039cb..31db36199a 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -75,6 +75,8 @@ android { externalNativeBuild { cmake { + val extraCMakeArgs = (project.findProperty("YUZU_ANDROID_ARGS") as String?)?.split("\\s+".toRegex()) ?: emptyList() + arguments.addAll(listOf( "-DENABLE_QT=0", // Don't use QT "-DENABLE_SDL2=0", // Don't use SDL @@ -87,7 +89,8 @@ android { "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", "-DBUILD_TESTING=OFF", "-DYUZU_TESTS=OFF", - "-DDYNARMIC_TESTS=OFF" + "-DDYNARMIC_TESTS=OFF", + *extraCMakeArgs.toTypedArray() )) abiFilters("arm64-v8a") From cb771edc87eb01590bed7485800c7b825138d1b6 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sat, 4 Oct 2025 12:19:16 -0300 Subject: [PATCH 02/18] dynarmic: no PRECOMPILED_HEADERS ftw Signed-off-by: Caio Oliveira --- src/dynarmic/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index 6b3308fb54..921839b7f1 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -25,11 +25,7 @@ option(DYNARMIC_IGNORE_ASSERTS "Ignore asserts" OFF) option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF) CMAKE_DEPENDENT_OPTION(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF "NOT YUZU_DISABLE_LLVM" OFF) -if (PLATFORM_OPENBSD) - option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF) -else() - option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) -endif() +option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF) option(DYNARMIC_INSTALL "Install dynarmic headers and CMake files" OFF) option(DYNARMIC_USE_BUNDLED_EXTERNALS "Use all bundled externals (useful when e.g. cross-compiling)" OFF) From 36e966629277074fd6f62751047d850db59f9e6b Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 11:22:38 -0300 Subject: [PATCH 03/18] dynarmic: include missing header Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/common/memory_pool.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dynarmic/src/dynarmic/common/memory_pool.h b/src/dynarmic/src/dynarmic/common/memory_pool.h index c99316e107..0f3971f674 100644 --- a/src/dynarmic/src/dynarmic/common/memory_pool.h +++ b/src/dynarmic/src/dynarmic/common/memory_pool.h @@ -6,6 +6,7 @@ #pragma once #include +#include #include namespace Dynarmic::Common { From 3ed52f2ae8747cc1f898349909a0e33092c0bdc7 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 11:43:59 -0300 Subject: [PATCH 04/18] dynarmic: Another "Temporary until MCL is fully removed" Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/common/assert.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dynarmic/src/dynarmic/common/assert.h b/src/dynarmic/src/dynarmic/common/assert.h index 9973b8948d..0a3cb5331d 100644 --- a/src/dynarmic/src/dynarmic/common/assert.h +++ b/src/dynarmic/src/dynarmic/common/assert.h @@ -23,6 +23,12 @@ template } \ }()) #endif +#ifndef ASSERT_FALSE +#define ASSERT_FALSE(...) \ + ([&]() { \ + assert_terminate("false", __VA_ARGS__); \ + }()) +#endif #ifndef ASSERT #define ASSERT(_a_) ASSERT_MSG(_a_, "") From a74beb00f5f2aab844354cfd15b96fb4e3518e9e Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 11:51:27 -0300 Subject: [PATCH 05/18] dynarmic: more missing headers Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/backend/arm64/abi.h | 1 + src/dynarmic/src/dynarmic/common/assert.h | 1 + src/dynarmic/src/dynarmic/ir/opt_passes.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/dynarmic/src/dynarmic/backend/arm64/abi.h b/src/dynarmic/src/dynarmic/backend/arm64/abi.h index ca7c9187db..635d64f062 100644 --- a/src/dynarmic/src/dynarmic/backend/arm64/abi.h +++ b/src/dynarmic/src/dynarmic/backend/arm64/abi.h @@ -14,6 +14,7 @@ #include #include "dynarmic/common/common_types.h" +#include "dynarmic/common/assert.h" #include #include "dynarmic/common/always_false.h" diff --git a/src/dynarmic/src/dynarmic/common/assert.h b/src/dynarmic/src/dynarmic/common/assert.h index 0a3cb5331d..a4d8874048 100644 --- a/src/dynarmic/src/dynarmic/common/assert.h +++ b/src/dynarmic/src/dynarmic/common/assert.h @@ -7,6 +7,7 @@ #pragma once #include +#include [[noreturn]] void assert_terminate_impl(const char* expr_str, fmt::string_view msg, fmt::format_args args); template diff --git a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp index e9175f0e6b..25afde9b5d 100644 --- a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp +++ b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp @@ -6,6 +6,7 @@ * SPDX-License-Identifier: 0BSD */ +#include #include #include From 61e2c360caac4e83aac44dcd027024afc5415457 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 25 Sep 2025 12:06:23 -0300 Subject: [PATCH 06/18] fix debug symbols building on window Signed-off-by: Caio Oliveira --- CMakeLists.txt | 7 +++++++ externals/CMakeLists.txt | 14 ++++++++------ src/CMakeLists.txt | 12 +++--------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f436c0a183..1b69782a23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,6 +287,13 @@ if (ANDROID) set(CMAKE_POLICY_VERSION_MINIMUM 3.5) # Workaround for Oboe endif() +# We need to downgrade debug info (/Zi -> /Z7) to use an older but more cacheable format +# See https://github.com/nanoant/CMakePCHCompiler/issues/21 +if(WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") +endif() + # Default to a Release build get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 434e6fb100..2da461fd5c 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -155,12 +155,14 @@ if (YUZU_USE_BUNDLED_SIRIT) AddJsonPackage(sirit-ci) else() AddJsonPackage(sirit) - if(MSVC AND USE_CCACHE AND sirit_ADDED) - get_target_property(_opts sirit COMPILE_OPTIONS) - list(FILTER _opts EXCLUDE REGEX "/Zi") - list(APPEND _opts "/Z7") - set_target_properties(siritobj PROPERTIES COMPILE_OPTIONS "${_opts}") - elseif(MSVC AND CXX_CLANG) + # Change to old-but-more-cacheable debug info on Windows + if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + get_target_property(sirit_opts sirit COMPILE_OPTIONS) + list(FILTER sirit_opts EXCLUDE REGEX "/Zi") + list(APPEND sirit_opts "/Z7") + set_target_properties(sirit PROPERTIES COMPILE_OPTIONS "${sirit_opts}") + endif() + if(MSVC AND CXX_CLANG) target_compile_options(siritobj PRIVATE -Wno-error=unused-command-line-argument) endif() endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 88470c4c42..0f3c5cfd4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,15 +101,9 @@ if (MSVC AND NOT CXX_CLANG) ) endif() - if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) - # when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format - # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21 - add_compile_options(/Z7) - # Avoid D9025 warning - string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - else() - add_compile_options(/Zi) + if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") endif() if (ARCHITECTURE_x86_64) From eed67ec3358584355bed9c2a6ba6ffe3861fb93b Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 12:20:32 -0300 Subject: [PATCH 07/18] fix missing copyright Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/common/memory_pool.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dynarmic/src/dynarmic/common/memory_pool.h b/src/dynarmic/src/dynarmic/common/memory_pool.h index 0f3971f674..d0a5223db3 100644 --- a/src/dynarmic/src/dynarmic/common/memory_pool.h +++ b/src/dynarmic/src/dynarmic/common/memory_pool.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + /* This file is part of the dynarmic project. * Copyright (c) 2016 MerryMage * SPDX-License-Identifier: 0BSD From f6d99e5032e8aeb55833c0b8edce01dc12297269 Mon Sep 17 00:00:00 2001 From: lizzie Date: Sun, 5 Oct 2025 20:44:48 +0200 Subject: [PATCH 08/18] [docs] initial user handbook draft (#2629) This is the initial draft of a "User Handbook", or FAQ. Currently contains useful info on the basics, graphics, and architecture/platform info. Archive.org OR archive.is should be used for linking external websites, especially since their content should not change. And most often than not, in a few years these could change. Signed-off-by: lizzie Co-authored-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2629 Reviewed-by: crueter Reviewed-by: CamilleLaVey Co-authored-by: lizzie Co-committed-by: lizzie --- docs/README.md | 2 +- docs/SIGNUP.md | 1 + docs/User.md | 15 ++--- docs/user/Architectures.md | 130 +++++++++++++++++++++++++++++++++++++ docs/user/Audio.md | 3 + docs/user/Basics.md | 57 ++++++++++++++++ docs/user/Graphics.md | 62 ++++++++++++++++++ 7 files changed, 261 insertions(+), 9 deletions(-) create mode 100644 docs/user/Architectures.md create mode 100644 docs/user/Audio.md create mode 100644 docs/user/Basics.md create mode 100644 docs/user/Graphics.md diff --git a/docs/README.md b/docs/README.md index 49617fa43a..686cfe8ea0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,4 +7,4 @@ This contains documentation created by developers. This contains build instructi - **[Dependencies](Deps.md)** - **[CPM - CMake Package Manager](CPMUtil.md)** - **[Platform-Specific Caveats](Caveats.md)** -- **[User Directory Handling](User.md)** \ No newline at end of file +- **[User Handbook](User.md)** \ No newline at end of file diff --git a/docs/SIGNUP.md b/docs/SIGNUP.md index f8cc315830..6995db6d9a 100644 --- a/docs/SIGNUP.md +++ b/docs/SIGNUP.md @@ -27,6 +27,7 @@ The following are not valid reasons to sign up: * To download and use Eden, see our [Releases page](https://github.com/eden-emulator/Releases/releases)! - I want to see the source code. * To see Eden's source code, go [here](https://git.eden-emu.dev/eden-emu/eden). + ## Other Information Requests that appear suspicious, automated, OR blank will generally be automatically filtered. In cases of suspicion, or any of the invalid reasons listed above, you may receive an email back asking for clarification. diff --git a/docs/User.md b/docs/User.md index cfc81063f8..ba5d1b3eb0 100644 --- a/docs/User.md +++ b/docs/User.md @@ -1,11 +1,10 @@ -# User configuration +# User Handbook -## Configuration directories +The "FAQ". -Eden will store configuration in the following directories: +This handbook is primarily aimed at the end-user - baking useful knowledge for enhancing their emulation experience. -- **Windows**: `%AppData%\Roaming`. -- **Android**: Data is stored internally. -- **Linux, macOS, FreeBSD, Solaris, OpenBSD**: `$XDG_DATA_HOME`, `$XDG_CACHE_HOME`, `$XDG_CONFIG_HOME`. - -If a `user` directory is present in the current working directory, that will override all global configuration directories and the emulator will use that instead. +- **[The Basics](user/Basics.md)** +- **[Audio](user/Audio.md)** +- **[Graphics](user/Graphics.md)** +- **[Platforms and Architectures](user/Architectures.md)** \ No newline at end of file diff --git a/docs/user/Architectures.md b/docs/user/Architectures.md new file mode 100644 index 0000000000..6d60716684 --- /dev/null +++ b/docs/user/Architectures.md @@ -0,0 +1,130 @@ +# User Handbook - Architectures and Platforms + +Notes and caveats for different architectures and platforms. + +# Architectures + +Eden is primarily designed to run on amd64 (x86_64--Intel/AMD 64-bit) and aarch64 (arm64--ARM 64-bit) CPUs. Each architecture tends to have their own quirks and fun stuff; this page serves as a reference for these quirks. + +## amd64 + +AMD64, aka x86_64, is the most tested and supported architecture for desktop targets. Android is entirely unsupported. + +### Caveats + +AMD64 systems are almost always limited by the CPU. For example, a Zen 5/RX 6600 system will often hit max CPU usage before the GPU ever reaches 70% usage, with minimal exceptions (that tend to pop up only at >200fps). JIT is slow! + +Computers on Linux will almost always run Eden strictly better than an equivalent machine on Windows. This is largely due to the way the Linux kernel handles memory management (and the lack of Microsoft spyware). + +Intel Macs are believed to be supported, but no CI is provided for them. Performance will likely be awful on all but the highest-end iMacs and Pro-level Macs, and the MoltenVK requirement generally means Vulkan compatibility will suffer. + +## aarch64 + +ARM64, aka aarch64, is the only supported architecture for Android, with limited experimental support available on Linux, Windows, and macOS. + +### Caveats + +NCE (Native Code Execution) is currently only available on Android and (experimentally) Linux. Support for macOS is in the works, but Windows is extremely unlikely to ever happen (if you want it--submit patches!). Generally, if NCE is available, you should pretty much always use it due to the massive performance hit JIT has. + +When NCE is enabled, do note that the GPU will almost always be the limiting factor. This is especially the case for Android, as well as desktops that lack dedicated GPUs; Adreno, Mali, PowerVR, etc. GPUs are generally significantly weaker relative to their respective CPUs. + +Windows/arm64 is *very* experimental and is unlikely to work at all. Support and testing is in the works. + +## riscv64 + +RISC-V, aka riscv64, is sparsely tested, but preliminary tests from developers have reported at least partial support on Milk-V's Fedora/riscv64 Linux distribution. Performance, Vulkan support, compatibility, and build system caveats are largely unknown for the time being. + +### Caveats + +Windows/riscv64 doesn't exist, and may never (until corporate greed no longer consumes Microsoft). + +Android/riscv64 is interesting. While support for it may be added if and when RISC-V phones/handhelds ever go mainstream, arm64 devices will always be preferred due to NCE. + +Only Fedora/riscv64 has been tested, but in theory, every riscv64 distribution that has *at least* the standard build tools, Qt, FFmpeg, and SDL2 should work. + +## Other + +Other architectures, such as SPARC, MIPS, PowerPC, Loong, and all 32-bit architectures are completely unsupported, as there is no JIT backend or emitter thereof. If you want support for it--submit patches! + +IA-64 (Itanium) support is completely unknown. Existing amd64 packages will not run on IA-64 (assuming you can even find a supported Windows/Linux distribution) + +# Platforms + +The vast majority of Eden's testing is done on Windows, Linux, and Android. However, first-class support is also provided for: + +- FreeBSD +- OpenBSD +- OpenIndiana (Solaris) +- macOS + +## Linux + +While all modern Linux distributions are supported (Fedora >40, Ubuntu >24.04, Debian >12, Arch, Gentoo, etc.), the vast majority of testing and development for Linux is on Arch and Gentoo. Most major build system changes are tested on Gentoo first and foremost, so if builds fail on any modern distribution no matter what you do, it's likely a bug and should be reported. + +Intel and Nvidia GPU support is limited. AMD (RADV) drivers receive first-class testing and are known to provide the most stable Eden experience possible. + +## Windows + +Windows 10 and 11 are supported. Support for Windows 8.x is unknown, and Windows 7 support is unlikely to ever be added. + +In order to run Eden, you will probably need to install the [Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170). + +Neither AMD nor Nvidia drivers work nearly as well as Linux's RADV drivers. Compatibility is still largely the same, but performance and some hard-to-run games may suffer compared to Linux. + +## Android + +A cooler is always recommended. Phone SoCs tend to get very hot, especially those manufactured with the Samsung process or those lacking in power. + +Adreno 6xx and 7xx GPUs with Turnip drivers will always have the best compatibility. "Stock" (system) drivers will have better performance on Adreno, but compatibility will suffer. Better support for stock drivers (including Adreno 8xx) is in the works. + +Android 16 is always recommended, as it brought major improvements to Vulkan requirements and compatibility, *plus* significant performance gains. Some users reported an over 50% performance gain on some Pixel phones after updating. + +Mali, PowerVR, Xclipse, and other GPU vendors generally lack in performance and compatibility. Notably: +- No PowerVR GPUs *except* the DXT-48-1536 are known to work with Eden at all. +- No Xclipse GPUs *except* the very latest (e.g. Xclipse 950) are known to work with Eden at all. +- Mali has especially bad performance, though the Mali-G715 (Tensor G4) and Immortalis-G925 are known to generally run surprisingly well, especially on Android 16. +- The status of all other GPU vendors is unknown. As long as they support Vulkan, they theoretically can run Eden. +- Note that these GPUs generally don't play well with driver injection. If you choose to inject custom drivers via a rooted system (Panfrost, RADV, etc), you may see good results. + +Qualcomm Snapdragon SoCs are generally the most well supported. +- Google Tensor chips have pretty terrible performance, but even the G1 has been proven to be able to run some games well on the Pixel 6 Pro. + * The Tensor G4 is the best-supported at the time. How the G5 currently fares is unknown, but on paper, it should do about as well as a Snapdragon 8 Gen 2 with stock drivers. +- Samsung Exynos chips made before 2022 are not supported. +- MediaTek Dimensity chips are extremely weak and most before mid-2023 don't work at all. + * This means that most budget phones won't work, as they tend to use old MediaTek SoCs. + * Generally, if your phone doesn't cost *at least* as much as a Switch itself, it will not *emulate* the Switch very well. +- Snapdragon 865 and other old-ish SoCs may benefit from the Legacy build. These will reduce performance but *should* drastically improve compatibility. +- If you're not sure how powerful your SoC is, check [NanoReview](https://nanoreview.net/en/soc-compare) - e.g. [Tensor G5](https://archive.is/ylC4Z). + * A good base to compare to is the Snapdragon 865--e.g. [Tensor vs SD865](https://archive.is/M1P58) + * Some benchmarks may be misleading due to thermal throttling OR RAM requirements. + - For example, a Pixel 6a (Tensor G1) performs about 1/3 as well as an 865 due to its lack of RAM and poor thermals. + * Remember--always use a cooler if you can, and you MUST have *at least* 8GB of RAM! +- If you're not sure what SoC you have, check [GSMArena](https://www.gsmarena.com) - e.g. [Pixel 9 Pro](https://archive.ph/91VhA) + +Custom ROMs are recommended, *as long as* you know what you're doing. +- For most devices, [LineageOS](https://lineageos.org/) is preferred. +- [CalyxOS](https://calyxos.org/) is available as well. +- For Google Pixel devices ONLY... and [soon another OEM](https://archive.ph/cPpMd)... [GrapheneOS](https://grapheneos.org/) is highly recommended. + * As of October 5, 2025, the Pixel 10 line is unsupported, however, [it will be](https://archive.is/viAUl) in the very near future! + * Keep checking the [FAQ page](https://grapheneos.org/faq#supported-devices) for news. +- Custom ROMs will likely be exclusively recommended in the future due to Google's upcoming [draconian](https://archive.is/hGIjZ), [anti-privacy, anti-user](https://archive.is/mc1CJ) verification requirements. + +Eden is currently unavailable on F-Droid or the Play Store. Check back occasionally. + +## macOS + +macOS is relatively stable, with only the occasional crash and bug. Compatibility may suffer due to the MoltenVK layer, however. + +Do note that building the GUI version with Qt versions higher than 6.7.3 will cause mysterious bugs, Vulkan errors, and crashes, alongside the cool feature of freezing the entire system UI randomly; we recommend you build with 6.7.3 (via aqtinstall) or earlier as the CI does. + +## *BSD, Solaris + +BSD and Solaris distributions tend to lag behind Linux in terms of Vulkan and other library compatibility. For example, OpenIndiana (Solaris) does not properly package Qt, meaning the recommended method of usage is to use `eden-cli` only for now. Solaris also generally works better with OpenGL. + +AMD GPU support on these platforms is limited or nonexistent. + +## VMs + +Eden "can" run in a VM, but only with the software renderer, *unless* you create a hardware-accelerated KVM with GPU passthrough. If you *really* want to do this and don't have a spare GPU lying around, RX 570 and 580 GPUs are extremely cheap on the black market and are powerful enough to run most commercial games at 60fps. + +Some users and developers have had success using a pure OpenGL-accelerated KVM on Linux with a Windows VM, but this is ridiculously tedious to set up. You're probably better off dual-booting. \ No newline at end of file diff --git a/docs/user/Audio.md b/docs/user/Audio.md new file mode 100644 index 0000000000..38a4ead433 --- /dev/null +++ b/docs/user/Audio.md @@ -0,0 +1,3 @@ +# User Handbook - Audio + +`PULSE_SERVER=none` forces cubeb to use ALSA. diff --git a/docs/user/Basics.md b/docs/user/Basics.md new file mode 100644 index 0000000000..5751c6a6a3 --- /dev/null +++ b/docs/user/Basics.md @@ -0,0 +1,57 @@ +# User Handbook - The Basics + +## Introduction + +Eden is a very complicated piece of software, and as such there are many knobs and toggles that can be configured. Most of these are invisible to normal users, however power users may be able to leverage them to their advantage. + +This handbook primarily describes such knobs and toggles. Normal configuration options are described within the emulator itself and will not be covered in detail. + +## Requirements + +The emulator is very demanding on hardware, and as such requires a decent mid-range computer/cellphone. + +See [the requirements page](https://archive.is/sv83h) for recommended and minimum specs. + +The CPU must support FMA for an optimal gameplay experience. The GPU needs to support OpenGL 4.6 ([compatibility list](https://opengl.gpuinfo.org/)), or Vulkan 1.1 ([compatibility list](https://vulkan.gpuinfo.org/)). + +If your GPU doesn't support or is just behind by a minor version, see Mesa environment variables below (*nix only). + +## User configuration + +### Configuration directories + +Eden will store configuration files in the following directories: + +- **Windows**: `%AppData%\Roaming`. +- **Android**: Data is stored internally. +- **Linux, macOS, FreeBSD, Solaris, OpenBSD**: `$XDG_DATA_HOME`, `$XDG_CACHE_HOME`, `$XDG_CONFIG_HOME`. + +If a `user` directory is present in the current working directory, that will override all global configuration directories and the emulator will use that instead. + +### Environment variables + +Throughout the handbook, environment variables are mentioned. These are often either global (system wide) or local (set in a script, bound only to the current session). It's heavily recommended to use them in a local context only, as this allows you to rollback changes easily (if for example, there are regressions setting them). + +The recommended way is to create a `.bat` file alongside the emulator `.exe`; contents of which could resemble something like: + +```bat +set "__GL_THREADED_OPTIMIZATIONS=1" +set "SOME_OTHER_VAR=1" +eden.exe +``` + +Android doesn't have a convenient way to set environment variables. + +For other platforms, the recommended method is using a shell script: + +```sh +export __GL_THREADED_OPTIMIZATIONS=1 +export SOME_OTHER_VAR=1 +./eden +``` + +Then just running `chmod +x script.sh && source script.sh`. + +## Compatibility list + +Eden doesn't mantain a compatibility list. However, [EmuReady](https://www.emuready.com/) has a more fine-grained compatibility information for multiple emulators/forks as well. diff --git a/docs/user/Graphics.md b/docs/user/Graphics.md new file mode 100644 index 0000000000..1b4c0dc4c3 --- /dev/null +++ b/docs/user/Graphics.md @@ -0,0 +1,62 @@ +# User Handbook - Graphics + +## Visual Enhancements + +### Anti-aliasing + +Enhancements aimed at removing jagged lines/sharp edges and/or masking artifacts. + +- **No AA**: Default, provides no anti-aliasing. +- **FXAA**: Fast Anti-Aliasing, an implementation as described on [this blog post](https://web.archive.org/web/20110831051323/http://timothylottes.blogspot.com/2011/03/nvidia-fxaa.html). Generally fast but with some innocuos artifacts. +- **SMAA**: Subpixel Morphological Anti-Aliasing, an implementation as described on [this article](https://web.archive.org/web/20250000000000*/https://www.iryoku.com/smaa/). + +### Filters + +Various graphical filters exist - each of them aimed at a specific target/image quality preset. + +- **Nearest**: Provides no filtering - useful for debugging. + - **Pros**: Fast, works in any hardware. + - **Cons**: Less image quality. +- **Bilinear**: Provides the hardware default filtering of the Tegra X1. + - **Pros**: Fast with acceptable image quality. +- **Bicubic**: Provides a bicubic interpolation using a Catmull-Rom (or hardware-accelerated) implementation. + - **Pros**: Better image quality with more rounded edges. +- **Zero-Tangent, B-Spline, Mitchell**: Provides bicubic interpolation using the respective matrix weights. They're normally not hardware accelerated unless the device supports the `VK_QCOM_filter_cubic_weights` extension. The matrix weights are those matching [the specification itself](https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VkSamplerCubicWeightsCreateInfoQCOM). + - **Pros/Cons**: Each of them is a variation of the Bicubic interpolation model with different weights, they offer different methods to fix some artifacts present in Catmull-Rom. +- **Spline-1**: Bicubic interpolation (similar to Mitchell) but with a faster texel fetch method. Generally less blurry than bicubic. + - **Pros**: Faster than bicubic even without hardware accelerated bicubic. +- **Gaussian**: Whole-area blur, an applied gaussian blur is done to the entire frame. + - **Pros**: Less edge artifacts. + - **Cons**: Slow and sometimes blurry. +- **Lanczos**: An implementation using `a = 3` (49 texel fetches). Provides sharper edges but blurrier artifacts. + - **Pros**: Less edge artifacts and less blurry than gaussian. + - **Cons**: Slow. +- **ScaleForce**: Experimental texture upscale method, see [ScaleFish](https://github.com/BreadFish64/ScaleFish). + - **Pros**: Relatively fast. +- **FSR**: Uses AMD FidelityFX Super Resolution to enhance image quality. + - **Pros**: Great for upscaling, and offers sharper visual quality. + - **Cons**: Somewhat slow, and may be offputtingly sharp. +- **Area**: Area interpolation (high kernel count). + - **Pros**: Best for downscaling (internal resolution > display resolution). + - **Cons**: Costly and slow. +- **MMPX**: Nearest-neighbour filter aimed at providing higher pixel-art quality. + - **Pros**: Offers decent pixel-art upscaling. + - **Cons**: Only works for pixel-art. + +### External + +While stock shaders offer a basic subset of options for most users, programs such as [ReShade](https://github.com/crosire/reshade) offer a more flexible experience. In addition to that users can also seek out modifications (mods) for enhancing visual experience (60 FPS mods, HDR, etc). + +## Driver specifics + +### Mesa environment variable hacks + +The software requires a certain version of Vulkan and a certain version of OpenGL to work - otherwise it will refuse to load, this can be easily bypassed by setting an environment variable: `MESA_GL_VERSION_OVERRIDE=4.6 MESA_GLSL_VERSION_OVERRIDE=460` (OpenGL) and `MESA_VK_VERSION_OVERRIDE=1.3` (Vulkan), for more information see [Environment variables for Mesa](https://web.archive.org/web/20250000000000*/https://docs.mesa3d.org/envvars.html). + +### NVIDIA OpenGL environment variables + +Unstable multithreaded optimisations are offered by the stock proprietary NVIDIA driver on X11 platforms. Setting `__GL_THREADED_OPTIMIZATIONS` to `1` would enable such optimisations. This mainly benefits the OpenGL backend. For more information see [Environment Variables for X11 NVIDIA](https://web.archive.org/web/20250115162518/https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/openglenvvariables.html). + +### swrast/LLVMpipe crashes under high load + +The OpenGL backend would invoke behaviour that would result in swarst/LLVMpipe writing an invalid SSA IR (on old versions of Mesa), and then proceeding to crash. The solution is using a script found in [tools/llvmpipe-run.sh](../../tools/llvmpipe-run.sh). From dd9b2c471356b50184ded2a7abd9294df1924fd9 Mon Sep 17 00:00:00 2001 From: DraVee Date: Sun, 5 Oct 2025 23:24:10 +0200 Subject: [PATCH 09/18] dynarmic: more fix only include symbols on Debug --- src/dynarmic/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index 921839b7f1..e5345ef458 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -77,7 +77,6 @@ if (MSVC) /wd4592 # Symbol will be dynamically initialized (implementation limitation) /permissive- # Stricter C++ standards conformance /MP - /Zi /Zo /EHsc /Zc:externConstexpr # Allows external linkage for variables declared "extern constexpr", as the standard permits. @@ -87,6 +86,11 @@ if (MSVC) /bigobj # Increase number of sections in .obj files /DNOMINMAX) + if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + endif() + if (DYNARMIC_WARNINGS_AS_ERRORS) list(APPEND DYNARMIC_CXX_FLAGS /WX) From bc1d093fe9e5ee4ddee02e3beb43480f5ee2ead9 Mon Sep 17 00:00:00 2001 From: Aleksandr Popovich Date: Mon, 6 Oct 2025 03:08:00 +0200 Subject: [PATCH 10/18] [frontend] add 1.25x resolution option (#2566) It sits at 900p or 1350p. Signed-off-by: Aleksandr Popovich Co-authored-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2566 Reviewed-by: MaranBr Reviewed-by: crueter Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- src/android/app/src/main/res/values/arrays.xml | 2 ++ src/android/app/src/main/res/values/strings.xml | 1 + src/common/settings.cpp | 4 ++++ src/common/settings_enums.h | 2 +- src/qt_common/shared_translation.cpp | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index 1b66c191d3..ec94730348 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -180,6 +180,7 @@ @string/resolution_half @string/resolution_three_quarter @string/resolution_one + @string/resolution_five_quarter @string/resolution_three_half @string/resolution_two @string/resolution_three @@ -202,6 +203,7 @@ 5 6 7 + 8 diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 2a5cc48bb1..2f6587d136 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -996,6 +996,7 @@ 0.5X (360p/540p) 0.75X (540p/810p) 1X (720p/1080p) + 1.25X (900p/1350p) 1.5X (1080p/1620p) 2X (1440p/2160p) (Slow) 3X (2160p/3240p) (Slow) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index b41f4c75f5..b849d7cb6a 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -301,6 +301,10 @@ void TranslateResolutionInfo(ResolutionSetup setup, ResolutionScalingInfo& info) info.up_scale = 3; info.down_shift = 1; break; + case ResolutionSetup::Res5_4X: + info.up_scale = 5; + info.down_shift = 2; + break; case ResolutionSetup::Res2X: info.up_scale = 2; info.down_shift = 0; diff --git a/src/common/settings_enums.h b/src/common/settings_enums.h index 0e5a08d845..6644bc01cc 100644 --- a/src/common/settings_enums.h +++ b/src/common/settings_enums.h @@ -142,7 +142,7 @@ ENUM(MemoryLayout, Memory_4Gb, Memory_6Gb, Memory_8Gb, Memory_10Gb, Memory_12Gb) ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never); ENUM(FullscreenMode, Borderless, Exclusive); ENUM(NvdecEmulation, Off, Cpu, Gpu); -ENUM(ResolutionSetup, Res1_4X, Res1_2X, Res3_4X, Res1X, Res3_2X, Res2X, Res3X, Res4X, Res5X, Res6X, Res7X, Res8X); +ENUM(ResolutionSetup, Res1_4X, Res1_2X, Res3_4X, Res1X, Res5_4X, Res3_2X, Res2X, Res3X, Res4X, Res5X, Res6X, Res7X, Res8X); ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Spline1, Gaussian, Lanczos, ScaleForce, Fsr, Area, MaxEnum); ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum); ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch); diff --git a/src/qt_common/shared_translation.cpp b/src/qt_common/shared_translation.cpp index 8f5d929b74..5b8622e00a 100644 --- a/src/qt_common/shared_translation.cpp +++ b/src/qt_common/shared_translation.cpp @@ -540,6 +540,7 @@ std::unique_ptr ComboboxEnumeration(QObject* parent) PAIR(ResolutionSetup, Res1_2X, tr("0.5X (360p/540p) [EXPERIMENTAL]")), PAIR(ResolutionSetup, Res3_4X, tr("0.75X (540p/810p) [EXPERIMENTAL]")), PAIR(ResolutionSetup, Res1X, tr("1X (720p/1080p)")), + PAIR(ResolutionSetup, Res5_4X, tr("1.25X (900p/1350p) [EXPERIMENTAL]")), PAIR(ResolutionSetup, Res3_2X, tr("1.5X (1080p/1620p) [EXPERIMENTAL]")), PAIR(ResolutionSetup, Res2X, tr("2X (1440p/2160p)")), PAIR(ResolutionSetup, Res3X, tr("3X (2160p/3240p)")), From 8bd1d9263eb330c7b37676e72232863f5a8c443f Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sat, 4 Oct 2025 11:03:35 -0300 Subject: [PATCH 11/18] android: support extra cmake args via -PYUZU_ANDROID_ARGS * also move externalNativeBuild/cmake/argurments to main defaultConfig Signed-off-by: Caio Oliveira --- docs/build/Android.md | 1 + src/android/app/build.gradle.kts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/build/Android.md b/docs/build/Android.md index c8ff3a3b1e..f511f71370 100644 --- a/docs/build/Android.md +++ b/docs/build/Android.md @@ -33,6 +33,7 @@ Eden by default will be cloned into - 4. Navigate to `eden/src/android`. 5. Then Build with `./gradlew assembleRelWithDebInfo`. 6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`. +7. You can pass extra variables to cmake via `-PYUZU_ANDROID_ARGS="-D..."` ### Script A convenience script for building is provided in `.ci/android/build.sh`. The built APK can be put into an `artifacts` directory via `.ci/android/package.sh`. On Windows, these must be done in the Git Bash or MinGW terminal. diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index c85da039cb..31db36199a 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -75,6 +75,8 @@ android { externalNativeBuild { cmake { + val extraCMakeArgs = (project.findProperty("YUZU_ANDROID_ARGS") as String?)?.split("\\s+".toRegex()) ?: emptyList() + arguments.addAll(listOf( "-DENABLE_QT=0", // Don't use QT "-DENABLE_SDL2=0", // Don't use SDL @@ -87,7 +89,8 @@ android { "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", "-DBUILD_TESTING=OFF", "-DYUZU_TESTS=OFF", - "-DDYNARMIC_TESTS=OFF" + "-DDYNARMIC_TESTS=OFF", + *extraCMakeArgs.toTypedArray() )) abiFilters("arm64-v8a") From c269e59715621654df38ecab043971385becfb5d Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sat, 4 Oct 2025 12:19:16 -0300 Subject: [PATCH 12/18] dynarmic: no PRECOMPILED_HEADERS ftw Signed-off-by: Caio Oliveira --- src/dynarmic/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index 6b3308fb54..921839b7f1 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -25,11 +25,7 @@ option(DYNARMIC_IGNORE_ASSERTS "Ignore asserts" OFF) option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF) CMAKE_DEPENDENT_OPTION(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF "NOT YUZU_DISABLE_LLVM" OFF) -if (PLATFORM_OPENBSD) - option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF) -else() - option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) -endif() +option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF) option(DYNARMIC_INSTALL "Install dynarmic headers and CMake files" OFF) option(DYNARMIC_USE_BUNDLED_EXTERNALS "Use all bundled externals (useful when e.g. cross-compiling)" OFF) From 661a9bbea614f044a470c72b0c75940031274190 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 11:22:38 -0300 Subject: [PATCH 13/18] dynarmic: include missing header Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/common/memory_pool.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dynarmic/src/dynarmic/common/memory_pool.h b/src/dynarmic/src/dynarmic/common/memory_pool.h index c99316e107..0f3971f674 100644 --- a/src/dynarmic/src/dynarmic/common/memory_pool.h +++ b/src/dynarmic/src/dynarmic/common/memory_pool.h @@ -6,6 +6,7 @@ #pragma once #include +#include #include namespace Dynarmic::Common { From 02e18f8f1bf06b08ec6cdb6bb509de7777e6f145 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 11:43:59 -0300 Subject: [PATCH 14/18] dynarmic: Another "Temporary until MCL is fully removed" Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/common/assert.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dynarmic/src/dynarmic/common/assert.h b/src/dynarmic/src/dynarmic/common/assert.h index 9973b8948d..0a3cb5331d 100644 --- a/src/dynarmic/src/dynarmic/common/assert.h +++ b/src/dynarmic/src/dynarmic/common/assert.h @@ -23,6 +23,12 @@ template } \ }()) #endif +#ifndef ASSERT_FALSE +#define ASSERT_FALSE(...) \ + ([&]() { \ + assert_terminate("false", __VA_ARGS__); \ + }()) +#endif #ifndef ASSERT #define ASSERT(_a_) ASSERT_MSG(_a_, "") From eef8477a72a0d7ed942a79272b56c098b75d59ba Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 11:51:27 -0300 Subject: [PATCH 15/18] dynarmic: more missing headers Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/backend/arm64/abi.h | 1 + src/dynarmic/src/dynarmic/common/assert.h | 1 + src/dynarmic/src/dynarmic/ir/opt_passes.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/dynarmic/src/dynarmic/backend/arm64/abi.h b/src/dynarmic/src/dynarmic/backend/arm64/abi.h index ca7c9187db..635d64f062 100644 --- a/src/dynarmic/src/dynarmic/backend/arm64/abi.h +++ b/src/dynarmic/src/dynarmic/backend/arm64/abi.h @@ -14,6 +14,7 @@ #include #include "dynarmic/common/common_types.h" +#include "dynarmic/common/assert.h" #include #include "dynarmic/common/always_false.h" diff --git a/src/dynarmic/src/dynarmic/common/assert.h b/src/dynarmic/src/dynarmic/common/assert.h index 0a3cb5331d..a4d8874048 100644 --- a/src/dynarmic/src/dynarmic/common/assert.h +++ b/src/dynarmic/src/dynarmic/common/assert.h @@ -7,6 +7,7 @@ #pragma once #include +#include [[noreturn]] void assert_terminate_impl(const char* expr_str, fmt::string_view msg, fmt::format_args args); template diff --git a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp index e9175f0e6b..25afde9b5d 100644 --- a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp +++ b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp @@ -6,6 +6,7 @@ * SPDX-License-Identifier: 0BSD */ +#include #include #include From ff1fdcf6127084a2af368871248346e05805c101 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 25 Sep 2025 12:06:23 -0300 Subject: [PATCH 16/18] fix debug symbols building on window Signed-off-by: Caio Oliveira --- CMakeLists.txt | 7 +++++++ externals/CMakeLists.txt | 14 ++++++++------ src/CMakeLists.txt | 12 +++--------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f436c0a183..1b69782a23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,6 +287,13 @@ if (ANDROID) set(CMAKE_POLICY_VERSION_MINIMUM 3.5) # Workaround for Oboe endif() +# We need to downgrade debug info (/Zi -> /Z7) to use an older but more cacheable format +# See https://github.com/nanoant/CMakePCHCompiler/issues/21 +if(WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") +endif() + # Default to a Release build get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 434e6fb100..2da461fd5c 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -155,12 +155,14 @@ if (YUZU_USE_BUNDLED_SIRIT) AddJsonPackage(sirit-ci) else() AddJsonPackage(sirit) - if(MSVC AND USE_CCACHE AND sirit_ADDED) - get_target_property(_opts sirit COMPILE_OPTIONS) - list(FILTER _opts EXCLUDE REGEX "/Zi") - list(APPEND _opts "/Z7") - set_target_properties(siritobj PROPERTIES COMPILE_OPTIONS "${_opts}") - elseif(MSVC AND CXX_CLANG) + # Change to old-but-more-cacheable debug info on Windows + if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + get_target_property(sirit_opts sirit COMPILE_OPTIONS) + list(FILTER sirit_opts EXCLUDE REGEX "/Zi") + list(APPEND sirit_opts "/Z7") + set_target_properties(sirit PROPERTIES COMPILE_OPTIONS "${sirit_opts}") + endif() + if(MSVC AND CXX_CLANG) target_compile_options(siritobj PRIVATE -Wno-error=unused-command-line-argument) endif() endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 88470c4c42..0f3c5cfd4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,15 +101,9 @@ if (MSVC AND NOT CXX_CLANG) ) endif() - if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) - # when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format - # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21 - add_compile_options(/Z7) - # Avoid D9025 warning - string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - else() - add_compile_options(/Zi) + if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") endif() if (ARCHITECTURE_x86_64) From 130d83dcff0f827c95e1f82453856c657adf2910 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 5 Oct 2025 12:20:32 -0300 Subject: [PATCH 17/18] fix missing copyright Signed-off-by: Caio Oliveira --- src/dynarmic/src/dynarmic/common/memory_pool.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dynarmic/src/dynarmic/common/memory_pool.h b/src/dynarmic/src/dynarmic/common/memory_pool.h index 0f3971f674..d0a5223db3 100644 --- a/src/dynarmic/src/dynarmic/common/memory_pool.h +++ b/src/dynarmic/src/dynarmic/common/memory_pool.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + /* This file is part of the dynarmic project. * Copyright (c) 2016 MerryMage * SPDX-License-Identifier: 0BSD From 4585656f0205b6d2426825064e70c80376dca653 Mon Sep 17 00:00:00 2001 From: DraVee Date: Sun, 5 Oct 2025 23:24:10 +0200 Subject: [PATCH 18/18] dynarmic: more fix only include symbols on Debug --- src/dynarmic/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index 921839b7f1..e5345ef458 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -77,7 +77,6 @@ if (MSVC) /wd4592 # Symbol will be dynamically initialized (implementation limitation) /permissive- # Stricter C++ standards conformance /MP - /Zi /Zo /EHsc /Zc:externConstexpr # Allows external linkage for variables declared "extern constexpr", as the standard permits. @@ -87,6 +86,11 @@ if (MSVC) /bigobj # Increase number of sections in .obj files /DNOMINMAX) + if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + endif() + if (DYNARMIC_WARNINGS_AS_ERRORS) list(APPEND DYNARMIC_CXX_FLAGS /WX)