Compare commits

...

21 Commits

Author SHA1 Message Date
PavelBARABANOV
10d50ac226 [vk_texture_cashe] improve MSAA copy fallback when specialized pass unavailable 2025-12-20 02:56:14 +01:00
John
c5bd7dc047 [sdl]Mouse Panning Regression Fix (#3181)
Fix the mouse panning issues

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3181
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: John <john@eden-emu.dev>
Co-committed-by: John <john@eden-emu.dev>
2025-12-19 23:32:42 +01:00
lizzie
557876b222 [core] use memcpy instead of hand rolling aligned cases (#2639)
Hand rolling memcpy like this is always frowned upon because the compiler has more insight on whats going on (plus the code resolves to a worse version of itself on assembly). This removes some branches that are just straight up redundant. May save stuff especially for systems without fastmem enabled.

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2639
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-19 03:58:20 +01:00
lizzie
22dfc560e0 [sdl] fix mouse panning delay (#3174)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3174
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-19 00:30:18 +01:00
Maufeat
1d869e8495 [hle] stubbed extra services from (parental controls and stuff) fw21 (#3175)
Adds more Firmware 20+ related service commands.
Renames existing service commands according to switchbrew docs,
Unstubs new parental service stuff.

Signed-off-by: lizzie lizzie@eden-emu.dev

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3175
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
2025-12-18 21:46:00 +01:00
lizzie
959f72297d [vk] use boost::container::deque instead of std::queue for presentation swapchain of frames (#3120)
This may reduce total overhead (as benchmarks show boost::container::deque being better performing than std::deque, especially with the limited set of ops like push_front and pop_back
May actually not help at all and be worse through, as always, performance tests are welcome

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3120
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-18 11:29:38 +01:00
Caio Oliveira
057d566ff4 [FIXUP] Partially revert "[dynarmic] allow better dtrace diagnostics for code - do not clobber %rbp and save frame pointer (#2653)" (#3176)
This partially reverts commit 50f8d4130d.

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3176
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-committed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
2025-12-18 00:09:42 +01:00
Lizzie
be592f0ab3 [dist, docs] Revolt renames itself to Stoat, change rvlt.gg to stt.gg (#2656)
No badges.io yet, no new SVG logo from them

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Co-authored-by: Maufeat <sahyno1996@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2656
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: Lizzie <lizzie@eden-emu.dev>
Co-committed-by: Lizzie <lizzie@eden-emu.dev>
2025-12-17 14:36:35 +01:00
Maufeat
bf68eede05 [bsd, ssl] fix connection between bsd:u and bsd:s and file descriptor copy (#3172)
as seen in repeated epic games api connection in sonic

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3172
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
2025-12-17 06:32:22 +01:00
Maufeat
1eed7efd09 [core, display, overlay] Add LayerIsOverlay to separate overlay on composer, stub RequestListSummaryOverlayNotification, sync emu settings when setting language (#3123)
This should fix the issue with, for example, ToTK running at 60 FPS when overlay applet is running.
This also should always run the overlay as actual overlay and not in the back.
Stubs RequestListSummaryOverlayNotifications in friends
Syncs Language of the Emulator, when setting language, this is used in Starter Applet

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3123
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
2025-12-17 06:26:02 +01:00
lizzie
50f8d4130d [dynarmic] allow better dtrace diagnostics for code - do not clobber %rbp and save frame pointer (#2653)
Saving the %rbp pointer allows us to backref previous stackframes easily

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2653
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-17 05:41:11 +01:00
Producdevity
e4dccd5a5c [android] setting to auto hide overlay on controller input (#3127)
Setting `HIDE_OVERLAY_ON_CONTROLLER_INPUT` in *Advanced settings → Input Overlay*

**Behavior:**
  - First controller input  -> hides overlay
  - Controller disconnect → shows overlay again
  - Subsequent controller inputs → ignored (already hidden, so no retrigger needed)
  - Touch screen → does **not** show overlay (so you can use a controller and touchscreen to interact with games)
  - Sidebar "Show/Hide controller" button → still works as master toggle

**State reset: The "first input" detection resets when:**
  1. Controller disconnects
  2. Overlay is shown via sidebar button
  3. Controller reconnects

**Interaction with other settings:**
  - Requires `SHOW_INPUT_OVERLAY` to be enabled (basicaly a master switch)
  - Independent from `ENABLE_INPUT_OVERLAY_AUTO_HIDE` (timer-based hide, was already implemented)
  - When both are enabled, touch-to-show is disabled (controller-hide takes precedence)

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3127
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: Producdevity <y.gherbi.dev@gmail.com>
Co-committed-by: Producdevity <y.gherbi.dev@gmail.com>
2025-12-17 03:59:46 +01:00
Kleidis
b9530ae80f [core] Add overridable game setting functionality (#2963)
Adds a place to override specific game settings for specific vendors

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2963
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: Kleidis <kleidis1@protonmail.com>
Co-committed-by: Kleidis <kleidis1@protonmail.com>
2025-12-17 03:59:27 +01:00
lizzie
5130185d12 [vk] avoid calling vkENumerateInstanceFeatures multiple times in init code (#3147)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3147
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-17 03:58:30 +01:00
Maufeat
db1dfc9755 [hle] fix struct order to fix flags and launching via qlaunch (#3173)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3173
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
2025-12-15 01:06:03 +01:00
Evilperson1337
d7de298948 [docs] Adding Multiplayer Guides (#3167)
## Overview
Adds guides relating to the multiplayer components of Eden, which will serve as a quick reference for users to get started.

### Guides added
- Multiplayer FAQ
- Hosting a Multiplayer Room
- Joining a Multiplayer Room
- Access Your Multiplayer Room Externally
- Finding Multiplayer Server Info

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3167
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: Evilperson1337 <Evilperson1337@proton.me>
Co-committed-by: Evilperson1337 <Evilperson1337@proton.me>
2025-12-13 23:24:08 +01:00
crueter
363d861011 [ffmpeg] update to 8.0.1, enable VTBox/mediacodec/d3d12 hwaccels (#3156)
MediaCodec needs some jvm shenanigans to work, but the others should
Just Work(TM). Need tests on Windows (AMD/Intel), macOS

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3156
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2025-12-13 20:32:37 +01:00
Maufeat
30d75d4e52 [hle] add GetApplicationControlData2 and GetApplicationControlData3 to make on FW20.0.0 - FW21.1.0 icons work on qlaunch (#3153)
This change makes firmware 20+ show icons in qlaunch and adds a way for ApplicationViewWithPromotion to handle below 20 and upwards struct

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3153
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
2025-12-13 20:08:44 +01:00
Maufeat
06b83a58a6 [audio] correct biquad filter v2 parameters (#3142)
We had the same struct for v1 and v2 - this was tested only with MP4, should output correct sounds now and boot it.

Co-authored-by: MaranBr <maranbr@outlook.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3142
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
2025-12-13 19:44:41 +01:00
lizzie
1e06c6f752 [docs] troubleshoot section, release policies, gpu documentation (#3078)
- gpu docs
- user guide stuff
- removed unused named.svg
- added link to ES-DE frontend stuff from 3rdparty
 Signed-off-by: lizzie lizzie@eden-emu.dev

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3078
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-12 18:36:19 +01:00
JPikachu
adc41bff70 [bsd, am, fermi] Replace assertions with warnings and update stubs (#3160)
- Return error logs instead of asserts for BSD sockets
- Warn about source depth != 1 in blits instead of assert in Fermi2D
- Update AM 210 - GetLaunchRequiredVersionUpgrade

Credit: liberodark.
Fixes Marvel Cosmic Invasion loading screen crash.

Co-authored-by: JPikachu <jpikachu.eden@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3160
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: JPikachu <jpikachu@eden-emu.dev>
Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
2025-12-12 04:06:33 +01:00
126 changed files with 3805 additions and 1708 deletions

2
.gitignore vendored
View File

@@ -37,6 +37,8 @@ CMakeLists.txt.user*
# *nix related
# Common convention for backup or temporary files
*~
*.core
dtrace-out/
# Visual Studio CMake settings
CMakeSettings.json

View File

@@ -13,8 +13,6 @@ Copyright: yuzu Emulator Project
License: GPL-2.0-or-later
Files: dist/qt_themes/default/icons/256x256/eden.png
dist/qt_themes/default/icons/256x256/eden_named.png
dist/Assets.car
dist/yuzu.bmp
dist/eden.icns
dist/eden.ico

View File

@@ -26,8 +26,9 @@ endif()
# Needed for FFmpeg w/ VAAPI and DRM
if (PLATFORM_OPENBSD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include")
# OpenBSD 7.8 broke libcxx when upgrading, so we must define the PSTL backend manually
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include -D_LIBCPP_PSTL_BACKEND_SERIAL=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include -D_LIBCPP_PSTL_BACKEND_SERIAL=1")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/X11R6/lib")
elseif (PLATFORM_NETBSD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R7/include")

View File

@@ -25,9 +25,9 @@ It is written in C++ with portability in mind, and we actively maintain builds f
<img src="https://img.shields.io/discord/1367654015269339267?color=5865F2&label=Eden&logo=discord&logoColor=white"
alt="Discord">
</a>
<a href="https://rvlt.gg/qKgFEAbH">
<img src="https://img.shields.io/revolt/invite/qKgFEAbH?color=d61f3a&label=Revolt"
alt="Revolt">
<a href="https://stt.gg/qKgFEAbH">
<img src="https://img.shields.io/revolt/invite/qKgFEAbH?color=d61f3a&label=Stoat"
alt="Stoat">
</a>
</p>
@@ -52,10 +52,10 @@ Check out our [website](https://eden-emu.dev) for the latest news on exciting fe
## Development
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/HstXbPch7X) or [Revolt](https://rvlt.gg/qKgFEAbH).
Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/HstXbPch7X) or [Stoat](https://stt.gg/qKgFEAbH).
You can also follow us on [X (Twitter)](https://nitter.poast.org/edenemuofficial) for updates and announcements.
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord or Revolt to learn more about the current state of the emulator.
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord or Stoat to learn more about the current state of the emulator.
See the [sign-up instructions](docs/SIGNUP.md) for information on registration.

81
dist/eden_named.svg vendored

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -137,7 +137,7 @@ If your initial configure failed:
- Evaluate the error and find any related settings
- See the [CPM docs](CPM.md) to see if you may need to forcefully bundle any packages
Otherwise, feel free to ask for help in Revolt or Discord.
Otherwise, feel free to ask for help in Stoat or Discord.
## Caveats

View File

@@ -77,6 +77,8 @@ For this reason this patch is NOT applied to default on all platforms (for obvio
Still will not run flawlessly until `mesa-24` is available. Modify CMakeCache.txt with the `.so` of libGL and libGLESv2 by doing the incredibly difficult task of copy pasting them (`cp /boot/system/lib/libGL.so .`)
If you have `quazip1_qt6_devel`, uninstall it. It may call `Core5Compat` on CMake which is wrongly packaged.
## OpenBSD
After configuration, you may need to modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`.
@@ -99,11 +101,17 @@ ip6addrctl=YES
ip6addrctl_policy=ipv4_prefer
```
System provides a default `g++-10` which doesn't support the current C++ codebase; install `clang-19` with `pkgin install clang-19`. Then build with `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -B build`.
System provides a default `g++-10` which doesn't support the current C++ codebase; install `clang-19` with `pkgin install clang-19`. Or install `gcc14` (or `gcc15` with current pkgsrc). Provided that, the following CMake commands may work:
- `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Bbuild`
- `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/pkg/gcc14/bin/gcc -DCMAKE_CXX_COMPILER=/usr/pkg/gcc14/bin/g++ -Bbuild`
- `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/pkg/gcc15/bin/gcc -DCMAKE_CXX_COMPILER=/usr/pkg/gcc15/bin/g++ -Bbuild`
Make may error out when generating C++ headers of SPIRV shaders, hence it's recommended to use `gmake` over the default system one.
glslang is not available on NetBSD, to circumvent this simply build glslang by yourself:
[parallel/spirv-tools](https://iso.us.netbsd.org/pub/pkgsrc/current/pkgsrc/parallel/spirv-tools/index.html) isn't available in binary form and must be build from source.
Such that glslang is not available on NetBSD, to circumvent this simply build glslang by yourself:
```sh
pkgin python313
git clone --depth=1 https://github.com/KhronosGroup/glslang.git
@@ -114,6 +122,8 @@ cmake --build build -- -j`nproc`
cmake --install build
```
However, pkgsrc is highly recommended, see [getting pkgsrc](https://iso.us.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/pkgsrc.html#getting). You must get `current` not the `2025Q2` version.
# DragonFlyBSD
If `libstdc++.so.6` is not found (`GLIBCXX_3.4.30`) then attempt:

View File

@@ -183,6 +183,8 @@ sudo dnf config-manager --enable crb
sudo dnf install qt6-qtbase-private-devel
```
For systems like OpenEuler or derivates, don't forget to also install: `SDL2-devel pkg-config fmt-dev nlohmann-json-dev`.
* [RPM Fusion](https://rpmfusion.org/Configuration) is required for `ffmpeg-devel`
* Fedora 32 or later is required.
* Fedora 36+ users with GCC 12 need Clang and should configure CMake with: `cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -B build`
@@ -241,7 +243,7 @@ brew install molten-vk vulkan-loader
<details>
<summary>FreeBSD</summary>
As root run: `pkg install devel/cmake devel/sdl20 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib devel/jwt-cpp devel/unordered-dense mbedtls3 vulkan-headers quazip-qt6`
As root run: `pkg install devel/cmake devel/sdl20 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib devel/unordered-dense mbedtls3 vulkan-headers quazip-qt6`
If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
@@ -251,7 +253,7 @@ If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
<details>
<summary>NetBSD</summary>
For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv-headers ffmpeg7 libva nlohmann-json jq libopus qt6 mbedtls3 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1`.
For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv-headers ffmpeg7 libva nlohmann-json jq libopus qt6 mbedtls3 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1 libcxx`.
[Caveats](./Caveats.md#netbsd).
@@ -320,7 +322,7 @@ pacman -Syuu --needed --noconfirm $packages
<summary>HaikuOS</summary>
```sh
pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel boost1.89_devel vulkan_devel qt6_base_devel libsdl2_devel ffmpeg7_devel libx11_devel enet_devel catch2_devel quazip1_qt6_devel qt6_5compat_devel libusb1_devel libz_devel mbedtls3_devel glslang
pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel boost1.89_devel vulkan_devel qt6_base_devel qt6_declarative_devel libsdl2_devel ffmpeg7_devel libx11_devel enet_devel catch2_devel quazip1_qt5_devel qt6_5compat_devel mbedtls3_devel glslang qt6_devel
```
[Caveats](./Caveats.md#haikuos).

874
docs/NvidiaGpu.md Normal file
View File

@@ -0,0 +1,874 @@
# The NVIDIA SM86 (Maxwell) GPU - Instruction set
<!-- TOC -->
[AL2P](#AL2P)
[ALD](#ALD)
[AST](#AST)
[ATOM](#ATOM)
[ATOMS](#ATOMS)
[B2R](#B2R)
[BAR](#BAR)
[BFE](#BFE)
[BFI](#BFI)
[BPT](#BPT)
[BRA](#BRA)
[BRK](#BRK)
[BRX](#BRX)
[CAL](#CAL)
[CCTL](#CCTL)
[CCTLL](#CCTLL)
[CONT](#CONT)
[CS2R](#CS2R)
[CSET](#CSET)
[CSETP](#CSETP)
[DADD](#DADD)
[DEPBAR](#DEPBAR)
[DFMA](#DFMA)
[DMNMX](#DMNMX)
[DMUL](#DMUL)
[DSET](#DSET)
[DSETP](#DSETP)
[EXIT](#EXIT)
[F2F](#F2F)
[F2I](#F2I)
[FADD](#FADD)
[FCHK](#FCHK)
[FCMP](#FCMP)
[FFMA](#FFMA)
[FLO](#FLO)
[FMNMX](#FMNMX)
[FMUL](#FMUL)
[FSET](#FSET)
[FSETP](#FSETP)
[FSWZADD](#FSWZADD)
[GETCRSPTR](#GETCRSPTR)
[GETLMEMBASE](#GETLMEMBASE)
[HADD2](#HADD2)
[HFMA2](#HFMA2)
[HMUL2](#HMUL2)
[HSET2](#HSET2)
[HSETP2](#HSETP2)
[I2F](#I2F)
[I2I](#I2I)
[IADD](#IADD)
[IADD3](#IADD3)
[ICMP](#ICMP)
[IDE](#IDE)
[IDP](#IDP)
[IMAD](#IMAD)
[IMADSP](#IMADSP)
[IMNMX](#IMNMX)
[IMUL](#IMUL)
[IPA](#IPA)
[ISBERD](#ISBERD)
[ISCADD](#ISCADD)
[ISET](#ISET)
[ISETP](#ISETP)
[JCAL](#JCAL)
[JMP](#JMP)
[JMX](#JMX)
[KIL](#KIL)
[LD](#LD)
[LDC](#LDC)
[LDG](#LDG)
[LDL](#LDL)
[LDS](#LDS)
[LEA](#LEA)
[LEPC](#LEPC)
[LONGJMP](#LONGJMP)
[LOP](#LOP)
[LOP3](#LOP3)
[MEMBAR](#MEMBAR)
[MOV](#MOV)
[MUFU](#MUFU)
[NOP](#NOP)
[OUT](#OUT)
[P2R](#P2R)
[PBK](#PBK)
[PCNT](#PCNT)
[PEXIT](#PEXIT)
[PIXLD](#PIXLD)
[PLONGJMP](#PLONGJMP)
[POPC](#POPC)
[PRET](#PRET)
[PRMT](#PRMT)
[PSET](#PSET)
[PSETP](#PSETP)
[R2B](#R2B)
[R2P](#R2P)
[RAM](#RAM)
[RED](#RED)
[RET](#RET)
[RRO](#RRO)
[RTT](#RTT)
[S2R](#S2R)
[SAM](#SAM)
[SEL](#SEL)
[SETCRSPTR](#SETCRSPTR)
[SETLMEMBASE](#SETLMEMBASE)
[SHF](#SHF)
[SHFL](#SHFL)
[SHL](#SHL)
[SHR](#SHR)
[SSY](#SSY)
[ST](#ST)
[STG](#STG)
[STL](#STL)
[STP](#STP)
[STS](#STS)
[SUATOM](#SUATOM)
[SULD](#SULD)
[SURED](#SURED)
[SUST](#SUST)
[SYNC](#SYNC)
[TEX](#TEX)
[TLD](#TLD)
[TLD4](#TLD4)
[TMML](#TMML)
[TXA](#TXA)
[TXD](#TXD)
[TXQ](#TXQ)
[VABSDIFF](#VABSDIFF)
[VABSDIFF4](#VABSDIFF4)
[VADD](#VADD)
[VMAD](#VMAD)
[VMNMX](#VMNMX)
[VOTE](#VOTE)
[VSET](#VSET)
[VSETP](#VSETP)
[VSHL](#VSHL)
[VSHR](#VSHR)
[XMAD](#XMAD)
<!-- /TOC -->
NOTE: Regenerate TOC with `cat docs/gpu/README.md | grep '#' | cut -d '#' -f 2 | tr -d ' ' | awk '{print "["$1"](#"$1")"}'`.
The numbers (in binary) represent the opcodes; `-` signifies "don't care".
# AL2P
`1110 1111 1010 0---`
# ALD
`1110 1111 1101 1---`
# AST
`1110 1111 1111 0---`
# ATOM
- **ATOM_cas**: `1110 1110 1111 ----`
- **ATOM**: `1110 1101 ---- ----`
Atomic operation.
- INC, DEC for U32/S32/U64 does nothing.
- ADD, INC, DEC for S64 does nothing.
- Only ADD does something for F32.
- Only ADD, MIN and MAX does something for F16x2.
# ATOMS
- **ATOMS_cas**: `1110 1110 ---- ----`
- **ATOMS**: `1110 1100 ---- ----`
# B2R
`1111 0000 1011 1---`
# BAR
`1111 0000 1010 1---`
# BFE
- **BFE_reg**: `0101 1100 0000 0---`
- **BFE_cbuf**: `0100 1100 0000 0---`
- **BFE_imm**: `0011 100- 0000 0---`
Bit Field Extract.
# BFI
- **BFI_reg**: `0101 1011 1111 0---`
- **BFI_rc**: `0101 0011 1111 0---`
- **BFI_cr**: `0100 1011 1111 0---`
- **BFI_imm**: `0011 011- 1111 0---`
Bit Field Insert.
# BPT
`1110 0011 1010 ----`
Breakpoint trap.
# BRA
`1110 0010 0100 ----`
Relative branch.
# BRK
`1110 0011 0100 ----`
Break.
# BRX
`1110 0010 0101 ----`
# CAL
`1110 0010 0110 ----`
# CCTL
`1110 1111 011- ----`
Cache Control.
# CCTLL
`1110 1111 100- ----`
Texture Cache Control.
# CONT
`1110 0011 0101 ----`
Continue.
# CS2R
`0101 0000 1100 1---`
Move Special Register to Register.
# CSET
`0101 0000 1001 1---`
Test Condition Code And Set.
# CSETP
`0101 0000 1010 0---`
Test Condition Code and Set Predicate.
# DADD
- **DADD_reg**: `0101 1100 0111 0---`
- **DADD_cbuf**: `0100 1100 0111 0---`
- **DADD_imm**: `0011 100- 0111 0---`
# DEPBAR
`1111 0000 1111 0---`
# DFMA
- **DFMA_reg**: `0101 1011 0111 ----`
- **DFMA_rc**: `0101 0011 0111 ----`
- **DFMA_cr**: `0100 1011 0111 ----`
- **DFMA_imm**: `0011 011- 0111 ----`
FP64 Fused Mutiply Add.
# DMNMX
- **DMNMX_reg**: `0101 1100 0101 0---`
- **DMNMX_cbuf**: `0100 1100 0101 0---`
- **DMNMX_imm**: `0011 100- 0101 0---`
FP64 Minimum/Maximum.
# DMUL
- **DMUL_reg**: `0101 1100 1000 0---`
- **DMUL_cbuf**: `0100 1100 1000 0---`
- **DMUL_imm**: `0011 100- 1000 0---`
FP64 Multiply.
# DSET
- **DSET_reg**: `0101 1001 0--- ----`
- **DSET_cbuf**: `0100 1001 0--- ----`
- **DSET_imm**: `0011 001- 0--- ----`
FP64 Compare And Set.
# DSETP
- **DSETP_reg**: `0101 1011 1000 ----`
- **DSETP_cbuf**: `0100 1011 1000 ----`
- **DSETP_imm**: `0011 011- 1000 ----`
FP64 Compare And Set Predicate.
# EXIT
`1110 0011 0000 ----`
# F2F
- **F2F_reg**: `0101 1100 1010 1---`
- **F2F_cbuf**: `0100 1100 1010 1---`
- **F2F_imm**: `0011 100- 1010 1---`
# F2I
- **F2I_reg**: `0101 1100 1011 0---`
- **F2I_cbuf**: `0100 1100 1011 0---`
- **F2I_imm**: `0011 100- 1011 0---`
# FADD
- **FADD_reg**: `0101 1100 0101 1---`
- **FADD_cbuf**: `0100 1100 0101 1---`
- **FADD_imm**: `0011 100- 0101 1---`
- **FADD32I**: `0000 10-- ---- ----`
FP32 Add.
# FCHK
- **FCHK_reg**: `0101 1100 1000 1---`
- **FCHK_cbuf**: `0100 1100 1000 1---`
- **FCHK_imm**: `0011 100- 1000 1---`
Single Precision FP Divide Range Check.
# FCMP
- **FCMP_reg**: `0101 1011 1010 ----`
- **FCMP_rc**: `0101 0011 1010 ----`
- **FCMP_cr**: `0100 1011 1010 ----`
- **FCMP_imm**: `0011 011- 1010 ----`
FP32 Compare to Zero and Select Source.
# FFMA
- **FFMA_reg**: `0101 1001 1--- ----`
- **FFMA_rc**: `0101 0001 1--- ----`
- **FFMA_cr**: `0100 1001 1--- ----`
- **FFMA_imm**: `0011 001- 1--- ----`
- **FFMA32I**: `0000 11-- ---- ----`
FP32 Fused Multiply and Add.
# FLO
- **FLO_reg**: `0101 1100 0011 0---`
- **FLO_cbuf**: `0100 1100 0011 0---`
- **FLO_imm**: `0011 100- 0011 0---`
# FMNMX
- **FMNMX_reg**: `0101 1100 0110 0---`
- **FMNMX_cbuf**: `0100 1100 0110 0---`
- **FMNMX_imm**: `0011 100- 0110 0---`
FP32 Minimum/Maximum.
# FMUL
- **FMUL_reg**: `0101 1100 0110 1---`
- **FMUL_cbuf**: `0100 1100 0110 1---`
- **FMUL_imm**: `0011 100- 0110 1---`
- **FMUL32I**: `0001 1110 ---- ----`
FP32 Multiply.
# FSET
- **FSET_reg**: `0101 1000 ---- ----`
- **FSET_cbuf**: `0100 1000 ---- ----`
- **FSET_imm**: `0011 000- ---- ----`
FP32 Compare And Set.
# FSETP
- **FSETP_reg**: `0101 1011 1011 ----`
- **FSETP_cbuf**: `0100 1011 1011 ----`
- **FSETP_imm**: `0011 011- 1011 ----`
FP32 Compare And Set Predicate.
# FSWZADD
`0101 0000 1111 1---`
FP32 Add used for FSWZ emulation.
# GETCRSPTR
`1110 0010 1100 ----`
# GETLMEMBASE
`1110 0010 1101 ----`
# HADD2
- **HADD2_reg**: `0101 1101 0001 0---`
- **HADD2_cbuf**: `0111 101- 1--- ----`
- **HADD2_imm**: `0111 101- 0--- ----`
- **HADD2_32I**: `0010 110- ---- ----`
FP16 Add.
# HFMA2
- **HFMA2_reg**: `0101 1101 0000 0---`
- **HFMA2_rc**: `0110 0--- 1--- ----`
- **HFMA2_cr**: `0111 0--- 1--- ----`
- **HFMA2_imm**: `0111 0--- 0--- ----`
- **HFMA2_32I**: `0010 100- ---- ----`
FP16 Fused Mutiply Add.
# HMUL2
- **HMUL2_reg**: `0101 1101 0000 1---`
- **HMUL2_cbuf**: `0111 100- 1--- ----`
- **HMUL2_imm**: `0111 100- 0--- ----`
- **HMUL2_32I**: `0010 101- ---- ----`
FP16 Multiply.
# HSET2
- **HSET2_reg**: `0101 1101 0001 1---`
- **HSET2_cbuf**: `0111 110- 1--- ----`
- **HSET2_imm**: `0111 110- 0--- ----`
FP16 Compare And Set.
# HSETP2
- **HSETP2_reg**: `0101 1101 0010 0---`
- **HSETP2_cbuf**: `0111 111- 1--- ----`
- **HSETP2_imm**: `0111 111- 0--- ----`
FP16 Compare And Set Predicate.
# I2F
- **I2F_reg**: `0101 1100 1011 1---`
- **I2F_cbuf**: `0100 1100 1011 1---`
- **I2F_imm**: `0011 100- 1011 1---`
# I2I
- **I2I_reg**: `0101 1100 1110 0---`
- **I2I_cbuf**: `0100 1100 1110 0---`
- **I2I_imm**: `0011 100- 1110 0---`
# IADD
- **IADD_reg**: `0101 1100 0001 0---`
- **IADD_cbuf**: `0100 1100 0001 0---`
- **IADD_imm**: `0011 100- 0001 0---`
Integer Addition.
# IADD3
- **IADD3_reg**: `0101 1100 1100 ----`
- **IADD3_cbuf**: `0100 1100 1100 ----`
- **IADD3_imm**: `0011 100- 1100 ----`
- **IADD32I**: `0001 110- ---- ----`
3-input Integer Addition.
# ICMP
- **ICMP_reg**: `0101 1011 0100 ----`
- **ICMP_rc**: `0101 0011 0100 ----`
- **ICMP_cr**: `0100 1011 0100 ----`
- **ICMP_imm**: `0011 011- 0100 ----`
Integer Compare to Zero and Select Source.
# IDE
`1110 0011 1001 ----`
# IDP
- **IDP_reg**: `0101 0011 1111 1---`
- **IDP_imm**: `0101 0011 1101 1---`
# IMAD
- **IMAD_reg**: `0101 1010 0--- ----`
- **IMAD_rc**: `0101 0010 0--- ----`
- **IMAD_cr**: `0100 1010 0--- ----`
- **IMAD_imm**: `0011 010- 0--- ----`
- **IMAD32I**: `1000 00-- ---- ----`
Integer Multiply And Add.
# IMADSP
- **IMADSP_reg**: `0101 1010 1--- ----`
- **IMADSP_rc**: `0101 0010 1--- ----`
- **IMADSP_cr**: `0100 1010 1--- ----`
- **IMADSP_imm**: `0011 010- 1--- ----`
Extracted Integer Multiply And Add..
# IMNMX
- **IMNMX_reg**: `0101 1100 0010 0---`
- **IMNMX_cbuf**: `0100 1100 0010 0---`
- **IMNMX_imm**: `0011 100- 0010 0---`
Integer Minimum/Maximum.
# IMUL
- **IMUL_reg**: `0101 1100 0011 1---`
- **IMUL_cbuf**: `0100 1100 0011 1---`
- **IMUL_imm**: `0011 100- 0011 1---`
- **IMUL32I**: `0001 1111 ---- ----`
Integer Multiply.
# IPA
`1110 0000 ---- ----`
# ISBERD
`1110 1111 1101 0---`
In-Stage-Buffer Entry Read.
# ISCADD
- **ISCADD_reg**: `0101 1100 0001 1---`
- **ISCADD_cbuf**: `0100 1100 0001 1---`
- **ISCADD_imm**: `0011 100- 0001 1---`
- **ISCADD32I**: `0001 01-- ---- ----`
Scaled Integer Addition.
# ISET
- **ISET_reg**: `0101 1011 0101 ----`
- **ISET_cbuf**: `0100 1011 0101 ----`
- **ISET_imm**: `0011 011- 0101 ----`
Integer Compare And Set.
# ISETP
- **ISETP_reg**: `0101 1011 0110 ----`
- **ISETP_cbuf**: `0100 1011 0110 ----`
- **ISETP_imm**: `0011 011- 0110 ----`
Integer Compare And Set Predicate.
# JCAL
`1110 0010 0010 ----`
Absolute Call.
# JMP
`1110 0010 0001 ----`
Absolute Jump.
# JMX
`1110 0010 0000 ----`
Absolute Jump Indirect.
# KIL
`1110 0011 0011 ----`
# LD
`100- ---- ---- ----`
Load from generic Memory.
# LDC
`1110 1111 1001 0---`
Load Constant.
# LDG
`1110 1110 1101 0---`
Load from Global Memory.
# LDL
`1110 1111 0100 0---`
Load within Local Memory Window.
# LDS
`1110 1111 0100 1---`
Load within Shared Memory Window.
# LEA
- **LEA_hi_reg**: `0101 1011 1101 1---`
- **LEA_hi_cbuf**: `0001 10-- ---- ----`
- **LEA_lo_reg**: `0101 1011 1101 0---`
- **LEA_lo_cbuf**: `0100 1011 1101 ----`
- **LEA_lo_imm**: `0011 011- 1101 0---`
# LEPC
`0101 0000 1101 0---`
# LONGJMP
`1110 0011 0001 ----`
# LOP
- **LOP_reg**: `0101 1100 0100 0---`
- **LOP_cbuf**: `0100 1100 0100 0---`
- **LOP_imm**: `0011 100- 0100 0---`
# LOP3
- **LOP3_reg**: `0101 1011 1110 0---`
- **LOP3_cbuf**: `0000 001- ---- ----`
- **LOP3_imm**: `0011 11-- ---- ----`
- **LOP32I**: `0000 01-- ---- ----`
# MEMBAR
`1110 1111 1001 1---`
Memory Barrier.
# MOV
- **MOV_reg**: `0101 1100 1001 1---`
- **MOV_cbuf**: `0100 1100 1001 1---`
- **MOV_imm**: `0011 100- 1001 1---`
- **MOV32I**: `0000 0001 0000 ----`
# MUFU
`0101 0000 1000 0---`
Multi Function Operation.
# NOP
`0101 0000 1011 0---`
No operation.
# OUT
- **OUT_reg**: `1111 1011 1110 0---`
- **OUT_cbuf**: `1110 1011 1110 0---`
- **OUT_imm**: `1111 011- 1110 0---`
# P2R
- **P2R_reg**: `0101 1100 1110 1---`
- **P2R_cbuf**: `0100 1100 1110 1---`
- **P2R_imm**: `0011 1000 1110 1---`
Move Predicate Register To Register.
# PBK
`1110 0010 1010 ----`
Pre-break.
# PCNT
`1110 0010 1011 ----`
Pre-continue.
# PEXIT
`1110 0010 0011 ----`
Pre-exit.
# PIXLD
`1110 1111 1110 1---`
# PLONGJMP
`1110 0010 1000 ----`
Pre-long jump.
# POPC
- **POPC_reg**: `0101 1100 0000 1---`
- **POPC_cbuf**: `0100 1100 0000 1---`
- **POPC_imm**: `0011 100- 0000 1---`
Population/Bit count.
# PRET
`1110 0010 0111 ----`
Pre-return from subroutine. Pushes the return address to the CRS stack.
# PRMT
- **PRMT_reg**: `0101 1011 1100 ----`
- **PRMT_rc**: `0101 0011 1100 ----`
- **PRMT_cr**: `0100 1011 1100 ----`
- **PRMT_imm**: `0011 011- 1100 ----`
# PSET
`0101 0000 1000 1---`
Combine Predicates and Set.
# PSETP
`0101 0000 1001 0---`
Combine Predicates and Set Predicate.
# R2B
`1111 0000 1100 0---`
Move Register to Barrier.
# R2P
- **R2P_reg**: `0101 1100 1111 0---`
- **R2P_cbuf**: `0100 1100 1111 0---`
- **R2P_imm**: `0011 100- 1111 0---`
Move Register To Predicate/CC Register.
# RAM
`1110 0011 1000 ----`
# RED
`1110 1011 1111 1---`
Reduction Operation on Generic Memory.
# RET
`1110 0011 0010 ----`
Return.
# RRO
- **RRO_reg**: `0101 1100 1001 0---`
- **RRO_cbuf**: `0100 1100 1001 0---`
- **RRO_imm**: `0011 100- 1001 0---`
# RTT
`1110 0011 0110 ----`
# S2R
`1111 0000 1100 1---`
# SAM
`1110 0011 0111 ----`
# SEL
- **SEL_reg**: `0101 1100 1010 0---`
- **SEL_cbuf**: `0100 1100 1010 0---`
- **SEL_imm**: `0011 100- 1010 0---`
# SETCRSPTR
`1110 0010 1110 ----`
# SETLMEMBASE
`1110 0010 1111 ----`
# SHF
- **SHF_l_reg**: `0101 1011 1111 1---`
- **SHF_l_imm**: `0011 011- 1111 1---`
- **SHF_r_reg**: `0101 1100 1111 1---`
- **SHF_r_imm**: `0011 100- 1111 1---`
# SHFL
`1110 1111 0001 0---`
# SHL
- **SHL_reg**: `0101 1100 0100 1---`
- **SHL_cbuf**: `0100 1100 0100 1---`
- **SHL_imm**: `0011 100- 0100 1---`
# SHR
- **SHR_reg**: `0101 1100 0010 1---`
- **SHR_cbuf**: `0100 1100 0010 1---`
- **SHR_imm**: `0011 100- 0010 1---`
# SSY
`1110 0010 1001 ----`
Set Synchronization Point.
# ST
`101- ---- ---- ----`
Store to generic Memory.
# STG
`1110 1110 1101 1---`
Store to global Memory.
# STL
`1110 1111 0101 0---`
Store within Local or Shared Window.
# STP
`1110 1110 1010 0---`
Store to generic Memory and Predicate.
# STS
`1110 1111 0101 1---`
Store within Local or Shared Window.
# SUATOM
- **SUATOM**: `1110 1010 0--- ----`
- **SUATOM_cas**: `1110 1010 1--- ----`
Atomic Op on Surface Memory.
# SULD
`1110 1011 000- ----`
Surface Load.
# SURED
`1110 1011 010- ----`
Reduction Op on Surface Memory.
# SUST
`1110 1011 001- ----`
Surface Store.
# SYNC
`1111 0000 1111 1---`
# TEX
- **TEX**: `1100 0--- ---- ----`
- **TEX_b**: `1101 1110 10-- ----`
- **TEXS**: `1101 -00- ---- ----`
Texture Fetch with scalar/non-vec4 source/destinations.
# TLD
- **TLD**: `1101 1100 ---- ----`
- **TLD_b**: `1101 1101 ---- ----`
- **TLDS**: `1101 -01- ---- ----`
Texture Load with scalar/non-vec4 source/destinations.
# TLD4
- **TLD4**: `1100 10-- ---- ----`
- **TLD4_b**: `1101 1110 11-- ----`
- **TLD4S**: `1101 1111 -0-- ----`
Texture Load 4 with scalar/non-vec4 source/destinations.
# TMML
- **TMML**: `1101 1111 0101 1---`
- **TMML_b**: `1101 1111 0110 0---`
Texture MipMap Level.
# TXA
`1101 1111 0100 0---`
# TXD
- **TXD**: `1101 1110 00-- ----`
- **TXD_b**: `1101 1110 01-- ----`
Texture Fetch With Derivatives.
# TXQ
- **TXQ**: `1101 1111 0100 1---`
- **TXQ_b**: `1101 1111 0101 0---`
Texture Query.
# VABSDIFF
`0101 0100 ---- ----`
# VABSDIFF4
`0101 0000 0--- ----`
# VADD
`0010 00-- ---- ----`
# VMAD
`0101 1111 ---- ----`
# VMNMX
`0011 101- ---- ----`
# VOTE
- **VOTE**: `0101 0000 1101 1---`
- **VOTE_vtg**: `0101 0000 1110 0---`
Vote Across SIMD Thread Group
# VSET
`0100 000- ---- ----`
# VSETP
`0101 0000 1111 0---`
# VSHL
`0101 0111 ---- ----`
# VSHR
`0101 0110 ---- ----`
# XMAD
- **XMAD_reg**: `0101 1011 00-- ----`
- **XMAD_rc**: `0101 0001 0--- ----`
- **XMAD_cr**: `0100 111- ---- ----`
- **XMAD_imm**: `0011 011- 00-- ----`
Integer Short Multiply Add.

View File

@@ -10,4 +10,6 @@ This contains documentation created by developers. This contains build instructi
- **[Debug Guidelines](./Debug.md)**
- **[CPM - CMake Package Manager](CPMUtil.md)**
- **[Platform-Specific Caveats](Caveats.md)**
- **[The NVIDIA SM86 (Maxwell) GPU](./NvidiaGpu.md)**
- **[User Handbook](./user)**
- **[Release Policy](./ReleasePolicy.md)**

25
docs/ReleasePolicy.md Normal file
View File

@@ -0,0 +1,25 @@
# Release Policy
While releases are usually made at the discretion of the team, we feel that establishing a clearer guideline on how those come to be will help expectations when it comes to features and fixes per version.
## Release candidates
Every full release is *preceded* by at least, 3 release candidates. The reasoning is that each week of the month, there will be a release candidate, with the "4th one" being the final full release.
The main expectation is that the release candidates bring both fixes and, sometimes, new features. But not guarantee a regression-free experience.
The criteria for choosing a date for a release candidate is at discretion, or "perceived necesity" at any given time.
## Full release
A full release means there are *no major* leftover regressions, importantly this means that a grand portion of regressions found between release candidates are swept out before declaring a full release. This doesn't mean a full release is regression-free; but we do a best-effort approach to reduce them for end-users.
The main expectation is that users can safely upgrade from a stable build to another, with no major regressions.
## Snapshot/rolling release
While we don't publish rolling releases, we are aware users may compile from source and/or provide binaries to master builds of the project.
This is mostly fine since we keep master very stable from major hiccups. However sometimes bugs do slip between tests or reviews - so users are advised to keep that in mind.
We advise that users also read git logs (`git log --oneline`) before recompiling to get a clearer picture of the changes given into the emulator.

View File

@@ -1,28 +0,0 @@
# Setting Controller Profiles By Game
Use this guide when you want to set up specific controller profiles for specific games. This can be useful for certain games like *Captain Toad Treasure Tracker* where a blue dot appears in the middle of the screen when you have docked mode enabled, but not handheld mode.
**Click [Here](https://evilperson1337.notion.site/Setting-Controller-Profiles-By-Game-2b057c2edaf681658a57f0c199cb6083) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Eden Emulator set up and fully configured
- Controller Profile Created
- See [*Configuring Controller Profiles*](./ControllerProfiles.md) for instructions on how to do this if needed.
---
## Steps
1. *Right-Click* the game you want to apply the profile to in the main window and select **Properties.**
2. Navigate to the **Input Profiles** tab in the window that appears. Drop down on *Player 1 profile* (or whatever player profile you want to apply it to) and select the profile you want.
<aside>
***NOTE***: You may have to resize the window to see all tabs, or press the arrows by the tabs to see **Input Profiles**.
</aside>
1. Click **OK** to apply the profile mapping.
2. Launch the game and confirm that the profile is applied, regardless of what the global configuration is.

View File

@@ -12,9 +12,38 @@ Use this guide for when you want to configure specific controller settings to be
---
## Steps
### Steps
1. Launch Eden and wait for it to load.
2. Navigate to *Emulation > Configure…*
3. Select **Controls** from the left-hand menu and configure your controller for the way you want it to be in game.
4. Select **New** and enter a name for the profile in the box that appears. Press **OK** to save the profile settings.
5. Select **OK** to close the settings menu.
5. Select **OK** to close the settings menu.
## Setting Controller Profiles By Game
Use this guide when you want to set up specific controller profiles for specific games. This can be useful for certain games like *Captain Toad Treasure Tracker* where a blue dot appears in the middle of the screen when you have docked mode enabled, but not handheld mode.
**Click [Here](https://evilperson1337.notion.site/Setting-Controller-Profiles-By-Game-2b057c2edaf681658a57f0c199cb6083) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Eden Emulator set up and fully configured
- Controller Profile Created
- See [*Configuring Controller Profiles*](./ControllerProfiles.md) for instructions on how to do this if needed.
---
### Steps
1. *Right-Click* the game you want to apply the profile to in the main window and select **Properties.**
2. Navigate to the **Input Profiles** tab in the window that appears. Drop down on *Player 1 profile* (or whatever player profile you want to apply it to) and select the profile you want.
<aside>
***NOTE***: You may have to resize the window to see all tabs, or press the arrows by the tabs to see **Input Profiles**.
</aside>
1. Click **OK** to apply the profile mapping.
2. Launch the game and confirm that the profile is applied, regardless of what the global configuration is.

View File

@@ -90,3 +90,22 @@ The OpenGL backend would invoke behaviour that would result in swarst/LLVMpipe w
### HaikuOS compatibility
HaikuOS bundles a Mesa library that doesn't support full core OpenGL 4.6 (required by the emulator). This leads to HaikuOS being one of the few computer platforms where Vulkan is the only available option for users. If OpenGL is desired, Mesa has to be built manually from source. For debugging purpouses `lavapipe` is recommended over the GPU driver; there is in-kernel support for NVIDIA cards through.
### Fixes for Windows 10 and above having "Device loss"
Run the following batch script *inside* the Eden folder:
```cmd
@echo off
pushd "%~dp0"
if exist "%temp%\FixFullScreen.reg" (
del %temp%\FixFullScreen.reg
)
set str_path="%cd:\=\\%\\eden.exe"
echo Windows Registry Editor Version 5.00 >> %temp%\FixFullScreen.reg
echo. >> %temp%\FixFullScreen.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers] >> %temp%\FixFullScreen.reg
echo %str_path%="~ DISABLEDXMAXIMIZEDWINDOWEDMODE HIGHDPIAWARE" >> %temp%\FixFullScreen.reg
regedit /s %temp%\FixFullScreen.reg
del %temp%\FixFullScreen.reg
exit /b
```

View File

@@ -3,7 +3,7 @@ Use this guide when you want to use the Steam Deck's native gyro functionality f
**Click [Here](https://evilperson1337.notion.site/Getting-Gyro-Motion-Controls-Working-on-Steam-Deck-2b057c2edaf681a1aaade35db6e0fd1b) for a version of this guide with images & visual elements.**
---
## Steamdeck
### Pre-Requisites
@@ -13,7 +13,7 @@ Use this guide when you want to use the Steam Deck's native gyro functionality f
---
## Steps
### Steps
1. Go into Steam Deck's Desktop Mode, and use the shortcut to launch EmuDeck.
2. Install [SteamDeckGyroDSU](https://github.com/kmicki/SteamDeckGyroDSU/releases) by going to *3rd Party Tools > Gyroscope* and clicking **Install.**

View File

@@ -4,15 +4,13 @@ Use this guide when you want to manually import save files for use in the Eden e
**Click [Here](https://evilperson1337.notion.site/Importing-Saves-Into-Eden-2b057c2edaf681fe968df8d63821ccae) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Eden emulator already set up and configured.
- The save file(s) you want to import
---
## Desktop
## Steps
### Steps
1. Open Eden and wait for it to load.
2. Start the game and create a save file to establish the directories.
3. *Right-Click* the game for which you want to load a save in.
@@ -25,4 +23,8 @@ Use this guide when you want to manually import save files for use in the Eden e
</aside>
7. Close the file explorer as it is no longer needed.
8. Launch the game in Eden and verify that the save data appears through whatever method the game implements.
8. Launch the game in Eden and verify that the save data appears through whatever method the game implements.
## Android
TBD

View File

@@ -1,4 +1,4 @@
# Installing Atmosphere Mods
# User Handbook - Installing Atmosphere Mods
Use this guide for when you want to install an Atmosphere-based mod for use in Eden.

View File

@@ -1,4 +1,4 @@
# Working with Updates/DLC in Eden
# User Handbook - Working with Updates/DLC in Eden
Use this guide when you want to install Updates or DLC for your games in Eden.

296
docs/user/Multiplayer.md Normal file
View File

@@ -0,0 +1,296 @@
# Multiplayer
Use this guide to answer questions regarding and to start using the multiplayer functionality of Eden.
## Multiplayer FAQ
This FAQ will serve as a general quick question and answer simple questions.
**Click [Here](https://evilperson1337.notion.site/Multiplayer-FAQ-2c357c2edaf680fca2e9ce59969a220f) for a version of this guide with images & visual elements.**
### Can Eden Play Games with a Switch Console?
No - The only emulator that has this kind of functionality is *Ryujinx* and it's forks. This solution requires loading a custom module on a modded switch console to work.
### Can I Play Online Games?
No - This would require hijacking requests to Nintendo's official servers to a custom server infrastructure built to emulate that functionality. This is how services like [*Pretendo*](https://pretendo.network/) operate. As such, you would not be able to play “Online”, you can however play multiplayer games.
### What's the Difference Between Online and Multiplayer?
I have chosen the wording carefully here for a reason.
- Online: Games that connect to Nintendo's Official servers and allow games/functionality using that communication method are unsupported on any emulator currently (for obvious reasons).
- Multiplayer: The ability to play with multiple players on separate systems. This is supported for games that support LDN Local Wireless.
The rule of thumb here is simple: If a game supports the ability to communicate without a server (Local Wireless, LAN, etc.) you will be able to play with other users. If it requires a server to function - it will not. You will need to look up if your title support Local Wireless/LAN play as an option.
### How Does Multiplayer Work on Eden Exactly?
Eden's multiplayer works by emulating the Switch's local wireless (LDN) system, then tunneling that traffic over the internet through “rooms” that act like lobbies. Each player runs their own instance of the emulator, and as long as everyone joins the same room and the game supports local wireless multiplayer, the emulated consoles see each other as if they were on the same local network. This design avoids typical one-save netplay issues because every user keeps an independent save and console state while only the in-game wireless packets are forwarded through the room server. In practice, you pick or host a room, configure your network interface/port forwarding if needed, then launch any LDN-capable game; from the game's perspective it is just doing standard local wireless, while the emulator handles discovery and communication over the internet or LAN.
### What Do I Need to Do?
That depends entirely on what your goal is and your level of technical ability, you have a 2 options on how to proceed.
1. Join a Public Lobby.
1. If you just want to play *Mario Kart 8 Deluxe* with other people and don't care how it works or about latency - this is the option for you. See the *Joining a Multiplayer Room* section for instructions on how to do this.
2. Host Your Own Room.
1. This option will require you to be comfortable with accessing your router's configuration, altering firewall rules, and troubleshooting when things (inevitably) don't work out perfectly on the first try. Use this option if you want to control the room entirely, are concerned about latency issues, or just want to run something for your friends. See the *Hosting a Multiplayer Room* section for next steps*.*
### Can Other Platforms Play Together?
Yes - the platform you choose to run the emulator on does not matter. Steam Deck users can play with Windows users, Android users can play with MacOS users, etc. Furthermore different emulators can play together as well (Eden/Citron/Ryubing, etc.) - but be you may want to all go to the same one if you are having issues.
### What Pitfalls Should I Look Out For?
While it would be nice if everything always worked perfectly - that is not reality. Here are some things you should watch out for when attempting to play multiplayer.
1. Emulator Version Mismatches
1. Occasionally updates to the emulator of choice alter how the LDN functionality is handled. In these situations, unexpected behavior can occur when trying to establish LDN connections. This is a good first step to check if you are having issues playing a game together, but can join the same lobby without issue.
2. Game Version Mismatches
1. It is best practice to have the game version be identical to each other in order to ensure that there is no difference in how the programs are handling the LDN logic. Games are black boxes that the dev team cannot see into to ensure the logic handling operates the same way. For this reason, it is highly advised that the game versions match across all the players. This would be a good 2nd step to check if you are having issues playing a game together, but can join the same lobby without issue.
3. Latency
1. Because this implementation is emulating a LAN/Local Wireless connection - it is extremely sensitive to network latency and drops. Eden has done a good job of trying to account for this and not immediately drop users out - but it is not infallible. If latency is a concern or becomes an issue - consider hosting a room.
---
## Joining a Multiplayer Room
Use this when you need to connect to a multiplayer room for LDN functionality inside of Eden. This does not cover how to host a room, only joining existing ones.
**Click [Here](https://evilperson1337.notion.site/Access-Your-Multiplayer-Room-Externally-2c357c2edaf681c0ab2ce2ee624d809d) for a version of this guide with images & visual elements.**
### Pre-Requisites
- Eden set up and functioning
- Multiplayer Options Configured in Eden Settings
- Network Access
## Steps
There are 2 primary methods that you can use to connect to an existing room, depending on how the room is hosted.
- Joining a Public Lobby
- This option allows you to view publicly hosted lobbies and join them easily. Use this option if you just want to join a room and play quickly.
- Directly Connecting to a Room
- Use this option if the hosted room is not on the public lobby list (private, internal network only, etc.)
<aside>
***NOTE:*** Just because a lobby appears on the public lobby list, does not mean that the hoster has properly configured the necessary port forwarding/firewall rules to allow a connection. If you cannot connect to a lobby, move onto another entry as the issue is probably not on your end. Start looking at your environment if you are unable to connect to multiple/any lobbies.
</aside>
### Joining a Public Lobby
1. Open Eden and navigate to *Multiplayer → Browse Public Game Lobby*.
2. The **Public Room Browser** will now open and display a list of publicly accessible rooms. Find one you want to connect to and double click it.
<aside>
***NOTE***: Just because a room is set for a specific game, does not mean that you ***have*** to play that game in that lobby. It is generally good practice to do so, but there is no enforcement of that.
</aside>
3. You will now see a window showing everyone on the lobby, or an error message.
### Direct Connecting to a Room
If the hoster has not made the lobby public, or you don't want to find it in the public game browser - use this option to connect.
1. Open Eden and navigate to *Multiplayer → Direct Connect*.
2. Enter the *Server Address, Port*, *Nickname* (what your user will be called in the room), and a *Password* (if the hoster set one, otherwise leave it blank) and hit **Connect.**
3. You will now see a window showing everyone on the lobby, or an error message.
---
# Hosting a Multiplayer Room
Use this guide for when you want to host a multiplayer lobby to play with others in Eden. In order to have someone access the room from outside your local network, see the *Access Your Multiplayer Room Externally* section for next steps.
**Click [Here](https://evilperson1337.notion.site/Hosting-a-Multiplayer-Room-2c357c2edaf6819481dbe8a99926cea2) for a version of this guide with images & visual elements.**
### Pre-Requisites
- Eden set up and Functioning
- Network Access
- Ability to allow programs through the firewall on your device.
## Steps
1. Open Eden and navigate to *Emulation → Multiplayer → Create Room.*
2. Fill out the following information in the popup dialog box.
| **Option** | **Acceptable Values** | **Default** | **Description** |
| --- | --- | --- | --- |
| Room Name | *Any string between 4 - 20 characters.* | *None* | Controls the name of the room and how it would appear in the Public Game Lobby/Room screen. |
| Username | *Any string between 4 - 20 characters.* | *None* | Controls the name your user will appear as to the other users in the room. |
| Preferred Game | *Any Game from your Game List.* | The first game on your game list | What game will the lobby be playing? You are not forced to play the game you choose and can switch games without needing to recreate the room. |
| Password | *None or any string* | *None* | What password do you want to secure the room with, if any. |
| Max Players | 2 - 16 | 8 | How many players do you want to allow in the room at a time? |
| Port | 1024 - 65535 | 24872 | What port do you want to run the lobby on? Could technically be any port number, but it's best to choose an uncommon port to avoid potential conflicts. See [*Well-Known Ports*](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports) for more information on ports commonly used. |
| Room Description | *None or any string* | *None* | An optional message that elaborates on what the room is for, or for a makeshift message of the day presented to users in the lobby. |
| Load Previous Ban List | [Checked, Unchecked] | Checked | Tells Eden to load the list containing users you have banned before. |
| Room Type | [Public, Unlisted] | Public | Specifies whether you want the server to appear in the public game lobby browser |
3. Click **Host Room** to start the room server. You may get a notice to allow the program through the firewall from your operating system. Allow it and then users can attempt to connect to your room.
---
# Access Your Multiplayer Room Externally
Quite often the person with whom you want to play is located off of your internal network (LAN). If you want to host a room and play with them you will need to get your devices to communicate with each other. This guide will go over your options on how to do this so that you can play together.
**Click [Here](https://evilperson1337.notion.site/Access-Your-Multiplayer-Room-Externally-2c357c2edaf681c0ab2ce2ee624d809d) for a version of this guide with images & visual elements.**
### Pre-Requisites
- Eden set up and Functioning
- Network Access
## Options
### Port Forwarding
- **Difficulty Level**: High
<aside>
Use this option if you want the greatest performance/lowest latency, don't want to install any software, and have the ability to modify your networking equipment's configuration (most notably - your router). Avoid this option if you cannot modify your router's configuration or are uncomfortable with looking up things on your own.
</aside>
Port forwarding is a networking technique that directs incoming traffic arriving at a specific port on a router or firewall to a designated device and port inside a private local network. When an external client contacts the public IP address of the router on that port, the router rewrites the packet's destination information (IP address and sometimes port number) and forwards it to the internal host that is listening on the corresponding service. This allows services such as web servers, game servers, or remote desktop sessions hosted behind NAT (Network Address Translation) to be reachable from the wider Internet despite the devices themselves having non-routable private addresses.
The process works by creating a static mapping—often called a “port-forward rule”—in the router's configuration. The rule specifies three pieces of data: the external (public) port, the internal (private) IP address of the target machine, and the internal port on which that machine expects the traffic. When a packet arrives, the router checks its NAT table, matches the external port to a rule, and then translates the packet's destination to the internal address before sending it onward. Responses from the internal host are similarly rewritten so they appear to come from the router's public IP, completing the bidirectional communication loop. This mechanism enables seamless access to services inside a protected LAN without exposing the entire network.
For our purposes we would pick the port we want to expose (*e.g. 24872*) and we would access our router's configuration and create a port-forward rule to send the traffic from an external connection to your local machine over our specified port (*24872)*. The exact way to do so, varies greatly by router manufacturer - and sometimes require contacting your ISP to do so depending on your agreement. You can look up your router on [*portforward.com*](https://portforward.com/router.htm) which may have instructions on how to do so for your specific equipment. If it is not there, you will have to use Google/ChatGPT to determine the steps for your equipment.
### Use a Tunnelling Service
- **Difficulty Level**: Easy
<aside>
Use this option if you don't want to have to worry about other users machine/configuration settings, but also cannot do port forwarding. This will still require that you as the hoster install a program and sign up for an account - but will prevent you from having to deal with port forwards or networking equipment. Avoid this option if there is not a close relay and you are getting issues with latency.
</aside>
Using a Tunnelling service may be the solution to avoid port forward, but also avoid worrying about your users setup. A tunnelling service works by having a lightweight client run on the machine that hosts the game server. That client immediately opens an **outbound** encrypted connection (typically over TLS/QUIC) to a relay node operated by the tunnel provider's cloud infrastructure. Because outbound traffic is almost always allowed through NAT routers and ISP firewalls, the tunnel can be established even when the host sits behind carrier-grade NAT or a strict firewall. The tunnel provider then assigns a public address (e.g.,`mygame.playit.gg:12345`). When a remote player connects to that address, the traffic reaches the the tunnel provider relay, which forwards it through the already-established tunnel back to the client on the private network, and finally onto the local game server's port. In effect, the server appears to the Internet as if it were listening on the public address, while the host never needs to configure port-forwarding rules or expose its own IP directly.
For our purposes we would spawn the listener for the port that way chose when hosting our room. The user would connect to our assigned public address/port combination, and it would be routed to our machine. The tunnel must remain active for as long as you want the connection to remain open. Closing the terminal will kill the tunnel and disconnect the users.
**Recommended Services:**
- [*Playit.GG*](https://playit.gg/)
### Use a VPN Service
- **Difficulty**: Easy
<aside>
Use this option if you don't want to use a tunnelling service, or don't want to manage the overhead of the playit gg solution, don't want to send data through the relay, or any other reason. Avoid this method if you do not want to have to manage VPN installation/configuration for your users.
</aside>
The VPN solution is a good compromise between the tunnelling solution and port forwarding. You do not have to port forward or touch your networking equipment at all - but also don't need to send all your data connections through a 3rd party relay. The big downside is that you will have to ensure all of your users have your VPN solution installed *and* that they have a valid configuration. When looking for a solution, it is advised to find one that uses the WireGuard protocol for speed, and does not require communication with a server beyond the initial handshake.
**Recommended Services:**
- [*Tailscale*](https://tailscale.com/)
- [*ZeroTier*](https://www.zerotier.com/)
- *Self-hosted VPN Solution*
- This is so far out of the scope of this document it has a different postal code.
*Check with the provider you select on the sign up and installation process specific to that provider.*
---
# Finding the Server Information for a Multiplayer Room
Use this guide when you need to determine the connection information for the Public Multiplayer Lobby you are connected to.
**Click [Here](https://evilperson1337.notion.site/Finding-the-Server-Information-for-a-Multiplayer-Room-2c557c2edaf6809e94e8ed3429b9eb26) for a version of this guide with images & visual elements.**
### Pre-Requisites
- Eden set up and configured
- Internet Access
## Steps
### Method 1: Grabbing the Address from the Log File
1. Open Eden and Connect to the room you want to identify.
1. See the *Joining a Multiplayer Room* section for instructions on how to do so if you need them.
2. Go to *File → Open Eden Folder*, then open the **config** folder.
3. Open the the **qt-config.ini** file in a text editor.
4. Search for the following keys:
1. `Multiplayer\ip=`
2. `Multiplayer\port=`
5. Copy the Server Address and Port.
### Method 2: Using a Web Browser
1. Obtain the name of the room you want the information for.
2. Open a Web Browser.
3. Navigate to [`https://api.ynet-fun.xyz/lobby`](https://api.ynet-fun.xyz/lobby)
4. Press *Ctrl + F* and search for the name of your room.
5. Look for and copy the Server Address and Port.
### Method 3: Using a Terminal (PowerShell or CURL)
1. Obtain the name of the room you want the information for.
2. Open the terminal supported by your operating system.
3. Run one of the following commands, replacing *<Name>* with the name of the server from step 1.
### PowerShell Command [Windows Users]
```powershell
# Calls the API to get the address and port information
(Invoke-RestMethod -Method Get -Uri "https://api.ynet-fun.xyz/lobby").rooms | Where-Object {$_.Name -eq '<NAME>'} | Select address,port | ConvertTo-Json
# Example Output
#{
# "address": "118.208.233.90",
# "port": 5001
#}
```
### CURL Command [MacOS/Linux Users] **Requires jq*
```bash
# Calls the API to get the address and port information
curl -s "https://api.ynet-fun.xyz/lobby" | jq '.rooms[] | select(.name == "<NAME>") | {address, port}'
# Example Output
#{
# "address": "118.208.233.90",
# "port": 5001
#}
```
4. Copy the Server Address and Port.
---
# Multiplayer for Local Co-Op Games
Use this guide when you want to play with a friend on a different system for games that only support local co-op.
**Click [Here](https://evilperson1337.notion.site/Multiplayer-for-Local-Co-Op-Games-2c657c2edaf680c59975ec6b52022a2d) for a version of this guide with images & visual elements.**
Occasionally you will want to play a game with a friend on a game that does not support LDN multiplayer, and only offer local co-op (multiple controllers connected to a single console), such as with *New Super Mario Bros. U Deluxe.* Emulation solutions have developed 2 primary methods for handling these cases.
1. Netplay: Netplay lets two or more players run the same game on their own computers while sharing each other's controller inputs over the internet, so everyone sees the same game world in sync. One player hosts the session, and the others join as guests, sending their button presses back and forth to keep the gameplay coordinated.
1. This is a huge over-simplification of how it works, but gives you an idea
2. Low-Latency remote desktop solutions: Using a service like *Parsec*, the host shares his screen to a remote party with an input device connected. This device sends inputs to the host machine.
In either situation at its core, we are emulating an input device on the host machine, so the game believes 2 controllers are connected. No current Switch emulator has a Netplay offering, so we use Parsec to accomplish this for us.
### Pre-Requisites
- Eden Set Up and Fully Configured
- A [*Parsec*](https://parsec.app/) Account
- Parsec is free to use for personal, non-commercial use. For instructions on how to set up an account and install the client you should refer to the Parsec documentation on it's site.
- Parsec client installed on your machine and remote (friend's) machine
## Steps
<aside>
This guide will assume you are the one hosting the game and go over things *Parsec* specific at a high level, as their system is subject to change. Follow *Parsec's* documentation where needed.
</aside>
1. Launch Parsec on the host machine.
2. Connect to the other player in Parsec. You will know it is successful when the other player can see the host's screen.
1. If you are the one hosting the game, you will have your friend initiate the remote connection you will accept.
2. If you are joining a game, you will have to send a connection request the host will have to accept.
3. Verify that the remote player can see the screen and that there is no issues with the connection.
4. Launch Eden.
5. Navigate to *Emulation → Configure*.
6. Select the **Controls** tab.
7. Set up your controller, if necessary.
8. Select the **Player 2** tab and select the **Connect Controller** checkbox. This enables inputs from another device to be seen as a second controller.
9. Dropdown the **Input Device** and select the controller.
1. What exactly it shows up as depends on the Parsec settings.
10. Set up the remote player's controller.
11. Hit **OK** to apply the changes.
12. Launch the game you want to play and enter the co-op mode. How this works depends on the game, so you will have to look in the menus or online to find out.

View File

@@ -4,21 +4,18 @@ Use this guide to get starting using the Eden emulator.
**Click [Here](https://evilperson1337.notion.site/Eden-Quick-Start-2b057c2edaf6817b9859d8bcdb474017) for a version of this guide with images & visual elements.**
---
## Windows
### Pre-Requisites
- The [*latest C++ Redistributable*](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-supported-redistributable-version) from Microsoft.
- Eden will not even launch without it see [*Eden Fails to Launch*](./EdenFailsToLaunch.md) for more information.
- Eden will not even launch without it see [*Eden Fails to Launch*](./Troubleshoot.md) for more information.
- Firmware dumped from your console
- Keys extracted from your console
- Games dumped from your console
- Internet Connection
---
## Steps
### Steps
1. Download either the *Stable* or *Nightly* Eden application.
<aside>
@@ -44,4 +41,39 @@ Use this guide to get starting using the Eden emulator.
6. Navigate to **Tools → Install Firmware**, *Select **From Folder*** or ***From ZIP*** - depending on how your firmware is stored, navigate to where it is stored and select it.
7. Double-Click the main window to add the folder containing your games.
8. Go to *Emulation > Configure > Input* and set up your controller of choice. Click **OK** to close the dialog window.
9. Double-Click a game to run it.
9. Double-Click a game to run it.
## Steamdeck
### Pre-Requisites
- Firmware dumped from your console
- Keys extracted from your console
- Games dumped from your console
- Internet Connection
### Steps
1. Access Steam Desktop Mode.
2. Download either the *Stable* or *Nightly* Eden AppImage onto your Steam Deck and save it somewhere accessible.
<aside>
***TIP***: If you have questions about the requirements, architectures, or general information surrounding what release you need - see the [*Basics Guide*](./Basics.md) and [*Architectures Guide*](./Architectures.md).
</aside>
3. Double-Click the Eden executable to launch the program.
<aside>
***NOTE***: The first time you run the AppImage you will get a notification asking you to confirm you want to launch the program. Hit **Continue**.
</aside>
4. If you have had a different Switch emulator installed, it will detect and ask if you want to import those settings. Make your selection to close the screen.
5. Eden will now launch and notify you about missing Encryption keys. Close the dialog box by hitting **OK**.
6. Navigate to **Tools → Install Decryption Keys**, navigate to the folder containing your ***prod.keys*** file and select the file and hit **Open**.
7. Navigate to **Tools → Install Firmware →** *Select **From Folder*** or ***From ZIP*** - depending on how your firmware is stored, navigate to where it is stored and select it.
8. Double-Click the main window to add the folder containing your games.
9. Go to *Emulation > Configure > Input* and set up your controller. Click **OK** to close the dialog window.
10. Double-Click a game to run it.

View File

@@ -1,42 +0,0 @@
# Eden Quick Start
Use this guide to get starting using the Eden emulator on Steam Deck.
**Click [Here](https://evilperson1337.notion.site/Eden-Quick-Start-2b757c2edaf680d49ffdcda291a32840) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Firmware dumped from your console
- Keys extracted from your console
- Games dumped from your console
- Internet Connection
---
## Steps
1. Access Steam Desktop Mode.
2. Download either the *Stable* or *Nightly* Eden AppImage onto your Steam Deck and save it somewhere accessible.
<aside>
***TIP***: If you have questions about the requirements, architectures, or general information surrounding what release you need - see the [*Basics Guide*](./Basics.md) and [*Architectures Guide*](./Architectures.md).
</aside>
3. Double-Click the Eden executable to launch the program.
<aside>
***NOTE***: The first time you run the AppImage you will get a notification asking you to confirm you want to launch the program. Hit **Continue**.
</aside>
4. If you have had a different Switch emulator installed, it will detect and ask if you want to import those settings. Make your selection to close the screen.
5. Eden will now launch and notify you about missing Encryption keys. Close the dialog box by hitting **OK**.
6. Navigate to **Tools → Install Decryption Keys**, navigate to the folder containing your ***prod.keys*** file and select the file and hit **Open**.
7. Navigate to **Tools → Install Firmware →** *Select **From Folder*** or ***From ZIP*** - depending on how your firmware is stored, navigate to where it is stored and select it.
8. Double-Click the main window to add the folder containing your games.
9. Go to *Emulation > Configure > Input* and set up your controller. Click **OK** to close the dialog window.
10. Double-Click a game to run it.

View File

@@ -4,14 +4,35 @@ The "FAQ".
This handbook is primarily aimed at the end-user - baking useful knowledge for enhancing their emulation experience.
## Basics
- **[The Basics](Basics.md)**
- **[Quickstart](./QuickStart.md)**
- **[Run On macOS](./RunOnMacOS.md)**
- **[Audio](Audio.md)**
- **[Server hosting](ServerHosting.md)**
- **[Graphics](Graphics.md)**
- **[Platforms and Architectures](Architectures.md)**
- **[Testing](Testing.md)**
- **[Data, savefiles and storage](Storage.md)**
- **[Data, Savefiles and Storage](Storage.md)**
- **[Orphaned Profiles](Orphaned.md)**
- **[Troubleshooting](./Troubleshoot.md)**
- **[Using Amiibo](./UsingAmiibo.md)**
- **[Using Cheats](./UsingCheats.md)**
- **[Importing Saves](./ImportingSaves.md)**
- **[Add Eden to Steam ROM Manager](./AddEdenToSRM.md)**
- **[Add Games to Steam ROM Manager](./AddGamesToSRM.md)**
- **[Installing Atmosphere Mods](./InstallingAtmosphereMods.md)**
- **[Installing Updates & DLCs](./InstallingUpdatesDLC.md)**
- **[Controller Profiles](./ControllerProfiles.md)**
- **[Alter Date & Time](./AlterDateTime.md)**
## Advanced
- **[How To Access Logs](./HowToAccessLogs.md)**
- **[Gyro Controls](./GyroControls.md)**
- **[Platforms and Architectures](Architectures.md)**
- **[Server hosting](ServerHosting.md)**
- **[Command Line](CommandLine.md)**
- **[Native Application Development](Native.md)**
- **[Adding Boolean Settings Toggles](AddingBooleanToggles.md)**
- **[Adding Debug Knobs](./AddingDebugKnobs.md)**
- **[Syncthing Guide](./SyncthingGuide.md)**
- **[Testing](Testing.md)**

211
docs/user/SyncthingGuide.md Normal file
View File

@@ -0,0 +1,211 @@
# User Handbook - Backing Up/Syncing Eden Game Saves
Use this guide for when you want to configure automated backup/syncing of your Eden save files using [*Syncthing*](https://syncthing.net/).
**Click [Here](https://evilperson1337.notion.site/Backing-Up-Syncing-Eden-Game-Saves-2b357c2edaf68000b40cfab2c2c3dc0a) for a version of this guide with images & visual elements.**
### Pre-Requisites
- Eden already installed, configured, and functioning.
- Devices to run Syncthing on.
- Ability to allow a program to communicate through the firewall of your device.
## Introduction
<aside>
***WARNING***: You should manually back up your save files before proceeding with this guide. If you incorrectly perform the steps, you risk losing them!
</aside>
- While this is a de-centralized model without the concepts of a Server/Client, Parent/Child, etc. - For the purposes of these guides, we will borrow from this models terminology to avoid sync conflicts and potential data loss. After the initial setup, all the devices in the sync network are equals and can push & pull files from any other device.
- In order for this to work, you should get all of the save files in Eden in the save folder on the Parent.
- If you need help doing that, see the ***Importing Saves into Eden*** guide for the platform you elect to act as the Parent, and delete the save files on the "Child" devices.
### Terminology
- **Sync Network**: All the devices configured in *Syncthing* to push/pull files.
- **Parent**: This will be the device that you elect to push files to the other devices. There can only be one here initially in order to avoid sync conflicts.
- **Child**: All the other devices added to the Sync Network. These devices will pull files from the Parent.
## Overview
Rather than giving a breakdown of all the platforms and configurations, those will be in the platforms specific guides - this will serve as a general overview of Syncthing.
### What is Syncthing Anyway?
Syncthing is a continuous file synchronization program (in the laymans - make sure 2 or more systems with the same files are always up to date). This is perfect for game saves where we would want to play on 1 device, save our game, and then continue playing it on another device. This technology is what Epic/Steam/etc. use to allow you to do this on games run through their respective services. Syncthing is an open source implementation of this technology that you control, rather than relying on a 3rd party. This has a few key benefits, most notably - better security, privacy, and speed (when on your LAN).
### What are some common issues?
Syncthing is fairly robust and doesnt have many issues luckily, but there are some things you should watch out for (almost all of them a user issue).
- Sync conflicts
- If for whatever reason you update the same file on 2 different machines, the system does not know which updated file is considered the one to sync across. This results in a ***sync conflict*** where it may not sync the files as you would expect. Worst case scenario, this can result in your save progress being lost if you are not careful. When one of these occurs, it will create a copy of the file and store it with a specific name, like this example, *Paper Mario.sync-conflict-20251102-072925-TZBBN6S.srm.* To resolve this, you must remove the other files and remove the *.sync-conflict-<TIMESTAMP>-<Syncthing Device ID>* from the file name of the file you want to keep.
- Accidental Deletions
- If you delete a file from one of the devices, it will also remove the file on the other devices when they perform a sync so be careful when doing this.
## Windows
### Pre-Requisites
- Eden already installed, configured, and functioning.
- Ability to allow a program to communicate through the firewall in Windows.
- Ability to extract archive (.zip/.7z/.rar) files.
### Steps
<aside>
***WARNING***: You should manually back up your save files before proceeding with this guide. If you incorrectly perform the steps, you risk losing them!
</aside>
#### Downloading and Installing *Syncthing*
1. Download [*Syncthing Tray*](https://martchus.github.io/syncthingtray/#downloads-section).
1. While it is available as a command line interface, for most people I would recommend *Syncthing Tray* on Windows. For most people here, you would download the **64-bit (Intel/AMD)** version.
2. Open the downloaded archive and extract the **syncthingtray.exe** to wherever you want to store the executable.
3. Double-Click the application to run it, select the **Start guided setup** on the splash screen that appears and press **Next**.
<aside>
***NOTE***: You may get a Windows Defender Smart Screen pop up, this is a known thing, just accept and run anyway.
</aside>
4. It will then look for an existing Syncthing instance to pull settings from, but will likely fail to do so if you are here. Regardless, select the **Yes, continue configuration** option.
5. Select ***Start Syncthing application that is built into Syncthing Tray***, this means it will use a built in Syncthing executable rather than relying on an externally provided one. Press **Next** to continue.
6. Check the box to start Syncthing Tray on login - as the name implies, this means the program will run automatically whenever you log onto the computer. Press Next to continue.
7. You will now be presented with a confirmation window with your selections, confirm they are what you want and hit **Apply** to continue.
8. You will now be prompted with a confirmation window and a message to allow it through the firewall. Allow the access through the firewall to close that pop up. The confirmation screen has a QR code and the devices identifier - you will need one of these to add other devices to the sync system.
9. *Syncthing/Syncthing Tray* are now installed.
#### Configuring this Machine as a Parent
Use this when you want to set this machine as the initial source of truth (push files out to all the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing.**
2. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
3. Well start by adding the folder with our save files that we want to sync by Pressing **+ Add Folder**.
4. A pop-up window will appear, fill in the Folder label field with whatever you want to call it, like Switch Saves.
5. Enter the Full folder path to where your save files are stored on this machine.
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
6. Ignore the other tabs for now and hit **Save**.
7. The folder is now ready to be shared with other devices.
#### Configuring this Machine as a Child
Use this when you want to set this machine up as a child (pull files from the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Install Syncthing Tray on the client device following the section above. Copy the childs ID and store it so it is accessible to the Parent.
2. ***ON THE PARENT***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already**.**
3. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
4. Navigate down to **+ Add Remote Device**, we are going to add our Child device, so I hope you have its ID handy. If not, go back and get it.
5. Add the ID and Name the device, the device may appear as a **nearby device**, in which case you can just click it to pre-populate the Device ID.
6. Click the **Sharing** Tab, and check the box next to the folder you set up on the Parent (Switch Saves in my case). Hit **Save.**
7. We are done with the parent, now **SWITCH OVER TO THE CHILD.**
8. ***ON THE CHILD***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already**.**
9. You should now see a connection request from the parent. Hit **+ Add Device** to add the device.
10. Hit **Save** to finish adding the device.
11. That pop-up will close and you will get notification that the device wants to share a folder now. Hit **Add.**
12. Enter the path to the save folder in Eden and hit **Save.**
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
13. *Syncthing* will now pull all the files from the Parent and store them in your local save directory. At this point the files are in sync and alterations to one will affect the other and both can be considered “*Parents*” for other devices you want to add. Repeat these steps for as many devices you want.
## Linux
### Pre-Requisites
- Eden already installed, configured, and functioning.
### Step 1: Downloading and Installing Syncthing
<aside>
***WARNING***: You should manually back up your save files before proceeding with this guide. If you incorrectly perform the steps, you risk losing them!
</aside>
<aside>
***NOTE***: I am using Linux Mint for my guides, but the steps should translate pretty easily to your distro. I ***hope*** that if you are running Linux you know the basic operations. Steam Deck users should follow the guide specific to that platform.
</aside>
1. Download [*Syncthing Tray*](https://flathub.org/en/apps/io.github.martchus.syncthingtray) from the Flatpak store.
2. Launch *Syncthing Tray* to run it, select the **Start guided setup** on the splash screen that appears and press **Next**.
3. It will then look for an existing *Syncthing* instance to pull settings from, but will likely fail to do so if you are here. Regardless, select the **Yes, continue configuration** option.
4. Select ***Start installed Syncthing application via Syncthing Tray***, this means it will use a built in Syncthing executable rather than relying on an externally provided one. Press **Next** to continue.
5. You will now be presented with a confirmation window with your selections, confirm they are what you want and hit **Apply** to continue.
6. You will now be prompted with a confirmation window that has a QR code and the devices identifier - you will need one of these to add other devices to the sync system.
7. *Syncthing/Syncthing Tray* are now installed. Press Finish to close the pop up.
<aside>
***NOTE***: By default due to flatpak sandboxing limitations, Syncthing Tray will not run automatically on login. You can get around this by following the [*instructions here*](https://github.com/flathub/io.github.martchus.syncthingtray).
</aside>
### Step 2: Configuring this Machine as a Parent
Use this when you want to set this machine as the initial source of truth (push files out to all the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing.**
1. If you dont have a taskbar in your distro, you can also reach it directly by opening a web browser to: *http://127.0.0.1:8384/.*
2. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
3. Well start by adding the folder with our save files that we want to sync by Pressing **+ Add Folder**.
4. A pop-up window will appear, fill in the Folder label field with whatever you want to call it, like Switch Saves.
5. Enter the Full folder path to where your save files are stored on this machine.
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
6. Ignore the other tabs for now and hit **Save**.
7. The folder is now ready to be shared with other devices.
### Step 3: Configuring this Machine as a Child
Use this when you want to set this machine up as a child (pull files from the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Install Syncthing Tray on the client device following the section above. Copy the childs ID and store it so it is accessible to the Parent.
2. ***ON THE PARENT***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already**.**
3. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
4. Navigate down to **+ Add Remote Device**, we are going to add our Child device, so I hope you have its ID handy. If not, go back and get it.
5. Add the ID and Name the device, the device may appear as a **nearby device**, in which case you can just click it to pre-populate the Device ID.
6. Click the **Sharing** Tab, and check the box next to the folder you set up on the Parent (Switch Saves in my case). Hit **Save.**
7. We are done with the parent, now **SWITCH OVER TO THE CHILD.**
8. ***ON THE CHILD***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already.
9. You should now see a connection request pop-up from the parent. Hit **+ Add Device** to add the device.
10. Hit **Save** to finish adding the device.
11. That pop-up will close and you will get notification that the device wants to share a folder now. Hit **Add.**
12. Enter the path to the save folder in Eden and hit **Save.**
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
13. *Syncthing* will now pull all the files from the Parent and store them in your local save directory. At this point the files are in sync and alterations to one will affect the other and both can be considered “*Parents*” for other devices you want to add. Repeat these steps for as many devices you want.

View File

@@ -1,66 +0,0 @@
# Backing Up/Syncing Eden Game Saves
Use this guide for when you want to configure automated backup/syncing of your Eden save files using [*Syncthing*](https://syncthing.net/).
**Click [Here](https://evilperson1337.notion.site/Backing-Up-Syncing-Eden-Game-Saves-2b357c2edaf68000b40cfab2c2c3dc0a) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Eden already installed, configured, and functioning.
- Devices to run Syncthing on.
- Ability to allow a program to communicate through the firewall of your device.
---
## Platform Specific Setup Guides
- [*Windows*](./SyncthingGuide_Windows.md)
- *MacOS (Coming Soon)*
- *Steam Deck (Coming Soon)*
- *Android (Coming Soon)*
- [*Linux*](./SyncthingGuide_Linux.md)
---
## A Few Notes Before You Proceed
<aside>
***WARNING***: You should manually back up your save files before proceeding with this guide. If you incorrectly perform the steps, you risk losing them!
</aside>
- While this is a de-centralized model without the concepts of a Server/Client, Parent/Child, etc. - For the purposes of these guides, we will borrow from this models terminology to avoid sync conflicts and potential data loss. After the initial setup, all the devices in the sync network are equals and can push & pull files from any other device.
- In order for this to work, you should get all of the save files in Eden in the save folder on the Parent.
- If you need help doing that, see the ***Importing Saves into Eden*** guide for the platform you elect to act as the Parent, and delete the save files on the "Child" devices.
### Terminology
- **Sync Network**: All the devices configured in *Syncthing* to push/pull files.
- **Parent**: This will be the device that you elect to push files to the other devices. There can only be one here initially in order to avoid sync conflicts.
- **Child**: All the other devices added to the Sync Network. These devices will pull files from the Parent.
---
## Overview
Rather than giving a breakdown of all the platforms and configurations, those will be in the platforms specific guides - this will serve as a general overview of Syncthing.
---
### What is Syncthing Anyway?
Syncthing is a continuous file synchronization program (in the laymans - make sure 2 or more systems with the same files are always up to date). This is perfect for game saves where we would want to play on 1 device, save our game, and then continue playing it on another device. This technology is what Epic/Steam/etc. use to allow you to do this on games run through their respective services. Syncthing is an open source implementation of this technology that you control, rather than relying on a 3rd party. This has a few key benefits, most notably - better security, privacy, and speed (when on your LAN).
---
### What are some common issues?
Syncthing is fairly robust and doesnt have many issues luckily, but there are some things you should watch out for (almost all of them a user issue).
- Sync conflicts
- If for whatever reason you update the same file on 2 different machines, the system does not know which updated file is considered the one to sync across. This results in a ***sync conflict*** where it may not sync the files as you would expect. Worst case scenario, this can result in your save progress being lost if you are not careful. When one of these occurs, it will create a copy of the file and store it with a specific name, like this example, *Paper Mario.sync-conflict-20251102-072925-TZBBN6S.srm.* To resolve this, you must remove the other files and remove the *.sync-conflict-<TIMESTAMP>-<Syncthing Device ID>* from the file name of the file you want to keep.
- Accidental Deletions
- If you delete a file from one of the devices, it will also remove the file on the other devices when they perform a sync so be careful when doing this.

View File

@@ -1,96 +0,0 @@
# Backing Up/Syncing Eden Game Saves
Use this guide for when you want to configure automated backup/syncing of your Eden save files using [*Syncthing*](https://syncthing.net/) on Linux.
**Click [Here](https://evilperson1337.notion.site/Backing-Up-Syncing-Eden-Game-Saves-2b057c2edaf680fc8a28eba5a05fd7a3) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Read the [*Syncthing General Guide*](./SyncthingGuide_General.md).
- Eden already installed, configured, and functioning.
---
## Steps
<aside>
***WARNING***: You should manually back up your save files before proceeding with this guide. If you incorrectly perform the steps, you risk losing them!
</aside>
<aside>
***NOTE***: I am using Linux Mint for my guides, but the steps should translate pretty easily to your distro. I ***hope*** that if you are running Linux you know the basic operations. Steam Deck users should follow the guide specific to that platform.
</aside>
### Downloading and Installing Syncthing
1. Download [*Syncthing Tray*](https://flathub.org/en/apps/io.github.martchus.syncthingtray) from the Flatpak store.
2. Launch *Syncthing Tray* to run it, select the **Start guided setup** on the splash screen that appears and press **Next**.
3. It will then look for an existing *Syncthing* instance to pull settings from, but will likely fail to do so if you are here. Regardless, select the **Yes, continue configuration** option.
4. Select ***Start installed Syncthing application via Syncthing Tray***, this means it will use a built in Syncthing executable rather than relying on an externally provided one. Press **Next** to continue.
5. You will now be presented with a confirmation window with your selections, confirm they are what you want and hit **Apply** to continue.
6. You will now be prompted with a confirmation window that has a QR code and the devices identifier - you will need one of these to add other devices to the sync system.
7. *Syncthing/Syncthing Tray* are now installed. Press Finish to close the pop up.
<aside>
***NOTE***: By default due to flatpak sandboxing limitations, Syncthing Tray will not run automatically on login. You can get around this by following the [*instructions here*](https://github.com/flathub/io.github.martchus.syncthingtray).
</aside>
---
### Configuring this Machine as a Parent
Use this when you want to set this machine as the initial source of truth (push files out to all the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing.**
1. If you dont have a taskbar in your distro, you can also reach it directly by opening a web browser to: *http://127.0.0.1:8384/.*
2. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
3. Well start by adding the folder with our save files that we want to sync by Pressing **+ Add Folder**.
4. A pop-up window will appear, fill in the Folder label field with whatever you want to call it, like Switch Saves.
5. Enter the Full folder path to where your save files are stored on this machine.
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
6. Ignore the other tabs for now and hit **Save**.
7. The folder is now ready to be shared with other devices.
---
### Configuring this Machine as a Child
Use this when you want to set this machine up as a child (pull files from the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Install Syncthing Tray on the client device following the section above. Copy the childs ID and store it so it is accessible to the Parent.
2. ***ON THE PARENT***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already**.**
3. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
4. Navigate down to **+ Add Remote Device**, we are going to add our Child device, so I hope you have its ID handy. If not, go back and get it.
5. Add the ID and Name the device, the device may appear as a **nearby device**, in which case you can just click it to pre-populate the Device ID.
6. Click the **Sharing** Tab, and check the box next to the folder you set up on the Parent (Switch Saves in my case). Hit **Save.**
7. We are done with the parent, now **SWITCH OVER TO THE CHILD.**
8. ***ON THE CHILD***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already.
9. You should now see a connection request pop-up from the parent. Hit **+ Add Device** to add the device.
10. Hit **Save** to finish adding the device.
11. That pop-up will close and you will get notification that the device wants to share a folder now. Hit **Add.**
12. Enter the path to the save folder in Eden and hit **Save.**
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
13. *Syncthing* will now pull all the files from the Parent and store them in your local save directory. At this point the files are in sync and alterations to one will affect the other and both can be considered “*Parents*” for other devices you want to add. Repeat these steps for as many devices you want.

View File

@@ -1,95 +0,0 @@
# Backing Up/Syncing Eden Game Saves
Use this guide for when you want to configure automated backup/syncing of your Eden save files using [*Syncthing](https://syncthing.net/)* on Windows.
**Click [Here](https://evilperson1337.notion.site/Backing-Up-Syncing-Eden-Game-Saves-2b057c2edaf680f5aa9cd1c4f97121ce) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Read the [*Syncthing General Guide*](./SyncthingGuide_General.md).
- Eden already installed, configured, and functioning.
- Ability to allow a program to communicate through the firewall in Windows.
- Ability to extract archive (.zip/.7z/.rar) files.
---
## Steps
<aside>
***WARNING***: You should manually back up your save files before proceeding with this guide. If you incorrectly perform the steps, you risk losing them!
</aside>
### Downloading and Installing *Syncthing*
1. Download [*Syncthing Tray*](https://martchus.github.io/syncthingtray/#downloads-section).
1. While it is available as a command line interface, for most people I would recommend *Syncthing Tray* on Windows. For most people here, you would download the **64-bit (Intel/AMD)** version.
2. Open the downloaded archive and extract the **syncthingtray.exe** to wherever you want to store the executable.
3. Double-Click the application to run it, select the **Start guided setup** on the splash screen that appears and press **Next**.
<aside>
***NOTE***: You may get a Windows Defender Smart Screen pop up, this is a known thing, just accept and run anyway.
</aside>
4. It will then look for an existing Syncthing instance to pull settings from, but will likely fail to do so if you are here. Regardless, select the **Yes, continue configuration** option.
5. Select ***Start Syncthing application that is built into Syncthing Tray***, this means it will use a built in Syncthing executable rather than relying on an externally provided one. Press **Next** to continue.
6. Check the box to start Syncthing Tray on login - as the name implies, this means the program will run automatically whenever you log onto the computer. Press Next to continue.
7. You will now be presented with a confirmation window with your selections, confirm they are what you want and hit **Apply** to continue.
8. You will now be prompted with a confirmation window and a message to allow it through the firewall. Allow the access through the firewall to close that pop up. The confirmation screen has a QR code and the devices identifier - you will need one of these to add other devices to the sync system.
9. *Syncthing/Syncthing Tray* are now installed.
---
### Configuring this Machine as a Parent
Use this when you want to set this machine as the initial source of truth (push files out to all the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing.**
2. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
3. Well start by adding the folder with our save files that we want to sync by Pressing **+ Add Folder**.
4. A pop-up window will appear, fill in the Folder label field with whatever you want to call it, like Switch Saves.
5. Enter the Full folder path to where your save files are stored on this machine.
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
6. Ignore the other tabs for now and hit **Save**.
7. The folder is now ready to be shared with other devices.
---
### Configuring this Machine as a Child
Use this when you want to set this machine up as a child (pull files from the other devices). Afterwards they will all be equal partners, not a parent/child relationship, this just helps with initial setup.
1. Install Syncthing Tray on the client device following the section above. Copy the childs ID and store it so it is accessible to the Parent.
2. ***ON THE PARENT***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already**.**
3. You will now have a browser window open up to a web GUI to configure *Syncthing*. You will get a pop up about allowing anonymous usage and setting a password, make your selections to close them.
4. Navigate down to **+ Add Remote Device**, we are going to add our Child device, so I hope you have its ID handy. If not, go back and get it.
5. Add the ID and Name the device, the device may appear as a **nearby device**, in which case you can just click it to pre-populate the Device ID.
6. Click the **Sharing** Tab, and check the box next to the folder you set up on the Parent (Switch Saves in my case). Hit **Save.**
7. We are done with the parent, now **SWITCH OVER TO THE CHILD.**
8. ***ON THE CHILD***: Right-Click the *Syncthing* Tray icon in your taskbar and select **Open Syncthing** if it is not open already**.**
9. You should now see a connection request from the parent. Hit **+ Add Device** to add the device.
10. Hit **Save** to finish adding the device.
11. That pop-up will close and you will get notification that the device wants to share a folder now. Hit **Add.**
12. Enter the path to the save folder in Eden and hit **Save.**
<aside>
***TIP***: The easiest way to do this would be to open Eden, right-click a game that has a save, hit ***Open Save Data Location,*** and then go up 1 directory. It should contain folders with the TitleID of your games.
It should look similar to this: ..*\nand\user\save\0000000000000000\EC573727F509799675F6E5112C581D7E*
</aside>
13. *Syncthing* will now pull all the files from the Parent and store them in your local save directory. At this point the files are in sync and alterations to one will affect the other and both can be considered “*Parents*” for other devices you want to add. Repeat these steps for as many devices you want.

View File

@@ -2,6 +2,11 @@
While this is mainly aimed for testers - normal users can benefit from these guidelines to make their life easier when trying to outline and/or report an issue.
## Getting logs
In order to get more information, you can find logs in the following location:
## How to Test a PR Against the Based Master When Issues Arise
When you're testing a pull request (PR) and encounter unexpected behavior, it's important to determine whether the issue was introduced by the PR or if it already exists in the base code. To do this, compare the behavior against the based master branch.

View File

@@ -6,3 +6,4 @@ While most of the links mentioned in this guide are relatively "safe"; we urge u
- [Nightly Eden builds](https://github.com/pflyly/eden-nightly)
- [NixOS Eden Flake](https://github.com/Grantimatter/eden-flake)
- [ES-DE Frontend Support](https://github.com/GlazedBelmont/es-de-android-custom-systems)

View File

@@ -1,10 +1,22 @@
# Eden Fails to Launch and Does Not Leave Any Logs
# User Handbook - Troubleshooting
## Vulkan initialization error
- Ensure you have the latest drivers
- Uninstall old drivers, for Windows you can use [Display Driver Uninstaller](https://www.guru3d.com/download/display-driver-uninstaller-download/)
- Change backend manually in the settings file (set it from `0` to `1` or viceversa).
- Disconnect your second monitor, if any
## This mod only works on an Emulator
- Enable RNG seed
- Set RNG seed to 0
## Eden Fails to Launch and Does Not Leave Any Logs
**Click [Here](https://evilperson1337.notion.site/Windows-Eden-Fails-to-Launch-and-Does-Not-Leave-Any-Logs-2b057c2edaf68156b640cf1ac549870a) for a version of this guide with images & visual elements.**
---
## Error Details
### Error Details
*Behavior*: Program appears not to launch or exits immediately without leaving any log entries.
*Platform(s) Affected*:
@@ -32,13 +44,11 @@ Faulting package-relative application ID:
---
## Causes
### Causes
<aside>
### Issue 1: Missing C++ Redistributable
---
#### Issue 1: Missing C++ Redistributable
*Eden requires the latest C++ redistributable from Microsoft in order to run. Like many other programs, it relies on aspects and libraries included in this runtime, without it - the program cannot run.*
@@ -50,9 +60,7 @@ Faulting package-relative application ID:
<aside>
### Issue 2: Corrupted System Files
---
#### Issue 2: Corrupted System Files
*A corruption of necessary system files can cause odd behaviors when Eden tries to access them. It is a very rare case and you would likely see other programs misbehaving if this is what your issue is, but you can try if you have no other options.*
@@ -88,4 +96,4 @@ Faulting package-relative application ID:
8. Reboot your computer.
9. Launch Eden and verify it is now working.
</aside>
</aside>

View File

@@ -1,10 +1,14 @@
# Using Amiibo with Eden
# User Handbook - Using Amiibo
Use this guide when you want to load Amiibo into your games for use with the Eden emulator.
**Click [Here](https://evilperson1337.notion.site/Using-Amiibo-with-Eden-2b057c2edaf681b1b28ec6be600c6d3e) for a version of this guide with images & visual elements.**
---
## Android
TBD
## Desktop
### Pre-Requisites
@@ -17,9 +21,7 @@ Use this guide when you want to load Amiibo into your games for use with the Ede
</aside>
## Steps
---
### Steps
1. Launch Eden and launch the game you want to load Amiibo for.
<aside>
@@ -40,4 +42,4 @@ Use this guide when you want to load Amiibo into your games for use with the Ede
</aside>
5. Upon loading a valid file, you will get a confirmation screen and your bonus content will be unlocked/functionality activated.
6. Repeat with any other Amiibo you want to use.
6. Repeat with any other Amiibo you want to use.

View File

@@ -1,10 +1,10 @@
# Using Cheats with Eden
# User Handbook - Using Cheats
Use this guide when you want to add cheats into a game to alter gameplay for use with the Eden emulator.
**Click [Here](https://evilperson1337.notion.site/Using-Cheats-with-Eden-2b057c2edaf6818fab66c276e2304bb4) for a version of this guide with images & visual elements.**
---
## Android
### Pre-Requisites
@@ -21,11 +21,7 @@ Another option would be to launch the game in Eden and close it - then go into t
</aside>
---
## Steps
### Configuring a Cheat
### Step 1: Configuring a Cheat
1. Create a directory somewhere accessible on your phone with the name of the cheat. The name you choose only affects how it is displayed in Eden.
2. Create a directory inside of this folder called **cheats.**
@@ -52,9 +48,7 @@ Another option would be to launch the game in Eden and close it - then go into t
2. You should now see the cheat appear in the **Add-ons** screen.
3. Launch the game and confirm that the cheat is applied.
---
### Multiple Cheats
### Step 2: Multiple Cheats
In order to install multiple cheats, you must repeat the steps above with the new cheat, creating a new directory with the name of the cheat and cheats directory. You **cannot** install multiple cheats with a single file.
@@ -79,9 +73,7 @@ Community Member [Ninjistix](https://github.com/Ninjistix) created a utility (Wi
040E0000 0048A818 52800028
```
---
### Enabling/Disabling Cheats
### Step 3: Enabling/Disabling Cheats
Cheats are enabled by default, but can be disabled so they dont affect gameplay fairly easily using the game properties.
@@ -89,4 +81,76 @@ Cheats are enabled by default, but can be disabled so they dont affect gamepl
2. Scroll down on the properties until you see **Add-ons**, select this option.
3. *Select/Deselect* the name of the cheat you wish to enable/disable.
4. Click **OK** to close the window.
5. Launch the game to confirm the cheat is/is not active.
5. Launch the game to confirm the cheat is/is not active.
## Desktop
### Pre-Requisites
- Eden Emulator fully set up and configured
- The cheat(s) you want to apply
- The **Build ID** of the game.
<aside>
***TIP***: The easiest way I have found to find the Build ID is by Right-Clicking the game **IN RYUJINX** and hitting **Manage Cheats**. Your Build ID will be displayed at the top.
Another option would be to launch the game in Eden and close it - then go into the log and look for a line like this - the first 16 characters if your Build ID. **Make sure that it is the MAIN line**.
`[ 27.098382] Loader <Info> core/file_sys/patch_manager.cpp:HasNSOPatch:304: Querying NSO patch existence for build_id=AEE6DCCC06D9C05B42061E2019123A61, name=main`
</aside>
### Step 1: Configuring a Cheat
1. Copy the Hex Code of the cheat into a text file, optionally with the cheat name at the beginning like the example. Here this code will set the timer to 999 in *New Super Mario Bros. U Deluxe.*
```bash
[Time = 999]
58000000 00C88A70
78001000 00000090
64000000 00000000 003E6F00
```
1. Save the file as a **txt** file with the Build ID of the game. For my example, my Build ID is **AEE6DCCC06D9C05B** so my file would be `AEE6DCCC06D9C05B.txt`.
2. Launch Eden and wait for the program to load.
3. *Right-Click* the game in Eden and select **Open Mod Data Location**. A file explorer window should appear.
4. Create a folder inside of the file explorer window with the name of the cheat. This name does not matter and only affects how it appears in the game properties inside of Eden.
5. Navigate inside of this folder and create another folder called **cheats.**
6. Move the txt file you created earlier into this **cheats** folder. (e.g. `<mod_location>/Time 999/cheats/AEE6DCCC06D9C05B.txt` )
7. Go back to Eden and *right-click* the game. Select *Configure Game* and you should now see the cheat you created appear in the **Add-Ons** section with the name of the folder from step 6.
8. Launch the game to verify that the cheat is enabled.
### Step 2: Multiple Cheats
In order to install multiple cheats, you must repeat the steps above with the new cheat, creating a new directory with the name of the cheat and cheats directory. You **cannot** install multiple cheats with a single file.
Community Member [Ninjistix](https://github.com/Ninjistix) created a utility (Windows or anything that can run Python) that can take a file with multiple cheats and create the files/structure for you with a provided Build ID. To download and run it, see the [GitHub Project](https://github.com/Ninjistix/nxCheat_Splitter) page.
**Example cheat TXT file with multiple cheats. It must be in this format to work:**
```
[Super Mario Bros. Wonder - Various] <- Optional
[♯ 1. Always Star Power]
040E0000 00880580 52800035
[♯ 2. Star Power + Bubble Mode (Invincible)]
040E0000 00880580 52800075
[♯ 3. Can Fast Travel to Any Course and World]
040E0000 00935E10 52800036
040E0000 0048A528 52800028
040E0000 005D9F58 52800028
[♯ 4. Got All Top of Flag Poles]
040E0000 0048A818 52800028
```
### Step 3: Enabling/Disabling Cheats
Cheats are enabled by default, but can be disabled so they dont affect gameplay fairly easily using the game properties.
1. *Right-Click* the game and select *Configure Game*.
2. In the **Add-Ons** section, locate the cheat you wish to enable.
3. *Select/Deselect* the name of the cheat you wish to enable/disable.
4. Click **OK** to close the window.
5. Launch the game to confirm the cheat is/is not active.

View File

@@ -1,83 +0,0 @@
# Using Cheats with Eden
Use this guide when you want to add cheats into a game to alter gameplay for use with the Eden emulator.
**Click [Here](https://evilperson1337.notion.site/Using-Cheats-with-Eden-2b057c2edaf6818fab66c276e2304bb4) for a version of this guide with images & visual elements.**
---
### Pre-Requisites
- Eden Emulator fully set up and configured
- The cheat(s) you want to apply
- The **Build ID** of the game.
<aside>
***TIP***: The easiest way I have found to find the Build ID is by Right-Clicking the game **IN RYUJINX** and hitting **Manage Cheats**. Your Build ID will be displayed at the top.
Another option would be to launch the game in Eden and close it - then go into the log and look for a line like this - the first 16 characters if your Build ID. **Make sure that it is the MAIN line**.
`[ 27.098382] Loader <Info> core/file_sys/patch_manager.cpp:HasNSOPatch:304: Querying NSO patch existence for build_id=AEE6DCCC06D9C05B42061E2019123A61, name=main`
</aside>
## Steps
---
### Configuring a Cheat
1. Copy the Hex Code of the cheat into a text file, optionally with the cheat name at the beginning like the example. Here this code will set the timer to 999 in *New Super Mario Bros. U Deluxe.*
```bash
[Time = 999]
58000000 00C88A70
78001000 00000090
64000000 00000000 003E6F00
```
1. Save the file as a **txt** file with the Build ID of the game. For my example, my Build ID is **AEE6DCCC06D9C05B** so my file would be `AEE6DCCC06D9C05B.txt`.
2. Launch Eden and wait for the program to load.
3. *Right-Click* the game in Eden and select **Open Mod Data Location**. A file explorer window should appear.
4. Create a folder inside of the file explorer window with the name of the cheat. This name does not matter and only affects how it appears in the game properties inside of Eden.
5. Navigate inside of this folder and create another folder called **cheats.**
6. Move the txt file you created earlier into this **cheats** folder. (e.g. `<mod_location>/Time 999/cheats/AEE6DCCC06D9C05B.txt` )
7. Go back to Eden and *right-click* the game. Select *Configure Game* and you should now see the cheat you created appear in the **Add-Ons** section with the name of the folder from step 6.
8. Launch the game to verify that the cheat is enabled.
### Multiple Cheats
In order to install multiple cheats, you must repeat the steps above with the new cheat, creating a new directory with the name of the cheat and cheats directory. You **cannot** install multiple cheats with a single file.
Community Member [Ninjistix](https://github.com/Ninjistix) created a utility (Windows or anything that can run Python) that can take a file with multiple cheats and create the files/structure for you with a provided Build ID. To download and run it, see the [GitHub Project](https://github.com/Ninjistix/nxCheat_Splitter) page.
**Example cheat TXT file with multiple cheats. It must be in this format to work:**
```
[Super Mario Bros. Wonder - Various] <- Optional
[♯ 1. Always Star Power]
040E0000 00880580 52800035
[♯ 2. Star Power + Bubble Mode (Invincible)]
040E0000 00880580 52800075
[♯ 3. Can Fast Travel to Any Course and World]
040E0000 00935E10 52800036
040E0000 0048A528 52800028
040E0000 005D9F58 52800028
[♯ 4. Got All Top of Flag Poles]
040E0000 0048A818 52800028
```
---
### Enabling/Disabling Cheats
Cheats are enabled by default, but can be disabled so they dont affect gameplay fairly easily using the game properties.
1. *Right-Click* the game and select *Configure Game*.
2. In the **Add-Ons** section, locate the cheat you wish to enable.
3. *Select/Deselect* the name of the cheat you wish to enable/disable.
4. Click **OK** to close the window.
5. Launch the game to confirm the cheat is/is not active.

View File

@@ -1,8 +1,8 @@
{
"ffmpeg": {
"repo": "FFmpeg/FFmpeg",
"sha": "ddf443f1e9",
"hash": "ded1c313843f23805102565bd3ca92602fb9c2951e059ca5e1a486ab3ef7d589acccf3cde05c5ff0cfc5199c3a261dccb4d2a93254e585824850696fb41a292e",
"sha": "5e56937b74",
"hash": "9ab0457dcd6ce6359b5053c1662f57910d332f68ca0cca9d4134d858464840917027374de3d97e0863c3a7daaea2fe4f4cd17d1c6d8e7f740f4ad91e71c2932b",
"bundled": true
},
"ffmpeg-ci": {
@@ -10,7 +10,7 @@
"package": "FFmpeg",
"name": "ffmpeg",
"repo": "crueter-ci/FFmpeg",
"version": "8.0-ddf443f1e9",
"version": "8.0.1-5e56937b74",
"min_version": "4.1"
}
}

View File

@@ -1,5 +1,5 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-25.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShellNoCC {

View File

@@ -18,6 +18,7 @@ import android.content.IntentFilter
import android.content.res.Configuration
import android.graphics.Rect
import android.graphics.drawable.Icon
import android.hardware.input.InputManager
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
@@ -63,11 +64,12 @@ import kotlin.math.roundToInt
import org.yuzu.yuzu_emu.utils.ForegroundService
import androidx.core.os.BundleCompat
class EmulationActivity : AppCompatActivity(), SensorEventListener {
class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager.InputDeviceListener {
private lateinit var binding: ActivityEmulationBinding
var isActivityRecreated = false
private lateinit var nfcReader: NfcReader
private lateinit var inputManager: InputManager
private var touchDownTime: Long = 0
private val maxTapDuration = 500L
@@ -140,6 +142,9 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
nfcReader = NfcReader(this)
nfcReader.initialize()
inputManager = getSystemService(INPUT_SERVICE) as InputManager
inputManager.registerInputDeviceListener(this, null)
foregroundService = Intent(this, ForegroundService::class.java)
startForegroundService(foregroundService)
@@ -206,9 +211,9 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
override fun onDestroy() {
super.onDestroy()
inputManager.unregisterInputDeviceListener(this)
stopForegroundService(this)
NativeLibrary.playTimeManagerStop()
}
override fun onUserLeaveHint() {
@@ -244,8 +249,10 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
val isPhysicalKeyboard = event.source and InputDevice.SOURCE_KEYBOARD == InputDevice.SOURCE_KEYBOARD &&
event.device?.isVirtual == false
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK &&
event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD &&
val isControllerInput = event.source and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK ||
event.source and InputDevice.SOURCE_GAMEPAD == InputDevice.SOURCE_GAMEPAD
if (!isControllerInput &&
event.source and InputDevice.SOURCE_MOUSE != InputDevice.SOURCE_MOUSE &&
!isPhysicalKeyboard
) {
@@ -256,12 +263,18 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
return super.dispatchKeyEvent(event)
}
if (isControllerInput && event.action == KeyEvent.ACTION_DOWN) {
notifyControllerInput()
}
return InputHandler.dispatchKeyEvent(event)
}
override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean {
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK &&
event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD &&
val isControllerInput = event.source and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK ||
event.source and InputDevice.SOURCE_GAMEPAD == InputDevice.SOURCE_GAMEPAD
if (!isControllerInput &&
event.source and InputDevice.SOURCE_KEYBOARD != InputDevice.SOURCE_KEYBOARD &&
event.source and InputDevice.SOURCE_MOUSE != InputDevice.SOURCE_MOUSE
) {
@@ -277,9 +290,54 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
return true
}
if (isControllerInput) {
notifyControllerInput()
}
return InputHandler.dispatchGenericMotionEvent(event)
}
private fun notifyControllerInput() {
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.fragment_container) as? NavHostFragment
val emulationFragment =
navHostFragment?.childFragmentManager?.fragments?.firstOrNull() as? org.yuzu.yuzu_emu.fragments.EmulationFragment
emulationFragment?.onControllerInputDetected()
}
private fun isGameController(deviceId: Int): Boolean {
val device = InputDevice.getDevice(deviceId) ?: return false
val sources = device.sources
return sources and InputDevice.SOURCE_GAMEPAD == InputDevice.SOURCE_GAMEPAD ||
sources and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK
}
override fun onInputDeviceAdded(deviceId: Int) {
if (isGameController(deviceId)) {
InputHandler.updateControllerData()
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.fragment_container) as? NavHostFragment
val emulationFragment =
navHostFragment?.childFragmentManager?.fragments?.firstOrNull() as? org.yuzu.yuzu_emu.fragments.EmulationFragment
emulationFragment?.onControllerConnected()
}
}
override fun onInputDeviceRemoved(deviceId: Int) {
InputHandler.updateControllerData()
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.fragment_container) as? NavHostFragment
val emulationFragment =
navHostFragment?.childFragmentManager?.fragments?.firstOrNull() as? org.yuzu.yuzu_emu.fragments.EmulationFragment
emulationFragment?.onControllerDisconnected()
}
override fun onInputDeviceChanged(deviceId: Int) {
if (isGameController(deviceId)) {
InputHandler.updateControllerData()
}
}
override fun onSensorChanged(event: SensorEvent) {
val rotation = this.display?.rotation
if (rotation == Surface.ROTATION_90) {
@@ -519,8 +577,10 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
touchDownTime = System.currentTimeMillis()
// show overlay immediately on touch and cancel timer
if (!emulationViewModel.drawerOpen.value) {
// show overlay immediately on touch and cancel timer when only auto-hide is enabled
if (!emulationViewModel.drawerOpen.value &&
BooleanSetting.ENABLE_INPUT_OVERLAY_AUTO_HIDE.getBoolean() &&
!BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT.getBoolean()) {
fragment.handler.removeCallbacksAndMessages(null)
fragment.showOverlay()
}

View File

@@ -52,6 +52,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
SOC_OVERLAY_BACKGROUND("soc_overlay_background"),
ENABLE_INPUT_OVERLAY_AUTO_HIDE("enable_input_overlay_auto_hide"),
HIDE_OVERLAY_ON_CONTROLLER_INPUT("hide_overlay_on_controller_input"),
PERF_OVERLAY_BACKGROUND("perf_overlay_background"),
SHOW_PERFORMANCE_OVERLAY("show_performance_overlay"),

View File

@@ -387,6 +387,13 @@ abstract class SettingsItem(
valueHint = R.string.seconds
)
)
put(
SwitchSetting(
BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT,
titleId = R.string.hide_overlay_on_controller_input,
descriptionId = R.string.hide_overlay_on_controller_input_description
)
)
put(
SwitchSetting(

View File

@@ -274,6 +274,7 @@ class SettingsFragmentPresenter(
sl.apply {
add(BooleanSetting.ENABLE_INPUT_OVERLAY_AUTO_HIDE.key)
add(IntSetting.INPUT_OVERLAY_AUTO_HIDE.key)
add(BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT.key)
}
}

View File

@@ -100,7 +100,7 @@ class AboutFragment : Fragment() {
}
binding.buttonDiscord.setOnClickListener { openLink(getString(R.string.discord_link)) }
binding.buttonRevolt.setOnClickListener { openLink(getString(R.string.revolt_link)) }
binding.buttonStoat.setOnClickListener { openLink(getString(R.string.stoat_link)) }
binding.buttonX.setOnClickListener { openLink(getString(R.string.x_link)) }
binding.buttonWebsite.setOnClickListener { openLink(getString(R.string.website_link)) }
binding.buttonGithub.setOnClickListener { openLink(getString(R.string.github_link)) }

View File

@@ -93,7 +93,6 @@ import org.yuzu.yuzu_emu.utils.collect
import org.yuzu.yuzu_emu.utils.CustomSettingsHandler
import java.io.ByteArrayOutputStream
import java.io.File
import kotlin.coroutines.coroutineContext
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
@@ -106,6 +105,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
val handler = Handler(Looper.getMainLooper())
private var isOverlayVisible = true
private var controllerInputReceived = false
private var _binding: FragmentEmulationBinding? = null
@@ -656,6 +656,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
BooleanSetting.SHOW_INPUT_OVERLAY.setBoolean(newState)
updateQuickOverlayMenuEntry(newState)
binding.surfaceInputOverlay.refreshControls()
// Sync view visibility with the setting
if (newState) {
showOverlay()
} else {
hideOverlay()
}
NativeConfig.saveGlobalConfig()
true
}
@@ -1901,7 +1907,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
companion object {
fun fromValue(value: Int): AmiiboState =
values().firstOrNull { it.value == value } ?: Disabled
entries.firstOrNull { it.value == value } ?: Disabled
}
}
@@ -1914,7 +1920,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
companion object {
fun fromValue(value: Int): AmiiboLoadResult =
values().firstOrNull { it.value == value } ?: Unknown
entries.firstOrNull { it.value == value } ?: Unknown
}
}
@@ -1971,6 +1977,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
fun showOverlay() {
if (!isOverlayVisible) {
isOverlayVisible = true
// Reset controller input flag so controller can hide overlay again
controllerInputReceived = false
ViewUtils.showView(binding.surfaceInputOverlay, 500)
}
}
@@ -1978,7 +1986,26 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
private fun hideOverlay() {
if (isOverlayVisible) {
isOverlayVisible = false
ViewUtils.hideView(binding.surfaceInputOverlay, 500)
ViewUtils.hideView(binding.surfaceInputOverlay)
}
}
fun onControllerInputDetected() {
if (!BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT.getBoolean()) return
if (!BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()) return
if (controllerInputReceived) return
controllerInputReceived = true
hideOverlay()
}
fun onControllerConnected() {
controllerInputReceived = false
}
fun onControllerDisconnected() {
if (!BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT.getBoolean()) return
if (!BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()) return
controllerInputReceived = false
showOverlay()
}
}

View File

@@ -92,6 +92,11 @@ namespace AndroidSettings {
Settings::Setting<u32> input_overlay_auto_hide{linkage, 5, "input_overlay_auto_hide",
Settings::Category::Overlay,
Settings::Specialization::Default, true, true, &enable_input_overlay_auto_hide};
Settings::Setting<bool> hide_overlay_on_controller_input{linkage, false,
"hide_overlay_on_controller_input",
Settings::Category::Overlay,
Settings::Specialization::Default, true,
true};
Settings::Setting<bool> perf_overlay_background{linkage, false, "perf_overlay_background",
Settings::Category::Overlay,
Settings::Specialization::Default, true,

View File

@@ -220,12 +220,12 @@
app:iconPadding="0dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/button_revolt"
android:id="@+id/button_stoat"
style="@style/EdenButton.Secondary"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginEnd="12dp"
app:icon="@drawable/ic_revolt"
app:icon="@drawable/ic_stoat"
app:iconGravity="textStart"
app:iconSize="24dp"
app:iconPadding="0dp" />
@@ -270,4 +270,4 @@
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -215,12 +215,12 @@
<com.google.android.material.button.MaterialButton
style="@style/EdenButton.Secondary"
android:id="@+id/button_revolt"
android:id="@+id/button_stoat"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_weight="1"
android:layout_marginEnd="8dp"
app:icon="@drawable/ic_revolt"
app:icon="@drawable/ic_stoat"
app:iconSize="24dp"
app:iconGravity="textStart"
app:iconPadding="0dp" />
@@ -235,7 +235,7 @@
app:icon="@drawable/ic_x"
app:iconSize="24dp"
app:iconGravity="textStart"
app:iconPadding="0dp" />
app:iconPadding="0dp" />
<com.google.android.material.button.MaterialButton
style="@style/EdenButton.Secondary"
@@ -267,4 +267,4 @@
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -26,6 +26,8 @@
<string name="overlay_auto_hide">Overlay Auto Hide</string>
<string name="overlay_auto_hide_description">Automatically hide the touch controls overlay after the specified time of inactivity.</string>
<string name="enable_input_overlay_auto_hide">Enable Overlay Auto Hide</string>
<string name="hide_overlay_on_controller_input">Hide Overlay on Controller Input</string>
<string name="hide_overlay_on_controller_input_description">Automatically hide the touch controls overlay when a physical controller is used. Overlay reappears when controller is disconnected.</string>
<string name="input_overlay_options">Input Overlay</string>
<string name="input_overlay_options_description">Configure on-screen controls</string>
@@ -445,7 +447,7 @@
<string name="user_data_export_cancelled">Export cancelled</string>
<string name="user_data_import_failed_description">Make sure the user data folders are at the root of the zip folder and contain a config file at config/config.ini and try again.</string>
<string name="discord_link" translatable="false">https://discord.gg/HstXbPch7X</string>
<string name="revolt_link" translatable="false">https://rvlt.gg/qKgFEAbH</string>
<string name="stoat_link" translatable="false">https://stt.gg/qKgFEAbH</string>
<string name="x_link" translatable="false">https://nitter.poast.org/edenemuofficial</string>
<string name="website_link" translatable="false">https://eden-emu.dev</string>
<string name="github_link" translatable="false">https://git.eden-emu.dev/eden-emu</string>

View File

@@ -21,6 +21,15 @@
namespace AudioCore::Renderer {
namespace {
constexpr f32 BiquadParameterFixedScaleQ14 = 16384.0f; // 1 << 14
[[nodiscard]] inline s16 ToQ14Clamped(f32 v) {
const f32 scaled = std::clamp(v * BiquadParameterFixedScaleQ14, -32768.0f, 32767.0f);
return static_cast<s16>(scaled);
}
} // namespace
template <typename T, CommandId Id>
T& CommandBuffer::GenerateStart(const s32 node_id) {
if (size + sizeof(T) >= command_list.size_bytes()) {
@@ -259,18 +268,42 @@ void CommandBuffer::GenerateBiquadFilterCommand(const s32 node_id, EffectInfoBas
const bool use_float_processing) {
auto& cmd{GenerateStart<BiquadFilterCommand, CommandId::BiquadFilter>(node_id)};
const auto& parameter{
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
const auto state{reinterpret_cast<VoiceState::BiquadFilterState*>(
effect_info.GetStateBuffer() + channel * sizeof(VoiceState::BiquadFilterState))};
cmd.input = buffer_offset + parameter.inputs[channel];
cmd.output = buffer_offset + parameter.outputs[channel];
if (behavior->IsEffectInfoVersion2Supported()) {
const auto& p{
*reinterpret_cast<BiquadFilterInfo::ParameterVersion2*>(effect_info.GetParameter())};
cmd.biquad.b = parameter.b;
cmd.biquad.a = parameter.a;
if (!IsChannelCountValid(p.channel_count) || channel < 0 || channel >= p.channel_count) {
return;
}
// Effects use legacy fixed-point format
cmd.input = buffer_offset + p.inputs[channel];
cmd.output = buffer_offset + p.outputs[channel];
// Convert float coefficients to Q2.14 fixed-point as expected by the legacy DSP path.
cmd.biquad.b[0] = ToQ14Clamped(p.b[0]);
cmd.biquad.b[1] = ToQ14Clamped(p.b[1]);
cmd.biquad.b[2] = ToQ14Clamped(p.b[2]);
cmd.biquad.a[0] = ToQ14Clamped(p.a[0]);
cmd.biquad.a[1] = ToQ14Clamped(p.a[1]);
} else {
const auto& p{
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
if (!IsChannelCountValid(p.channel_count) || channel < 0 || channel >= p.channel_count) {
return;
}
cmd.input = buffer_offset + p.inputs[channel];
cmd.output = buffer_offset + p.outputs[channel];
cmd.biquad.b = p.b;
cmd.biquad.a = p.a;
}
// Effects always use the fixed-point coefficient path on the DSP.
cmd.use_float_coefficients = false;
cmd.state = memory_pool->Translate(CpuAddr(state),
@@ -595,6 +628,15 @@ void CommandBuffer::GenerateCopyMixBufferCommand(const s32 node_id, EffectInfoBa
const s16 buffer_offset, const s8 channel) {
auto& cmd{GenerateStart<CopyMixBufferCommand, CommandId::CopyMixBuffer>(node_id)};
if (behavior->IsEffectInfoVersion2Supported()) {
const auto& parameter_v2{
*reinterpret_cast<BiquadFilterInfo::ParameterVersion2*>(effect_info.GetParameter())};
cmd.input_index = buffer_offset + parameter_v2.inputs[channel];
cmd.output_index = buffer_offset + parameter_v2.outputs[channel];
GenerateEnd<CopyMixBufferCommand>(cmd);
return;
}
const auto& parameter{
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
cmd.input_index = buffer_offset + parameter.inputs[channel];

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
@@ -361,12 +364,37 @@ void CommandGenerator::GenerateAuxCommand(const s16 buffer_offset, EffectInfoBas
void CommandGenerator::GenerateBiquadFilterEffectCommand(const s16 buffer_offset,
EffectInfoBase& effect_info,
const s32 node_id) {
const auto& parameter{
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
EffectInfoBase::ParameterState param_state{};
s8 channel_count = 0;
if (render_context.behavior->IsEffectInfoVersion2Supported()) {
const auto* parameter =
reinterpret_cast<const BiquadFilterInfo::ParameterVersion2*>(effect_info.GetParameter());
if (!parameter) {
LOG_ERROR(Service_Audio, "Biquad filter parameter is null");
return;
}
param_state = parameter->state;
channel_count = parameter->channel_count;
} else {
const auto* parameter =
reinterpret_cast<const BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter());
if (!parameter) {
LOG_ERROR(Service_Audio, "Biquad filter parameter is null");
return;
}
param_state = parameter->state;
channel_count = parameter->channel_count;
}
if (channel_count <= 0) {
return;
}
if (effect_info.IsEnabled()) {
bool needs_init{false};
switch (parameter.state) {
switch (param_state) {
case EffectInfoBase::ParameterState::Initialized:
needs_init = true;
break;
@@ -375,22 +403,26 @@ void CommandGenerator::GenerateBiquadFilterEffectCommand(const s16 buffer_offset
if (render_context.behavior->IsBiquadFilterEffectStateClearBugFixed()) {
needs_init = false;
} else {
needs_init = parameter.state == EffectInfoBase::ParameterState::Updating;
needs_init = param_state == EffectInfoBase::ParameterState::Updating;
}
break;
default:
LOG_ERROR(Service_Audio, "Invalid biquad parameter state {}",
static_cast<u32>(parameter.state));
LOG_ERROR(Service_Audio,
"Invalid biquad parameter state {}, treating as uninitialized",
static_cast<u32>(param_state));
needs_init = true;
break;
}
for (s8 channel = 0; channel < parameter.channel_count; channel++) {
command_buffer.GenerateBiquadFilterCommand(
node_id, effect_info, buffer_offset, channel, needs_init,
render_context.behavior->UseBiquadFilterFloatProcessing());
const bool use_float_processing =
render_context.behavior->UseBiquadFilterFloatProcessing();
for (s8 channel = 0; channel < channel_count; channel++) {
command_buffer.GenerateBiquadFilterCommand(node_id, effect_info, buffer_offset, channel,
needs_init, use_float_processing);
}
} else {
for (s8 channel = 0; channel < parameter.channel_count; channel++) {
for (s8 channel = 0; channel < channel_count; channel++) {
command_buffer.GenerateCopyMixBufferCommand(node_id, effect_info, buffer_offset,
channel);
}

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
@@ -34,14 +37,22 @@ void BiquadFilterInfo::Update(BehaviorInfo::ErrorInfo& error_info,
}
void BiquadFilterInfo::UpdateForCommandGeneration() {
if (enabled) {
usage_state = UsageState::Enabled;
} else {
usage_state = UsageState::Disabled;
}
usage_state = enabled ? UsageState::Enabled : UsageState::Disabled;
auto params{reinterpret_cast<ParameterVersion1*>(parameter.data())};
params->state = ParameterState::Updated;
auto* params_v1 = reinterpret_cast<ParameterVersion1*>(parameter.data());
auto* params_v2 = reinterpret_cast<ParameterVersion2*>(parameter.data());
const auto raw_state_v1 = static_cast<u8>(params_v1->state);
const auto raw_state_v2 = static_cast<u8>(params_v2->state);
if (raw_state_v1 <= static_cast<u8>(ParameterState::Updated)) {
params_v1->state = ParameterState::Updated;
} else if (raw_state_v2 <= static_cast<u8>(ParameterState::Updated)) {
params_v2->state = ParameterState::Updated;
} else {
params_v1->state = ParameterState::Updated;
params_v2->state = ParameterState::Updated;
}
}
void BiquadFilterInfo::InitializeResultState(EffectResultState& result_state) {}

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
@@ -27,10 +30,12 @@ public:
struct ParameterVersion2 {
/* 0x00 */ std::array<s8, MaxChannels> inputs;
/* 0x06 */ std::array<s8, MaxChannels> outputs;
/* 0x0C */ std::array<s16, 3> b;
/* 0x12 */ std::array<s16, 2> a;
/* 0x16 */ s8 channel_count;
/* 0x17 */ ParameterState state;
/* 0x0C */ u32 padding;
/* 0x10 */ std::array<f32, 3> b;
/* 0x1C */ std::array<f32, 2> a;
/* 0x24 */ s8 channel_count;
/* 0x25 */ ParameterState state;
/* 0x26 */ u16 reserved;
};
static_assert(sizeof(ParameterVersion2) <= sizeof(EffectInfoBase::InParameterVersion2),
"BiquadFilterInfo::ParameterVersion2 has the wrong size!");

View File

@@ -17,6 +17,8 @@ add_library(core STATIC
constants.h
core.cpp
core.h
game_settings.cpp
game_settings.h
core_timing.cpp
core_timing.h
cpu_manager.cpp

View File

@@ -6,6 +6,7 @@
#include <memory>
#include <utility>
#include "game_settings.h"
#include "audio_core/audio_core.h"
#include "common/fs/fs.h"
#include "common/logging/log.h"
@@ -292,48 +293,6 @@ struct System::Impl {
return SystemResultStatus::Success;
}
void LoadOverrides(u64 programId) const {
std::string vendor = gpu_core->Renderer().GetDeviceVendor();
LOG_INFO(Core, "GPU Vendor: {}", vendor);
// Reset all per-game flags
Settings::values.use_squashed_iterated_blend = false;
// Insert PC overrides here
#ifdef ANDROID
// Example on how to set a setting based on the program ID and vendor
if (programId == 0x010028600EBDA000 && vendor == "Mali") { // Mario 3d World
// Settings::values.example = true;
}
// Example array of program IDs
const std::array<u64, 10> example_array = {
//0xprogramId
0x0004000000033400, // Game 1
0x0004000000033500 // Game 2
// And so on
};
for (auto id : example_array) {
if (programId == id) {
// Settings::values.example = true;
break;
}
}
#endif
// Ninja Gaiden Ragebound
constexpr u64 ngr = 0x0100781020710000ULL;
if (programId == ngr) {
LOG_INFO(Core, "Enabling game specifc override: use_squashed_iterated_blend");
Settings::values.use_squashed_iterated_blend = true;
}
}
SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window,
const std::string& filepath,
Service::AM::FrontendAppletParameters& params) {
@@ -419,7 +378,8 @@ struct System::Impl {
LOG_ERROR(Core, "Failed to find program id for ROM");
}
LoadOverrides(program_id);
GameSettings::LoadOverrides(program_id, gpu_core->Renderer());
if (auto room_member = Network::GetRoomMember().lock()) {
Network::GameInfo game_info;
game_info.name = name;

140
src/core/game_settings.cpp Normal file
View File

@@ -0,0 +1,140 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#include "core/game_settings.h"
#include <algorithm>
#include <cctype>
#include "common/logging/log.h"
#include "common/settings.h"
#include "video_core/renderer_base.h"
#if defined(__APPLE__)
#include <TargetConditionals.h>
#endif
namespace Core::GameSettings {
static GPUVendor GetGPU(const std::string& gpu_vendor_string) {
struct Entry { const char* name; GPUVendor vendor; };
static constexpr Entry GpuVendor[] = {
// NVIDIA
{"NVIDIA", GPUVendor::Nvidia},
{"Nouveau", GPUVendor::Nvidia},
{"NVK", GPUVendor::Nvidia},
{"Tegra", GPUVendor::Nvidia},
// AMD
{"AMD", GPUVendor::AMD},
{"RadeonSI", GPUVendor::AMD},
{"RADV", GPUVendor::AMD},
{"AMDVLK", GPUVendor::AMD},
{"R600", GPUVendor::AMD},
// Intel
{"Intel", GPUVendor::Intel},
{"ANV", GPUVendor::Intel},
{"i965", GPUVendor::Intel},
{"i915", GPUVendor::Intel},
{"OpenSWR", GPUVendor::Intel},
// Apple
{"Apple", GPUVendor::Apple},
{"MoltenVK", GPUVendor::Apple},
// Qualcomm / Adreno
{"Qualcomm", GPUVendor::Qualcomm},
{"Turnip", GPUVendor::Qualcomm},
// ARM / Mali
{"Mali", GPUVendor::ARM},
{"PanVK", GPUVendor::ARM},
// Imagination / PowerVR
{"PowerVR", GPUVendor::Imagination},
{"PVR", GPUVendor::Imagination},
// Microsoft / WARP / D3D12 GL
{"D3D12", GPUVendor::Microsoft},
{"Microsoft", GPUVendor::Microsoft},
{"WARP", GPUVendor::Microsoft},
};
for (const auto& entry : GpuVendor) {
if (gpu_vendor_string == entry.name) {
return entry.vendor;
}
}
// legacy (shouldn't be needed anymore, but just in case)
std::string gpu = gpu_vendor_string;
std::transform(gpu.begin(), gpu.end(), gpu.begin(), [](unsigned char c){ return (char)std::tolower(c); });
if (gpu.find("geforce") != std::string::npos) {
return GPUVendor::Nvidia;
}
if (gpu.find("radeon") != std::string::npos || gpu.find("ati") != std::string::npos) {
return GPUVendor::AMD;
}
return GPUVendor::Unknown;
}
static OS DetectOS() {
#if defined(_WIN32)
return OS::Windows;
#elif defined(__FIREOS__)
return OS::FireOS;
#elif defined(__ANDROID__)
return OS::Android;
#elif defined(__OHOS__)
return OS::HarmonyOS;
#elif defined(__HAIKU__)
return OS::HaikuOS;
#elif defined(__DragonFly__)
return OS::DragonFlyBSD;
#elif defined(__NetBSD__)
return OS::NetBSD;
#elif defined(__OpenBSD__)
return OS::OpenBSD;
#elif defined(_AIX)
return OS::AIX;
#elif defined(__managarm__)
return OS::Managarm;
#elif defined(__redox__)
return OS::RedoxOS;
#elif defined(__APPLE__) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
return OS::IOS;
#elif defined(__APPLE__)
return OS::MacOS;
#elif defined(__FreeBSD__)
return OS::FreeBSD;
#elif defined(__sun) && defined(__SVR4)
return OS::Solaris;
#elif defined(__linux__)
return OS::Linux;
#else
return OS::Unknown;
#endif
}
EnvironmentInfo DetectEnvironment(const VideoCore::RendererBase& renderer) {
EnvironmentInfo env{};
env.os = DetectOS();
env.vendor_string = renderer.GetDeviceVendor();
env.vendor = GetGPU(env.vendor_string);
return env;
}
void LoadOverrides(std::uint64_t program_id, const VideoCore::RendererBase& renderer) {
const auto env = DetectEnvironment(renderer);
switch (static_cast<TitleID>(program_id)) {
case TitleID::NinjaGaidenRagebound:
Settings::values.use_squashed_iterated_blend = true;
break;
default:
break;
}
LOG_INFO(Core, "Applied game settings for title ID {:016X} on OS {}, GPU vendor {} ({})",
program_id,
static_cast<int>(env.os),
static_cast<int>(env.vendor),
env.vendor_string);
}
} // namespace Core::GameSettings

60
src/core/game_settings.h Normal file
View File

@@ -0,0 +1,60 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <array>
#include <cstdint>
#include <string>
namespace VideoCore { class RendererBase; }
namespace Core::GameSettings {
enum class OS {
Windows,
Linux,
MacOS,
IOS,
Android,
FireOS,
HarmonyOS,
FreeBSD,
DragonFlyBSD,
NetBSD,
OpenBSD,
HaikuOS,
AIX,
Managarm,
RedoxOS,
Solaris,
Unknown,
};
enum class GPUVendor {
Nvidia,
AMD,
Intel,
Apple,
Qualcomm,
ARM,
Imagination,
Microsoft,
Unknown,
};
enum class TitleID : std::uint64_t {
NinjaGaidenRagebound = 0x0100781020710000ULL
};
struct EnvironmentInfo {
OS os{OS::Unknown};
GPUVendor vendor{GPUVendor::Unknown};
std::string vendor_string; // raw string from driver
};
EnvironmentInfo DetectEnvironment(const VideoCore::RendererBase& renderer);
void LoadOverrides(std::uint64_t program_id, const VideoCore::RendererBase& renderer);
} // namespace Core::GameSettings

View File

@@ -12,7 +12,7 @@
#include "common/common_types.h"
#include "common/expected.h"
// All the constants in this file come from http://switchbrew.org/index.php?title=Error_codes
// All the constants in this file come from <http://switchbrew.org/index.php?title=Error_codes>
/**
* Identifies the module which caused the error. Error codes can be propagated through a call
@@ -87,6 +87,7 @@ enum class ErrorModule : u32 {
AM = 128,
PlayReport = 129,
AHID = 130,
APPLET = 131,
Qlaunch = 132,
PCV = 133,
USBPD = 134,
@@ -113,8 +114,8 @@ enum class ErrorModule : u32 {
NPNSHTTPSTREAM = 155,
IDLE = 156,
ARP = 157,
SWKBD = 158,
BOOT = 159,
UPDATER = 158,
SWKBD = 159,
NetDiag = 160,
NFCMifare = 161,
UserlandAssert = 162,
@@ -125,7 +126,8 @@ enum class ErrorModule : u32 {
BGTC = 167,
UserlandCrash = 168,
SASBUS = 169,
PI = 170,
PL = 170,
CDMSC = 171,
AudioCtrl = 172,
LBL = 173,
JIT = 175,
@@ -137,23 +139,30 @@ enum class ErrorModule : u32 {
Dauth = 181,
STDFU = 182,
DBG = 183,
CDACM = 184,
TCAP = 185,
DHCPS = 186,
SPI = 187,
AVM = 188,
PWM = 189,
DNSServer = 190,
RTC = 191,
Regulator = 192,
LED = 193,
HTCTool = 194,
SIO = 195,
PCM = 196,
CLKRST = 197,
POWCTL = 198,
HIDDriver = 199,
DMA = 200,
AudioOld = 201,
HID = 202,
LDN = 203,
CS = 204,
Irsensor = 205,
Capture = 206,
MM = 207,
Manu = 208,
ATK = 209,
WEB = 210,
@@ -166,19 +175,24 @@ enum class ErrorModule : u32 {
MigrationLdcServ = 217,
HIDBUS = 218,
ENS = 219,
ND = 220,
NDD = 221,
ToyCon = 222,
WebSocket = 223,
SocketIO = 224,
DCDMTP = 227,
PGL = 228,
Notification = 229,
INS = 230,
LP2P = 231,
RCD = 232,
LCM40607 = 233,
ICM40607 = 233,
PRC = 235,
TMAHTC = 237,
ECTX = 238,
BridgeCtrl = 237,
ErrContext = 238,
MNPP = 239,
HSHL = 240,
RINGCON = 241,
CAPMTP = 242,
DP2HDMI = 244,
Cradle = 245,
@@ -186,6 +200,8 @@ enum class ErrorModule : u32 {
Icm42607p = 248,
NDRM = 250,
Fst2 = 251,
TS = 253,
SPLAY = 260,
Nex = 306,
NPLN = 321,
TSPM = 499,

View File

@@ -36,10 +36,6 @@ void DisplayLayerManager::Initialize(Core::System& system, Kernel::KProcess* pro
m_buffer_sharing_enabled = false;
m_blending_enabled = mode == LibraryAppletMode::PartialForeground ||
mode == LibraryAppletMode::PartialForegroundIndirectDisplay;
if (m_applet_id != AppletId::Application) {
(void)this->IsSystemBufferSharingEnabled();
}
}
void DisplayLayerManager::Finalize() {
@@ -80,11 +76,10 @@ Result DisplayLayerManager::CreateManagedDisplayLayer(u64* out_layer_id) {
if (m_applet_id != AppletId::Application) {
(void)m_manager_display_service->SetLayerBlending(m_blending_enabled, *out_layer_id);
if (m_applet_id == AppletId::OverlayDisplay) {
static constexpr s32 kOverlayBackgroundZ = -1;
(void)m_manager_display_service->SetLayerZIndex(kOverlayBackgroundZ, *out_layer_id);
(void)m_manager_display_service->SetLayerZIndex(-1, *out_layer_id);
(void)m_display_service->GetContainer()->SetLayerIsOverlay(*out_layer_id, true);
} else {
static constexpr s32 kOverlayZ = 3;
(void)m_manager_display_service->SetLayerZIndex(kOverlayZ, *out_layer_id);
(void)m_manager_display_service->SetLayerZIndex(1, *out_layer_id);
}
}
@@ -131,6 +126,7 @@ Result DisplayLayerManager::IsSystemBufferSharingEnabled() {
s32 initial_z = 1;
if (m_applet_id == AppletId::OverlayDisplay) {
initial_z = -1;
(void)m_display_service->GetContainer()->SetLayerIsOverlay(m_system_shared_layer_id, true);
}
m_manager_display_service->SetLayerZIndex(initial_z, m_system_shared_layer_id);
R_SUCCEED();

View File

@@ -88,12 +88,13 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_
{181, nullptr, "UpgradeLaunchRequiredVersion"},
{190, nullptr, "SendServerMaintenanceOverlayNotification"},
{200, nullptr, "GetLastApplicationExitReason"},
{210, D<&IApplicationFunctions::GetUnknownEvent210>, "Unknown210"},
{220, nullptr, "Unknown220"}, // [20.0.0+]
{300, nullptr, "Unknown300"}, // [20.0.0+]
{310, nullptr, "Unknown310"}, // [20.0.0+]
{320, nullptr, "Unknown320"}, // [20.0.0+]
{330, nullptr, "Unknown330"}, // [20.0.0+]
{210, D<&IApplicationFunctions::GetLaunchRequiredVersionUpgrade>, "GetLaunchRequiredVersionUpgrade"}, //20.0.0+
{211, nullptr, "GetLaunchRequiredVersionUpgradeStatus"}, //20.0.0+
{220, nullptr, "Unknown220"}, //20.0.0+
{300, nullptr, "CreateMovieWriter"}, //20.0.0+
{310, nullptr, "Unknown310"}, //20.0.0+
{320, nullptr, "Unknown320"}, //20.0.0+
{330, nullptr, "Unknown330"}, //20.0.0+
{500, nullptr, "StartContinuousRecordingFlushForDebug"},
{1000, nullptr, "CreateMovieMaker"},
{1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"},
@@ -496,10 +497,10 @@ Result IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(
R_SUCCEED();
}
Result IApplicationFunctions::GetUnknownEvent210(
Result IApplicationFunctions::GetLaunchRequiredVersionUpgrade(
OutCopyHandle<Kernel::KReadableEvent> out_event) {
LOG_DEBUG(Service_AM, "called");
*out_event = m_applet->unknown_event.GetHandle();
LOG_WARNING(Service_AM, "(STUBBED) called");
*out_event = m_applet->state_changed_event.GetHandle();
R_SUCCEED();
}

View File

@@ -79,7 +79,7 @@ private:
Result TryPopFromFriendInvitationStorageChannel(Out<SharedPointer<IStorage>> out_storage);
Result GetNotificationStorageChannelEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetHealthWarningDisappearedSystemEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetUnknownEvent210(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetLaunchRequiredVersionUpgrade(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result PrepareForJit();
const std::shared_ptr<Applet> m_applet;

View File

@@ -18,7 +18,7 @@ IAudioController::IAudioController(Core::System& system_)
{2, D<&IAudioController::GetLibraryAppletExpectedMasterVolume>, "GetLibraryAppletExpectedMasterVolume"},
{3, D<&IAudioController::ChangeMainAppletMasterVolume>, "ChangeMainAppletMasterVolume"},
{4, D<&IAudioController::SetTransparentVolumeRate>, "SetTransparentVolumeRate"},
{5, nullptr, "Unknown5"},
{5, nullptr, "Unknown5"}, //20.0.0+
};
// clang-format on

View File

@@ -24,7 +24,7 @@ namespace Service::AM {
{20, D<&IOverlayFunctions::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"},
{21, nullptr, "SetHandlingTouchScreenInputEnabled"},
{30, nullptr, "SetHealthWarningShowingState"},
{31, nullptr, "IsHealthWarningRequired"},
{31, D<&IOverlayFunctions::IsHealthWarningRequired>, "IsHealthWarningRequired"},
{40, nullptr, "GetApplicationNintendoLogo"},
{41, nullptr, "GetApplicationStartupMovie"},
{50, nullptr, "SetGpuTimeSliceBoostForApplication"},
@@ -69,12 +69,33 @@ namespace Service::AM {
Result IOverlayFunctions::GetApplicationIdForLogo(Out<u64> out_application_id) {
LOG_DEBUG(Service_AM, "called");
// Prefer explicit application_id if available, else fall back to program_id
std::shared_ptr<Applet> target_applet;
auto* window_system = system.GetAppletManager().GetWindowSystem();
if (window_system) {
target_applet = window_system->GetMainApplet();
if (target_applet) {
std::scoped_lock lk{target_applet->lock};
LOG_DEBUG(Service_AM, "applet_id={}, program_id={:016X}, type={}",
static_cast<u32>(target_applet->applet_id), target_applet->program_id,
static_cast<u32>(target_applet->type));
u64 id = target_applet->screen_shot_identity.application_id;
if (id == 0) {
id = target_applet->program_id;
}
LOG_DEBUG(Service_AM, "application_id={:016X}", id);
*out_application_id = id;
R_SUCCEED();
}
}
std::scoped_lock lk{m_applet->lock};
u64 id = m_applet->screen_shot_identity.application_id;
if (id == 0) {
id = m_applet->program_id;
}
LOG_DEBUG(Service_AM, "application_id={:016X} (fallback)", id);
*out_application_id = id;
R_SUCCEED();
}
@@ -86,6 +107,13 @@ namespace Service::AM {
R_SUCCEED();
}
Result IOverlayFunctions::IsHealthWarningRequired(Out<bool> is_required) {
LOG_DEBUG(Service_AM, "called");
std::scoped_lock lk{m_applet->lock};
*is_required = false;
R_SUCCEED();
}
Result IOverlayFunctions::SetHandlingHomeButtonShortPressedEnabled(bool enabled) {
LOG_DEBUG(Service_AM, "called, enabled={}", enabled);
std::scoped_lock lk{m_applet->lock};

View File

@@ -18,6 +18,7 @@ namespace Service::AM {
Result EndToWatchShortHomeButtonMessage();
Result GetApplicationIdForLogo(Out<u64> out_application_id);
Result SetAutoSleepTimeAndDimmingTimeEnabled(bool enabled);
Result IsHealthWarningRequired(Out<bool> is_required);
Result SetHandlingHomeButtonShortPressedEnabled(bool enabled);
Result Unknown70();

View File

@@ -186,8 +186,6 @@ void WindowSystem::OnSystemButtonPress(SystemButtonType type) {
if (m_overlay_display) {
std::scoped_lock lk_overlay{m_overlay_display->lock};
m_overlay_display->overlay_in_foreground = !m_overlay_display->overlay_in_foreground;
// Tie window visibility to foreground state so hidden when not active
m_overlay_display->window_visible = m_overlay_display->overlay_in_foreground;
LOG_INFO(Service_AM, "Overlay long-press toggle: overlay_in_foreground={} window_visible={}", m_overlay_display->overlay_in_foreground, m_overlay_display->window_visible);
}
SendButtonAppletMessageLocked(AppletMessage::DetectLongPressingHomeButton);
@@ -393,7 +391,7 @@ void WindowSystem::UpdateAppletStateLocked(Applet* applet, bool is_foreground, b
s32 z_index = 0;
const bool now_foreground = inherited_foreground;
if (applet->applet_id == AppletId::OverlayDisplay) {
z_index = applet->overlay_in_foreground ? 100000 : -100000;
z_index = applet->overlay_in_foreground ? 100000 : -1;
} else if (now_foreground && !is_obscured) {
z_index = 2;
} else if (now_foreground) {

View File

@@ -30,7 +30,7 @@ IAudioController::IAudioController(Core::System& system_)
{3, D<&IAudioController::GetTargetVolumeMax>, "GetTargetVolumeMax"},
{4, D<&IAudioController::IsTargetMute>, "IsTargetMute"},
{5, D<&IAudioController::SetTargetMute>, "SetTargetMute"},
{6, nullptr, "IsTargetConnected"},
{6, nullptr, "IsTargetConnected"}, //20.0.0+
{7, nullptr, "SetDefaultTarget"},
{8, nullptr, "GetDefaultTarget"},
{9, D<&IAudioController::GetAudioOutputMode>, "GetAudioOutputMode"},
@@ -67,7 +67,8 @@ IAudioController::IAudioController(Core::System& system_)
{40, nullptr, "GetSystemInformationForDebug"},
{41, nullptr, "SetVolumeButtonLongPressTime"},
{42, nullptr, "SetNativeVolumeForDebug"},
{5000, D<&IAudioController::Unknown5000>, "Unknown5000"},
{43, nullptr, "Unknown43"}, //21.0.0+
{5000, D<&IAudioController::Unknown5000>, "Unknown5000"}, //19.0.0+
{10000, nullptr, "NotifyAudioOutputTargetForPlayReport"},
{10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"},
{10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"},
@@ -76,13 +77,13 @@ IAudioController::IAudioController(Core::System& system_)
{10102, nullptr, "BindAudioOutputTargetUpdateEventForPlayReport"},
{10103, nullptr, "GetAudioOutputTargetForPlayReport"},
{10104, nullptr, "GetAudioOutputChannelCountForPlayReport"},
{10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"},
{10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"},
{10200, nullptr, "Unknown10200"}, // [20.0.0+]
{50000, nullptr, "SetAnalogInputBoostGainForPrototyping"},
{50001, nullptr, "OverrideDefaultTargetForDebug"},
{50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"},
{50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"}
{10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, //14.0.0-19.0.1
{10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"}, //14.0.0-19.0.1
{10200, nullptr, "Unknown10200"}, //20.0.0+
{50000, nullptr, "SetAnalogInputBoostGainForPrototyping"}, //15.0.0-18.1.0
{50001, nullptr, "OverrideDefaultTargetForDebug"}, //19.0.0-19.0.1
{50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"}, //19.0.0+
{50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"} //19.0.0+
};
// clang-format on

View File

@@ -32,13 +32,13 @@ IAudioDevice::IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u
{12, D<&IAudioDevice::QueryAudioDeviceOutputEvent>, "QueryAudioDeviceOutputEvent"},
{13, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioOutputDeviceName"},
{14, D<&IAudioDevice::ListAudioOutputDeviceName>, "ListAudioOutputDeviceName"},
{15, nullptr, "AcquireAudioInputDeviceNotification"}, // 17.0.0+
{16, nullptr, "ReleaseAudioInputDeviceNotification"}, // 17.0.0+
{17, nullptr, "AcquireAudioOutputDeviceNotification"}, // 17.0.0+
{18, nullptr, "ReleaseAudioOutputDeviceNotification"}, // 17.0.0+
{19, nullptr, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, // 18.0.0+
{20, nullptr, "IsAudioDeviceOutputVolumeAutoTuneEnabled"}, // 18.0.0+
{21, nullptr, "IsActiveOutputDeviceEstimatedLowLatency"} // 21.0.0+
{15, nullptr, "AcquireAudioInputDeviceNotification"}, //17.0.0+
{16, nullptr, "ReleaseAudioInputDeviceNotification"}, //17.0.0+
{17, nullptr, "AcquireAudioOutputDeviceNotification"}, //17.0.0+
{18, nullptr, "ReleaseAudioOutputDeviceNotification"}, //17.0.0+
{19, nullptr, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+
{20, nullptr, "IsAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+
{21, nullptr, "IsActiveOutputDeviceEstimatedLowLatency"} //21.0.0+
};
RegisterHandlers(functions);

View File

@@ -43,21 +43,21 @@ IBcatService::IBcatService(Core::System& system_, BcatBackend& backend_)
{20401, nullptr, "UnregisterSystemApplicationDeliveryTask"},
{20410, nullptr, "SetSystemApplicationDeliveryTaskTimer"},
{30100, D<&IBcatService::SetPassphrase>, "SetPassphrase"},
{30101, nullptr, "Unknown30101"},
{30102, nullptr, "Unknown30102"},
{30101, nullptr, "Unknown30101"}, //2.0.0-2.3.0
{30102, nullptr, "Unknown30102"}, //2.0.0-2.3.0
{30200, nullptr, "RegisterBackgroundDeliveryTask"},
{30201, nullptr, "UnregisterBackgroundDeliveryTask"},
{30202, nullptr, "BlockDeliveryTask"},
{30203, nullptr, "UnblockDeliveryTask"},
{30210, nullptr, "SetDeliveryTaskTimer"},
{30300, D<&IBcatService::RegisterSystemApplicationDeliveryTasks>, "RegisterSystemApplicationDeliveryTasks"},
{90100, nullptr, "EnumerateBackgroundDeliveryTask"},
{90101, nullptr, "Unknown90101"},
{90100, nullptr, "GetDeliveryTaskList"},
{90101, nullptr, "GetDeliveryTaskListForSystem"}, //11.0.0+
{90200, nullptr, "GetDeliveryList"},
{90201, D<&IBcatService::ClearDeliveryCacheStorage>, "ClearDeliveryCacheStorage"},
{90202, nullptr, "ClearDeliveryTaskSubscriptionStatus"},
{90300, nullptr, "GetPushNotificationLog"},
{90301, nullptr, "Unknown90301"},
{90301, nullptr, "GetDeliveryCacheStorageUsage"}, //11.0.0+
};
// clang-format on
RegisterHandlers(functions);

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -12,19 +15,19 @@ INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "I
{10100, D<&INewsService::PostLocalNews>, "PostLocalNews"},
{20100, nullptr, "SetPassphrase"},
{30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},
{30101, nullptr, "GetTopicList"},
{30110, nullptr, "Unknown30110"},
{30101, nullptr, "GetTopicList"}, //3.0.0+
{30110, nullptr, "Unknown30110"}, //6.0.0+
{30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"},
{30201, nullptr, "Unknown30201"},
{30210, nullptr, "Unknown30210"},
{30201, nullptr, "Unknown30201"}, //8.0.0+
{30210, nullptr, "Unknown30210"}, //10.0.0+
{30300, nullptr, "RequestImmediateReception"},
{30400, nullptr, "DecodeArchiveFile"},
{30500, nullptr, "Unknown30500"},
{30900, nullptr, "Unknown30900"},
{30901, nullptr, "Unknown30901"},
{30902, nullptr, "Unknown30902"},
{30400, nullptr, "DecodeArchiveFile"}, //3.0.0-18.1.0
{30500, nullptr, "Unknown30500"}, //8.0.0+
{30900, nullptr, "Unknown30900"}, //1.0.0
{30901, nullptr, "Unknown30901"}, //1.0.0
{30902, nullptr, "Unknown30902"}, //1.0.0
{40100, nullptr, "SetSubscriptionStatus"},
{40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"},
{40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"}, //3.0.0+
{40200, nullptr, "ClearStorage"},
{40201, nullptr, "ClearSubscriptionStatusAll"},
{90100, nullptr, "GetNewsDatabaseDump"},

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -77,31 +80,33 @@ public:
{57, nullptr, "RegisterAppletResourceUserId"},
{58, nullptr, "UnregisterAppletResourceUserId"},
{59, nullptr, "SetAppletResourceUserId"},
{60, nullptr, "Unknown60"},
{61, nullptr, "Unknown61"},
{62, nullptr, "Unknown62"},
{63, nullptr, "Unknown63"},
{64, nullptr, "Unknown64"},
{65, nullptr, "Unknown65"},
{66, nullptr, "Unknown66"},
{67, nullptr, "Unknown67"},
{68, nullptr, "Unknown68"},
{69, nullptr, "Unknown69"},
{70, nullptr, "Unknown70"},
{71, nullptr, "Unknown71"},
{72, nullptr, "Unknown72"},
{73, nullptr, "Unknown73"},
{74, nullptr, "Unknown74"},
{75, nullptr, "Unknown75"},
{76, nullptr, "Unknown76"},
{100, nullptr, "Unknown100"},
{101, nullptr, "Unknown101"},
{110, nullptr, "Unknown110"},
{111, nullptr, "Unknown111"},
{112, nullptr, "Unknown112"},
{113, nullptr, "Unknown113"},
{114, nullptr, "Unknown114"},
{115, nullptr, "Unknown115"},
{60, nullptr, "AcquireBleConnectionParameterUpdateEvent"}, //8.0.0+
{61, nullptr, "SetCeLength"}, //8.0.0+
{62, nullptr, "EnsureSlotExpansion"}, //9.0.0+
{63, nullptr, "IsSlotExpansionEnsured"}, //9.0.0+
{64, nullptr, "CancelConnectionTrigger"}, //10.0.0+
{65, nullptr, "GetConnectionCapacity"}, //13.0.0+
{66, nullptr, "GetWlanMode"}, //13.0.0+
{67, nullptr, "IsSlotSavingEnabled"}, //13.0.0+
{68, nullptr, "IsSlotSavingForPairingEnabled"}, //13.0.0+
{69, nullptr, "AcquireAudioDeviceConnectionEvent"}, //13.0.0+
{70, nullptr, "GetConnectedAudioDevices"}, //13.0.0+
{71, nullptr, "SetAudioSourceVolume"}, //13.0.0+
{72, nullptr, "GetAudioSourceVolume"}, //13.0.0+
{73, nullptr, "RequestAudioDeviceConnectionRejection"}, //13.0.0+
{74, nullptr, "CancelAudioDeviceConnectionRejection"}, //13.0.0+
{75, nullptr, "GetPairedAudioDevices"}, //13.0.0+
{76, nullptr, "SetWlanModeWithOption"}, //13.1.0+
{100, nullptr, "AcquireConnectionDisallowedEvent"}, //13.0.0+
{101, nullptr, "GetUsecaseViolationFactor"}, //13.0.0+
{110, nullptr, "GetShortenedDeviceInfo"}, //13.0.0+
{111, nullptr, "AcquirePairingCountUpdateEvent"},//13.0.0+
{112, nullptr, "Unknown112"}, //14.0.0-14.1.2
{113, nullptr, "Unknown113"}, //14.0.0-14.1.2
{114, nullptr, "IsFirstAudioControlConnection"}, //14.0.0+
{115, nullptr, "GetShortenedDeviceCondition"}, //14.0.0+
{116, nullptr, "SetAudioSinkVolume"}, //15.0.0+
{117, nullptr, "GetAudioSinkVolume"}, //15.0.0+
};
// clang-format on

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -17,11 +20,15 @@ IBtmDebug::IBtmDebug(Core::System& system_) : ServiceFramework{system_, "btm:dbg
{6, nullptr, "SetTsiMode"},
{7, nullptr, "GeneralTest"},
{8, nullptr, "HidConnect"},
{9, nullptr, "GeneralGet"},
{10, nullptr, "GetGattClientDisconnectionReason"},
{11, nullptr, "GetBleConnectionParameter"},
{12, nullptr, "GetBleConnectionParameterRequest"},
{13, nullptr, "Unknown13"},
{9, nullptr, "GeneralGet"}, //5.0.0+
{10, nullptr, "GetGattClientDisconnectionReason"}, //5.0.0+
{11, nullptr, "GetBleConnectionParameter"}, //5.1.0+
{12, nullptr, "GetBleConnectionParameterRequest"}, //5.1.0+
{13, nullptr, "GetDiscoveredDevice"}, //12.0.0+
{14, nullptr, "SleepAwakeLoopTest"}, //15.0.0+
{15, nullptr, "SleepTest"}, //15.0.0+
{16, nullptr, "MinimumAwakeTest"}, //15.0.0+
{17, nullptr, "ForceEnableBtm"}, //15.0.0+
};
// clang-format on

View File

@@ -60,6 +60,16 @@ public:
{38, nullptr, "OwnTicket3"},
{39, nullptr, "DeleteAllInactivePersonalizedTicket"},
{40, nullptr, "DeletePrepurchaseRecordByNintendoAccountId"},
{101, nullptr, "Unknown101"}, //18.0.0+
{102, nullptr, "Unknown102"}, //18.0.0+
{103, nullptr, "Unknown103"}, //18.0.0+
{104, nullptr, "Unknown104"}, //18.0.0+
{105, nullptr, "Unknown105"}, //20.0.0+
{201, nullptr, "Unknown201"}, //18.0.0+
{202, nullptr, "Unknown202"}, //18.0.0+
{203, nullptr, "Unknown203"}, //18.0.0+
{204, nullptr, "Unknown204"}, //18.0.0+
{205, nullptr, "Unknown205"}, //18.0.0+
{501, nullptr, "Unknown501"},
{502, nullptr, "Unknown502"},
{503, nullptr, "GetTitleKey"},

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -67,7 +70,7 @@ public:
{20701, &IFriendService::GetPlayHistoryStatistics, "GetPlayHistoryStatistics"},
{20800, &IFriendService::LoadUserSetting, "LoadUserSetting"},
{20801, nullptr, "SyncUserSetting"},
{20900, nullptr, "RequestListSummaryOverlayNotification"},
{20900, &IFriendService::RequestListSummaryOverlayNotification, "RequestListSummaryOverlayNotification"},
{21000, nullptr, "GetExternalApplicationCatalog"},
{22000, nullptr, "GetReceivedFriendInvitationList"},
{22001, nullptr, "GetReceivedFriendInvitationDetailedInfo"},
@@ -317,6 +320,13 @@ private:
rb.Push(ResultSuccess);
}
void RequestListSummaryOverlayNotification(HLERequestContext& ctx) {
LOG_INFO(Service_Friend, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
}
void GetReceivedFriendInvitationCountCache(HLERequestContext& ctx) {
LOG_DEBUG(Service_Friend, "(STUBBED) called, check in out");

View File

@@ -125,13 +125,10 @@ IHidDebugServer::IHidDebugServer(Core::System& system_, std::shared_ptr<Resource
{250, nullptr, "IsVirtual"},
{251, nullptr, "GetAnalogStickModuleParam"},
{253, nullptr, "ClearStorageForShipment"}, //19.0.0+
{254, nullptr, "Unknown254"},
{255, nullptr, "Unknown255"},
{256, nullptr, "Unknown256"},
{261, nullptr, "UpdateDesignInfo12"},
{262, nullptr, "GetUniquePadButtonCount"},
{267, nullptr, "Unknown267"},
{268, nullptr, "Unknown268"},
{261, nullptr, "UpdateDesignInfo12"}, //21.0.0+
{262, nullptr, "GetUniquePadButtonCount"}, //21.0.0+
{267, nullptr, "SetAnalogStickCalibration"}, //21.0.0+
{268, nullptr, "ResetAnalogStickCalibration"}, //21.0.0+
{301, nullptr, "GetAbstractedPadHandles"},
{302, nullptr, "GetAbstractedPadState"},
{303, nullptr, "GetAbstractedPadsState"},
@@ -148,6 +145,8 @@ IHidDebugServer::IHidDebugServer(Core::System& system_, std::shared_ptr<Resource
{331, nullptr, "DetachHdlsVirtualDevice"},
{332, nullptr, "SetHdlsState"},
{350, nullptr, "AddRegisteredDevice"},
{351, nullptr, "GetRegisteredDevicesCountDebug"}, //17.0.0-18.1.0
{352, nullptr, "DeleteRegisteredDevicesDebug"}, //17.0.0-18.1.0
{400, nullptr, "DisableExternalMcuOnNxDevice"},
{401, nullptr, "DisableRailDeviceFiltering"},
{402, nullptr, "EnableWiredPairing"},
@@ -159,14 +158,30 @@ IHidDebugServer::IHidDebugServer(Core::System& system_, std::shared_ptr<Resource
{551, nullptr, "GetAnalogStickModelData"},
{552, nullptr, "ResetAnalogStickModelData"},
{600, nullptr, "ConvertPadState"},
{601, nullptr, "IsButtonConfigSupported"}, //18.0.0+
{602, nullptr, "IsButtonConfigEmbeddedSupported"}, //18.0.0+
{603, nullptr, "DeleteButtonConfig"}, //18.0.0+
{604, nullptr, "DeleteButtonConfigEmbedded"}, //18.0.0+
{605, nullptr, "SetButtonConfigEnabled"}, //18.0.0+
{606, nullptr, "SetButtonConfigEmbeddedEnabled"}, //18.0.0+
{607, nullptr, "IsButtonConfigEnabled"}, //18.0.0+
{608, nullptr, "IsButtonConfigEmbeddedEnabled"}, //18.0.0+
{609, nullptr, "SetButtonConfigEmbedded"}, //18.0.0+
{610, nullptr, "SetButtonConfigFull"}, //18.0.0+
{611, nullptr, "SetButtonConfigLeft"}, //18.0.0+
{612, nullptr, "SetButtonConfigRight"}, //18.0.0+
{613, nullptr, "GetButtonConfigEmbedded"}, //18.0.0+
{614, nullptr, "GetButtonConfigFull"}, //18.0.0+
{615, nullptr, "GetButtonConfigLeft"}, //18.0.0+
{616, nullptr, "GetButtonConfigRight"}, //18.0.0+
{650, nullptr, "AddButtonPlayData"},
{651, nullptr, "StartButtonPlayData"},
{652, nullptr, "StopButtonPlayData"},
{700, nullptr, "Unknown700"},
{700, nullptr, "GetRailAttachEventCount"}, //21.0.0+
{2000, nullptr, "DeactivateDigitizer"},
{2001, nullptr, "SetDigitizerAutoPilotState"},
{2002, nullptr, "UnsetDigitizerAutoPilotState"},
{2002, nullptr, "ReloadFirmwareDebugSettings"},
{3000, nullptr, "ReloadFirmwareDebugSettings"},
};
// clang-format on

View File

@@ -70,7 +70,9 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
{328, nullptr, "AttachAbstractedPadToNpad"},
{329, nullptr, "DetachAbstractedPadAll"},
{330, nullptr, "CheckAbstractedPadConnection"},
{500, nullptr, "SetAppletResourceUserId"},
{332, nullptr, "ConvertAppletDetailedUiTypeFromPlayReportType"}, //19.0.0+
{333, nullptr, "SetNpadUserSpgApplet"}, //20.0.0+
{334, nullptr, "AcquireUniquePadButtonStateChangedEventHandle"}, //20.0.0+
{501, &IHidSystemServer::RegisterAppletResourceUserId, "RegisterAppletResourceUserId"},
{502, &IHidSystemServer::UnregisterAppletResourceUserId, "UnregisterAppletResourceUserId"},
{503, &IHidSystemServer::EnableAppletToGetInput, "EnableAppletToGetInput"},
@@ -99,7 +101,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
{547, nullptr, "GetAllowedBluetoothLinksCount"},
{548, &IHidSystemServer::GetRegisteredDevices, "GetRegisteredDevices"},
{549, nullptr, "GetConnectableRegisteredDevices"},
{551, nullptr, "GetRegisteredDevicesForControllerSupport"},
{551, nullptr, "GetRegisteredDevicesForControllerSupport"}, //20.0.0+
{700, nullptr, "ActivateUniquePad"},
{702, &IHidSystemServer::AcquireUniquePadConnectionEventHandle, "AcquireUniquePadConnectionEventHandle"},
{703, &IHidSystemServer::GetUniquePadIds, "GetUniquePadIds"},
@@ -119,6 +121,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
{810, nullptr, "GetUniquePadControllerNumber"},
{811, nullptr, "GetSixAxisSensorUserCalibrationStage"},
{812, nullptr, "GetConsoleUniqueSixAxisSensorHandle"},
{813, nullptr, "GetDeviceType"},
{821, nullptr, "StartAnalogStickManualCalibration"},
{822, nullptr, "RetryCurrentAnalogStickManualCalibrationStage"},
{823, nullptr, "CancelAnalogStickManualCalibration"},
@@ -149,6 +152,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
{1009, nullptr, "AcquireAudioControlEventHandle"},
{1010, nullptr, "GetAudioControlStates"},
{1011, nullptr, "DeactivateAudioControl"},
{1012, nullptr, "GetFirmwareVersionStringForUserSupportPage"},
{1050, nullptr, "IsSixAxisSensorAccurateUserCalibrationSupported"},
{1051, nullptr, "StartSixAxisSensorAccurateUserCalibration"},
{1052, nullptr, "CancelSixAxisSensorAccurateUserCalibration"},
@@ -169,6 +173,8 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
{1155, &IHidSystemServer::SetForceHandheldStyleVibration, "SetForceHandheldStyleVibration"},
{1156, nullptr, "SendConnectionTriggerWithoutTimeoutEvent"},
{1157, nullptr, "CancelConnectionTrigger"},
{1158, nullptr, "SetConnectionLimitForSplay"}, //20.1.0+
{1159, nullptr, "ClearConnectionLimitForSplay"}, //20.1.0+
{1200, nullptr, "IsButtonConfigSupported"},
{1201, nullptr, "IsButtonConfigEmbeddedSupported"},
{1202, nullptr, "DeleteButtonConfig"},
@@ -227,16 +233,17 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
{1289, nullptr, "SetButtonConfigStorageFull"},
{1290, nullptr, "DeleteButtonConfigStorageRight"},
{1291, nullptr, "DeleteButtonConfigStorageRight"},
{1308, nullptr, "SetButtonConfigVisible"}, // 18.0.0+
{1309, nullptr, "IsButtonConfigVisible"}, // 18.0.0+
{1320, nullptr, "WakeTouchScreenUp"}, // 17.0.0+
{1321, nullptr, "PutTouchScreenToSleep"}, // 17.0.0+
{1322, nullptr, "AcquireTouchScreenAsyncWakeCompletedEvent"}, // 20.0.0+
{1323, nullptr, "StartTouchScreenAutoTuneForSystemSettings"}, // 21.0.0+
{1324, nullptr, "AcquireTouchScreenAutoTuneCompletedEvent"}, // 21.0.0+
{1325, nullptr, "IsTouchScreenAutoTuneRequiredForRepairProviderReplacement"}, // 21.0.0+
{1326, nullptr, "Unknown1326"}, // 21.0.0+
{1420, nullptr, "GetAppletResourceProperty"}, // 19.0.0+
{1308, nullptr, "SetButtonConfigVisible"}, //18.0.0+
{1309, nullptr, "IsButtonConfigVisible"}, //18.0.0+
{1320, nullptr, "WakeTouchScreenUp"}, //17.0.0+
{1321, nullptr, "PutTouchScreenToSleep"}, //17.0.0+
{1322, nullptr, "AcquireTouchScreenAsyncWakeCompletedEvent"}, //20.0.0+
{1323, nullptr, "StartTouchScreenAutoTuneForSystemSettings"}, //21.0.0+
{1324, nullptr, "AcquireTouchScreenAutoTuneCompletedEvent"}, //21.0.0+
{1325, nullptr, "IsTouchScreenAutoTuneRequiredForRepairProviderReplacement"}, //21.0.0+
{1326, nullptr, "SetTouchScreenOffset"}, //21.0.0+
{1420, nullptr, "GetAppletResourceProperty"}, //19.0.0+
{12010, nullptr, "SetButtonConfigLeft"} //11.0.0-17.0.1
};
// clang-format on

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -14,17 +17,42 @@ public:
explicit MIG_USR(Core::System& system_) : ServiceFramework{system_, "mig:usr"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "Unknown0"}, //19.0.0+
{1, nullptr, "Unknown1"}, //20.0.0+
{2, nullptr, "Unknown2"}, //20.0.0+
{10, nullptr, "TryGetLastMigrationInfo"},
{100, nullptr, "CreateServer"},
{101, nullptr, "ResumeServer"},
{200, nullptr, "CreateClient"},
{201, nullptr, "ResumeClient"},
{1001, nullptr, "Unknown1001"},
{1010, nullptr, "Unknown1010"},
{1100, nullptr, "Unknown1100"},
{1101, nullptr, "Unknown1101"},
{1200, nullptr, "Unknown1200"},
{1201, nullptr, "Unknown1201"}
{11, nullptr, "Unknown11"}, //20.0.0+
{100, nullptr, "CreateUserMigrationServer"}, //7.0.0+
{101, nullptr, "ResumeUserMigrationServer"}, //7.0.0+
{200, nullptr, "CreateUserMigrationClient"}, //7.0.0+
{201, nullptr, "ResumeUserMigrationClient"}, //7.0.0+
{1001, nullptr, "GetSaveDataMigrationPolicyInfoAsync"}, //8.0.0-20.5.0
{1010, nullptr, "TryGetLastSaveDataMigrationInfo"}, //7.0.0+
{1100, nullptr, "CreateSaveDataMigrationServer"}, //7.0.0-19.0.1
{1101, nullptr, "ResumeSaveDataMigrationServer"}, //7.0.0+
{1110, nullptr, "Unknown1101"}, //17.0.0+
{1200, nullptr, "CreateSaveDataMigrationClient"}, //7.0.0+
{1201, nullptr, "ResumeSaveDataMigrationClient"}, //7.0.0+
{2001, nullptr, "Unknown2001"}, //20.0.0+
{2010, nullptr, "Unknown2010"}, //20.0.0+
{2100, nullptr, "Unknown2100"}, //20.0.0+
{2110, nullptr, "Unknown2110"}, //20.0.0+
{2200, nullptr, "Unknown2200"}, //20.0.0+
{2210, nullptr, "Unknown2210"}, //20.0.0+
{2220, nullptr, "Unknown2220"}, //20.0.0+
{2230, nullptr, "Unknown2230"}, //20.0.0+
{2231, nullptr, "Unknown2231"}, //20.0.0+
{2232, nullptr, "Unknown2232"}, //20.0.0+
{2233, nullptr, "Unknown2233"}, //20.0.0+
{2234, nullptr, "Unknown2234"}, //20.0.0+
{2250, nullptr, "Unknown2250"}, //20.0.0+
{2260, nullptr, "Unknown2260"}, //20.0.0+
{2270, nullptr, "Unknown2270"}, //20.0.0+
{2280, nullptr, "Unknown2280"}, //20.0.0+
{2300, nullptr, "Unknown2300"}, //20.0.0+
{2310, nullptr, "Unknown2310"}, //20.0.0+
{2400, nullptr, "Unknown2400"}, //20.0.0+
{2420, nullptr, "Unknown2420"}, //20.0.0+
};
// clang-format on

View File

@@ -167,57 +167,146 @@ public:
{81, nullptr, "ListLocalCommunicationSendSystemUpdateTask"},
{82, nullptr, "GetReceivedSystemDataPath"},
{83, nullptr, "CalculateApplyDeltaTaskOccupiedSize"},
{84, nullptr, "Unknown84"},
{84, nullptr, "ReloadErrorSimulation"},
{85, nullptr, "ListNetworkInstallTaskContentMetaFromInstallMeta"},
{86, nullptr, "ListNetworkInstallTaskOccupiedSize"},
{87, nullptr, "Unknown87"},
{88, nullptr, "Unknown88"},
{89, nullptr, "Unknown89"},
{90, nullptr, "Unknown90"},
{91, nullptr, "Unknown91"},
{92, nullptr, "Unknown92"},
{93, nullptr, "Unknown93"},
{94, nullptr, "Unknown94"},
{95, nullptr, "Unknown95"},
{96, nullptr, "Unknown96"},
{97, nullptr, "Unknown97"},
{98, nullptr, "Unknown98"},
{99, nullptr, "Unknown99"},
{100, nullptr, "Unknown100"},
{101, nullptr, "Unknown101"},
{102, nullptr, "Unknown102"},
{103, nullptr, "Unknown103"},
{104, nullptr, "Unknown104"},
{105, nullptr, "Unknown105"},
{106, nullptr, "Unknown106"},
{107, nullptr, "Unknown107"},
{108, nullptr, "Unknown108"},
{109, nullptr, "Unknown109"},
{110, nullptr, "Unknown110"},
{111, nullptr, "Unknown111"},
{112, nullptr, "Unknown112"},
{113, nullptr, "Unknown113"},
{114, nullptr, "Unknown114"},
{115, nullptr, "Unknown115"},
{116, nullptr, "Unknown116"},
{117, nullptr, "Unknown117"},
{118, nullptr, "Unknown118"},
{119, nullptr, "Unknown119"},
{120, nullptr, "Unknown120"},
{121, nullptr, "Unknown121"},
{122, nullptr, "Unknown122"},
{123, nullptr, "Unknown123"},
{124, nullptr, "Unknown124"},
{125, nullptr, "Unknown125"},
{126, nullptr, "Unknown126"},
{127, nullptr, "Unknown127"},
{128, nullptr, "Unknown128"},
{129, nullptr, "Unknown129"},
{130, nullptr, "Unknown130"},
{131, nullptr, "Unknown131"},
{132, nullptr, "Unknown132"},
{133, nullptr, "Unknown133"},
{134, nullptr, "Unknown134"},
{87, nullptr, "RequestQueryAvailableELicenses"},
{88, nullptr, "RequestAssignELicenses"},
{89, nullptr, "RequestExtendELicenses"},
{90, nullptr, "RequestSyncELicenses"},
{91, nullptr, "Unknown91"}, //6.0.0-14.1.2
{92, nullptr, "Unknown92"}, //21.0.0+
{93, nullptr, "RequestReportActiveELicenses"},
{94, nullptr, "RequestReportActiveELicensesPassively"},
{95, nullptr, "RequestRegisterDynamicRightsNotificationToken"},
{96, nullptr, "RequestAssignAllDeviceLinkedELicenses"},
{97, nullptr, "RequestRevokeAllELicenses"},
{98, nullptr, "RequestPrefetchForDynamicRights"},
{99, nullptr, "CreateNetworkInstallTask"},
{100, nullptr, "ListNetworkInstallTaskRightsIds"},
{101, nullptr, "RequestDownloadETickets"},
{102, nullptr, "RequestQueryDownloadableContents"},
{103, nullptr, "DeleteNetworkInstallTaskContentMeta"},
{104, nullptr, "RequestIssueEdgeTokenForDebug"},
{105, nullptr, "RequestQueryAvailableELicenses2"},
{106, nullptr, "RequestAssignELicenses2"},
{107, nullptr, "GetNetworkInstallTaskStateCounter"},
{108, nullptr, "InvalidateDynamicRightsNaIdTokenCacheForDebug"},
{109, nullptr, "ListNetworkInstallTaskPartialInstallContentMeta"},
{110, nullptr, "ListNetworkInstallTaskRightsIdsFromIndex"},
{111, nullptr, "AddNetworkInstallTaskContentMetaForUser"},
{112, nullptr, "RequestAssignELicensesAndDownloadETickets"},
{113, nullptr, "RequestQueryAvailableCommonELicenses"},
{114, nullptr, "SetNetworkInstallTaskExtendedAttribute"},
{115, nullptr, "GetNetworkInstallTaskExtendedAttribute"},
{116, nullptr, "GetAllocatorInfo"},
{117, nullptr, "RequestQueryDownloadableContentsByApplicationId"},
{118, nullptr, "MarkNoDownloadRightsErrorResolved"},
{119, nullptr, "GetApplyDeltaTaskAllAppliedContentMeta"},
{120, nullptr, "PrioritizeNetworkInstallTask"},
{121, nullptr, "RequestQueryAvailableCommonELicenses2"},
{122, nullptr, "RequestAssignCommonELicenses"},
{123, nullptr, "RequestAssignCommonELicenses2"},
{124, nullptr, "IsNetworkInstallTaskFrontOfQueue"},
{125, nullptr, "PrioritizeApplyDeltaTask"},
{126, nullptr, "RerouteDownloadingPatch"},
{127, nullptr, "UnmarkNoDownloadRightsErrorResolved"},
{128, nullptr, "RequestContentsSize"},
{129, nullptr, "RequestContentsAuthorizationToken"},
{130, nullptr, "RequestCdnVendorDiscovery"},
{131, nullptr, "RefreshDebugAvailability"},
{132, nullptr, "ClearResponseSimulationEntry"},
{133, nullptr, "RegisterResponseSimulationEntry"},
{134, nullptr, "GetProcessedCdnVendors"},
{135, nullptr, "RefreshRuntimeBehaviorsForDebug"},
{136, nullptr, "RequestOnlineSubscriptionFreeTrialAvailability"},
{137, nullptr, "GetNetworkInstallTaskContentMetaCount"},
{138, nullptr, "RequestRevokeELicenses"},
{139, nullptr, "EnableNetworkConnectionToUseApplicationCore"},
{140, nullptr, "DisableNetworkConnectionToUseApplicationCore"},
{141, nullptr, "IsNetworkConnectionEnabledToUseApplicationCore"},
{142, nullptr, "RequestCheckSafeSystemVersion"},
{143, nullptr, "RequestApplicationIcon"},
{144, nullptr, "RequestDownloadIdbeIconFile"},
{147, nullptr, "Unknown147"}, //18.0.0+
{148, nullptr, "Unknown148"}, //18.0.0+
{150, nullptr, "Unknown150"}, //19.0.0+
{151, nullptr, "Unknown151"}, //20.0.0+
{152, nullptr, "Unknown152"}, //20.0.0+
{153, nullptr, "Unknown153"}, //20.0.0+
{154, nullptr, "Unknown154"}, //20.0.0+
{155, nullptr, "Unknown155"}, //20.0.0+
{156, nullptr, "Unknown156"}, //20.0.0+
{157, nullptr, "Unknown157"}, //20.0.0+
{158, nullptr, "Unknown158"}, //20.0.0+
{159, nullptr, "Unknown159"}, //20.0.0+
{160, nullptr, "Unknown160"}, //20.0.0+
{161, nullptr, "Unknown161"}, //20.0.0+
{162, nullptr, "Unknown162"}, //20.0.0+
{163, nullptr, "Unknown163"}, //20.0.0+
{164, nullptr, "Unknown164"}, //20.0.0+
{165, nullptr, "Unknown165"}, //20.0.0+
{166, nullptr, "Unknown166"}, //20.0.0+
{167, nullptr, "Unknown167"}, //20.0.0+
{168, nullptr, "Unknown168"}, //20.0.0+
{169, nullptr, "Unknown169"}, //20.0.0+
{170, nullptr, "Unknown170"}, //20.0.0+
{171, nullptr, "Unknown171"}, //20.0.0+
{172, nullptr, "Unknown172"}, //20.0.0+
{173, nullptr, "Unknown173"}, //20.0.0+
{174, nullptr, "Unknown174"}, //20.0.0+
{175, nullptr, "Unknown175"}, //20.0.0+
{176, nullptr, "Unknown176"}, //20.0.0+
{177, nullptr, "Unknown177"}, //20.0.0+
{2000, nullptr, "Unknown2000"}, //20.0.0+
{2001, nullptr, "Unknown2001"}, //20.0.0+
{2002, nullptr, "Unknown2002"}, //20.0.0+
{2003, nullptr, "Unknown2003"}, //20.0.0+
{2004, nullptr, "Unknown2004"}, //20.0.0+
{2007, nullptr, "Unknown2007"}, //20.0.0+
{2011, nullptr, "Unknown2011"}, //20.0.0+
{2012, nullptr, "Unknown2012"}, //20.0.0+
{2013, nullptr, "Unknown2013"}, //20.0.0+
{2014, nullptr, "Unknown2014"}, //20.0.0+
{2015, nullptr, "Unknown2015"}, //20.0.0+
{2016, nullptr, "Unknown2016"}, //20.0.0+
{2017, nullptr, "Unknown2017"}, //20.0.0+
{2018, nullptr, "Unknown2018"}, //20.0.0+
{2019, nullptr, "Unknown2019"}, //20.0.0+
{2020, nullptr, "Unknown2020"}, //20.0.0+
{2021, nullptr, "Unknown2021"}, //20.0.0+
{2022, nullptr, "Unknown2022"}, //20.0.0+
{2023, nullptr, "Unknown2023"}, //20.0.0+
{2024, nullptr, "Unknown2024"}, //20.0.0+
{2025, nullptr, "Unknown2025"}, //20.0.0+
{2026, nullptr, "Unknown2026"}, //20.0.0+
{2027, nullptr, "Unknown2027"}, //20.0.0+
{2028, nullptr, "Unknown2028"}, //20.0.0+
{2029, nullptr, "Unknown2029"}, //20.0.0+
{2030, nullptr, "Unknown2030"}, //20.0.0+
{2031, nullptr, "Unknown2031"}, //20.0.0+
{2032, nullptr, "Unknown2032"}, //20.0.0+
{2033, nullptr, "Unknown2033"}, //20.0.0+
{2034, nullptr, "Unknown2034"}, //20.0.0+
{2035, nullptr, "Unknown2035"}, //20.0.0+
{2036, nullptr, "Unknown2036"}, //20.0.0+
{2037, nullptr, "Unknown2037"}, //20.0.0+
{2038, nullptr, "Unknown2038"}, //20.0.0+
{2039, nullptr, "Unknown2039"}, //20.0.0+
{2040, nullptr, "Unknown2040"}, //20.0.0+
{2041, nullptr, "Unknown2041"}, //20.0.0+
{2042, nullptr, "Unknown2042"}, //20.0.0+
{2043, nullptr, "Unknown2043"}, //20.0.0+
{2044, nullptr, "Unknown2044"}, //20.0.0+
{2045, nullptr, "Unknown2045"}, //20.0.0+
{2046, nullptr, "Unknown2046"}, //20.0.0+
{2047, nullptr, "Unknown2047"}, //20.0.0+
{2048, nullptr, "Unknown2048"}, //20.0.0+
{2049, nullptr, "Unknown2049"}, //20.0.0+
{2050, nullptr, "Unknown2050"}, //20.0.0+
{2051, nullptr, "Unknown2051"}, //20.0.0+
{3000, nullptr, "RequestLatestApplicationIcon"}, //17.0.0+
{3001, nullptr, "RequestDownloadIdbeLatestIconFile"}, //17.0.0+
};
// clang-format on

View File

@@ -10,9 +10,12 @@
#include "core/hle/service/cmif_serialization.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/ns/application_manager_interface.h"
#include "core/file_sys/content_archive.h"
#include "core/hle/service/ns/content_management_interface.h"
#include "core/hle/service/ns/read_only_application_control_data_interface.h"
#include "core/file_sys/patch_manager.h"
#include "frontend_common/firmware_manager.h"
namespace Service::NS {
@@ -53,7 +56,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{37, nullptr, "ListRequiredVersion"},
{38, D<&IApplicationManagerInterface::CheckApplicationLaunchVersion>, "CheckApplicationLaunchVersion"},
{39, nullptr, "CheckApplicationLaunchRights"},
{40, nullptr, "GetApplicationLogoData"},
{40, D<&IApplicationManagerInterface::GetApplicationLogoData>, "GetApplicationLogoData"},
{41, nullptr, "CalculateApplicationDownloadRequiredSize"},
{42, nullptr, "CleanupSdCard"},
{43, D<&IApplicationManagerInterface::CheckSdCardMountStatus>, "CheckSdCardMountStatus"},
@@ -131,7 +134,26 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{406, nullptr, "GetApplicationControlProperty"},
{407, nullptr, "ListApplicationTitle"},
{408, nullptr, "ListApplicationIcon"},
{411, nullptr, "Unknown411"}, //19.0.0+
{412, nullptr, "Unknown412"}, //19.0.0+
{413, nullptr, "Unknown413"}, //19.0.0+
{414, nullptr, "Unknown414"}, //19.0.0+
{415, nullptr, "Unknown415"}, //19.0.0+
{416, nullptr, "Unknown416"}, //19.0.0+
{417, nullptr, "InvalidateAllApplicationControlCacheOfTheStage"}, //19.0.0+
{418, nullptr, "InvalidateApplicationControlCacheOfTheStage"}, //19.0.0+
{419, D<&IApplicationManagerInterface::RequestDownloadApplicationControlDataInBackground>, "RequestDownloadApplicationControlDataInBackground"},
{420, nullptr, "CloneApplicationControlDataCacheForDebug"},
{421, nullptr, "Unknown421"}, //20.0.0+
{422, nullptr, "Unknown422"}, //20.0.0+
{423, nullptr, "Unknown423"}, //20.0.0+
{424, nullptr, "Unknown424"}, //20.0.0+
{425, nullptr, "Unknown425"}, //20.0.0+
{426, nullptr, "Unknown426"}, //20.0.0+
{427, nullptr, "Unknown427"}, //20.0.0+
{428, nullptr, "Unknown428"}, //21.0.0+
{429, nullptr, "Unknown429"}, //21.0.0+
{430, nullptr, "Unknown430"}, //21.0.0+
{502, nullptr, "RequestCheckGameCardRegistration"},
{503, nullptr, "RequestGameCardRegistrationGoldPoint"},
{504, nullptr, "RequestRegisterGameCard"},
@@ -143,6 +165,13 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{510, nullptr, "GetGameCardPlatformRegion"},
{511, D<&IApplicationManagerInterface::GetGameCardWakenReadyEvent>, "GetGameCardWakenReadyEvent"},
{512, D<&IApplicationManagerInterface::IsGameCardApplicationRunning>, "IsGameCardApplicationRunning"},
{513, nullptr, "Unknown513"}, //20.0.0+
{514, nullptr, "Unknown514"}, //20.0.0+
{515, nullptr, "Unknown515"}, //20.0.0+
{516, nullptr, "Unknown516"}, //21.0.0+
{517, nullptr, "Unknown517"}, //21.0.0+
{518, nullptr, "Unknown518"}, //21.0.0+
{519, nullptr, "Unknown519"}, //21.0.0+
{600, nullptr, "CountApplicationContentMeta"},
{601, nullptr, "ListApplicationContentMetaStatus"},
{602, nullptr, "ListAvailableAddOnContent"},
@@ -180,6 +209,22 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{914, nullptr, "HideApplicationRecord"},
{915, nullptr, "ShowApplicationRecord"},
{916, nullptr, "IsApplicationAutoDeleteDisabled"},
{916, nullptr, "Unknown916"}, //20.0.0+
{917, nullptr, "Unknown917"}, //20.0.0+
{918, nullptr, "Unknown918"}, //20.0.0+
{919, nullptr, "Unknown919"}, //20.0.0+
{920, nullptr, "Unknown920"}, //20.0.0+
{921, nullptr, "Unknown921"}, //20.0.0+
{922, nullptr, "Unknown922"}, //20.0.0+
{923, nullptr, "Unknown923"}, //20.0.0+
{928, nullptr, "Unknown928"}, //20.0.0+
{929, nullptr, "Unknown929"}, //20.0.0+
{930, nullptr, "Unknown930"}, //20.0.0+
{931, nullptr, "Unknown931"}, //20.0.0+
{933, nullptr, "Unknown933"}, //20.0.0+
{934, nullptr, "Unknown934"}, //20.0.0+
{935, nullptr, "Unknown935"}, //20.0.0+
{936, nullptr, "Unknown936"}, //20.0.0+
{1000, nullptr, "RequestVerifyApplicationDeprecated"},
{1001, nullptr, "CorruptApplicationForDebug"},
{1002, nullptr, "RequestVerifyAddOnContentsRights"},
@@ -208,6 +253,11 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{1504, nullptr, "InsertSdCard"},
{1505, nullptr, "RemoveSdCard"},
{1506, nullptr, "GetSdCardStartupStatus"},
{1508, nullptr, "Unknown1508"}, //20.0.0+
{1509, nullptr, "Unknown1509"}, //20.0.0+
{1510, nullptr, "Unknown1510"}, //20.0.0+
{1511, nullptr, "Unknown1511"}, //20.0.0+
{1512, nullptr, "Unknown1512"}, //20.0.0+
{1600, nullptr, "GetSystemSeedForPseudoDeviceId"},
{1601, nullptr, "ResetSystemSeedForPseudoDeviceId"},
{1700, nullptr, "ListApplicationDownloadingContentMeta"},
@@ -244,8 +294,11 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{2016, nullptr, "ListNotCommittedContentMeta"},
{2017, nullptr, "CreateDownloadTask"},
{2018, nullptr, "GetApplicationDeliveryInfoHash"},
{2019, nullptr, "Unknown2019"}, //20.0.0+
{2050, D<&IApplicationManagerInterface::GetApplicationRightsOnClient>, "GetApplicationRightsOnClient"},
{2051, nullptr, "InvalidateRightsIdCache"},
{2052, nullptr, "Unknown2052"}, //20.0.0+
{2053, nullptr, "Unknown2053"}, //20.0.0+
{2100, D<&IApplicationManagerInterface::GetApplicationTerminateResult>, "GetApplicationTerminateResult"},
{2101, nullptr, "GetRawApplicationTerminateResult"},
{2150, nullptr, "CreateRightsEnvironment"},
@@ -262,6 +315,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{2180, nullptr, "RequestExtendRightsInRightsEnvironment"},
{2181, nullptr, "GetResultOfExtendRightsInRightsEnvironment"},
{2182, nullptr, "SetActiveRightsContextUsingStateToRightsEnvironment"},
{2183, nullptr, "Unknown2183"}, //20.1.0+
{2190, nullptr, "GetRightsEnvironmentHandleForApplication"},
{2199, nullptr, "GetRightsEnvironmentCountForDebug"},
{2200, nullptr, "GetGameCardApplicationCopyIdentifier"},
@@ -278,6 +332,16 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{2357, nullptr, "EnableMultiCoreDownload"},
{2358, nullptr, "DisableMultiCoreDownload"},
{2359, nullptr, "IsMultiCoreDownloadEnabled"},
{2360, nullptr, "GetApplicationDownloadTaskCount"}, //19.0.0+
{2361, nullptr, "GetMaxApplicationDownloadTaskCount"}, //19.0.0+
{2362, nullptr, "Unknown2362"}, //20.0.0+
{2363, nullptr, "Unknown2363"}, //20.0.0+
{2364, nullptr, "Unknown2364"}, //20.0.0+
{2365, nullptr, "Unknown2365"}, //20.0.0+
{2366, nullptr, "Unknown2366"}, //20.0.0+
{2367, nullptr, "Unknown2367"}, //20.0.0+
{2368, nullptr, "Unknown2368"}, //20.0.0+
{2369, nullptr, "Unknown2369"}, //21.0.0+
{2400, nullptr, "GetPromotionInfo"},
{2401, nullptr, "CountPromotionInfo"},
{2402, nullptr, "ListPromotionInfo"},
@@ -296,6 +360,9 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{2520, nullptr, "IsQualificationTransitionSupportedByProcessId"},
{2521, nullptr, "GetRightsUserChangedEvent"},
{2522, nullptr, "IsRomRedirectionAvailable"},
{2523, nullptr, "GetProgramId"}, //17.0.0+
{2524, nullptr, "Unknown2524"}, //19.0.0+
{2525, nullptr, "Unknown2525"}, //20.0.0+
{2800, nullptr, "GetApplicationIdOfPreomia"},
{3000, nullptr, "RegisterDeviceLockKey"},
{3001, nullptr, "UnregisterDeviceLockKey"},
@@ -313,11 +380,99 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_
{3013, nullptr, "IsGameCardEnabled"},
{3014, nullptr, "IsLocalContentShareEnabled"},
{3050, nullptr, "ListAssignELicenseTaskResult"},
{4022, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4022"},
{4023, D<&IApplicationManagerInterface::Unknown4023>, "Unknown4023"},
{4088, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4088"},
{4053, D<&IApplicationManagerInterface::Unknown4053>, "Unknown4053"},
{9999, nullptr, "GetApplicationCertificate"},
{3104, nullptr, "GetApplicationNintendoLogo"}, //18.0.0+
{3105, nullptr, "GetApplicationStartupMovie"}, //18.0.0+
{4000, nullptr, "Unknown4000"}, //20.0.0+
{4004, nullptr, "Unknown4004"}, //20.0.0+
{4006, nullptr, "Unknown4006"}, //20.0.0+
{4007, nullptr, "Unknown4007"}, //20.0.0+
{4008, nullptr, "Unknown4008"}, //20.0.0+
{4009, nullptr, "Unknown4009"}, //20.0.0+
{4010, nullptr, "Unknown4010"}, //20.0.0+
{4011, nullptr, "Unknown4011"}, //20.0.0+
{4012, nullptr, "Unknown4012"}, //20.0.0+
{4013, nullptr, "Unknown4013"}, //20.0.0+
{4015, nullptr, "Unknown4015"}, //20.0.0+
{4017, nullptr, "Unknown4017"}, //20.0.0+
{4019, nullptr, "Unknown4019"}, //20.0.0+
{4020, nullptr, "Unknown4020"}, //20.0.0+
{4021, nullptr, "Unknown4021"}, //20.0.0+
{4022, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4022"}, //20.0.0+
{4023, D<&IApplicationManagerInterface::Unknown4023>, "Unknown4023"}, //20.0.0+
{4024, nullptr, "Unknown4024"}, //20.0.0+
{4025, nullptr, "Unknown4025"}, //20.0.0+
{4026, nullptr, "Unknown4026"}, //20.0.0+
{4027, nullptr, "Unknown4027"}, //20.0.0+
{4028, nullptr, "Unknown4028"}, //20.0.0+
{4029, nullptr, "Unknown4029"}, //20.0.0+
{4030, nullptr, "Unknown4030"}, //20.0.0+
{4031, nullptr, "Unknown4031"}, //20.0.0+
{4032, nullptr, "Unknown4032"}, //20.0.0+
{4033, nullptr, "Unknown4033"}, //20.0.0+
{4034, nullptr, "Unknown4034"}, //20.0.0+
{4035, nullptr, "Unknown4035"}, //20.0.0+
{4037, nullptr, "Unknown4037"}, //20.0.0+
{4038, nullptr, "Unknown4038"}, //20.0.0+
{4039, nullptr, "Unknown4039"}, //20.0.0+
{4040, nullptr, "Unknown4040"}, //20.0.0+
{4041, nullptr, "Unknown4041"}, //20.0.0+
{4042, nullptr, "Unknown4042"}, //20.0.0+
{4043, nullptr, "Unknown4043"}, //20.0.0+
{4044, nullptr, "Unknown4044"}, //20.0.0+
{4045, nullptr, "Unknown4045"}, //20.0.0+
{4046, nullptr, "Unknown4046"}, //20.0.0+
{4049, nullptr, "Unknown4049"}, //20.0.0+
{4050, nullptr, "Unknown4050"}, //20.0.0+
{4051, nullptr, "Unknown4051"}, //20.0.0+
{4052, nullptr, "Unknown4052"}, //20.0.0+
{4053, D<&IApplicationManagerInterface::Unknown4053>, "Unknown4053"}, //20.0.0+
{4054, nullptr, "Unknown4054"}, //20.0.0+
{4055, nullptr, "Unknown4055"}, //20.0.0+
{4056, nullptr, "Unknown4056"}, //20.0.0+
{4057, nullptr, "Unknown4057"}, //20.0.0+
{4058, nullptr, "Unknown4058"}, //20.0.0+
{4059, nullptr, "Unknown4059"}, //20.0.0+
{4060, nullptr, "Unknown4060"}, //20.0.0+
{4061, nullptr, "Unknown4061"}, //20.0.0+
{4062, nullptr, "Unknown4062"}, //20.0.0+
{4063, nullptr, "Unknown4063"}, //20.0.0+
{4064, nullptr, "Unknown4064"}, //20.0.0+
{4065, nullptr, "Unknown4065"}, //20.0.0+
{4066, nullptr, "Unknown4066"}, //20.0.0+
{4067, nullptr, "Unknown4067"}, //20.0.0+
{4068, nullptr, "Unknown4068"}, //20.0.0+
{4069, nullptr, "Unknown4069"}, //20.0.0+
{4070, nullptr, "Unknown4070"}, //20.0.0+
{4071, nullptr, "Unknown4071"}, //20.0.0+
{4072, nullptr, "Unknown4072"}, //20.0.0+
{4073, nullptr, "Unknown4073"}, //20.0.0+
{4074, nullptr, "Unknown4074"}, //20.0.0+
{4075, nullptr, "Unknown4075"}, //20.0.0+
{4076, nullptr, "Unknown4076"}, //20.0.0+
{4077, nullptr, "Unknown4077"}, //20.0.0+
{4078, nullptr, "Unknown4078"}, //20.0.0+
{4079, nullptr, "Unknown4079"}, //20.0.0+
{4080, nullptr, "Unknown4080"}, //20.0.0+
{4081, nullptr, "Unknown4081"}, //20.0.0+
{4083, nullptr, "Unknown4083"}, //20.0.0+
{4084, nullptr, "Unknown4084"}, //20.0.0+
{4085, nullptr, "Unknown4085"}, //20.0.0+
{4086, nullptr, "Unknown4086"}, //20.0.0+
{4087, nullptr, "Unknown4087"}, //20.0.0+
{4088, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4088"}, //20.0.0+
{4089, nullptr, "Unknown4089"}, //20.0.0+
{4090, nullptr, "Unknown4090"}, //20.0.0+
{4091, nullptr, "Unknown4091"}, //20.0.0+
{4092, nullptr, "Unknown4092"}, //20.0.0+
{4093, nullptr, "Unknown4093"}, //20.0.0+
{4094, nullptr, "Unknown4094"}, //20.0.0+
{4095, nullptr, "Unknown4095"}, //20.0.0+
{4096, nullptr, "Unknown4096"}, //20.0.0+
{4097, nullptr, "Unknown4097"}, //20.0.0+
{4099, nullptr, "Unknown4099"}, //21.0.0+
{5000, nullptr, "Unknown5000"}, //18.0.0+
{5001, nullptr, "Unknown5001"}, //18.0.0+
{9999, nullptr, "GetApplicationCertificate"}, //10.0.0-10.2.0
};
// clang-format on
@@ -330,6 +485,53 @@ Result IApplicationManagerInterface::UnregisterNetworkServiceAccountWithUserSave
LOG_DEBUG(Service_NS, "called, user_id={}", user_id.FormattedString());
R_SUCCEED();
}
Result IApplicationManagerInterface::GetApplicationLogoData(
Out<s64> out_size, OutBuffer<BufferAttr_HipcMapAlias> out_buffer, u64 application_id,
InBuffer<BufferAttr_HipcMapAlias> logo_path_buffer) {
const std::string path_view{reinterpret_cast<const char*>(logo_path_buffer.data()),
logo_path_buffer.size()};
// Find null terminator and trim the path
auto null_pos = path_view.find('\0');
std::string path = (null_pos != std::string::npos) ? path_view.substr(0, null_pos) : path_view;
LOG_DEBUG(Service_NS, "called, application_id={:016X}, logo_path={}", application_id, path);
auto& content_provider = system.GetContentProviderUnion();
auto program = content_provider.GetEntry(application_id, FileSys::ContentRecordType::Program);
if (!program) {
LOG_WARNING(Service_NS, "Application program not found for id={:016X}", application_id);
R_RETURN(ResultUnknown);
}
const auto logo_dir = program->GetLogoPartition();
if (!logo_dir) {
LOG_WARNING(Service_NS, "Logo partition not found for id={:016X}", application_id);
R_RETURN(ResultUnknown);
}
const auto file = logo_dir->GetFile(path);
if (!file) {
LOG_WARNING(Service_NS, "Logo path not found: {} for id={:016X}", path,
application_id);
R_RETURN(ResultUnknown);
}
const auto data = file->ReadAllBytes();
if (data.size() > out_buffer.size()) {
LOG_WARNING(Service_NS, "Logo buffer too small: have={}, need={}", out_buffer.size(),
data.size());
R_RETURN(ResultUnknown);
}
std::memcpy(out_buffer.data(), data.data(), data.size());
*out_size = static_cast<s64>(data.size());
R_SUCCEED();
}
Result IApplicationManagerInterface::GetApplicationControlData(
OutBuffer<BufferAttr_HipcMapAlias> out_buffer, Out<u32> out_actual_size,
ApplicationControlSource application_control_source, u64 application_id) {
@@ -429,13 +631,13 @@ Result IApplicationManagerInterface::IsAnyApplicationEntityInstalled(
}
Result IApplicationManagerInterface::GetApplicationViewDeprecated(
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
OutArray<ApplicationViewV19, BufferAttr_HipcMapAlias> out_application_views,
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
const auto size = (std::min)(out_application_views.size(), application_ids.size());
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
for (size_t i = 0; i < size; i++) {
ApplicationView view{};
ApplicationViewV19 view{};
view.application_id = application_ids[i];
view.version = 0x70000;
view.flags = 0x401f17;
@@ -447,34 +649,53 @@ Result IApplicationManagerInterface::GetApplicationViewDeprecated(
}
Result IApplicationManagerInterface::GetApplicationViewWithPromotionInfo(
OutArray<ApplicationViewWithPromotionInfo, BufferAttr_HipcMapAlias> out_application_views,
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
Out<u32> out_count,
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
const auto size = (std::min)(out_application_views.size(), application_ids.size());
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
const auto requested = application_ids.size();
LOG_WARNING(Service_NS, "called, size={}", requested);
for (size_t i = 0; i < size; i++) {
ApplicationViewWithPromotionInfo view{};
view.view.application_id = application_ids[i];
view.view.version = 0x70000;
view.view.flags = 0x401f17;
view.promotion = {};
const auto fw_pair = FirmwareManager::GetFirmwareVersion(system);
const bool is_fw20 = fw_pair.first.major >= 20;
out_application_views[i] = view;
const size_t per_entry_size = is_fw20 ? (sizeof(ApplicationViewV20) + sizeof(PromotionInfo))
: (sizeof(ApplicationViewV19) + sizeof(PromotionInfo));
const size_t capacity_entries = out_buffer.size() / per_entry_size;
const size_t to_write_entries = (std::min)(requested, capacity_entries);
u8* dst = out_buffer.data();
for (size_t i = 0; i < to_write_entries; ++i) {
ApplicationViewWithPromotionData data{};
data.view.application_id = application_ids[i];
data.view.version = 0x70000;
data.view.unk = 0;
data.view.flags = 0x401f17;
data.view.download_state = {};
data.view.download_progress = {};
data.promotion = {};
const size_t written = WriteApplicationViewWithPromotion(dst, out_buffer.size() - (dst - out_buffer.data()), data, is_fw20);
if (written == 0) {
break;
}
dst += written;
}
*out_count = static_cast<u32>(dst - out_buffer.data()) / static_cast<u32>(per_entry_size);
R_SUCCEED();
}
Result IApplicationManagerInterface::GetApplicationView(
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
OutArray<ApplicationViewV20, BufferAttr_HipcMapAlias> out_application_views,
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
const auto size = (std::min)(out_application_views.size(), application_ids.size());
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
for (size_t i = 0; i < size; i++) {
ApplicationView view{};
ApplicationViewV20 view{};
view.application_id = application_ids[i];
view.version = 0x70000;
view.unk = 0;
view.flags = 0x401f17;
out_application_views[i] = view;

View File

@@ -36,13 +36,14 @@ public:
Result IsGameCardApplicationRunning(Out<bool> out_is_running);
Result IsAnyApplicationEntityInstalled(Out<bool> out_is_any_application_entity_installed);
Result GetApplicationViewDeprecated(
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
OutArray<ApplicationViewV19, BufferAttr_HipcMapAlias> out_application_views,
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
Result GetApplicationViewWithPromotionInfo(
OutArray<ApplicationViewWithPromotionInfo, BufferAttr_HipcMapAlias> out_application_views,
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
Out<u32> out_count,
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
Result GetApplicationView(
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
OutArray<ApplicationViewV20, BufferAttr_HipcMapAlias> out_application_views,
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
Result GetApplicationRightsOnClient(
OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
@@ -59,6 +60,10 @@ public:
u64 application_id);
Result CheckApplicationLaunchVersion(u64 application_id);
Result GetApplicationTerminateResult(Out<Result> out_result, u64 application_id);
Result GetApplicationLogoData(Out<s64> out_size,
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
u64 application_id,
InBuffer<BufferAttr_HipcMapAlias> logo_path_buffer);
Result Unknown4022(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result Unknown4023(Out<u64> out_result);
Result Unknown4053();

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -22,6 +25,7 @@ IContentManagementInterface::IContentManagementInterface(Core::System& system_)
{601, nullptr, "ListApplicationContentMetaStatus"},
{605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"},
{607, nullptr, "IsAnyApplicationRunning"},
{608, nullptr, "Unknown608"}, //21.0.0+
};
// clang-format on

View File

@@ -37,7 +37,11 @@ IDynamicRightsInterface::IDynamicRightsInterface(Core::System& system_)
{23, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"},
{24, nullptr, "NotifyLimitedApplicationLicenseUpgradableEventForDebug"},
{25, nullptr, "RequestProceedDynamicRightsState"},
{26, D<&IDynamicRightsInterface::HasAccountRestrictedRightsInRunningApplications>, "HasAccountRestrictedRightsInRunningApplications"}
{26, D<&IDynamicRightsInterface::HasAccountRestrictedRightsInRunningApplications>, "HasAccountRestrictedRightsInRunningApplications"},
{27, nullptr, "Unknown27"}, //20.0.0+
{28, nullptr, "Unknown28"}, //20.0.0+
{29, nullptr, "Unknown29"}, //21.0.0+
{30, nullptr, "Unknown30"}, //21.0.0+
};
// clang-format on

View File

@@ -55,16 +55,6 @@ struct ApplicationDownloadState {
static_assert(sizeof(ApplicationDownloadState) == 0x20,
"ApplicationDownloadState has incorrect size.");
/// ApplicationView
struct ApplicationView {
u64 application_id; ///< ApplicationId.
u32 version; ///< Application Version(?)
u32 flags; ///< Flags.
ApplicationDownloadState download_state; ///< \ref ApplicationDownloadState
ApplicationDownloadState download_progress; ///< \ref ApplicationDownloadState
};
static_assert(sizeof(ApplicationView) == 0x50, "ApplicationView has incorrect size.");
struct ApplicationRightsOnClient {
u64 application_id;
Common::UUID uid;
@@ -88,14 +78,74 @@ struct PromotionInfo {
};
static_assert(sizeof(PromotionInfo) == 0x20, "PromotionInfo has incorrect size.");
// TODO(Maufeat): NsApplicationViewWithPromotionInfo is on SDK20+ 0x78 bytes
/// NsApplicationViewWithPromotionInfo
struct ApplicationViewWithPromotionInfo {
ApplicationView view; ///< \ref NsApplicationView
PromotionInfo promotion; ///< \ref NsPromotionInfo
struct ApplicationViewV19 {
u64 application_id;
u32 version;
u32 flags;
ApplicationDownloadState download_state;
ApplicationDownloadState download_progress;
};
static_assert(sizeof(ApplicationViewWithPromotionInfo) == 0x70,
"ApplicationViewWithPromotionInfo has incorrect size.");
static_assert(sizeof(ApplicationViewV19) == 0x50, "ApplicationViewV19 has incorrect size.");
struct ApplicationViewV20 {
u64 application_id;
u32 version;
u32 flags;
u32 unk;
ApplicationDownloadState download_state;
ApplicationDownloadState download_progress;
};
static_assert(sizeof(ApplicationViewV20) == 0x58, "ApplicationViewV20 has incorrect size.");
struct ApplicationViewData {
u64 application_id{};
u32 version{};
u32 flags{};
u32 unk{};
ApplicationDownloadState download_state{};
ApplicationDownloadState download_progress{};
};
inline size_t WriteApplicationView(void* dst, size_t dst_size, const ApplicationViewData& data,
bool is_fw20) {
if (is_fw20) {
if (dst_size < sizeof(ApplicationViewV20)) return 0;
auto* out = reinterpret_cast<ApplicationViewV20*>(dst);
out->application_id = data.application_id;
out->version = data.version;
out->flags = data.flags;
out->unk = data.unk;
out->download_state = data.download_state;
out->download_progress = data.download_progress;
return sizeof(ApplicationViewV20);
} else {
if (dst_size < sizeof(ApplicationViewV19)) return 0;
auto* out = reinterpret_cast<ApplicationViewV19*>(dst);
out->application_id = data.application_id;
out->version = data.version;
out->flags = data.flags;
out->download_state = data.download_state;
out->download_progress = data.download_progress;
return sizeof(ApplicationViewV19);
}
}
struct ApplicationViewWithPromotionData {
ApplicationViewData view;
PromotionInfo promotion;
};
inline size_t WriteApplicationViewWithPromotion(void* dst, size_t dst_size,
const ApplicationViewWithPromotionData& data,
bool sdk20_plus) {
const size_t view_written = WriteApplicationView(dst, dst_size, data.view, sdk20_plus);
if (view_written == 0) return 0;
const size_t remaining = dst_size - view_written;
if (remaining < sizeof(PromotionInfo)) return 0;
auto* promo_dst = reinterpret_cast<u8*>(dst) + view_written;
std::memcpy(promo_dst, &data.promotion, sizeof(PromotionInfo));
return view_written + sizeof(PromotionInfo);
}
struct ApplicationOccupiedSizeEntity {
FileSys::StorageId storage_id;
@@ -129,4 +179,9 @@ struct ApplicationDisplayData {
};
static_assert(sizeof(ApplicationDisplayData) == 0x300, "ApplicationDisplayData has incorrect size.");
struct LogoPath {
std::array<char, 0x300> path;
};
static_assert(std::is_trivially_copyable_v<LogoPath>, "LogoPath must be trivially copyable.");
} // namespace Service::NS

View File

@@ -4,6 +4,12 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
#include <vector>
#include <stb_image.h>
#include <stb_image_resize.h>
#include <stb_image_write.h>
#include "common/settings.h"
#include "core/file_sys/control_metadata.h"
#include "core/file_sys/patch_manager.h"
@@ -17,6 +23,49 @@
namespace Service::NS {
namespace {
void JPGToMemory(void* context, void* data, int size) {
auto* buffer = static_cast<std::vector<u8>*>(context);
const auto* char_data = static_cast<const u8*>(data);
buffer->insert(buffer->end(), char_data, char_data + size);
}
void SanitizeJPEGImageSize(std::vector<u8>& image) {
constexpr std::size_t max_jpeg_image_size = 0x20000;
constexpr int profile_dimensions = 174; // for grid view thingy
int original_width, original_height, color_channels;
auto* plain_image =
stbi_load_from_memory(image.data(), static_cast<int>(image.size()), &original_width,
&original_height, &color_channels, STBI_rgb);
if (plain_image == nullptr) {
LOG_ERROR(Service_NS, "Failed to load JPEG for sanitization.");
return;
}
if (original_width != profile_dimensions || original_height != profile_dimensions) {
std::vector<u8> out_image(profile_dimensions * profile_dimensions * STBI_rgb);
stbir_resize_uint8_srgb(plain_image, original_width, original_height, 0, out_image.data(),
profile_dimensions, profile_dimensions, 0, STBI_rgb, 0,
STBIR_FILTER_BOX);
image.clear();
if (!stbi_write_jpg_to_func(JPGToMemory, &image, profile_dimensions, profile_dimensions,
STBI_rgb, out_image.data(), 90)) {
LOG_ERROR(Service_NS, "Failed to resize the user provided image.");
}
}
stbi_image_free(plain_image);
if (image.size() > max_jpeg_image_size) {
image.resize(max_jpeg_image_size);
}
}
} // namespace
IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterface(
Core::System& system_)
: ServiceFramework{system_, "IReadOnlyApplicationControlDataInterface"} {
@@ -27,8 +76,8 @@ IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterfa
{2, D<&IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"},
{3, nullptr, "ConvertLanguageCodeToApplicationLanguage"},
{4, nullptr, "SelectApplicationDesiredLanguage"},
{5, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithoutIcon>, "GetApplicationControlDataWithoutIcon"},
{19, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithoutIcon>, "GetApplicationControlDataWithoutIcon"},
{5, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData2>, "GetApplicationControlDataWithoutIcon"},
{19, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData3>, "GetApplicationControlDataWithoutIcon3"},
};
// clang-format on
@@ -125,11 +174,77 @@ Result IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLan
R_SUCCEED();
}
Result IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithoutIcon(
Result IReadOnlyApplicationControlDataInterface::GetApplicationControlData2(
OutBuffer<BufferAttr_HipcMapAlias> out_buffer, Out<u64> out_total_size,
ApplicationControlSource application_control_source, u64 application_id) {
LOG_INFO(Service_NS, "called with control_source={}, application_id={:016X}",
application_control_source, application_id);
ApplicationControlSource application_control_source, u8 flag1, u8 flag2, u64 application_id) {
LOG_INFO(Service_NS, "called with control_source={}, flags=({:02X},{:02X}), application_id={:016X}",
application_control_source, flag1, flag2, application_id);
const FileSys::PatchManager pm{application_id, system.GetFileSystemController(),
system.GetContentProvider()};
const auto control = pm.GetControlMetadata();
const auto size = out_buffer.size();
const auto nacp_size = sizeof(FileSys::RawNACP);
if (size < nacp_size) {
LOG_ERROR(Service_NS, "output buffer is too small! (actual={:016X}, expected_min={:08X})",
size, nacp_size);
R_THROW(ResultUnknown);
}
if (control.first != nullptr) {
const auto bytes = control.first->GetRawBytes();
const auto copy_len = (std::min)(static_cast<size_t>(bytes.size()), static_cast<size_t>(nacp_size));
std::memcpy(out_buffer.data(), bytes.data(), copy_len);
if (copy_len < nacp_size) {
std::memset(out_buffer.data() + copy_len, 0, nacp_size - copy_len);
}
} else {
LOG_WARNING(Service_NS, "missing NACP data for application_id={:016X}", application_id);
std::memset(out_buffer.data(), 0, nacp_size);
}
const auto icon_area_size = size - nacp_size;
std::vector<u8> final_icon_data;
if (control.second != nullptr) {
size_t full_size = control.second->GetSize();
if (full_size > 0) {
final_icon_data.resize(full_size);
control.second->Read(final_icon_data.data(), full_size);
if (flag1 == 1) {
SanitizeJPEGImageSize(final_icon_data);
}
}
}
size_t available_icon_bytes = final_icon_data.size();
if (icon_area_size > 0) {
const size_t to_copy = (std::min)(available_icon_bytes, icon_area_size);
if (to_copy > 0) {
std::memcpy(out_buffer.data() + nacp_size, final_icon_data.data(), to_copy);
}
if (to_copy < icon_area_size) {
std::memset(out_buffer.data() + nacp_size + to_copy, 0, icon_area_size - to_copy);
}
}
const u32 total_available = static_cast<u32>(nacp_size + available_icon_bytes);
*out_total_size = (static_cast<u64>(total_available) << 32) | static_cast<u64>(flag1);
R_SUCCEED();
}
Result IReadOnlyApplicationControlDataInterface::GetApplicationControlData3(
OutBuffer<BufferAttr_HipcMapAlias> out_buffer, Out<u32> out_flags_a, Out<u32> out_flags_b,
Out<u32> out_actual_size, ApplicationControlSource application_control_source, u8 flag1, u8 flag2, u64 application_id) {
LOG_INFO(Service_NS, "called with control_source={}, flags=({:02X},{:02X}), application_id={:016X}",
application_control_source, flag1, flag2, application_id);
const FileSys::PatchManager pm{application_id, system.GetFileSystemController(),
system.GetContentProvider()};
@@ -158,22 +273,43 @@ Result IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithou
}
const auto icon_area_size = size - nacp_size;
if (icon_area_size > 0) {
if (control.second != nullptr) {
const auto icon_size = control.second->GetSize();
const auto to_copy = static_cast<size_t>((std::min)(icon_size, icon_area_size));
control.second->Read(out_buffer.data() + nacp_size, to_copy);
if (to_copy < icon_area_size) {
std::memset(out_buffer.data() + nacp_size + to_copy, 0, icon_area_size - to_copy);
std::vector<u8> final_icon_data;
if (control.second != nullptr) {
size_t full_size = control.second->GetSize();
if (full_size > 0) {
final_icon_data.resize(full_size);
control.second->Read(final_icon_data.data(), full_size);
if (flag1 == 1) {
SanitizeJPEGImageSize(final_icon_data);
}
} else {
std::memset(out_buffer.data() + nacp_size, 0, icon_area_size);
LOG_WARNING(Service_NS, "missing icon data for application_id={:016X}, zero-filling icon area",
application_id);
}
}
*out_total_size = static_cast<u64>(size);
size_t available_icon_bytes = final_icon_data.size();
if (icon_area_size > 0) {
const size_t to_copy = (std::min)(available_icon_bytes, icon_area_size);
if (to_copy > 0) {
std::memcpy(out_buffer.data() + nacp_size, final_icon_data.data(), to_copy);
}
if (to_copy < icon_area_size) {
std::memset(out_buffer.data() + nacp_size + to_copy, 0, icon_area_size - to_copy);
}
} else {
std::memset(out_buffer.data() + nacp_size, 0, icon_area_size);
}
const u32 actual_total_size = static_cast<u32>(nacp_size + available_icon_bytes);
// Out 1: always 0x10001 (likely presents flags: Bit0=Icon, Bit16=NACP)
// Out 2: reflects flag1 application (0 if flag1=0, 0x10001 if flag1=1)
// Out 3: The actual size of data
*out_flags_a = 0x10001;
*out_flags_b = (flag1 == 1) ? 0x10001 : 0;
*out_actual_size = actual_total_size;
R_SUCCEED();
}

View File

@@ -27,10 +27,21 @@ public:
u32 supported_languages);
Result ConvertApplicationLanguageToLanguageCode(Out<u64> out_language_code,
ApplicationLanguage application_language);
Result GetApplicationControlDataWithoutIcon(
Result GetApplicationControlData2(
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
Out<u64> out_total_size,
ApplicationControlSource application_control_source,
u8 flag1,
u8 flag2,
u64 application_id);
Result GetApplicationControlData3(
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
Out<u32> out_flags_a,
Out<u32> out_flags_b,
Out<u32> out_actual_size,
ApplicationControlSource application_control_source,
u8 flag1,
u8 flag2,
u64 application_id);
};

View File

@@ -15,7 +15,7 @@ struct Layer {
explicit Layer(std::shared_ptr<android::BufferItemConsumer> buffer_item_consumer_,
s32 consumer_id_)
: buffer_item_consumer(std::move(buffer_item_consumer_)), consumer_id(consumer_id_),
blending(LayerBlending::None), visible(true), z_index(0) {}
blending(LayerBlending::None), visible(true), z_index(0), is_overlay(false) {}
~Layer() {
buffer_item_consumer->Abandon();
}
@@ -25,6 +25,7 @@ struct Layer {
LayerBlending blending;
bool visible;
s32 z_index;
bool is_overlay;
};
struct LayerStack {

View File

@@ -78,8 +78,25 @@ u32 HardwareComposer::ComposeLocked(f32* out_speed_scale, Display& display,
for (auto& layer : display.stack.layers) {
auto consumer_id = layer->consumer_id;
bool should_try_acquire = true;
if (!layer->is_overlay) {
auto fb_it = m_framebuffers.find(consumer_id);
if (fb_it != m_framebuffers.end() && fb_it->second.is_acquired) {
const u64 frames_since_last_acquire = m_frame_number - fb_it->second.last_acquire_frame;
const s32 expected_interval = NormalizeSwapInterval(nullptr, fb_it->second.item.swap_interval);
if (frames_since_last_acquire < static_cast<u64>(expected_interval)) {
should_try_acquire = false;
}
}
}
// Try to fetch the framebuffer (either new or stale).
const auto result = this->CacheFramebufferLocked(*layer, consumer_id);
const auto result = should_try_acquire
? this->CacheFramebufferLocked(*layer, consumer_id)
: (m_framebuffers.find(consumer_id) != m_framebuffers.end() && m_framebuffers[consumer_id].is_acquired
? CacheStatus::CachedBufferReused
: CacheStatus::NoBufferAvailable);
// If we failed, skip this layer.
if (result == CacheStatus::NoBufferAvailable) {
@@ -111,6 +128,12 @@ u32 HardwareComposer::ComposeLocked(f32* out_speed_scale, Display& display,
});
}
// Overlay layers run at their own framerate independently of the game.
// Skip them when calculating the swap interval for the main game.
if (layer->is_overlay) {
continue;
}
// We need to compose again either before this frame is supposed to
// be released, or exactly on the vsync period it should be released.
const s32 item_swap_interval = NormalizeSwapInterval(out_speed_scale, item.swap_interval);
@@ -138,33 +161,44 @@ u32 HardwareComposer::ComposeLocked(f32* out_speed_scale, Display& display,
// Batch framebuffer releases, instead of one-into-one.
std::vector<std::pair<Layer*, Framebuffer*>> to_release;
for (auto& [layer_id, framebuffer] : m_framebuffers) {
if (framebuffer.release_frame_number > m_frame_number || !framebuffer.is_acquired)
if (!framebuffer.is_acquired)
continue;
if (auto layer = display.stack.FindLayer(layer_id); layer)
auto layer = display.stack.FindLayer(layer_id);
if (!layer)
continue;
// Overlay layers always release after every compose
// Non-overlay layers release based on their swap interval
if (layer->is_overlay || framebuffer.release_frame_number <= m_frame_number) {
to_release.emplace_back(layer.get(), &framebuffer);
}
}
for (auto& [layer, framebuffer] : to_release) {
layer->buffer_item_consumer->ReleaseBuffer(framebuffer->item, android::Fence::NoFence());
framebuffer->is_acquired = false;
}
// Advance by at least one frame.
const u32 frame_advance = swap_interval.value_or(1);
m_frame_number += frame_advance;
// Advance by 1 frame (60 FPS compositing)
m_frame_number += 1;
// Release any necessary framebuffers.
// Release any necessary framebuffers (non-overlay layers only, as overlays are already released above).
for (auto& [layer_id, framebuffer] : m_framebuffers) {
if (framebuffer.release_frame_number > m_frame_number) {
// Not yet ready to release this framebuffer.
continue;
}
if (!framebuffer.is_acquired) {
// Already released.
continue;
}
if (framebuffer.release_frame_number > m_frame_number) {
continue;
}
if (const auto layer = display.stack.FindLayer(layer_id); layer != nullptr) {
// Skip overlay layers as they were already released above
if (layer->is_overlay) {
continue;
}
// TODO: support release fence
// This is needed to prevent screen tearing
layer->buffer_item_consumer->ReleaseBuffer(framebuffer.item, android::Fence::NoFence());
@@ -172,7 +206,7 @@ u32 HardwareComposer::ComposeLocked(f32* out_speed_scale, Display& display,
}
}
return frame_advance;
return 1;
}
void HardwareComposer::RemoveLayerLocked(Display& display, ConsumerId consumer_id) {
@@ -200,8 +234,9 @@ bool HardwareComposer::TryAcquireFramebufferLocked(Layer& layer, Framebuffer& fr
}
// We succeeded, so set the new release frame info.
framebuffer.release_frame_number =
NormalizeSwapInterval(nullptr, framebuffer.item.swap_interval);
const s32 swap_interval = layer.is_overlay ? 1 : NormalizeSwapInterval(nullptr, framebuffer.item.swap_interval);
framebuffer.release_frame_number = m_frame_number + swap_interval;
framebuffer.last_acquire_frame = m_frame_number;
framebuffer.is_acquired = true;
return true;

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -34,6 +37,7 @@ private:
struct Framebuffer {
android::BufferItem item{};
ReleaseFrameNumber release_frame_number{};
u64 last_acquire_frame{0};
bool is_acquired{false};
};

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -101,6 +104,13 @@ void SurfaceFlinger::SetLayerBlending(s32 consumer_binder_id, LayerBlending blen
}
}
void SurfaceFlinger::SetLayerIsOverlay(s32 consumer_binder_id, bool is_overlay) {
if (const auto layer = this->FindLayer(consumer_binder_id); layer != nullptr) {
layer->is_overlay = is_overlay;
LOG_DEBUG(Service_VI, "Layer {} marked as overlay: {}", consumer_binder_id, is_overlay);
}
}
Display* SurfaceFlinger::FindDisplay(u64 display_id) {
for (auto& display : m_displays) {
if (display.id == display_id) {

View File

@@ -47,6 +47,7 @@ public:
void SetLayerVisibility(s32 consumer_binder_id, bool visible);
void SetLayerBlending(s32 consumer_binder_id, LayerBlending blending);
void SetLayerIsOverlay(s32 consumer_binder_id, bool is_overlay);
std::shared_ptr<Layer> FindLayer(s32 consumer_binder_id);

View File

@@ -16,64 +16,67 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
: ServiceFramework{system_, "olsc:s"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IOlscServiceForSystemService::OpenTransferTaskListController>, "OpenTransferTaskListController"},
{1, D<&IOlscServiceForSystemService::OpenRemoteStorageController>, "OpenRemoteStorageController"},
{2, D<&IOlscServiceForSystemService::OpenDaemonController>, "OpenDaemonController"},
{10, nullptr, "Unknown10"},
{11, nullptr, "Unknown11"},
{12, nullptr, "Unknown12"},
{13, nullptr, "Unknown13"},
{0, D<&IOlscServiceForSystemService::GetTransferTaskListController>, "GetTransferTaskListController"},
{1, D<&IOlscServiceForSystemService::GetRemoteStorageController>, "GetRemoteStorageController"},
{2, D<&IOlscServiceForSystemService::GetDaemonController>, "GetDaemonController"},
{10, nullptr, "PrepareDeleteUserProperty"},
{11, nullptr, "DeleteUserSaveDataProperty"},
{12, nullptr, "InvalidateMountCache"},
{13, nullptr, "DeleteDeviceSaveDataProperty"},
{100, nullptr, "ListLastTransferTaskErrorInfo"},
{101, nullptr, "GetLastErrorInfoCount"},
{102, nullptr, "RemoveLastErrorInfoOld"},
{103, nullptr, "GetLastErrorInfo"},
{104, nullptr, "GetLastErrorEventHolder"},
{105, nullptr, "GetLastTransferTaskErrorInfo"},
{200, D<&IOlscServiceForSystemService::GetDataTransferPolicyInfo>, "GetDataTransferPolicyInfo"},
{201, nullptr, "RemoveDataTransferPolicyInfo"},
{202, nullptr, "UpdateDataTransferPolicyOld"},
{203, nullptr, "UpdateDataTransferPolicy"},
{204, nullptr, "CleanupDataTransferPolicyInfo"},
{205, nullptr, "RequestDataTransferPolicy"},
{300, nullptr, "GetAutoTransferSeriesInfo"},
{301, nullptr, "UpdateAutoTransferSeriesInfo"},
{400, nullptr, "CleanupSaveDataArchiveInfoType1"},
{900, nullptr, "CleanupTransferTask"},
{902, nullptr, "CleanupSeriesInfoType0"},
{903, nullptr, "CleanupSaveDataArchiveInfoType0"},
{904, nullptr, "CleanupApplicationAutoTransferSetting"},
{905, nullptr, "CleanupErrorHistory"},
{906, nullptr, "SetLastError"},
{907, nullptr, "AddSaveDataArchiveInfoType0"},
{908, nullptr, "RemoveSeriesInfoType0"},
{909, nullptr, "GetSeriesInfoType0"},
{910, nullptr, "RemoveLastErrorInfo"},
{911, nullptr, "CleanupSeriesInfoType1"},
{912, nullptr, "RemoveSeriesInfoType1"},
{913, nullptr, "GetSeriesInfoType1"},
{200, D<&IOlscServiceForSystemService::GetDataTransferPolicy>, "GetDataTransferPolicy"},
{201, nullptr, "DeleteDataTransferPolicyCache"},
{202, nullptr, "Unknown202"},
{203, nullptr, "RequestUpdateDataTransferPolicyCacheAsync"},
{204, nullptr, "ClearDataTransferPolicyCache"},
{205, nullptr, "RequestGetDataTransferPolicyAsync"},
{206, nullptr, "Unknown206"}, //21.0.0+
{300, nullptr, "GetUserSaveDataProperty"},
{301, nullptr, "SetUserSaveDataProperty"},
{302, nullptr, "Unknown302"}, //21.0.0+
{400, nullptr, "CleanupSaveDataBackupContextForSpecificApplications"},
{900, nullptr, "DeleteAllTransferTask"},
{902, nullptr, "DeleteAllSeriesInfo"},
{903, nullptr, "DeleteAllSdaInfoCache"},
{904, nullptr, "DeleteAllApplicationSetting"},
{905, nullptr, "DeleteAllTransferTaskErrorInfo"},
{906, nullptr, "RegisterTransferTaskErrorInfo"},
{907, nullptr, "AddSaveDataArchiveInfoCache"},
{908, nullptr, "DeleteSeriesInfo"},
{909, nullptr, "GetSeriesInfo"},
{910, nullptr, "RemoveTransferTaskErrorInfo"},
{911, nullptr, "DeleteAllSeriesInfoForSaveDataBackup"},
{912, nullptr, "DeleteSeriesInfoForSaveDataBackup"},
{913, nullptr, "GetSeriesInfoForSaveDataBackup"},
{914, nullptr, "Unknown914"}, //20.2.0+
{1000, nullptr, "UpdateIssueOld"},
{1010, nullptr, "Unknown1010"},
{1011, nullptr, "ListIssueInfoOld"},
{1012, nullptr, "GetIssueOld"},
{1013, nullptr, "GetIssue2Old"},
{1014, nullptr, "GetIssue3Old"},
{1020, nullptr, "RepairIssueOld"},
{1021, nullptr, "RepairIssueWithUserIdOld"},
{1022, nullptr, "RepairIssue2Old"},
{1023, nullptr, "RepairIssue3Old"},
{1011, nullptr, "Unknown1011"},
{1012, nullptr, "Unknown1012"},
{1013, nullptr, "Unkown1013"},
{1014, nullptr, "Unknown1014"},
{1020, nullptr, "Unknown1020"},
{1021, nullptr, "Unknown1021"},
{1022, nullptr, "Unknown1022"},
{1023, nullptr, "Unknown1023"},
{1024, nullptr, "Unknown1024"},
{1100, nullptr, "UpdateIssue"},
{1110, nullptr, "Unknown1110"},
{1111, nullptr, "ListIssueInfo"},
{1112, nullptr, "GetIssue"},
{1113, nullptr, "GetIssue2"},
{1114, nullptr, "GetIssue3"},
{1120, nullptr, "RepairIssue"},
{1121, nullptr, "RepairIssueWithUserId"},
{1122, nullptr, "RepairIssue2"},
{1123, nullptr, "RepairIssue3"},
{1124, nullptr, "Unknown1124"},
{10000, D<&IOlscServiceForSystemService::CloneService>, "CloneService"},
{1100, nullptr, "RepairUpdateIssueInfoCacheAync"},
{1110, nullptr, "RepairGetIssueInfo"},
{1111, nullptr, "RepairListIssueInfo"},
{1112, nullptr, "RepairListOperationPermissionInfo"},
{1113, nullptr, "RepairListDataInfoForRepairedSaveDataDownload"},
{1114, nullptr, "RepairListDataInfoForOriginalSaveDataDownload"},
{1120, nullptr, "RepairUploadSaveDataAsync"},
{1121, nullptr, "RepairUploadSaveDataAsync1"},
{1122, nullptr, "RepairDownloadRepairedSaveDataAsync"},
{1123, nullptr, "RepairDownloadOriginalSaveDataAsync"},
{1124, nullptr, "RepairGetOperationProgressInfo"},
{10000, D<&IOlscServiceForSystemService::GetOlscServiceForSystemService>, "GetOlscServiceForSystemService"},
};
// clang-format on
@@ -82,38 +85,38 @@ IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_
IOlscServiceForSystemService::~IOlscServiceForSystemService() = default;
Result IOlscServiceForSystemService::OpenTransferTaskListController(
Result IOlscServiceForSystemService::GetTransferTaskListController(
Out<SharedPointer<ITransferTaskListController>> out_interface) {
LOG_INFO(Service_OLSC, "called");
*out_interface = std::make_shared<ITransferTaskListController>(system);
R_SUCCEED();
}
Result IOlscServiceForSystemService::OpenRemoteStorageController(
Result IOlscServiceForSystemService::GetRemoteStorageController(
Out<SharedPointer<IRemoteStorageController>> out_interface) {
LOG_INFO(Service_OLSC, "called");
*out_interface = std::make_shared<IRemoteStorageController>(system);
R_SUCCEED();
}
Result IOlscServiceForSystemService::OpenDaemonController(
Result IOlscServiceForSystemService::GetDaemonController(
Out<SharedPointer<IDaemonController>> out_interface) {
LOG_INFO(Service_OLSC, "called");
*out_interface = std::make_shared<IDaemonController>(system);
R_SUCCEED();
}
Result IOlscServiceForSystemService::GetDataTransferPolicyInfo(
Out<DataTransferPolicy> out_policy_info, u64 application_id) {
Result IOlscServiceForSystemService::GetDataTransferPolicy(
Out<DataTransferPolicy> out_policy, u64 application_id) {
LOG_WARNING(Service_OLSC, "(STUBBED) called");
DataTransferPolicy policy{};
policy.upload_policy = 0;
policy.download_policy = 0;
*out_policy_info = policy;
*out_policy = policy;
R_SUCCEED();
}
Result IOlscServiceForSystemService::CloneService(
Result IOlscServiceForSystemService::GetOlscServiceForSystemService(
Out<SharedPointer<IOlscServiceForSystemService>> out_interface) {
LOG_INFO(Service_OLSC, "called");
*out_interface = std::static_pointer_cast<IOlscServiceForSystemService>(shared_from_this());

View File

@@ -24,12 +24,12 @@ public:
~IOlscServiceForSystemService() override;
private:
Result OpenTransferTaskListController(
Result GetTransferTaskListController(
Out<SharedPointer<ITransferTaskListController>> out_interface);
Result OpenRemoteStorageController(Out<SharedPointer<IRemoteStorageController>> out_interface);
Result OpenDaemonController(Out<SharedPointer<IDaemonController>> out_interface);
Result GetDataTransferPolicyInfo(Out<DataTransferPolicy> out_policy_info, u64 application_id);
Result CloneService(Out<SharedPointer<IOlscServiceForSystemService>> out_interface);
Result GetRemoteStorageController(Out<SharedPointer<IRemoteStorageController>> out_interface);
Result GetDaemonController(Out<SharedPointer<IDaemonController>> out_interface);
Result GetDataTransferPolicy(Out<DataTransferPolicy> out_policy, u64 application_id);
Result GetOlscServiceForSystemService(Out<SharedPointer<IOlscServiceForSystemService>> out_interface);
};
} // namespace Service::OLSC

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -11,32 +14,37 @@ ITransferTaskListController::ITransferTaskListController(Core::System& system_)
: ServiceFramework{system_, "ITransferTaskListController"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "Unknown0"},
{1, nullptr, "Unknown1"},
{2, nullptr, "Unknown2"},
{3, nullptr, "Unknown3"},
{4, nullptr, "Unknown4"},
{5, D<&ITransferTaskListController::GetNativeHandleHolder>, "GetNativeHandleHolder"},
{6, nullptr, "Unknown6"},
{7, nullptr, "Unknown7"},
{8, nullptr, "GetRemoteStorageController"},
{9, D<&ITransferTaskListController::GetNativeHandleHolder>, "GetNativeHandleHolder2"},
{10, nullptr, "Unknown10"},
{11, nullptr, "Unknown11"},
{12, nullptr, "Unknown12"},
{13, nullptr, "Unknown13"},
{14, nullptr, "Unknown14"},
{15, nullptr, "Unknown15"},
{16, nullptr, "Unknown16"},
{17, nullptr, "Unknown17"},
{18, nullptr, "Unknown18"},
{19, nullptr, "Unknown19"},
{20, nullptr, "Unknown20"},
{21, nullptr, "Unknown21"},
{22, nullptr, "Unknown22"},
{23, nullptr, "Unknown23"},
{24, nullptr, "Unknown24"},
{25, nullptr, "Unknown25"},
{0, nullptr, "GetTransferTaskCountForOcean"},
{1, nullptr, "GetTransferTaskInfoForOcean"},
{2, nullptr, "ListTransferTaskInfoForOcean"},
{3, nullptr, "DeleteTransferTaskForOcean"},
{4, nullptr, "RaiseTransferTaskPriorityForOcean"},
{5, D<&ITransferTaskListController::GetTransferTaskEndEventNativeHandleHolder>, "GetTransferTaskEndEventNativeHandleHolder"},
{6, nullptr, "GetTransferTaskProgressForOcean"},
{7, nullptr, "GetTransferTaskLastResultForOcean"},
{8, nullptr, "StopNextTransferTaskExecution"},
{9, D<&ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder>, "GetTransferTaskStartEventNativeHandleHolder"},
{10, nullptr, "SuspendTransferTaskForOcean"},
{11, nullptr, "GetCurrentTransferTaskInfoForOcean"},
{12, nullptr, "FindTransferTaskInfoForOcean"},
{13, nullptr, "CancelCurrentRepairTransferTask"},
{14, nullptr, "GetRepairTransferTaskProgress"},
{15, nullptr, "EnsureExecutableForRepairTransferTask"},
{16, nullptr, "GetTransferTaskCount"},
{17, nullptr, "GetTransferTaskInfo"},
{18, nullptr, "ListTransferTaskInfo"},
{19, nullptr, "DeleteTransferTask"},
{20, nullptr, "RaiseTransferTaskPriority"},
{21, nullptr, "GetTransferTaskProgress"},
{22, nullptr, "GetTransferTaskLastResult"},
{23, nullptr, "SuspendTransferTask"},
{24, nullptr, "GetCurrentTransferTaskInfo"},
{25, nullptr, "Unknown25"}, //20.1.0+
{26, nullptr, "Unknown26"}, //20.1.0+
{27, nullptr, "Unknown27"}, //20.1.0+
{28, nullptr, "Unknown28"}, //20.1.0+
{29, nullptr, "Unknown29"}, //20.1.0+
{30, nullptr, "Unknown30"}, //20.1.0+
};
// clang-format on
@@ -45,7 +53,14 @@ ITransferTaskListController::ITransferTaskListController(Core::System& system_)
ITransferTaskListController::~ITransferTaskListController() = default;
Result ITransferTaskListController::GetNativeHandleHolder(
Result ITransferTaskListController::GetTransferTaskEndEventNativeHandleHolder(
Out<SharedPointer<INativeHandleHolder>> out_holder) {
LOG_WARNING(Service_OLSC, "(STUBBED) called");
*out_holder = std::make_shared<INativeHandleHolder>(system);
R_SUCCEED();
}
Result ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder(
Out<SharedPointer<INativeHandleHolder>> out_holder) {
LOG_WARNING(Service_OLSC, "(STUBBED) called");
*out_holder = std::make_shared<INativeHandleHolder>(system);

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -14,7 +17,8 @@ public:
~ITransferTaskListController() override;
private:
Result GetNativeHandleHolder(Out<SharedPointer<INativeHandleHolder>> out_holder);
Result GetTransferTaskEndEventNativeHandleHolder(Out<SharedPointer<INativeHandleHolder>> out_holder);
Result GetTransferTaskStartEventNativeHandleHolder(Out<SharedPointer<INativeHandleHolder>> out_holder);
};
} // namespace Service::OLSC

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -34,10 +37,10 @@ public:
{17, nullptr, "AcquireIrq"},
{18, nullptr, "ReleaseIrq"},
{19, nullptr, "SetIrqEnable"},
{20, nullptr, "SetAspmEnable"},
{21, nullptr, "SetResetUponResumeEnable"},
{22, nullptr, "ResetFunction"},
{23, nullptr, "Unknown23"},
{20, nullptr, "GetIrqEvent"},
{21, nullptr, "SetAspmEnable"},
{22, nullptr, "SetResetUponResumeEnable"},
{23, nullptr, "ResetFunction"},
};
// clang-format on

View File

@@ -39,6 +39,9 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{1017, D<&IParentalControlService::EndFreeCommunication>, "EndFreeCommunication"},
{1018, D<&IParentalControlService::IsFreeCommunicationAvailable>, "IsFreeCommunicationAvailable"},
{1019, D<&IParentalControlService::ConfirmLaunchApplicationPermission>, "ConfirmLaunchApplicationPermission"},
{1020, nullptr, "ConfirmLaunchSharedApplicationPermission"}, //20.0.0+
{1021, nullptr, "TryBeginFreeCommunicationForStreamPlay"}, //21.0.0+
{1022, nullptr, "EndFreeCommunicationForStreamPlay"}, //21.0.0+
{1031, D<&IParentalControlService::IsRestrictionEnabled>, "IsRestrictionEnabled"},
{1032, D<&IParentalControlService::GetSafetyLevel>, "GetSafetyLevel"},
{1033, nullptr, "SetSafetyLevel"},
@@ -56,6 +59,8 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{1047, nullptr, "NotifyApplicationDownloadStarted"},
{1048, nullptr, "NotifyNetworkProfileCreated"},
{1049, nullptr, "ResetFreeCommunicationApplicationList"},
{1050, nullptr, "AddToFreeCommunicationApplicationList"}, //20.0.0+
{1051, nullptr, "NotifyApplicationDownloadStarted"}, //20.0.0+
{1061, D<&IParentalControlService::ConfirmStereoVisionRestrictionConfigurable>, "ConfirmStereoVisionRestrictionConfigurable"},
{1062, D<&IParentalControlService::GetStereoVisionRestriction>, "GetStereoVisionRestriction"},
{1063, D<&IParentalControlService::SetStereoVisionRestriction>, "SetStereoVisionRestriction"},
@@ -126,8 +131,17 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{2013, nullptr, "SynchronizeParentalControlSettingsAsync"},
{2014, nullptr, "FinishSynchronizeParentalControlSettings"},
{2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"},
{2016, nullptr, "RequestUpdateExemptionListAsync"},
{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"} // 18.0.0+
{2016, nullptr, "RequestUpdateExemptionListAsync"}, //5.0.0+
{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+
{2017, nullptr, "AuthorizePairingAsync"}, //19.0.0+
{2019, nullptr, "RequestUpdateDeviceUsersBackground"}, //19.0.0+
{2021, nullptr, "RequestCopyPairingAsync"}, //20.0.0+
{2022, nullptr, "FinishRequestCopyPairing"}, //20.0.0+
{2023, nullptr, "IsFromPairingActiveDevice"}, //20.0.0+
{2024, nullptr, "RollbackCopyPairing"}, //21.0.0+
{3001, nullptr, "GetErrorContextChangedEvent"}, //20.0.0+
{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+
{195101, D<&IParentalControlService::SetPlayTimerSettings>, "SetPlayTimerSettingsForDebug"}, //18.0.0+
};
// clang-format on
RegisterHandlers(functions);
@@ -393,16 +407,21 @@ Result IParentalControlService::IsRestrictedByPlayTimer(Out<bool> out_is_restric
}
Result IParentalControlService::GetPlayTimerSettingsOld(
Out<PlayTimerSettings> out_play_timer_settings) {
Out<PlayTimerSettingsOld> out_play_timer_settings) {
LOG_WARNING(Service_PCTL, "(STUBBED) called");
*out_play_timer_settings = {};
R_SUCCEED();
}
Result IParentalControlService::GetPlayTimerSettings(
Out<PlayTimerSettings> out_play_timer_settings) {
Result IParentalControlService::GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings) {
LOG_WARNING(Service_PCTL, "(STUBBED) called");
*out_play_timer_settings = {};
*out_play_timer_settings = raw_play_timer_settings;
R_SUCCEED();
}
Result IParentalControlService::SetPlayTimerSettings(PlayTimerSettings play_timer_settings) {
LOG_WARNING(Service_PCTL, "(STUBBED) called");
raw_play_timer_settings = play_timer_settings;
R_SUCCEED();
}

View File

@@ -51,7 +51,7 @@ private:
Result IsPlayTimerEnabled(Out<bool> out_is_play_timer_enabled);
Result GetPlayTimerRemainingTime(Out<s32> out_remaining_time);
Result IsRestrictedByPlayTimer(Out<bool> out_is_restricted_by_play_timer);
Result GetPlayTimerSettingsOld(Out<PlayTimerSettings> out_play_timer_settings);
Result GetPlayTimerSettingsOld(Out<PlayTimerSettingsOld> out_play_timer_settings);
Result GetPlayTimerEventToRequestSuspension(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result IsPlayTimerAlarmDisabled(Out<bool> out_play_timer_alarm_disabled);
Result GetPlayTimerRemainingTimeDisplayInfo();
@@ -60,6 +60,7 @@ private:
Result SetStereoVisionRestriction(bool stereo_vision_restriction);
Result ResetConfirmedStereoVisionPermission();
Result GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings);
Result SetPlayTimerSettings(PlayTimerSettings out_play_timer_settings);
struct States {
u64 current_tid{};
@@ -83,6 +84,8 @@ private:
RestrictionSettings restriction_settings{};
std::array<char, 8> pin_code{};
Capability capability{};
// TODO: this is RAW as fuck
PlayTimerSettings raw_play_timer_settings{};
KernelHelpers::ServiceContext service_context;
Event synchronization_event;

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -34,10 +37,16 @@ struct RestrictionSettings {
};
static_assert(sizeof(RestrictionSettings) == 0x3, "RestrictionSettings has incorrect size.");
// This is nn::pctl::PlayTimerSettings
struct PlayTimerSettings {
// This is nn::pctl::PlayTimerSettingsOld
struct PlayTimerSettingsOld {
std::array<u32, 13> settings;
};
static_assert(sizeof(PlayTimerSettings) == 0x34, "PlayTimerSettings has incorrect size.");
static_assert(sizeof(PlayTimerSettingsOld) == 0x34, "PlayTimerSettingsOld has incorrect size.");
// This is nn::pctl::PlayTimerSettings
struct PlayTimerSettings {
std::array<u32, 17> settings; //21.0.0+ now takes 0x44
};
static_assert(sizeof(PlayTimerSettings) == 0x44, "PlayTimerSettings has incorrect size.");
} // namespace Service::PCTL

View File

@@ -34,9 +34,9 @@ public:
{10300, &PlayReport::GetTransmissionStatus, "GetTransmissionStatus"},
{10400, &PlayReport::GetSystemSessionId, "GetSystemSessionId"},
{20100, &PlayReport::SaveSystemReportOld, "SaveSystemReport"},
{20101, &PlayReport::SaveSystemReportWithUserOld, "SaveSystemReportWithUser"},
{20102, &PlayReport::SaveSystemReport, "SaveSystemReport"},
{20103, &PlayReport::SaveSystemReportWithUser, "SaveSystemReportWithUser"},
{20101, &PlayReport::SaveSystemReportWithUserOld, "SaveSystemReportWithUser"},
{20102, &PlayReport::SaveSystemReport, "SaveSystemReport"},
{20103, &PlayReport::SaveSystemReportWithUser, "SaveSystemReportWithUser"},
{20200, nullptr, "SetOperationMode"},
{30100, nullptr, "ClearStorage"},
{30200, nullptr, "ClearStatistics"},

View File

@@ -18,49 +18,43 @@
namespace Service {
/**
* Creates a function string for logging, complete with the name (or header code, depending
* on what's passed in) the port name, and all the cmd_buff arguments.
*/
[[maybe_unused]] static std::string MakeFunctionString(std::string_view name,
std::string_view port_name,
const u32* cmd_buff) {
/// @brief Creates a function string for logging, complete with the name (or header code, depending
/// on what's passed in) the port name, and all the cmd_buff arguments.
[[maybe_unused]] static std::string MakeFunctionString(std::string_view name, std::string_view port_name, const u32* cmd_buff) {
// Number of params == bits 0-5 + bits 6-11
int num_params = (cmd_buff[0] & 0x3F) + ((cmd_buff[0] >> 6) & 0x3F);
std::string function_string = fmt::format("function '{}': port={}", name, port_name);
for (int i = 1; i <= num_params; ++i) {
for (int i = 1; i <= num_params; ++i)
function_string += fmt::format(", cmd_buff[{}]={:#X}", i, cmd_buff[i]);
}
return function_string;
}
ServiceFrameworkBase::ServiceFrameworkBase(Core::System& system_, const char* service_name_,
u32 max_sessions_, InvokerFn* handler_invoker_)
: SessionRequestHandler(system_.Kernel(), service_name_), system{system_},
service_name{service_name_}, max_sessions{max_sessions_}, handler_invoker{handler_invoker_} {}
service_name{service_name_}, handler_invoker{handler_invoker_}, max_sessions{max_sessions_} {}
ServiceFrameworkBase::~ServiceFrameworkBase() {
// Wait for other threads to release access before destroying
const auto guard = LockService();
const auto guard = ServiceFrameworkBase::LockService();
}
void ServiceFrameworkBase::RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n) {
// Usually this array is sorted by id already, so hint to insert at the end
handlers.reserve(handlers.size() + n);
for (std::size_t i = 0; i < n; ++i) {
// Usually this array is sorted by id already, so hint to insert at the end
for (std::size_t i = 0; i < n; ++i)
handlers.emplace_hint(handlers.cend(), functions[i].expected_header, functions[i]);
}
}
void ServiceFrameworkBase::RegisterHandlersBaseTipc(const FunctionInfoBase* functions,
std::size_t n) {
void ServiceFrameworkBase::RegisterHandlersBaseTipc(const FunctionInfoBase* functions, std::size_t n) {
// Usually this array is sorted by id already, so hint to insert at the end
handlers_tipc.reserve(handlers_tipc.size() + n);
for (std::size_t i = 0; i < n; ++i) {
// Usually this array is sorted by id already, so hint to insert at the end
for (std::size_t i = 0; i < n; ++i)
handlers_tipc.emplace_hint(handlers_tipc.cend(), functions[i].expected_header,
functions[i]);
}
}
void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx,
@@ -69,15 +63,12 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx,
std::string function_name = info == nullptr ? "<unknown>" : info->name;
fmt::memory_buffer buf;
fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]={:#X}",
ctx.GetCommand(), function_name, service_name, cmd_buf[0]);
for (int i = 1; i <= 8; ++i) {
fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]={:#X}", ctx.GetCommand(), function_name, service_name, cmd_buf[0]);
for (int i = 1; i <= 8; ++i)
fmt::format_to(std::back_inserter(buf), ", [{}]={:#X}", i, cmd_buf[i]);
}
buf.push_back('}');
system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name,
service_name);
system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, service_name);
UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf));
if (Settings::values.use_auto_stub) {
LOG_WARNING(Service, "Using auto stub fallback!");
@@ -87,25 +78,20 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx,
}
void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) {
auto itr = handlers.find(ctx.GetCommand());
const FunctionInfoBase* info = itr == handlers.end() ? nullptr : &itr->second;
if (info == nullptr || info->handler_callback == nullptr) {
auto it = handlers.find(ctx.GetCommand());
FunctionInfoBase const* info = it == handlers.end() ? nullptr : &it->second;
if (info == nullptr || info->handler_callback == nullptr)
return ReportUnimplementedFunction(ctx, info);
}
LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer()));
handler_invoker(this, info->handler_callback, ctx);
}
void ServiceFrameworkBase::InvokeRequestTipc(HLERequestContext& ctx) {
boost::container::flat_map<u32, FunctionInfoBase>::iterator itr;
itr = handlers_tipc.find(ctx.GetCommand());
const FunctionInfoBase* info = itr == handlers_tipc.end() ? nullptr : &itr->second;
if (info == nullptr || info->handler_callback == nullptr) {
auto it = handlers_tipc.find(ctx.GetCommand());
FunctionInfoBase const* info = it == handlers_tipc.end() ? nullptr : &it->second;
if (info == nullptr || info->handler_callback == nullptr)
return ReportUnimplementedFunction(ctx, info);
}
LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer()));
handler_invoker(this, info->handler_callback, ctx);

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -47,25 +50,23 @@ static_assert(ServerSessionCountMax == 0x40,
class ServiceFrameworkBase : public SessionRequestHandler {
public:
/// Returns the string identifier used to connect to the service.
std::string GetServiceName() const {
[[nodiscard]] std::string_view GetServiceName() const noexcept {
return service_name;
}
/**
* Returns the maximum number of sessions that can be connected to this service at the same
* time.
*/
u32 GetMaxSessions() const {
/// @brief Returns the maximum number of sessions that can be connected to this service at the same
/// time.
u32 GetMaxSessions() const noexcept {
return max_sessions;
}
/// Invokes a service request routine using the HIPC protocol.
/// @brief Invokes a service request routine using the HIPC protocol.
void InvokeRequest(HLERequestContext& ctx);
/// Invokes a service request routine using the HIPC protocol.
/// @brief Invokes a service request routine using the HIPC protocol.
void InvokeRequestTipc(HLERequestContext& ctx);
/// Handles a synchronization request for the service.
/// @brief Handles a synchronization request for the service.
Result HandleSyncRequest(Kernel::KServerSession& session, HLERequestContext& context) override;
protected:
@@ -74,7 +75,7 @@ protected:
using HandlerFnP = void (Self::*)(HLERequestContext&);
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
[[nodiscard]] virtual std::unique_lock<std::mutex> LockService() {
[[nodiscard]] virtual std::unique_lock<std::mutex> LockService() noexcept {
return std::unique_lock{lock_service};
}
@@ -105,20 +106,19 @@ private:
void RegisterHandlersBaseTipc(const FunctionInfoBase* functions, std::size_t n);
void ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info);
boost::container::flat_map<u32, FunctionInfoBase> handlers;
boost::container::flat_map<u32, FunctionInfoBase> handlers_tipc;
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
std::mutex lock_service;
/// Function used to safely up-cast pointers to the derived class before invoking a handler.
InvokerFn* handler_invoker;
/// Maximum number of concurrent sessions that this service can handle.
u32 max_sessions;
/// Flag to store if a port was already create/installed to detect multiple install attempts,
/// which is not supported.
bool service_registered = false;
/// Function used to safely up-cast pointers to the derived class before invoking a handler.
InvokerFn* handler_invoker;
boost::container::flat_map<u32, FunctionInfoBase> handlers;
boost::container::flat_map<u32, FunctionInfoBase> handlers_tipc;
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
std::mutex lock_service;
};
/**
@@ -142,20 +142,12 @@ protected:
// TODO(yuriks): This function could be constexpr, but clang is the only compiler that
// doesn't emit an ICE or a wrong diagnostic because of the static_cast.
/**
* Constructs a FunctionInfo for a function.
*
* @param expected_header_ request header in the command buffer which will trigger dispatch
* to this handler
* @param handler_callback_ member function in this service which will be called to handle
* the request
* @param name_ human-friendly name for the request. Used mostly for logging purposes.
*/
FunctionInfoTyped(u32 expected_header_, HandlerFnP<T> handler_callback_, const char* name_)
: FunctionInfoBase{
expected_header_,
// Type-erase member function pointer by casting it down to the base class.
static_cast<HandlerFnP<ServiceFrameworkBase>>(handler_callback_), name_} {}
/// @brief Constructs a FunctionInfo for a function.
/// @param expected_header_ request header in the command buffer which will trigger dispatch to this handler
/// @param handler_callback_ member function in this service which will be called to handle the request
/// @param name_ human-friendly name for the request. Used mostly for logging purposes.
constexpr FunctionInfoTyped(u32 expected_header_, HandlerFnP<T> handler_callback_, const char* name_)
: FunctionInfoBase{expected_header_, HandlerFnP<ServiceFrameworkBase>(handler_callback_), name_} {}
};
using FunctionInfo = FunctionInfoTyped<Self>;

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