Compare commits

..

33 commits

Author SHA1 Message Date
2c4d5f7a81 refactor: wip, trying to fix intent launching 2025-07-27 14:05:20 +02:00
e99b129cc2 style: remove unused DriverResolver and refactor driver handling in CustomSettingsHandler
- Deleted `DriverResolver`
- Moved and streamlined driver path extraction logic into `CustomSettingsHandler`.
- Improved string resource usage and ensured consistent formatting across dialogs.
2025-07-27 13:35:55 +02:00
3e3e35f558 fix: exclude Android from gamemode sources in CMakeLists.txt 2025-07-27 13:14:44 +02:00
6cb45e67fc style: add GradientBorderCardView with theme-aware gradient border implementation 2025-07-27 13:14:18 +02:00
fcd1b0ecc5 style: implement Eden theme 2025-07-27 13:13:26 +02:00
716e30e204 style: update SPDX license information in CarouselRecyclerView 2025-07-25 20:32:00 +02:00
1a5b6083e7 style: code formatting and remove unused imports in MainActivity 2025-07-25 20:20:57 +02:00
9838ebaef9 style: format code and remove unused imports in GamesFragment 2025-07-25 18:50:54 +02:00
f71872d937 style: remove redundant public modifier and fix variable declaration 2025-07-25 18:49:18 +02:00
6e88a9f1f6 style: format code and remove unnecessary blank lines and imports 2025-07-25 18:46:01 +02:00
0ea1870bbc feat: driver installation dialogs with string resources 2025-07-25 18:38:02 +02:00
6b65f95cfa style: remove unnecessary blank line in build.gradle.kts 2025-07-25 18:34:27 +02:00
5008b23062 fix: formatting in DriverGroupAdapter.kt and unused iimport 2025-07-25 18:34:04 +02:00
0dda4fd3ce style: format code 2025-07-25 18:33:29 +02:00
eb3d221ec6 Fix malformed XML in string translations
The `shader_backend_glasm` and `shader_backend_spirv` strings had an extra `string>` tag in multiple language files. This commit removes the extraneous tag.

Additionally, new strings related to Intent Launch, Custom Config, and Driver handling have been added to the default `strings.xml` file.

* src/android/app/src/main/res/values-ru/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-fr/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-pt-rPT/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-id/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-pl/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values/strings.xml: Remove extraneous `string>` tag and add new strings.
* src/android/app/src/main/res/values-fa/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ar/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-he/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ckb/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-sr/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-it/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ja/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-vi/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-cs/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-hu/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-nb/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-uk/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-ko/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-es/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-de/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-zh-rCN/strings.xml: Remove extraneous `string>` tag.
* src/android/app/src/main/res/values-pt-rBR/strings.xml: Remove extraneous `string>` tag.
2025-07-25 18:29:58 +02:00
953e07d1d7 Fix typos in Chinese (Traditional) translation
* src/android/app/src/main/res/values-zh-rTW/strings.xml: Remove extra 'string' from shader backend options.
2025-07-25 18:28:22 +02:00
e3acf3051c Merge branch 'feat/android-emuready' of eden:eden-emu/eden into feat/android-emuready 2025-07-23 17:57:53 +02:00
4155efc7b9 Merge branch 'master' of eden:eden-emu/eden into feat/android-emuready 2025-07-23 17:57:24 +02:00
d76218baa1 Add user feedback with Toast messages for custom settings and driver handling
* Introduced Toast messages across `CustomSettingsHandler`, `DriverResolver`, and `EmulationFragment` to improve user interaction and feedback for key operations.
* Enhanced error handling and confirmation dialogs, including options to launch with default settings when custom settings fail.
2025-07-23 09:58:31 +02:00
e2f2cfa476 refactor: extract and streamline EmuReady intent handling
* Moved custom settings logic from `onCreate` to `handleEmuReadyIntent` for better readability.
* Added `showLaunchConfirmationDialog` to confirm game launch with or without custom settings.
* Updated `CustomSettingsHandler.findGameByTitleId` to show user feedback via `Toast`.
* Ensured improved separation of concerns and reusable methods.
2025-07-23 09:58:31 +02:00
1eeab7e19e fix: suppress warning for predictive back gesture
* src/android/app/src/main/AndroidManifest.xml: Set targetApi to 33 and
  enable onBackInvokedCallback to support the Android 13 predictive back gesture.
  Also, add the tools namespace.
2025-07-23 09:58:31 +02:00
9adb75b0dc fix: refactor EmulationFragment
*handler callbacks using nullable Runnables
  * Remove unused `cpuBackend` and `gpuDriver` variables.
  * Use lambda syntax for `Slider.OnChangeListener`.
  * Remove unused imports.
2025-07-23 09:58:31 +02:00
ab50b5cc9a fix: deprecating warning for getLayoutDirection and LAYOUT_DIRECTION_LTR 2025-07-23 09:58:31 +02:00
e00abd0281 chore: removed unnecessary typecasting 2025-07-23 09:58:31 +02:00
e1efec5a24 Support loading custom game settings via intent
This commit introduces the ability to launch games with custom configurations supplied via an Android intent. This allows external applications to provide specific settings for a game at launch time.

Key changes include:

*   **`CustomSettingsHandler.kt`**: A new class responsible for:
    *   Processing incoming intents with custom settings.
    *   Finding the target game in the user's library by its title ID.
    *   Writing the custom settings to a per-game INI file (`config/custom/<title_id>.ini`).
    *   Handling potential conflicts if a custom configuration already exists, prompting the user to overwrite or cancel.
    *   Integrating with `DriverResolver` to check for and handle required GPU drivers specified in the custom settings.
    *   Initializing the native per-game configuration.
*   **`DriverResolver.kt`**: A new utility class for managing GPU drivers specified in custom settings:
    *   Extracts the driver path from the custom settings INI content.
    *   Checks if the required driver exists locally.
    *   If not found locally, searches for the driver in predefined GitHub repositories (Mr. Purple Turnip, GameHub Adreno 8xx, KIMCHI Turnip, Weab-Chan Freedreno).
    *   Prompts the user to download and install the missing driver if found online.
    *   Handles automatic download and installation of drivers using `DriverViewModel`.
    *   Notifies the user if a required driver cannot be found or installed.
*   **`AndroidManifest.xml`**:
    *   Added a new intent filter for the action `dev.eden.eden_emulator.LAUNCH_WITH_CUSTOM_CONFIG` to `EmulationActivity`. This allows the app to respond to custom settings intents.
*   **`EmulationFragment.kt`**:
    *   Modified `onCreate` to detect and handle the new custom settings intent.
    *   If a custom settings intent is received:
        *   It uses `CustomSettingsHandler.applyCustomSettingsWithDriverCheck` to process the settings asynchronously. This allows for driver checks and user interaction (e.g., overwrite confirmation, driver installation).
        *   Displays appropriate error messages via `Toast` if custom settings processing fails (e.g., game not found, driver issues).
        *   The game is then launched with the applied custom settings.
    *   If a regular file intent or navigation arguments are used, the existing logic for loading game configurations (including custom per-game configs) is retained.
    *   Ensures that per-game configurations are correctly loaded or unloaded based on how the game is launched.
2025-07-23 09:58:31 +02:00
c77cf1d0e8 Add user feedback with Toast messages for custom settings and driver handling
* Introduced Toast messages across `CustomSettingsHandler`, `DriverResolver`, and `EmulationFragment` to improve user interaction and feedback for key operations.
* Enhanced error handling and confirmation dialogs, including options to launch with default settings when custom settings fail.
2025-07-20 18:11:55 +02:00
3abc4ee7db refactor: extract and streamline EmuReady intent handling
* Moved custom settings logic from `onCreate` to `handleEmuReadyIntent` for better readability.
* Added `showLaunchConfirmationDialog` to confirm game launch with or without custom settings.
* Updated `CustomSettingsHandler.findGameByTitleId` to show user feedback via `Toast`.
* Ensured improved separation of concerns and reusable methods.
2025-07-13 07:31:22 +02:00
3376e86e47 fix: suppress warning for predictive back gesture
* src/android/app/src/main/AndroidManifest.xml: Set targetApi to 33 and
  enable onBackInvokedCallback to support the Android 13 predictive back gesture.
  Also, add the tools namespace.
2025-07-12 21:11:34 +02:00
4ae2e31667 Merge branch 'master' of eden:eden-emu/eden into feat/android-emuready 2025-07-12 20:48:53 +02:00
c03b93e1f0 fix: refactor EmulationFragment
*handler callbacks using nullable Runnables
  * Remove unused `cpuBackend` and `gpuDriver` variables.
  * Use lambda syntax for `Slider.OnChangeListener`.
  * Remove unused imports.
2025-07-12 20:47:37 +02:00
4c66f6aceb fix: deprecating warning for getLayoutDirection and LAYOUT_DIRECTION_LTR 2025-07-12 20:46:33 +02:00
7fa40791c6 chore: removed unnecessary typecasting 2025-07-12 18:25:28 +02:00
eb720ef074 Support loading custom game settings via intent
This commit introduces the ability to launch games with custom configurations supplied via an Android intent. This allows external applications to provide specific settings for a game at launch time.

Key changes include:

*   **`CustomSettingsHandler.kt`**: A new class responsible for:
    *   Processing incoming intents with custom settings.
    *   Finding the target game in the user's library by its title ID.
    *   Writing the custom settings to a per-game INI file (`config/custom/<title_id>.ini`).
    *   Handling potential conflicts if a custom configuration already exists, prompting the user to overwrite or cancel.
    *   Integrating with `DriverResolver` to check for and handle required GPU drivers specified in the custom settings.
    *   Initializing the native per-game configuration.
*   **`DriverResolver.kt`**: A new utility class for managing GPU drivers specified in custom settings:
    *   Extracts the driver path from the custom settings INI content.
    *   Checks if the required driver exists locally.
    *   If not found locally, searches for the driver in predefined GitHub repositories (Mr. Purple Turnip, GameHub Adreno 8xx, KIMCHI Turnip, Weab-Chan Freedreno).
    *   Prompts the user to download and install the missing driver if found online.
    *   Handles automatic download and installation of drivers using `DriverViewModel`.
    *   Notifies the user if a required driver cannot be found or installed.
*   **`AndroidManifest.xml`**:
    *   Added a new intent filter for the action `dev.eden.eden_emulator.LAUNCH_WITH_CUSTOM_CONFIG` to `EmulationActivity`. This allows the app to respond to custom settings intents.
*   **`EmulationFragment.kt`**:
    *   Modified `onCreate` to detect and handle the new custom settings intent.
    *   If a custom settings intent is received:
        *   It uses `CustomSettingsHandler.applyCustomSettingsWithDriverCheck` to process the settings asynchronously. This allows for driver checks and user interaction (e.g., overwrite confirmation, driver installation).
        *   Displays appropriate error messages via `Toast` if custom settings processing fails (e.g., game not found, driver issues).
        *   The game is then launched with the applied custom settings.
    *   If a regular file intent or navigation arguments are used, the existing logic for loading game configurations (including custom per-game configs) is retained.
    *   Ensures that per-game configurations are correctly loaded or unloaded based on how the game is launched.
2025-07-12 13:02:48 +02:00
344 changed files with 3663 additions and 3479 deletions

View file

@ -3,53 +3,47 @@
# SPDX-FileCopyrightText: 2025 eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
case "$1" in
amd64 | "")
echo "Making amd64-v3 optimized build of Eden"
ARCH="amd64_v3"
ARCH_FLAGS="-march=x86-64-v3"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=v3)
;;
steamdeck | zen2)
echo "Making Steam Deck (Zen 2) optimized build of Eden"
ARCH="steamdeck"
ARCH_FLAGS="-march=znver2 -mtune=znver2"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=zen2 -DYUZU_SYSTEM_PROFILE=steamdeck)
;;
rog-ally | allyx | zen4)
echo "Making ROG Ally X (Zen 4) optimized build of Eden"
ARCH="rog-ally-x"
ARCH_FLAGS="-march=znver4 -mtune=znver4"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=zen2 -DYUZU_SYSTEM_PROFILE=steamdeck)
;;
legacy)
echo "Making amd64 generic build of Eden"
ARCH=amd64
ARCH_FLAGS="-march=x86-64 -mtune=generic"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=generic)
;;
aarch64)
echo "Making armv8-a build of Eden"
ARCH=aarch64
ARCH_FLAGS="-march=armv8-a -mtune=generic -w"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=generic)
;;
armv9)
echo "Making armv9-a build of Eden"
ARCH=armv9
ARCH_FLAGS="-march=armv9-a -mtune=generic -w"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=armv9)
;;
native)
echo "Making native build of Eden"
ARCH="$(uname -m)"
ARCH_FLAGS="-march=native -mtune=native"
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=native)
;;
*)
echo "Invalid target $1 specified, must be one of native, amd64, steamdeck, zen2, allyx, rog-ally, zen4, legacy, aarch64, armv9"
exit 1
;;
amd64|"")
echo "Making amd64-v3 optimized build of Eden"
ARCH="amd64_v3"
ARCH_FLAGS="-march=x86-64-v3"
;;
steamdeck|zen2)
echo "Making Steam Deck (Zen 2) optimized build of Eden"
ARCH="steamdeck"
ARCH_FLAGS="-march=znver2 -mtune=znver2"
;;
rog-ally|allyx|zen4)
echo "Making ROG Ally X (Zen 4) optimized build of Eden"
ARCH="rog-ally-x"
ARCH_FLAGS="-march=znver4 -mtune=znver4"
;;
legacy)
echo "Making amd64 generic build of Eden"
ARCH=amd64
ARCH_FLAGS="-march=x86-64 -mtune=generic"
;;
aarch64)
echo "Making armv8-a build of Eden"
ARCH=aarch64
ARCH_FLAGS="-march=armv8-a -mtune=generic -w"
;;
armv9)
echo "Making armv9-a build of Eden"
ARCH=armv9
ARCH_FLAGS="-march=armv9-a -mtune=generic -w"
;;
native)
echo "Making native build of Eden"
ARCH="$(uname -m)"
ARCH_FLAGS="-march=native -mtune=native"
;;
*)
echo "Invalid target $1 specified, must be one of native, amd64, steamdeck, zen2, allyx, rog-ally, zen4, legacy, aarch64, armv9"
exit 1
;;
esac
export ARCH_FLAGS="$ARCH_FLAGS -O3"
@ -61,10 +55,10 @@ fi
if [ "$1" != "" ]; then shift; fi
if [ "$TARGET" = "appimage" ]; then
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DCMAKE_INSTALL_PREFIX=/usr -DYUZU_ROOM=ON -DYUZU_ROOM_STANDALONE=OFF -DYUZU_CMD=OFF)
export EXTRA_CMAKE_FLAGS=(-DCMAKE_INSTALL_PREFIX=/usr -DYUZU_ROOM=ON -DYUZU_ROOM_STANDALONE=OFF -DYUZU_CMD=OFF)
else
# For the linux-fresh verification target, verify compilation without PCH as well.
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_PRECOMPILED_HEADERS=OFF)
export EXTRA_CMAKE_FLAGS=(-DYUZU_USE_PRECOMPILED_HEADERS=OFF)
fi
if [ "$DEVEL" != "true" ]; then
@ -92,7 +86,7 @@ export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
mkdir -p build && cd build
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DENABLE_QT_TRANSLATION=ON \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=ON \
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \
-DCMAKE_C_FLAGS="$ARCH_FLAGS" \
@ -105,12 +99,12 @@ cmake .. -G Ninja \
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
-DYUZU_USE_FASTER_LD=ON \
-DYUZU_ENABLE_LTO=ON \
"${EXTRA_CMAKE_FLAGS[@]}"
"${EXTRA_CMAKE_FLAGS[@]}"
ninja -j${NPROC}
if [ -d "bin/Release" ]; then
strip -s bin/Release/*
strip -s bin/Release/*
else
strip -s bin/*
strip -s bin/*
fi

View file

@ -92,6 +92,7 @@ chmod +x ./sharun-aio
xvfb-run -a ./sharun-aio l -p -v -e -s -k \
../$BUILDDIR/bin/eden* \
$LIBDIR/lib*GL*.so* \
$LIBDIR/libSDL2*.so* \
$LIBDIR/dri/* \
$LIBDIR/vdpau/* \
$LIBDIR/libvulkan* \

View file

@ -2,9 +2,9 @@
# some stuff needs cleaned up etc
name: eden-build
#on:
# push:
# branches: [ "master" ]
on:
push:
branches: [ "master" ]
# TODO: combine build.yml into trigger_release.yml
jobs:

View file

@ -1,8 +1,8 @@
name: Build Application and Make Release
#on:
# push:
# tags: [ "*" ]
on:
push:
tags: [ "*" ]
permissions:
contents: write

9
.gitmodules vendored
View file

@ -16,9 +16,15 @@
[submodule "opus"]
path = externals/opus
url = https://github.com/xiph/opus.git
[submodule "SDL"]
path = externals/SDL
url = https://github.com/libsdl-org/SDL.git
[submodule "cpp-httplib"]
path = externals/cpp-httplib
url = https://github.com/yhirose/cpp-httplib.git
[submodule "ffmpeg"]
path = externals/ffmpeg/ffmpeg
url = https://github.com/FFmpeg/FFmpeg.git
[submodule "vcpkg"]
path = externals/vcpkg
url = https://github.com/microsoft/vcpkg.git
@ -43,6 +49,9 @@
[submodule "externals/dynarmic/externals/unordered_dense"]
path = externals/dynarmic/externals/unordered_dense
url = https://github.com/Lizzie841/unordered_dense.git
[submodule "externals/dynarmic/externals/xbyak"]
path = externals/dynarmic/externals/xbyak
url = https://github.com/Lizzie841/xbyak.git
[submodule "externals/dynarmic/externals/zycore-c"]
path = externals/dynarmic/externals/zycore-c
url = https://github.com/zyantific/zycore-c.git

View file

@ -33,9 +33,9 @@ endif()
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON "ENABLE_SDL2;MSVC" OFF)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF)
else()
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
endif()
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
@ -332,41 +332,6 @@ if (YUZU_ROOM)
add_definitions(-DYUZU_ROOM)
endif()
# Build/optimization presets
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if (ARCHITECTURE_x86_64)
set(YUZU_BUILD_PRESET "generic" CACHE STRING "Build preset to use. One of: generic, v3, zen2, zen4, native")
if (${YUZU_BUILD_PRESET} STREQUAL "generic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -mtune=generic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=x86-64 -mtune=generic")
elseif (${YUZU_BUILD_PRESET} STREQUAL "v3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64-v3 -mtune=generic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=x86-64-v3 -mtune=generic")
elseif (${YUZU_BUILD_PRESET} STREQUAL "zen2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=znver2 -mtune=znver2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=znver2 -mtune=znver2")
elseif (${YUZU_BUILD_PRESET} STREQUAL "zen4")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=znver4 -mtune=znver4")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=znver4 -mtune=znver4")
elseif (${YUZU_BUILD_PRESET} STREQUAL "native")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mtune=native")
endif()
elseif(ARCHITECTURE_arm64)
set(YUZU_BUILD_PRESET "generic" CACHE STRING "Build preset to use. One of: generic, armv9")
if (${YUZU_BUILD_PRESET} STREQUAL "generic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a -mtune=generic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv8-a -mtune=generic")
elseif (${YUZU_BUILD_PRESET} STREQUAL "armv9")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv9-a -mtune=generic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv9-a -mtune=generic")
endif()
endif()
endif()
# Other presets, e.g. steamdeck
set(YUZU_SYSTEM_PROFILE "generic" CACHE STRING "CMake and Externals profile to use. One of: generic, steamdeck")
# Configure C++ standard
# ===========================
@ -450,12 +415,11 @@ if(ENABLE_OPENSSL)
find_package(OpenSSL 1.1.1 REQUIRED)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ANDROID)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ANDROID)
find_package(gamemode 1.7 MODULE)
endif()
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the YUZU_find_package
# TODO(crueter): combine this all with CPM.
if (ENABLE_SDL2)
if (YUZU_USE_BUNDLED_SDL2)
# Detect toolchain and platform
@ -491,8 +455,6 @@ set(FFmpeg_COMPONENTS
avutil
swscale)
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
add_subdirectory(externals)
if (ENABLE_QT)

View file

@ -15,7 +15,8 @@
<br>
</h1>
<h4 align="center"><b>Eden</b> is an open-source Nintendo Switch emulator, forked from the Yuzu emulator — started by former Citron developer Camille LaVey and the Eden team.
<h4 align="center"><b>Eden</b> is a open-source Nintendo Switch emulator, forked from the Yuzu emulator — started by former Citron developer Camille LaVey and the Eden team.
<br>
It is written in C++ with portability in mind, and we actively maintain builds for Windows, Linux and Android.
</h4>
@ -56,7 +57,6 @@ You can also contact any of the developers on Discord to learn more about the cu
* **Windows**: [Windows Building Guide](./docs/build/Windows.md)
* **Linux**: [Linux Building Guide](./docs/build/Linux.md)
* **Android**: [Android Building Guide](./docs/build/Android.md)
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
@ -75,7 +75,7 @@ Any donations received will go towards things such as:
* Additional hardware (e.g. GPUs as needed to improve rendering support, other peripherals to add support for, etc.)
* CI Infrastructure
If you would prefer to support us in a different way, please join our [Discord](https://discord.gg/edenemu) and talk to Camille or any of our other developers.
If you would prefer to support us in a different way, please join our [Discord](https://discord.gg/edenemu), once public, and talk to Camille or any of our other developers.
## License

View file

@ -1,174 +0,0 @@
# Development
* **Windows**: [Windows Building Guide](./docs/build/Windows.md)
* **Linux**: [Linux Building Guide](./docs/build/Linux.md)
* **Android**: [Android Building Guide](./docs/build/Android.md)
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
# Building speedup
If you have an HDD, use ramdisk (build in RAM):
```sh
sudo mkdir /tmp/ramdisk
sudo chmod 777 /tmp/ramdisk
# about 10GB needed
sudo mount -t tmpfs -o size=10G myramdisk /tmp/ramdisk
cmake -B /tmp/ramdisk
cmake --build /tmp/ramdisk -- -j32
sudo umount /tmp/ramdisk
```
# How to test JIT
## gdb
Run `./build/bin/eden-cli -c <path to your config file (see logs where you run eden normally to see where it is)> -d -g <path to game>`
Then hook up an aarch64-gdb (use `yay aarch64-gdb` or `sudo pkg in arch64-gdb` to install)
Then type `target remote localhost:1234` and type `c` (for continue) - and then if it crashes just do a `bt` (backtrace) and `layout asm`.
### gdb cheatsheet
- `mo <cmd>`: Monitor commands, `get info`, `get fastmem` and `get mappings` are available.
- `detach`: Detach from remote (i.e restarting the emulator).
- `c`: Continue
- `p <expr>`: Print variable, `p/x <expr>` for hexadecimal.
- `r`: Run
- `bt`: Print backtrace
- `info threads`: Print all active threads
- `thread <number>`: Switch to the given thread (see `info threads`)
- `layout asm`: Display in assembly mode (TUI)
- `si`: Step assembly instruction
- `s` or `step`: Step over LINE OF CODE (not assembly)
- `display <expr>`: Display variable each step.
- `n`: Next (skips over call frame of a function)
- `frame <number>`: Switches to the given frame (from `bt`)
- `br <expr>`: Set breakpoint at `<expr>`.
- `delete`: Deletes all breakpoints.
- `catch throw`: Breakpoint at throw. Can also use `br __cxa_throw`
Expressions can be `variable_names` or `1234` (numbers) or `*var` (dereference of a pointer) or `*(1 + var)` (computed expression).
For more information type `info gdb` and read [the man page](https://man7.org/linux/man-pages/man1/gdb.1.html).
## Bisecting older commits
Since going into the past can be tricky (especially due to the dependencies from the project being lost thru time). This should "restore" the URLs for the respective submodules.
```sh
#!/bin/sh
cat > .gitmodules <<EOF
[submodule "enet"]
path = externals/enet
url = https://github.com/lsalzman/enet.git
[submodule "cubeb"]
path = externals/cubeb
url = https://github.com/mozilla/cubeb.git
[submodule "dynarmic"]
path = externals/dynarmic
url = https://github.com/lioncash/dynarmic.git
[submodule "libusb"]
path = externals/libusb/libusb
url = https://github.com/libusb/libusb.git
[submodule "discord-rpc"]
path = externals/discord-rpc
url = https://github.com/yuzu-emu-mirror/discord-rpc.git
[submodule "Vulkan-Headers"]
path = externals/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "sirit"]
path = externals/sirit
url = https://github.com/yuzu-emu-mirror/sirit.git
[submodule "mbedtls"]
path = externals/mbedtls
url = https://github.com/yuzu-emu-mirror/mbedtls.git
[submodule "xbyak"]
path = externals/xbyak
url = https://github.com/herumi/xbyak.git
[submodule "opus"]
path = externals/opus
url = https://github.com/xiph/opus.git
[submodule "SDL"]
path = externals/SDL
url = https://github.com/libsdl-org/SDL.git
[submodule "cpp-httplib"]
path = externals/cpp-httplib
url = https://github.com/yhirose/cpp-httplib.git
[submodule "ffmpeg"]
path = externals/ffmpeg/ffmpeg
url = https://github.com/FFmpeg/FFmpeg.git
[submodule "vcpkg"]
path = externals/vcpkg
url = https://github.com/microsoft/vcpkg.git
[submodule "cpp-jwt"]
path = externals/cpp-jwt
url = https://github.com/arun11299/cpp-jwt.git
[submodule "libadrenotools"]
path = externals/libadrenotools
url = https://github.com/bylaws/libadrenotools.git
[submodule "tzdb_to_nx"]
path = externals/nx_tzdb/tzdb_to_nx
url = https://github.com/lat9nq/tzdb_to_nx.git
[submodule "VulkanMemoryAllocator"]
path = externals/VulkanMemoryAllocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
[submodule "breakpad"]
path = externals/breakpad
url = https://github.com/yuzu-emu-mirror/breakpad.git
[submodule "simpleini"]
path = externals/simpleini
url = https://github.com/brofield/simpleini.git
[submodule "oaknut"]
path = externals/oaknut
url = https://github.com/merryhime/oaknut.git
[submodule "Vulkan-Utility-Libraries"]
path = externals/Vulkan-Utility-Libraries
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
[submodule "oboe"]
path = externals/oboe
url = https://github.com/google/oboe.git
[submodule "externals/boost-headers"]
path = externals/boost-headers
url = https://github.com/boostorg/headers.git
EOF
git submodule sync
update_or_checkout () {
if [ $0 = 'externals/sirit' ] \
|| [ $0 = 'externals/dynarmic' ] \
|| [ $0 = 'externals/breakpad' ] \
|| [ $0 = 'externals/discord-rpc' ] \
|| [ $0 = 'externals/mbedtls' ]; then
[ -f $0/CMakeLists.txt ] || git submodule update --force --remote --init -- $0
echo $0 ':remote' && git submodule update --remote $0
exit
elif [ $0 = 'externals/nx_tzdb/tzdb_to_nx' ]; then
[ -f $0/CMakeLists.txt ] || git submodule update --force --remote --init -- $0
echo $0 ':remote' && git submodule update --remote $0
else
echo $0 ':update' && git submodule update --init $0 && exit
echo $0 ':remote' && git submodule update --remote $0 && exit
echo $0 ':failure'
fi
}
export -f update_or_checkout
grep path .gitmodules | sed 's/.*= //' | xargs -n 1 -I {} bash -c 'update_or_checkout "$@"' {}
# Fix for LLVM builds
sed -i 's/src\/yuzu\/main.cpp/${CMAKE_SOURCE_DIR}\/src\/yuzu\/main.cpp/g' CMakeModules/FindLLVM.cmake
# Only after cloning and everything - fixes issues with Zydis
cat > externals/dynarmic/src/dynarmic/common/x64_disassemble.cpp <<EOF
#include <cstddef>
#include <vector>
#include <string>
namespace Dynarmic::Common {
void DumpDisassembledX64(const void* ptr, size_t size) {}
std::vector<std::string> DisassembleX64(const void* ptr, size_t size) { return {}; }
}
EOF
```
If having issues with older artifacts, then run `rm -r externals/dynarmic/build externals/dynarmic/externals externals/nx_tzdb/tzdb_to_nx/externals externals/sirit/externals`.
Configuring CMake with `-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=1 -DCMAKE_CXX_FLAGS="-Wno-error" -DCMAKE_C_FLAGS="-Wno-error -Wno-array-parameter -Wno-stringop-overflow"` is also recommended.

View file

@ -83,23 +83,7 @@ if (YUZU_USE_EXTERNAL_SDL2)
set(SDL_FILE ON)
endif()
include(CPM)
set(CPM_USE_LOCAL_PACKAGES OFF)
if ("${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck")
set(SDL_HASH cc016b0046)
set(SDL_PIPEWIRE OFF) # build errors out with this on
set(SDL_SHA512SUM 34d5ef58da6a4f9efa6689c82f67badcbd741f5a4f562a9c2c30828fa839830fb07681c5dc6a7851520e261c8405a416ac0a2c2513b51984fb3b4fa4dcb3e20b)
else()
set(SDL_HASH 2e4c12cd2c)
set(SDL_SHA512SUM d95af47f469a312876f8ab361074a1e7b8083db19935a102d9c6e5887ace6008e64475a8c54b00164b40cad86492bb1b2366084efdd0b2555e5fea6d9c5da80e)
endif()
CPMAddPackage(
NAME SDL2
URL "https://github.com/libsdl-org/SDL/archive/${SDL_HASH}.zip"
URL_HASH SHA512=${SDL_SHA512SUM}
)
add_subdirectory(SDL)
endif()
# ENet
@ -227,7 +211,7 @@ if (ANDROID)
endif()
endif()
if ((CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ANDROID) AND NOT TARGET gamemode::headers)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ANDROID AND NOT TARGET gamemode::headers)
add_library(gamemode INTERFACE)
target_include_directories(gamemode INTERFACE gamemode)
add_library(gamemode::headers ALIAS gamemode)

1
externals/SDL vendored Submodule

@ -0,0 +1 @@
Subproject commit 2e4c12cd2cb2c5d0b60ef2196b400339591e733c

@ -1 +1 @@
Subproject commit 89268a6d17fc87003b209a1422c17ab288be99a0
Subproject commit 16cedde3564629c43808401ad1eb3ca6ef24709a

@ -1 +1 @@
Subproject commit df2e3581520f36776cd42b9fec3ec4a51ab878ef
Subproject commit f216bb107bfc6d99a9605572963613e828b10880

@ -1 +1 @@
Subproject commit 1076b348abd17859a116f4b111c43d58a588a086
Subproject commit 6ec8481c8a13db586d7b3ba58f4eb9bbf017edf0

2
externals/cubeb vendored

@ -1 +1 @@
Subproject commit fa021607121360af7c171d881dc5bc8af7bb56eb
Subproject commit 832fcf38e600bf80b4b728a3e0227403088d992c

View file

@ -64,13 +64,12 @@ if (NOT TARGET ankerl::unordered_dense)
endif()
# xbyak
# uncomment if in an independent repo.
# if (NOT TARGET xbyak::xbyak)
# if ("x86_64" IN_LIST ARCHITECTURE)
# add_subdirectory(xbyak)
# endif()
# endif()
if (NOT TARGET xbyak::xbyak)
if ("x86_64" IN_LIST ARCHITECTURE)
add_subdirectory(xbyak)
endif()
endif()
# zydis

@ -1 +1 @@
Subproject commit 5aa8d113215bd9a97ecc1a2f3fc9506947a2fa57
Subproject commit 74fcff6e5b190fb833a231b7f7c1829e3c3ac54d

@ -1 +1 @@
Subproject commit 35dcc58263d6b55419a5932bd6b0b3029a0a8c00
Subproject commit 02de29e00321787fa515ca60f0f5911e61892dc6

1
externals/dynarmic/externals/xbyak vendored Submodule

@ -0,0 +1 @@
Subproject commit 44a72f369268f7d552650891b296693e91db86bb

@ -1 +1 @@
Subproject commit 75a36c45ae1ad382b0f4e0ede0af84c11ee69928
Subproject commit 7ad36e52110b39cfb62b47bfdb6def94ac531309

@ -1 +1 @@
Subproject commit c2d2bab0255e53a7c3e9b615f4eb69449eb942df
Subproject commit 6372690e30389a94db65ece2d8a1f0a2310475ed

View file

@ -5,10 +5,7 @@ add_library(dynarmic
backend/block_range_information.h
backend/exception_handler.h
common/always_false.h
common/assert.cpp
common/assert.h
common/cast_util.h
common/common_types.h
common/crypto/aes.cpp
common/crypto/aes.h
common/crypto/crc32.cpp

View file

@ -1,6 +1,3 @@
// 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) 2021 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,9 +7,9 @@
#include <mutex>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/arm64/a32_address_space.h"
#include "dynarmic/backend/arm64/a32_core.h"

View file

@ -1,6 +1,3 @@
// 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
@ -9,7 +6,7 @@
#include "dynarmic/backend/arm64/a32_jitstate.h"
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::Arm64 {

View file

@ -1,6 +1,3 @@
// 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) 2021 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
#include "dynarmic/ir/location_descriptor.h"

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,9 +7,9 @@
#include <mutex>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/arm64/a64_address_space.h"
#include "dynarmic/backend/arm64/a64_core.h"

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/frontend/A64/a64_location_descriptor.h"

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -11,7 +8,7 @@
#include <vector>
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <oaknut/oaknut.hpp>
namespace Dynarmic::Backend::Arm64 {

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -13,7 +10,7 @@
#include <type_traits>
#include <mcl/mp/metavalue/lift_value.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <oaknut/oaknut.hpp>
#include "dynarmic/common/always_false.h"

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -11,7 +8,7 @@
#include <map>
#include <optional>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <oaknut/code_block.hpp>
#include <oaknut/oaknut.hpp>
#include <ankerl/unordered_dense.h>

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -9,7 +6,7 @@
#pragma once
#include <mcl/bit_cast.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <mcl/type_traits/function_info.hpp>
namespace Dynarmic::Backend::Arm64 {

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -13,7 +10,7 @@
#include <memory>
#include <vector>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <ankerl/unordered_dense.h>
#include "dynarmic/backend/arm64/fastmem.h"

View file

@ -1,12 +1,9 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
*/
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace oaknut {
struct CodeGenerator;

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <algorithm>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
namespace Dynarmic {

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -12,7 +9,7 @@
#include <tuple>
#include <mcl/hash/xmrx.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <ankerl/unordered_dense.h>
#include "dynarmic/backend/exception_handler.h"

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace oaknut {
struct CodeGenerator;

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -12,11 +9,11 @@
#include <array>
#include <iterator>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include <mcl/bit_cast.hpp>
#include <mcl/mp/metavalue/lift_value.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/arm64/abi.h"
#include "dynarmic/backend/arm64/emit_context.h"

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -14,8 +11,8 @@
#include <utility>
#include <vector>
#include "dynarmic/common/assert.h"
#include "dynarmic/common/common_types.h"
#include <mcl/assert.hpp>
#include <mcl/stdint.hpp>
#include <mcl/type_traits/is_instance_of_template.hpp>
#include <oaknut/oaknut.hpp>
#include <ankerl/unordered_dense.h>

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::Arm64 {

View file

@ -1,6 +1,3 @@
// 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) 2023 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/arm64/stack_layout.h"

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <boost/icl/interval_map.hpp>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <ankerl/unordered_dense.h>
namespace Dynarmic::Backend {

View file

@ -1,6 +1,3 @@
// 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) 2020 MerryMage
* SPDX-License-Identifier: 0BSD
@ -13,7 +10,7 @@
#include <optional>
#include <mcl/macro/architecture.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#if defined(MCL_ARCHITECTURE_X86_64)
namespace Dynarmic::Backend::X64 {

View file

@ -1,6 +1,3 @@
// 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) 2019 MerryMage
* SPDX-License-Identifier: 0BSD
@ -18,10 +15,10 @@
#include <vector>
#include <fmt/format.h>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit_cast.hpp>
#include <mcl/macro/architecture.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/exception_handler.h"

View file

@ -28,9 +28,9 @@
#include <optional>
#include <vector>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit_cast.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#if defined(MCL_ARCHITECTURE_X86_64)
# include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -8,7 +5,7 @@
#include "dynarmic/backend/riscv64/a32_address_space.h"
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include "dynarmic/backend/riscv64/abi.h"
#include "dynarmic/backend/riscv64/emit_riscv64.h"

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,9 +7,9 @@
#include <mutex>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/riscv64/a32_address_space.h"
#include "dynarmic/backend/riscv64/a32_core.h"

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -9,7 +6,7 @@
#include "dynarmic/backend/riscv64/a32_jitstate.h"
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::RV64 {

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
#include "dynarmic/ir/location_descriptor.h"

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -11,7 +8,7 @@
#include <vector>
#include <biscuit/label.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace biscuit {
class Assembler;

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -11,9 +8,9 @@
#include <algorithm>
#include <array>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/mp/metavalue/lift_value.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/common/always_false.h"

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -16,8 +13,8 @@
#include <biscuit/assembler.hpp>
#include <biscuit/registers.hpp>
#include "dynarmic/common/assert.h"
#include "dynarmic/common/common_types.h"
#include <mcl/assert.hpp>
#include <mcl/stdint.hpp>
#include <mcl/type_traits/is_instance_of_template.hpp>
#include <ankerl/unordered_dense.h>

View file

@ -1,6 +1,3 @@
// 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) 2024 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::RV64 {

View file

@ -1,6 +1,3 @@
// 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
@ -14,10 +11,10 @@
#include <fmt/format.h>
#include <fmt/ostream.h>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <boost/container/static_vector.hpp>
#include "dynarmic/backend/x64/a32_jitstate.h"

View file

@ -1,6 +1,3 @@
// 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
@ -12,10 +9,10 @@
#include <boost/icl/interval_set.hpp>
#include <fmt/format.h>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit_cast.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/a32_emit_x64.h"
#include "dynarmic/backend/x64/a32_jitstate.h"

View file

@ -1,6 +1,3 @@
// 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
@ -8,9 +5,9 @@
#include "dynarmic/backend/x64/a32_jitstate.h"
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/block_of_code.h"
#include "dynarmic/backend/x64/nzcv_util.h"

View file

@ -1,6 +1,3 @@
// 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
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::X64 {

View file

@ -1,6 +1,3 @@
// 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
@ -10,9 +7,9 @@
#include <fmt/format.h>
#include <fmt/ostream.h>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <mcl/type_traits/integer_of_size.hpp>
#include <boost/container/static_vector.hpp>

View file

@ -1,6 +1,3 @@
// 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
@ -11,7 +8,7 @@
#include <mutex>
#include <boost/icl/interval_set.hpp>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit_cast.hpp>
#include <mcl/scope_exit.hpp>

View file

@ -1,6 +1,3 @@
// 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
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/nzcv_util.h"
#include "dynarmic/frontend/A64/a64_location_descriptor.h"

View file

@ -11,7 +11,7 @@
#include <algorithm>
#include <mcl/iterator/reverse.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <xbyak/xbyak.h>
#include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,6 +1,3 @@
// 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
@ -9,7 +6,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/hostloc.h"

View file

@ -1,6 +1,3 @@
// 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
@ -24,7 +21,7 @@
#include <array>
#include <cstring>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include <xbyak/xbyak.h>

View file

@ -1,6 +1,3 @@
// 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
@ -14,7 +11,7 @@
#include <type_traits>
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <xbyak/xbyak.h>
#include <xbyak/xbyak_util.h>

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -11,7 +8,7 @@
#include <functional>
#include <vector>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <xbyak/xbyak.h>
namespace Dynarmic::Backend::X64 {

View file

@ -1,6 +1,3 @@
// 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
@ -10,7 +7,7 @@
#include <cstring>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,6 +1,3 @@
// 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
@ -13,7 +10,7 @@
#include <span>
#include <utility>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <ankerl/unordered_dense.h>
#include <xbyak/xbyak.h>

View file

@ -1,6 +1,3 @@
// 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
@ -11,7 +8,7 @@
#include <optional>
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/common/fp/rounding_mode.h"

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -12,7 +9,7 @@
#include <utility>
#include <mcl/bit_cast.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <mcl/type_traits/function_info.hpp>
#include "dynarmic/backend/x64/callback.h"

View file

@ -1,6 +1,3 @@
// 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
@ -10,10 +7,10 @@
#include <iterator>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include <mcl/scope_exit.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <ankerl/unordered_dense.h>
#include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,12 +1,9 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
*/
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/abi.h"
#include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,6 +1,3 @@
// 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
@ -9,8 +6,8 @@
#include <cstddef>
#include <type_traits>
#include "dynarmic/common/assert.h"
#include "dynarmic/common/common_types.h"
#include <mcl/assert.hpp>
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/block_of_code.h"
#include "dynarmic/backend/x64/emit_x64.h"

View file

@ -1,6 +1,3 @@
// 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
@ -10,14 +7,14 @@
#include <type_traits>
#include <utility>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/mp/metavalue/lift_value.hpp>
#include <mcl/mp/typelist/cartesian_product.hpp>
#include <mcl/mp/typelist/get.hpp>
#include <mcl/mp/typelist/lift_sequence.hpp>
#include <mcl/mp/typelist/list.hpp>
#include <mcl/mp/typelist/lower_to_tuple.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <mcl/type_traits/integer_of_size.hpp>
#include <xbyak/xbyak.h>

View file

@ -1,6 +1,3 @@
// 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
@ -8,9 +5,9 @@
#include <limits>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <mcl/type_traits/integer_of_size.hpp>
#include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,6 +1,3 @@
// 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
@ -12,11 +9,11 @@
#include <cstdlib>
#include <type_traits>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_count.hpp>
#include <mcl/bit/bit_field.hpp>
#include <mcl/bitsizeof.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <mcl/type_traits/function_info.hpp>
#include <xbyak/xbyak.h>

View file

@ -1,6 +1,3 @@
// 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
@ -12,7 +9,7 @@
#include <type_traits>
#include <utility>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/mp/metavalue/lift_value.hpp>
#include <mcl/mp/typelist/cartesian_product.hpp>
#include <mcl/mp/typelist/get.hpp>

View file

@ -1,12 +1,9 @@
// 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
*/
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/block_of_code.h"
#include "dynarmic/backend/x64/constants.h"

View file

@ -1,6 +1,3 @@
// 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
@ -12,9 +9,9 @@
#include <cstring>
#include <vector>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit_cast.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/exception_handler.h"
#include "dynarmic/backend/x64/block_of_code.h"

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <algorithm>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
namespace Dynarmic {

View file

@ -1,6 +1,3 @@
// 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) 2021 MerryMage
* SPDX-License-Identifier: 0BSD
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::X64 {

View file

@ -1,14 +1,11 @@
// 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
*/
#pragma once
#include "dynarmic/common/assert.h"
#include "dynarmic/common/common_types.h"
#include <mcl/assert.hpp>
#include <mcl/stdint.hpp>
#include <xbyak/xbyak.h>
namespace Dynarmic::Backend::X64 {

View file

@ -1,6 +1,3 @@
// 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
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::X64::NZCV {

View file

@ -1,6 +1,3 @@
// 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
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <xbyak/xbyak.h>
namespace Dynarmic::Backend::X64 {

View file

@ -1,6 +1,3 @@
// 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
@ -13,7 +10,7 @@
#include <utility>
#include <fmt/ostream.h>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit_cast.hpp>
#include <xbyak/xbyak.h>
@ -418,54 +415,21 @@ void RegAlloc::ReleaseStackSpace(const size_t stack_space) noexcept {
}
HostLoc RegAlloc::SelectARegister(const boost::container::static_vector<HostLoc, 28>& desired_locations) const noexcept {
// TODO(lizzie): Overspill causes issues (reads to 0 and such) on some games, I need to make a testbench
// to later track this down - however I just modified the LRU algo so it prefers empty registers first
// we need to test high register pressure (and spills, maybe 32 regs?)
boost::container::static_vector<HostLoc, 28> candidates = desired_locations; //Who let someone copy an ENTIRE VECTOR here?
// Find all locations that have not been allocated..
const auto allocated_locs = std::partition(candidates.begin(), candidates.end(), [this](auto loc) noexcept {
return !this->LocInfo(loc).IsLocked();
});
candidates.erase(allocated_locs, candidates.end());
ASSERT_MSG(!candidates.empty(), "All candidate registers have already been allocated");
// Selects the best location out of the available locations.
// NOTE: Using last is BAD because new REX prefix for each insn using the last regs
// TODO: Actually do LRU or something. Currently we just try to pick something without a value if possible.
auto min_lru_counter = size_t(-1);
auto it_candidate = desired_locations.cend(); //default fallback if everything fails
auto it_rex_candidate = desired_locations.cend();
auto it_empty_candidate = desired_locations.cend();
for (auto it = desired_locations.cbegin(); it != desired_locations.cend(); it++) {
auto const& loc_info = LocInfo(*it);
// Abstain from using upper registers unless absolutely nescesary
if (loc_info.IsLocked()) {
// skip, not suitable for allocation
} else {
if (loc_info.lru_counter < min_lru_counter) {
if (loc_info.IsEmpty())
it_empty_candidate = it;
// Otherwise a "quasi"-LRU
min_lru_counter = loc_info.lru_counter;
if (*it >= HostLoc::R8 && *it <= HostLoc::R15) {
it_rex_candidate = it;
} else {
it_candidate = it;
}
if (min_lru_counter == 0)
break; //early exit
}
// only if not assigned (i.e for failcase of all LRU=0)
if (it_empty_candidate == desired_locations.cend() && loc_info.IsEmpty())
it_empty_candidate = it;
}
}
// Final resolution goes as follows:
// 1 => Try an empty candidate
// 2 => Try normal candidate (no REX prefix)
// 3 => Try using a REX prefixed one
// We avoid using REX-addressable registers because they add +1 REX prefix which
// do we really need? The trade-off may not be worth it.
auto const it_final = it_empty_candidate != desired_locations.cend()
? it_empty_candidate : it_candidate != desired_locations.cend()
? it_candidate : it_rex_candidate;
ASSERT_MSG(it_final != desired_locations.cend(), "All candidate registers have already been allocated");
// Evil magic - increment LRU counter (will wrap at 256)
const_cast<RegAlloc*>(this)->LocInfo(*it_final).lru_counter++;
return *it_final;
auto const it = std::find_if(candidates.begin(), candidates.end(), [this](auto const loc) noexcept {
return this->LocInfo(loc).IsEmpty();
});
return it != candidates.end() ? *it : candidates.front();
}
void RegAlloc::DefineValueImpl(IR::Inst* def_inst, HostLoc host_loc) noexcept {

View file

@ -1,6 +1,3 @@
// 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
@ -12,7 +9,7 @@
#include <functional>
#include <optional>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include <xbyak/xbyak.h>
#include <boost/container/static_vector.hpp>
#include <boost/container/flat_set.hpp>
@ -95,8 +92,8 @@ private:
uint8_t max_bit_width = 0; //Valid values: 1,2,4,8,16,32,128
bool is_scratch : 1 = false; //1
bool is_set_last_use : 1 = false; //1
alignas(16) uint8_t lru_counter = 0; //1
friend class RegAlloc;
alignas(16) char padding;
};
static_assert(sizeof(HostLocInfo) == 64);

View file

@ -1,6 +1,3 @@
// 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
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Backend::X64 {

View file

@ -1,6 +1,3 @@
// 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) 2023 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/backend/x64/stack_layout.h"

View file

@ -1,13 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <fmt/format.h>
[[noreturn]] void assert_terminate_impl(const char* expr_str, fmt::string_view msg, fmt::format_args args) {
fmt::print(stderr, "assertion failed: {}\n", expr_str);
fmt::vprint(stderr, msg, args);
std::fflush(stderr);
std::terminate();
}

View file

@ -1,32 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2013 Dolphin Emulator Project
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <fmt/format.h>
[[noreturn]] void assert_terminate_impl(const char* expr_str, fmt::string_view msg, fmt::format_args args);
template<typename... Ts>
[[noreturn]] void assert_terminate(const char* expr_str, fmt::string_view msg, Ts... args) {
assert_terminate_impl(expr_str, msg, fmt::make_format_args(args...));
}
#define ASSERT_MSG(_a_, ...) \
([&]() { \
if (!(_a_)) [[unlikely]] { \
assert_terminate(#_a_, __VA_ARGS__); \
} \
}())
#define ASSERT(_a_) ASSERT_MSG(_a_, "")
#define UNREACHABLE() ASSERT(false, "unreachable")
#ifdef _DEBUG
#define DEBUG_ASSERT(_a_) ASSERT(_a_)
#define DEBUG_ASSERT_MSG(_a_, ...) ASSERT_MSG(_a_, __VA_ARGS__)
#else // not debug
#define DEBUG_ASSERT(_a_)
#define DEBUG_ASSERT_MSG(_a_, _desc_, ...)
#endif

View file

@ -1,6 +1,3 @@
// 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) 2022 MerryMage
* SPDX-License-Identifier: 0BSD
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Atomic {

View file

@ -1,23 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <cstdint>
#include <array>
using u8 = std::uint8_t; ///< 8-bit unsigned byte
using u16 = std::uint16_t; ///< 16-bit unsigned short
using u32 = std::uint32_t; ///< 32-bit unsigned word
using u64 = std::uint64_t; ///< 64-bit unsigned int
using s8 = std::int8_t; ///< 8-bit signed byte
using s16 = std::int16_t; ///< 16-bit signed short
using s32 = std::int32_t; ///< 32-bit signed word
using s64 = std::int64_t; ///< 64-bit signed int
using f32 = float; ///< 32-bit floating point
using f64 = double; ///< 64-bit floating point
using u128 = std::array<std::uint64_t, 2>;
static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide");

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Common::Crypto::AES {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Common::Crypto::AES {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Common::Crypto::CRC32 {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Common::Crypto::CRC32 {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <array>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Common::Crypto::SM4 {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -8,7 +5,7 @@
#pragma once
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::Common::Crypto::SM4 {

View file

@ -1,6 +1,3 @@
// 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
@ -10,9 +7,9 @@
#include <optional>
#include "dynarmic/common/assert.h"
#include <mcl/assert.hpp>
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
#include "dynarmic/common/fp/rounding_mode.h"

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -9,7 +6,7 @@
#pragma once
#include <mcl/bit/bit_field.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::FP {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -9,7 +6,7 @@
#pragma once
#include <mcl/bit/bit_count.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::FP {

View file

@ -1,6 +1,3 @@
// 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) 2018 MerryMage
* SPDX-License-Identifier: 0BSD
@ -10,7 +7,7 @@
#include <mcl/bit/bit_field.hpp>
#include <mcl/bitsizeof.hpp>
#include "dynarmic/common/common_types.h"
#include <mcl/stdint.hpp>
namespace Dynarmic::FP {

Some files were not shown because too many files have changed in this diff Show more