Compare commits

..

25 commits

Author SHA1 Message Date
533fa2bd8d
fix cmake defaults/include stuff for Sequoia
All checks were successful
eden-license / license-header (pull_request) Successful in 33s
Signed-off-by: crueter <crueter@eden-emu.dev>
2025-09-07 19:42:04 -04:00
93cfc8d520
[nce] signal hanlder fixes for sigaction
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
1078649898
[docs, nce] use macos handler, cross arm inst
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
3eba1533e7
[nce] fix tls using c23 kw
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
aa82a1cc99
mcl sucks
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
3e838e7e1b
[nce] fix yoruself amd64
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
42a774e118
[nce] fix multiarch
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
d6d61c1a35
[nce] fix macos
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
5c848779bd
[nce] fix linux build
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
c1577d15dd
[nce] fix thread kill
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
7f36e38725
[cmake] enable nce on macos
Signed-off-by: crueter <crueter@eden-emu.dev>
2025-09-07 19:41:37 -04:00
489ca98345
[nce] fix extra mangled symbols i forgot
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
b30a6c3bf8
[nce] add extra underscore, bother with preventing mangling later
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
4cebff8aae
[nce] more annoying syscalls and stuff
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
e7da1c96b3
[nce] fix apple gettid and tkill
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
1fffe9f825
[nce] fix FPSR and FPCR
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
d3518926f3
[nce] add syscall number for nearest thing to a tkill
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
2c11541034
[nce] more arm macos fixes
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
d95e1bb4fe
[nce] more apple fixes
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
82cb6686a4
[nce] common ctx
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:37 -04:00
053ad5c729
[nce, dynarmic] macOS port
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-07 19:41:36 -04:00
2f82b63e6a
[user] prioritize 'user' directory if it exists (without needing a portable build) + docs (#338)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: #338
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-09-08 00:57:08 +02:00
43c41e4db5
[compat] openbsd port fixes (#273)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: #273
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-09-08 00:54:48 +02:00
10dd003d0f
[dynarmic, cmake] allow LTO build for dynarmic (#252)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: #252
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-09-08 00:49:46 +02:00
37e0b80766
[hle] Added missing error codes and increased audio renderer revision (#390)
Co-authored-by: Jarrod Norwell <official.antique@gmail.com>

Fixes Animal Well

Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com>
Reviewed-on: #390
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Gamer64 <gamer64@eden-emu.dev>
Co-committed-by: Gamer64 <gamer64@eden-emu.dev>
2025-09-07 19:20:45 +02:00
21 changed files with 94 additions and 44 deletions

View file

@ -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}

View file

@ -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

View file

@ -50,7 +50,9 @@ CMAKE_DEPENDENT_OPTION(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" O
set(EXT_DEFAULT ON)
if (PLATFORM_FREEBSD OR APPLE)
# 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 OR APPLE)
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)

View file

@ -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

View file

@ -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
View 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
View 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`.

View file

@ -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)

@ -1 +1 @@
Subproject commit 3dbfa16f0cd9e8ed4fec916c6c00f41c738cb8f4
Subproject commit c060e9ce30ac2e3ffb49d94209c4dae77b6642f7

View file

@ -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")

View file

@ -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;
};

View file

@ -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)

View file

@ -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"

View file

@ -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);

View file

@ -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

View file

@ -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.

View file

@ -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)
if (NOT DEFINED DYNARMIC_FRONTENDS)
set(DYNARMIC_FRONTENDS "A32;A64" CACHE STRING "Selects which frontends to enable")
endif()

View file

@ -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

View file

@ -440,6 +440,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)

View file

@ -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)

View file

@ -37,7 +37,7 @@ namespace {
struct SpinLockImpl {
void Initialize();
Xbyak::CodeGenerator code;
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, Xbyak::DontSetProtectRWE);
void (*lock)(volatile int*);
void (*unlock)(volatile int*);