Compare commits
19 commits
6362cab83e
...
852a0ff5ac
Author | SHA1 | Date | |
---|---|---|---|
852a0ff5ac | |||
56327d738d | |||
b17845fa65 | |||
2f99bee38a | |||
b77aa7c2d1 | |||
a25ab193e8 | |||
1b21a05255 | |||
6cd26bb9c9 | |||
6d99502d4d | |||
49c2789f4f | |||
f6a3e31a23 | |||
20dbc3cbe6 | |||
bbbc4b4c96 | |||
95fd9ecdd7 | |||
ecc99ce9ab | |||
2f82b63e6a | |||
43c41e4db5 | |||
10dd003d0f | |||
37e0b80766 |
20 changed files with 99 additions and 43 deletions
|
@ -104,6 +104,7 @@ cmake .. -G Ninja \
|
|||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||
-DYUZU_USE_FASTER_LD=ON \
|
||||
-DYUZU_ENABLE_LTO=ON \
|
||||
-DDYNARMIC_ENABLE_LTO=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
|
||||
ninja -j${NPROC}
|
||||
|
|
|
@ -52,6 +52,7 @@ cmake .. -G Ninja \
|
|||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||
-DYUZU_ENABLE_LTO=ON \
|
||||
-DDYNARMIC_ENABLE_LTO=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
|
||||
ninja
|
||||
|
|
|
@ -50,7 +50,9 @@ CMAKE_DEPENDENT_OPTION(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" O
|
|||
|
||||
set(EXT_DEFAULT ON)
|
||||
|
||||
if (PLATFORM_FREEBSD)
|
||||
# See https://github.com/llvm/llvm-project/issues/123946
|
||||
# OpenBSD va_list doesn't play nice with precompiled headers
|
||||
if (PLATFORM_FREEBSD OR PLATFORM_OPENBSD)
|
||||
set(EXT_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
|
@ -115,8 +117,6 @@ option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
|||
|
||||
option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" ON)
|
||||
|
||||
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
||||
|
|
|
@ -63,6 +63,7 @@ If you would like to contribute, we are open to new developers and pull requests
|
|||
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
|
||||
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
|
||||
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
|
||||
* **OpenBSD**: [OpenBSD Building Guide](./docs/build/OpenBSD.md)
|
||||
|
||||
## Download
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* **Solaris**: [Solaris Building Guide](./build/Solaris.md)
|
||||
* **FreeBSD**: [FreeBSD Building Guide](./build/FreeBSD.md)
|
||||
* **macOS**: [macOS Building Guide](./build/macOS.md)
|
||||
* **OpenBSD**: [OpenBSD Building Guide](./build/OpenBSD.md)
|
||||
|
||||
# CPM
|
||||
|
||||
|
|
11
docs/User.md
Normal file
11
docs/User.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# User configuration
|
||||
|
||||
## Configuration directories
|
||||
|
||||
Eden will store configuration 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.
|
10
docs/build/OpenBSD.md
vendored
Normal file
10
docs/build/OpenBSD.md
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Building for OpenBSD
|
||||
|
||||
```sh
|
||||
pkg_add -u
|
||||
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq
|
||||
git --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||
cmake -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_QT=OFF -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -B /usr/obj/eden
|
||||
```
|
||||
|
||||
- Modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`.
|
2
externals/CMakeLists.txt
vendored
2
externals/CMakeLists.txt
vendored
|
@ -33,7 +33,7 @@ endif()
|
|||
|
||||
# Xbyak (also used by Dynarmic, so needs to be added first)
|
||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||
if (PLATFORM_SUN)
|
||||
if (PLATFORM_SUN OR PLATFORM_OPENBSD)
|
||||
AddJsonPackage(xbyak_sun)
|
||||
else()
|
||||
AddJsonPackage(xbyak)
|
||||
|
|
|
@ -179,7 +179,8 @@ android {
|
|||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||
"-DBUILD_TESTING=OFF",
|
||||
"-DYUZU_TESTS=OFF",
|
||||
"-DDYNARMIC_TESTS=OFF"
|
||||
"-DDYNARMIC_TESTS=OFF",
|
||||
"-DDYNARMIC_ENABLE_LTO=ON"
|
||||
)
|
||||
|
||||
abiFilters("arm64-v8a")
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -13,7 +16,7 @@
|
|||
#include "common/polyfill_ranges.h"
|
||||
|
||||
namespace AudioCore {
|
||||
constexpr u32 CurrentRevision = 15;
|
||||
constexpr u32 CurrentRevision = 16;
|
||||
|
||||
enum class SupportTags {
|
||||
CommandProcessingTimeEstimatorVersion4,
|
||||
|
@ -54,6 +57,7 @@ constexpr u32 GetRevisionNum(u32 user_revision) {
|
|||
user_revision -= Common::MakeMagic('R', 'E', 'V', '0');
|
||||
user_revision >>= 24;
|
||||
}
|
||||
|
||||
return user_revision;
|
||||
};
|
||||
|
||||
|
|
|
@ -162,10 +162,6 @@ add_library(
|
|||
zstd_compression.h
|
||||
)
|
||||
|
||||
if(YUZU_ENABLE_PORTABLE)
|
||||
add_compile_definitions(YUZU_ENABLE_PORTABLE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_sources(common PRIVATE windows/timer_resolution.cpp
|
||||
windows/timer_resolution.h)
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#define PORTABLE_DIR "user"
|
||||
|
||||
// Sub-directories contained within a yuzu data directory
|
||||
|
||||
#define AMIIBO_DIR "amiibo"
|
||||
#define CACHE_DIR "cache"
|
||||
#define CONFIG_DIR "config"
|
||||
|
@ -28,11 +27,12 @@
|
|||
#define SHADER_DIR "shader"
|
||||
#define TAS_DIR "tas"
|
||||
#define ICONS_DIR "icons"
|
||||
|
||||
// Compatibility with other emulators
|
||||
#define CITRON_DIR "citron"
|
||||
#define SUDACHI_DIR "sudachi"
|
||||
#define YUZU_DIR "yuzu"
|
||||
#define SUYU_DIR "suyu"
|
||||
|
||||
// yuzu-specific files
|
||||
|
||||
#define LOG_FILE "eden_log.txt"
|
||||
|
|
|
@ -101,61 +101,53 @@ public:
|
|||
legacy_paths.insert_or_assign(legacy_path, new_path);
|
||||
}
|
||||
|
||||
/// In non-android devices, the current directory will first search for "user"
|
||||
/// if such directory (and it must be a directory) is found, that takes priority
|
||||
/// over the global configuration directory (in other words, portable directories
|
||||
/// take priority over the global ones, always)
|
||||
/// On Android, the behaviour is to look for the current directory only.
|
||||
void Reinitialize(fs::path eden_path = {}) {
|
||||
fs::path eden_path_cache;
|
||||
fs::path eden_path_config;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef YUZU_ENABLE_PORTABLE
|
||||
// User directory takes priority over global %AppData% directory
|
||||
eden_path = GetExeDirectory() / PORTABLE_DIR;
|
||||
#endif
|
||||
if (!IsDir(eden_path)) {
|
||||
if (!Exists(eden_path) || !IsDir(eden_path)) {
|
||||
eden_path = GetAppDataRoamingDirectory() / EDEN_DIR;
|
||||
}
|
||||
|
||||
eden_path_cache = eden_path / CACHE_DIR;
|
||||
eden_path_config = eden_path / CONFIG_DIR;
|
||||
|
||||
#define LEGACY_PATH(titleName, upperName) GenerateLegacyPath(LegacyPath::titleName##Dir, GetAppDataRoamingDirectory() / upperName##_DIR); \
|
||||
GenerateLegacyPath(LegacyPath::titleName##ConfigDir, GetAppDataRoamingDirectory() / upperName##_DIR / CONFIG_DIR); \
|
||||
GenerateLegacyPath(LegacyPath::titleName##CacheDir, GetAppDataRoamingDirectory() / upperName##_DIR / CACHE_DIR);
|
||||
|
||||
LEGACY_PATH(Citron, CITRON)
|
||||
LEGACY_PATH(Sudachi, SUDACHI)
|
||||
LEGACY_PATH(Yuzu, YUZU)
|
||||
LEGACY_PATH(Suyu, SUYU)
|
||||
#undef LEGACY_PATH
|
||||
|
||||
#elif ANDROID
|
||||
ASSERT(!eden_path.empty());
|
||||
eden_path_cache = eden_path / CACHE_DIR;
|
||||
eden_path_config = eden_path / CONFIG_DIR;
|
||||
#else
|
||||
#ifdef YUZU_ENABLE_PORTABLE
|
||||
eden_path = GetCurrentDir() / PORTABLE_DIR;
|
||||
#endif
|
||||
if (Exists(eden_path) && IsDir(eden_path)) {
|
||||
eden_path_cache = eden_path / CACHE_DIR;
|
||||
eden_path_config = eden_path / CONFIG_DIR;
|
||||
} else {
|
||||
if (!Exists(eden_path) || !IsDir(eden_path)) {
|
||||
eden_path = GetDataDirectory("XDG_DATA_HOME") / EDEN_DIR;
|
||||
eden_path_cache = GetDataDirectory("XDG_CACHE_HOME") / EDEN_DIR;
|
||||
eden_path_config = GetDataDirectory("XDG_CONFIG_HOME") / EDEN_DIR;
|
||||
} else {
|
||||
eden_path_cache = eden_path / CACHE_DIR;
|
||||
eden_path_config = eden_path / CONFIG_DIR;
|
||||
}
|
||||
|
||||
#define LEGACY_PATH(titleName, upperName) GenerateLegacyPath(LegacyPath::titleName##Dir, GetDataDirectory("XDG_DATA_HOME") / upperName##_DIR); \
|
||||
GenerateLegacyPath(LegacyPath::titleName##ConfigDir, GetDataDirectory("XDG_CONFIG_HOME") / upperName##_DIR); \
|
||||
GenerateLegacyPath(LegacyPath::titleName##CacheDir, GetDataDirectory("XDG_CACHE_HOME") / upperName##_DIR);
|
||||
|
||||
LEGACY_PATH(Citron, CITRON)
|
||||
LEGACY_PATH(Sudachi, SUDACHI)
|
||||
LEGACY_PATH(Yuzu, YUZU)
|
||||
LEGACY_PATH(Suyu, SUYU)
|
||||
|
||||
#undef LEGACY_PATH
|
||||
|
||||
#endif
|
||||
|
||||
GenerateEdenPath(EdenPath::EdenDir, eden_path);
|
||||
GenerateEdenPath(EdenPath::AmiiboDir, eden_path / AMIIBO_DIR);
|
||||
GenerateEdenPath(EdenPath::CacheDir, eden_path_cache);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <boost/asio.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION > 108300 && (!defined(_WINDOWS) && !defined(ANDROID)) || defined(YUZU_BOOST_v1)
|
||||
#if BOOST_VERSION > 108400 && (!defined(_WINDOWS) && !defined(ANDROID)) || defined(YUZU_BOOST_v1)
|
||||
#define USE_BOOST_v1
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -24,6 +27,7 @@ enum class ErrorModule : u32 {
|
|||
HTCS = 4,
|
||||
NCM = 5,
|
||||
DD = 6,
|
||||
OSDBG = 7,
|
||||
LR = 8,
|
||||
Loader = 9,
|
||||
CMIF = 10,
|
||||
|
@ -51,6 +55,7 @@ enum class ErrorModule : u32 {
|
|||
Util = 33,
|
||||
TIPC = 35,
|
||||
ANIF = 37,
|
||||
CRT = 39,
|
||||
ETHC = 100,
|
||||
I2C = 101,
|
||||
GPIO = 102,
|
||||
|
@ -106,6 +111,7 @@ enum class ErrorModule : u32 {
|
|||
Audio = 153,
|
||||
NPNS = 154,
|
||||
NPNSHTTPSTREAM = 155,
|
||||
IDLE = 156,
|
||||
ARP = 157,
|
||||
SWKBD = 158,
|
||||
BOOT = 159,
|
||||
|
@ -115,6 +121,7 @@ enum class ErrorModule : u32 {
|
|||
Fatal = 163,
|
||||
NIMShop = 164,
|
||||
SPSM = 165,
|
||||
AOC = 166,
|
||||
BGTC = 167,
|
||||
UserlandCrash = 168,
|
||||
SASBUS = 169,
|
||||
|
@ -176,13 +183,22 @@ enum class ErrorModule : u32 {
|
|||
DP2HDMI = 244,
|
||||
Cradle = 245,
|
||||
SProfile = 246,
|
||||
Icm42607p = 248,
|
||||
NDRM = 250,
|
||||
Fst2 = 251,
|
||||
Nex = 306,
|
||||
NPLN = 321,
|
||||
TSPM = 499,
|
||||
DevMenu = 500,
|
||||
Nverpt = 520,
|
||||
Am_StuckMonitor = 521,
|
||||
Pia = 618,
|
||||
Eagle = 623,
|
||||
GeneralWebApplet = 800,
|
||||
WifiWebAuthApplet = 809,
|
||||
WhitelistedApplet = 810,
|
||||
ShopN = 811,
|
||||
Coral = 815
|
||||
};
|
||||
|
||||
/// Encapsulates a Horizon OS error code, allowing it to be separated into its constituent fields.
|
||||
|
|
|
@ -14,15 +14,28 @@ endif()
|
|||
|
||||
# Dynarmic project options
|
||||
option(DYNARMIC_ENABLE_CPU_FEATURE_DETECTION "Turning this off causes dynarmic to assume the host CPU doesn't support anything later than SSE3" ON)
|
||||
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" OFF)
|
||||
|
||||
if (PLATFORM_OPENBSD)
|
||||
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" ON)
|
||||
else()
|
||||
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" OFF)
|
||||
endif()
|
||||
|
||||
option(DYNARMIC_FATAL_ERRORS "Errors are fatal" OFF)
|
||||
option(DYNARMIC_IGNORE_ASSERTS "Ignore asserts" OFF)
|
||||
option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF)
|
||||
option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF)
|
||||
option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
|
||||
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_INSTALL "Install dynarmic headers and CMake files" OFF)
|
||||
option(DYNARMIC_USE_BUNDLED_EXTERNALS "Use all bundled externals (useful when e.g. cross-compiling)" OFF)
|
||||
option(DYNARMIC_WARNINGS_AS_ERRORS "Warnings as errors" ${MASTER_PROJECT})
|
||||
option(DYNARMIC_ENABLE_LTO "Enable LTO" OFF)
|
||||
|
||||
# Default to a Release build
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
|
|
7
src/dynarmic/externals/CMakeLists.txt
vendored
7
src/dynarmic/externals/CMakeLists.txt
vendored
|
@ -60,13 +60,6 @@ AddJsonPackage(
|
|||
# endif()
|
||||
# endif()
|
||||
|
||||
# unordered_dense
|
||||
|
||||
# AddJsonPackage(
|
||||
# NAME unordered-dense
|
||||
# BUNDLED_PACKAGE ${DYNARMIC_USE_BUNDLED_EXTERNALS}
|
||||
# )
|
||||
|
||||
# xbyak
|
||||
# uncomment if in an independent repo
|
||||
|
||||
|
|
|
@ -395,6 +395,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||
endif()
|
||||
target_compile_definitions(dynarmic PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
||||
|
||||
if (DYNARMIC_ENABLE_LTO)
|
||||
set_property(TARGET dynarmic PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
if (DYNARMIC_USE_PRECOMPILED_HEADERS)
|
||||
set(PRECOMPILED_HEADERS "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/ir/ir_emitter.h>")
|
||||
if ("x86_64" IN_LIST ARCHITECTURE)
|
||||
|
|
|
@ -225,8 +225,14 @@ bool IsUnderRosetta() {
|
|||
|
||||
} // anonymous namespace
|
||||
|
||||
#ifdef DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT
|
||||
static const auto default_cg_mode = Xbyak::DontSetProtectRWE;
|
||||
#else
|
||||
static const auto default_cg_mode = nullptr; //Allow RWE
|
||||
#endif
|
||||
|
||||
BlockOfCode::BlockOfCode(RunCodeCallbacks cb, JitStateInfo jsi, size_t total_code_size, std::function<void(BlockOfCode&)> rcp)
|
||||
: Xbyak::CodeGenerator(total_code_size, nullptr, &s_allocator)
|
||||
: Xbyak::CodeGenerator(total_code_size, default_cg_mode, &s_allocator)
|
||||
, cb(std::move(cb))
|
||||
, jsi(jsi)
|
||||
, constant_pool(*this, CONSTANT_POOL_SIZE)
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
#include "dynarmic/backend/x64/hostloc.h"
|
||||
#include "dynarmic/common/spin_lock.h"
|
||||
|
||||
#ifdef DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT
|
||||
static const auto default_cg_mode = Xbyak::DontSetProtectRWE;
|
||||
#else
|
||||
static const auto default_cg_mode = nullptr; //Allow RWE
|
||||
#endif
|
||||
|
||||
namespace Dynarmic {
|
||||
|
||||
void EmitSpinLockLock(Xbyak::CodeGenerator& code, Xbyak::Reg64 ptr, Xbyak::Reg32 tmp) {
|
||||
|
@ -37,7 +43,7 @@ namespace {
|
|||
struct SpinLockImpl {
|
||||
void Initialize();
|
||||
|
||||
Xbyak::CodeGenerator code;
|
||||
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, default_cg_mode);
|
||||
|
||||
void (*lock)(volatile int*);
|
||||
void (*unlock)(volatile int*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue