Compare commits
11 Commits
quick-fix
...
descriptor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2370bd46a | ||
|
|
b782497755 | ||
|
|
c0aca8d67f | ||
|
|
55ae877dc2 | ||
|
|
db1dfc9755 | ||
|
|
d7de298948 | ||
|
|
363d861011 | ||
|
|
30d75d4e52 | ||
|
|
06b83a58a6 | ||
|
|
1e06c6f752 | ||
|
|
adc41bff70 |
@@ -13,8 +13,6 @@ Copyright: yuzu Emulator Project
|
|||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
|
|
||||||
Files: dist/qt_themes/default/icons/256x256/eden.png
|
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/yuzu.bmp
|
||||||
dist/eden.icns
|
dist/eden.icns
|
||||||
dist/eden.ico
|
dist/eden.ico
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ endif()
|
|||||||
|
|
||||||
# Needed for FFmpeg w/ VAAPI and DRM
|
# Needed for FFmpeg w/ VAAPI and DRM
|
||||||
if (PLATFORM_OPENBSD)
|
if (PLATFORM_OPENBSD)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include")
|
# OpenBSD 7.8 broke libcxx when upgrading, so we must define the PSTL backend manually
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R6/include")
|
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")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_SYSROOT}/usr/X11R6/lib")
|
||||||
elseif (PLATFORM_NETBSD)
|
elseif (PLATFORM_NETBSD)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R7/include")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/X11R7/include")
|
||||||
|
|||||||
81
dist/eden_named.svg
vendored
81
dist/eden_named.svg
vendored
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 37 KiB |
@@ -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 .`)
|
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
|
## OpenBSD
|
||||||
|
|
||||||
After configuration, you may need to modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`.
|
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
|
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.
|
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
|
```sh
|
||||||
pkgin python313
|
pkgin python313
|
||||||
git clone --depth=1 https://github.com/KhronosGroup/glslang.git
|
git clone --depth=1 https://github.com/KhronosGroup/glslang.git
|
||||||
@@ -114,6 +122,8 @@ cmake --build build -- -j`nproc`
|
|||||||
cmake --install build
|
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
|
# DragonFlyBSD
|
||||||
|
|
||||||
If `libstdc++.so.6` is not found (`GLIBCXX_3.4.30`) then attempt:
|
If `libstdc++.so.6` is not found (`GLIBCXX_3.4.30`) then attempt:
|
||||||
|
|||||||
@@ -183,6 +183,8 @@ sudo dnf config-manager --enable crb
|
|||||||
sudo dnf install qt6-qtbase-private-devel
|
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`
|
* [RPM Fusion](https://rpmfusion.org/Configuration) is required for `ffmpeg-devel`
|
||||||
* Fedora 32 or later is required.
|
* 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`
|
* 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>
|
<details>
|
||||||
<summary>FreeBSD</summary>
|
<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.
|
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>
|
<details>
|
||||||
<summary>NetBSD</summary>
|
<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).
|
[Caveats](./Caveats.md#netbsd).
|
||||||
|
|
||||||
@@ -320,7 +322,7 @@ pacman -Syuu --needed --noconfirm $packages
|
|||||||
<summary>HaikuOS</summary>
|
<summary>HaikuOS</summary>
|
||||||
|
|
||||||
```sh
|
```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).
|
[Caveats](./Caveats.md#haikuos).
|
||||||
|
|||||||
874
docs/NvidiaGpu.md
Normal file
874
docs/NvidiaGpu.md
Normal 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.
|
||||||
@@ -10,4 +10,6 @@ This contains documentation created by developers. This contains build instructi
|
|||||||
- **[Debug Guidelines](./Debug.md)**
|
- **[Debug Guidelines](./Debug.md)**
|
||||||
- **[CPM - CMake Package Manager](CPMUtil.md)**
|
- **[CPM - CMake Package Manager](CPMUtil.md)**
|
||||||
- **[Platform-Specific Caveats](Caveats.md)**
|
- **[Platform-Specific Caveats](Caveats.md)**
|
||||||
|
- **[The NVIDIA SM86 (Maxwell) GPU](./NvidiaGpu.md)**
|
||||||
- **[User Handbook](./user)**
|
- **[User Handbook](./user)**
|
||||||
|
- **[Release Policy](./ReleasePolicy.md)**
|
||||||
|
|||||||
25
docs/ReleasePolicy.md
Normal file
25
docs/ReleasePolicy.md
Normal 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.
|
||||||
@@ -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.
|
|
||||||
@@ -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.
|
1. Launch Eden and wait for it to load.
|
||||||
2. Navigate to *Emulation > Configure…*
|
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.
|
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.
|
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.
|
||||||
|
|||||||
@@ -90,3 +90,22 @@ The OpenGL backend would invoke behaviour that would result in swarst/LLVMpipe w
|
|||||||
### HaikuOS compatibility
|
### 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.
|
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
|
||||||
|
```
|
||||||
|
|||||||
@@ -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.**
|
**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
|
### 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.
|
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.**
|
2. Install [SteamDeckGyroDSU](https://github.com/kmicki/SteamDeckGyroDSU/releases) by going to *3rd Party Tools > Gyroscope* and clicking **Install.**
|
||||||
@@ -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.**
|
**Click [Here](https://evilperson1337.notion.site/Importing-Saves-Into-Eden-2b057c2edaf681fe968df8d63821ccae) for a version of this guide with images & visual elements.**
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Pre-Requisites
|
### Pre-Requisites
|
||||||
- Eden emulator already set up and configured.
|
- Eden emulator already set up and configured.
|
||||||
- The save file(s) you want to import
|
- The save file(s) you want to import
|
||||||
|
|
||||||
---
|
## Desktop
|
||||||
|
|
||||||
## Steps
|
### Steps
|
||||||
1. Open Eden and wait for it to load.
|
1. Open Eden and wait for it to load.
|
||||||
2. Start the game and create a save file to establish the directories.
|
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.
|
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>
|
</aside>
|
||||||
7. Close the file explorer as it is no longer needed.
|
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
|
||||||
@@ -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.
|
Use this guide for when you want to install an Atmosphere-based mod for use in Eden.
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
Use this guide when you want to install Updates or DLC for your games in Eden.
|
||||||
|
|
||||||
296
docs/user/Multiplayer.md
Normal file
296
docs/user/Multiplayer.md
Normal 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.
|
||||||
@@ -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.**
|
**Click [Here](https://evilperson1337.notion.site/Eden-Quick-Start-2b057c2edaf6817b9859d8bcdb474017) for a version of this guide with images & visual elements.**
|
||||||
|
|
||||||
---
|
## Windows
|
||||||
|
|
||||||
### Pre-Requisites
|
### 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.
|
- 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
|
- Firmware dumped from your console
|
||||||
- Keys extracted from your console
|
- Keys extracted from your console
|
||||||
- Games dumped from your console
|
- Games dumped from your console
|
||||||
- Internet Connection
|
- Internet Connection
|
||||||
|
|
||||||
---
|
### Steps
|
||||||
|
|
||||||
## Steps
|
|
||||||
|
|
||||||
1. Download either the *Stable* or *Nightly* Eden application.
|
1. Download either the *Stable* or *Nightly* Eden application.
|
||||||
<aside>
|
<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.
|
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.
|
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.
|
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.
|
||||||
@@ -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.
|
|
||||||
@@ -4,14 +4,35 @@ The "FAQ".
|
|||||||
|
|
||||||
This handbook is primarily aimed at the end-user - baking useful knowledge for enhancing their emulation experience.
|
This handbook is primarily aimed at the end-user - baking useful knowledge for enhancing their emulation experience.
|
||||||
|
|
||||||
|
## Basics
|
||||||
|
|
||||||
- **[The Basics](Basics.md)**
|
- **[The Basics](Basics.md)**
|
||||||
|
- **[Quickstart](./QuickStart.md)**
|
||||||
|
- **[Run On macOS](./RunOnMacOS.md)**
|
||||||
- **[Audio](Audio.md)**
|
- **[Audio](Audio.md)**
|
||||||
- **[Server hosting](ServerHosting.md)**
|
|
||||||
- **[Graphics](Graphics.md)**
|
- **[Graphics](Graphics.md)**
|
||||||
- **[Platforms and Architectures](Architectures.md)**
|
- **[Data, Savefiles and Storage](Storage.md)**
|
||||||
- **[Testing](Testing.md)**
|
|
||||||
- **[Data, savefiles and storage](Storage.md)**
|
|
||||||
- **[Orphaned Profiles](Orphaned.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)**
|
- **[Command Line](CommandLine.md)**
|
||||||
- **[Native Application Development](Native.md)**
|
- **[Native Application Development](Native.md)**
|
||||||
- **[Adding Boolean Settings Toggles](AddingBooleanToggles.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
211
docs/user/SyncthingGuide.md
Normal 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 platform’s specific guides - this will serve as a general overview of Syncthing.
|
||||||
|
|
||||||
|
### What is Syncthing Anyway?
|
||||||
|
|
||||||
|
Syncthing is a continuous file synchronization program (in the layman’s - 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 doesn’t 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. We’ll 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 child’s 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 don’t 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. We’ll 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 child’s 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.
|
||||||
@@ -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 platform’s specific guides - this will serve as a general overview of Syncthing.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### What is Syncthing Anyway?
|
|
||||||
|
|
||||||
Syncthing is a continuous file synchronization program (in the layman’s - 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 doesn’t 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.
|
|
||||||
@@ -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 don’t 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. We’ll 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 child’s 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.
|
|
||||||
@@ -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. We’ll 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 child’s 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.
|
|
||||||
@@ -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.
|
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
|
## 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.
|
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.
|
||||||
|
|||||||
@@ -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)
|
- [Nightly Eden builds](https://github.com/pflyly/eden-nightly)
|
||||||
- [NixOS Eden Flake](https://github.com/Grantimatter/eden-flake)
|
- [NixOS Eden Flake](https://github.com/Grantimatter/eden-flake)
|
||||||
|
- [ES-DE Frontend Support](https://github.com/GlazedBelmont/es-de-android-custom-systems)
|
||||||
|
|||||||
@@ -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.**
|
**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.
|
*Behavior*: Program appears not to launch or exits immediately without leaving any log entries.
|
||||||
*Platform(s) Affected*:
|
*Platform(s) Affected*:
|
||||||
@@ -32,13 +44,11 @@ Faulting package-relative application ID:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Causes
|
### Causes
|
||||||
|
|
||||||
<aside>
|
<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.*
|
*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>
|
<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.*
|
*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.
|
8. Reboot your computer.
|
||||||
9. Launch Eden and verify it is now working.
|
9. Launch Eden and verify it is now working.
|
||||||
</aside>
|
</aside>
|
||||||
@@ -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.
|
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.**
|
**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
|
### Pre-Requisites
|
||||||
|
|
||||||
@@ -17,9 +21,7 @@ Use this guide when you want to load Amiibo into your games for use with the Ede
|
|||||||
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
## Steps
|
### Steps
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
1. Launch Eden and launch the game you want to load Amiibo for.
|
1. Launch Eden and launch the game you want to load Amiibo for.
|
||||||
<aside>
|
<aside>
|
||||||
@@ -40,4 +42,4 @@ Use this guide when you want to load Amiibo into your games for use with the Ede
|
|||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
5. Upon loading a valid file, you will get a confirmation screen and your bonus content will be unlocked/functionality activated.
|
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.
|
||||||
@@ -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.
|
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.**
|
**Click [Here](https://evilperson1337.notion.site/Using-Cheats-with-Eden-2b057c2edaf6818fab66c276e2304bb4) for a version of this guide with images & visual elements.**
|
||||||
|
|
||||||
---
|
## Android
|
||||||
|
|
||||||
### Pre-Requisites
|
### Pre-Requisites
|
||||||
|
|
||||||
@@ -21,11 +21,7 @@ Another option would be to launch the game in Eden and close it - then go into t
|
|||||||
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
---
|
### Step 1: Configuring a Cheat
|
||||||
|
|
||||||
## Steps
|
|
||||||
|
|
||||||
### 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.
|
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.**
|
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.
|
2. You should now see the cheat appear in the **Add-ons** screen.
|
||||||
3. Launch the game and confirm that the cheat is applied.
|
3. Launch the game and confirm that the cheat is applied.
|
||||||
|
|
||||||
---
|
### Step 2: Multiple Cheats
|
||||||
|
|
||||||
### 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.
|
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
|
040E0000 0048A818 52800028
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
### Step 3: Enabling/Disabling Cheats
|
||||||
|
|
||||||
### Enabling/Disabling Cheats
|
|
||||||
|
|
||||||
Cheats are enabled by default, but can be disabled so they don’t affect gameplay fairly easily using the game properties.
|
Cheats are enabled by default, but can be disabled so they don’t affect gameplay fairly easily using the game properties.
|
||||||
|
|
||||||
@@ -89,4 +81,76 @@ Cheats are enabled by default, but can be disabled so they don’t affect gamepl
|
|||||||
2. Scroll down on the properties until you see **Add-ons**, select this option.
|
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.
|
3. *Select/Deselect* the name of the cheat you wish to enable/disable.
|
||||||
4. Click **OK** to close the window.
|
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 don’t 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.
|
||||||
@@ -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 don’t 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.
|
|
||||||
6
externals/ffmpeg/cpmfile.json
vendored
6
externals/ffmpeg/cpmfile.json
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"ffmpeg": {
|
"ffmpeg": {
|
||||||
"repo": "FFmpeg/FFmpeg",
|
"repo": "FFmpeg/FFmpeg",
|
||||||
"sha": "ddf443f1e9",
|
"sha": "5e56937b74",
|
||||||
"hash": "ded1c313843f23805102565bd3ca92602fb9c2951e059ca5e1a486ab3ef7d589acccf3cde05c5ff0cfc5199c3a261dccb4d2a93254e585824850696fb41a292e",
|
"hash": "9ab0457dcd6ce6359b5053c1662f57910d332f68ca0cca9d4134d858464840917027374de3d97e0863c3a7daaea2fe4f4cd17d1c6d8e7f740f4ad91e71c2932b",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
},
|
},
|
||||||
"ffmpeg-ci": {
|
"ffmpeg-ci": {
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"package": "FFmpeg",
|
"package": "FFmpeg",
|
||||||
"name": "ffmpeg",
|
"name": "ffmpeg",
|
||||||
"repo": "crueter-ci/FFmpeg",
|
"repo": "crueter-ci/FFmpeg",
|
||||||
"version": "8.0-ddf443f1e9",
|
"version": "8.0.1-5e56937b74",
|
||||||
"min_version": "4.1"
|
"min_version": "4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
let
|
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 = []; };
|
pkgs = import nixpkgs { config = {}; overlays = []; };
|
||||||
in
|
in
|
||||||
pkgs.mkShellNoCC {
|
pkgs.mkShellNoCC {
|
||||||
|
|||||||
@@ -21,6 +21,15 @@
|
|||||||
|
|
||||||
namespace AudioCore::Renderer {
|
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>
|
template <typename T, CommandId Id>
|
||||||
T& CommandBuffer::GenerateStart(const s32 node_id) {
|
T& CommandBuffer::GenerateStart(const s32 node_id) {
|
||||||
if (size + sizeof(T) >= command_list.size_bytes()) {
|
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) {
|
const bool use_float_processing) {
|
||||||
auto& cmd{GenerateStart<BiquadFilterCommand, CommandId::BiquadFilter>(node_id)};
|
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*>(
|
const auto state{reinterpret_cast<VoiceState::BiquadFilterState*>(
|
||||||
effect_info.GetStateBuffer() + channel * sizeof(VoiceState::BiquadFilterState))};
|
effect_info.GetStateBuffer() + channel * sizeof(VoiceState::BiquadFilterState))};
|
||||||
|
|
||||||
cmd.input = buffer_offset + parameter.inputs[channel];
|
if (behavior->IsEffectInfoVersion2Supported()) {
|
||||||
cmd.output = buffer_offset + parameter.outputs[channel];
|
const auto& p{
|
||||||
|
*reinterpret_cast<BiquadFilterInfo::ParameterVersion2*>(effect_info.GetParameter())};
|
||||||
|
|
||||||
cmd.biquad.b = parameter.b;
|
if (!IsChannelCountValid(p.channel_count) || channel < 0 || channel >= p.channel_count) {
|
||||||
cmd.biquad.a = parameter.a;
|
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.use_float_coefficients = false;
|
||||||
|
|
||||||
cmd.state = memory_pool->Translate(CpuAddr(state),
|
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) {
|
const s16 buffer_offset, const s8 channel) {
|
||||||
auto& cmd{GenerateStart<CopyMixBufferCommand, CommandId::CopyMixBuffer>(node_id)};
|
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{
|
const auto& parameter{
|
||||||
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
|
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
|
||||||
cmd.input_index = buffer_offset + parameter.inputs[channel];
|
cmd.input_index = buffer_offset + parameter.inputs[channel];
|
||||||
|
|||||||
@@ -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-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// 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,
|
void CommandGenerator::GenerateBiquadFilterEffectCommand(const s16 buffer_offset,
|
||||||
EffectInfoBase& effect_info,
|
EffectInfoBase& effect_info,
|
||||||
const s32 node_id) {
|
const s32 node_id) {
|
||||||
const auto& parameter{
|
EffectInfoBase::ParameterState param_state{};
|
||||||
*reinterpret_cast<BiquadFilterInfo::ParameterVersion1*>(effect_info.GetParameter())};
|
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()) {
|
if (effect_info.IsEnabled()) {
|
||||||
bool needs_init{false};
|
bool needs_init{false};
|
||||||
|
|
||||||
switch (parameter.state) {
|
switch (param_state) {
|
||||||
case EffectInfoBase::ParameterState::Initialized:
|
case EffectInfoBase::ParameterState::Initialized:
|
||||||
needs_init = true;
|
needs_init = true;
|
||||||
break;
|
break;
|
||||||
@@ -375,22 +403,26 @@ void CommandGenerator::GenerateBiquadFilterEffectCommand(const s16 buffer_offset
|
|||||||
if (render_context.behavior->IsBiquadFilterEffectStateClearBugFixed()) {
|
if (render_context.behavior->IsBiquadFilterEffectStateClearBugFixed()) {
|
||||||
needs_init = false;
|
needs_init = false;
|
||||||
} else {
|
} else {
|
||||||
needs_init = parameter.state == EffectInfoBase::ParameterState::Updating;
|
needs_init = param_state == EffectInfoBase::ParameterState::Updating;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(Service_Audio, "Invalid biquad parameter state {}",
|
LOG_ERROR(Service_Audio,
|
||||||
static_cast<u32>(parameter.state));
|
"Invalid biquad parameter state {}, treating as uninitialized",
|
||||||
|
static_cast<u32>(param_state));
|
||||||
|
needs_init = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (s8 channel = 0; channel < parameter.channel_count; channel++) {
|
const bool use_float_processing =
|
||||||
command_buffer.GenerateBiquadFilterCommand(
|
render_context.behavior->UseBiquadFilterFloatProcessing();
|
||||||
node_id, effect_info, buffer_offset, channel, needs_init,
|
|
||||||
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 {
|
} 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,
|
command_buffer.GenerateCopyMixBufferCommand(node_id, effect_info, buffer_offset,
|
||||||
channel);
|
channel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -34,14 +37,22 @@ void BiquadFilterInfo::Update(BehaviorInfo::ErrorInfo& error_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BiquadFilterInfo::UpdateForCommandGeneration() {
|
void BiquadFilterInfo::UpdateForCommandGeneration() {
|
||||||
if (enabled) {
|
usage_state = enabled ? UsageState::Enabled : UsageState::Disabled;
|
||||||
usage_state = UsageState::Enabled;
|
|
||||||
} else {
|
|
||||||
usage_state = UsageState::Disabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto params{reinterpret_cast<ParameterVersion1*>(parameter.data())};
|
auto* params_v1 = reinterpret_cast<ParameterVersion1*>(parameter.data());
|
||||||
params->state = ParameterState::Updated;
|
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) {}
|
void BiquadFilterInfo::InitializeResultState(EffectResultState& result_state) {}
|
||||||
|
|||||||
@@ -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-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -27,10 +30,12 @@ public:
|
|||||||
struct ParameterVersion2 {
|
struct ParameterVersion2 {
|
||||||
/* 0x00 */ std::array<s8, MaxChannels> inputs;
|
/* 0x00 */ std::array<s8, MaxChannels> inputs;
|
||||||
/* 0x06 */ std::array<s8, MaxChannels> outputs;
|
/* 0x06 */ std::array<s8, MaxChannels> outputs;
|
||||||
/* 0x0C */ std::array<s16, 3> b;
|
/* 0x0C */ u32 padding;
|
||||||
/* 0x12 */ std::array<s16, 2> a;
|
/* 0x10 */ std::array<f32, 3> b;
|
||||||
/* 0x16 */ s8 channel_count;
|
/* 0x1C */ std::array<f32, 2> a;
|
||||||
/* 0x17 */ ParameterState state;
|
/* 0x24 */ s8 channel_count;
|
||||||
|
/* 0x25 */ ParameterState state;
|
||||||
|
/* 0x26 */ u16 reserved;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(ParameterVersion2) <= sizeof(EffectInfoBase::InParameterVersion2),
|
static_assert(sizeof(ParameterVersion2) <= sizeof(EffectInfoBase::InParameterVersion2),
|
||||||
"BiquadFilterInfo::ParameterVersion2 has the wrong size!");
|
"BiquadFilterInfo::ParameterVersion2 has the wrong size!");
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_
|
|||||||
{181, nullptr, "UpgradeLaunchRequiredVersion"},
|
{181, nullptr, "UpgradeLaunchRequiredVersion"},
|
||||||
{190, nullptr, "SendServerMaintenanceOverlayNotification"},
|
{190, nullptr, "SendServerMaintenanceOverlayNotification"},
|
||||||
{200, nullptr, "GetLastApplicationExitReason"},
|
{200, nullptr, "GetLastApplicationExitReason"},
|
||||||
{210, D<&IApplicationFunctions::GetUnknownEvent210>, "Unknown210"},
|
{210, D<&IApplicationFunctions::GetLaunchRequiredVersionUpgrade>, "GetLaunchRequiredVersionUpgrade"}, // [20.0.0+]
|
||||||
|
{211, nullptr, "GetLaunchRequiredVersionUpgradeStatus"}, // [20.0.0+]
|
||||||
{220, nullptr, "Unknown220"}, // [20.0.0+]
|
{220, nullptr, "Unknown220"}, // [20.0.0+]
|
||||||
{300, nullptr, "Unknown300"}, // [20.0.0+]
|
{300, nullptr, "Unknown300"}, // [20.0.0+]
|
||||||
{310, nullptr, "Unknown310"}, // [20.0.0+]
|
{310, nullptr, "Unknown310"}, // [20.0.0+]
|
||||||
@@ -496,10 +497,10 @@ Result IApplicationFunctions::GetHealthWarningDisappearedSystemEvent(
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
Result IApplicationFunctions::GetUnknownEvent210(
|
Result IApplicationFunctions::GetLaunchRequiredVersionUpgrade(
|
||||||
OutCopyHandle<Kernel::KReadableEvent> out_event) {
|
OutCopyHandle<Kernel::KReadableEvent> out_event) {
|
||||||
LOG_DEBUG(Service_AM, "called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
*out_event = m_applet->unknown_event.GetHandle();
|
*out_event = m_applet->state_changed_event.GetHandle();
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ private:
|
|||||||
Result TryPopFromFriendInvitationStorageChannel(Out<SharedPointer<IStorage>> out_storage);
|
Result TryPopFromFriendInvitationStorageChannel(Out<SharedPointer<IStorage>> out_storage);
|
||||||
Result GetNotificationStorageChannelEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
Result GetNotificationStorageChannelEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||||
Result GetHealthWarningDisappearedSystemEvent(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();
|
Result PrepareForJit();
|
||||||
|
|
||||||
const std::shared_ptr<Applet> m_applet;
|
const std::shared_ptr<Applet> m_applet;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "core/hle/service/ns/content_management_interface.h"
|
#include "core/hle/service/ns/content_management_interface.h"
|
||||||
#include "core/hle/service/ns/read_only_application_control_data_interface.h"
|
#include "core/hle/service/ns/read_only_application_control_data_interface.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
|
#include "frontend_common/firmware_manager.h"
|
||||||
|
|
||||||
namespace Service::NS {
|
namespace Service::NS {
|
||||||
|
|
||||||
@@ -429,13 +430,13 @@ Result IApplicationManagerInterface::IsAnyApplicationEntityInstalled(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result IApplicationManagerInterface::GetApplicationViewDeprecated(
|
Result IApplicationManagerInterface::GetApplicationViewDeprecated(
|
||||||
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
|
OutArray<ApplicationViewV19, BufferAttr_HipcMapAlias> out_application_views,
|
||||||
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
|
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
|
||||||
const auto size = (std::min)(out_application_views.size(), application_ids.size());
|
const auto size = (std::min)(out_application_views.size(), application_ids.size());
|
||||||
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
|
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
|
||||||
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
ApplicationView view{};
|
ApplicationViewV19 view{};
|
||||||
view.application_id = application_ids[i];
|
view.application_id = application_ids[i];
|
||||||
view.version = 0x70000;
|
view.version = 0x70000;
|
||||||
view.flags = 0x401f17;
|
view.flags = 0x401f17;
|
||||||
@@ -447,34 +448,53 @@ Result IApplicationManagerInterface::GetApplicationViewDeprecated(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result IApplicationManagerInterface::GetApplicationViewWithPromotionInfo(
|
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) {
|
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
|
||||||
const auto size = (std::min)(out_application_views.size(), application_ids.size());
|
const auto requested = application_ids.size();
|
||||||
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
|
LOG_WARNING(Service_NS, "called, size={}", requested);
|
||||||
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
const auto fw_pair = FirmwareManager::GetFirmwareVersion(system);
|
||||||
ApplicationViewWithPromotionInfo view{};
|
const bool is_fw20 = fw_pair.first.major >= 20;
|
||||||
view.view.application_id = application_ids[i];
|
|
||||||
view.view.version = 0x70000;
|
|
||||||
view.view.flags = 0x401f17;
|
|
||||||
view.promotion = {};
|
|
||||||
|
|
||||||
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();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
Result IApplicationManagerInterface::GetApplicationView(
|
Result IApplicationManagerInterface::GetApplicationView(
|
||||||
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
|
OutArray<ApplicationViewV20, BufferAttr_HipcMapAlias> out_application_views,
|
||||||
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
|
InArray<u64, BufferAttr_HipcMapAlias> application_ids) {
|
||||||
const auto size = (std::min)(out_application_views.size(), application_ids.size());
|
const auto size = (std::min)(out_application_views.size(), application_ids.size());
|
||||||
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
|
LOG_WARNING(Service_NS, "(STUBBED) called, size={}", application_ids.size());
|
||||||
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
ApplicationView view{};
|
ApplicationViewV20 view{};
|
||||||
view.application_id = application_ids[i];
|
view.application_id = application_ids[i];
|
||||||
view.version = 0x70000;
|
view.version = 0x70000;
|
||||||
|
view.unk = 0;
|
||||||
view.flags = 0x401f17;
|
view.flags = 0x401f17;
|
||||||
|
|
||||||
out_application_views[i] = view;
|
out_application_views[i] = view;
|
||||||
|
|||||||
@@ -36,13 +36,14 @@ public:
|
|||||||
Result IsGameCardApplicationRunning(Out<bool> out_is_running);
|
Result IsGameCardApplicationRunning(Out<bool> out_is_running);
|
||||||
Result IsAnyApplicationEntityInstalled(Out<bool> out_is_any_application_entity_installed);
|
Result IsAnyApplicationEntityInstalled(Out<bool> out_is_any_application_entity_installed);
|
||||||
Result GetApplicationViewDeprecated(
|
Result GetApplicationViewDeprecated(
|
||||||
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
|
OutArray<ApplicationViewV19, BufferAttr_HipcMapAlias> out_application_views,
|
||||||
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
||||||
Result GetApplicationViewWithPromotionInfo(
|
Result GetApplicationViewWithPromotionInfo(
|
||||||
OutArray<ApplicationViewWithPromotionInfo, BufferAttr_HipcMapAlias> out_application_views,
|
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
||||||
|
Out<u32> out_count,
|
||||||
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
||||||
Result GetApplicationView(
|
Result GetApplicationView(
|
||||||
OutArray<ApplicationView, BufferAttr_HipcMapAlias> out_application_views,
|
OutArray<ApplicationViewV20, BufferAttr_HipcMapAlias> out_application_views,
|
||||||
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
InArray<u64, BufferAttr_HipcMapAlias> application_ids);
|
||||||
Result GetApplicationRightsOnClient(
|
Result GetApplicationRightsOnClient(
|
||||||
OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
|
OutArray<ApplicationRightsOnClient, BufferAttr_HipcMapAlias> out_rights, Out<u32> out_count,
|
||||||
|
|||||||
@@ -55,16 +55,6 @@ struct ApplicationDownloadState {
|
|||||||
static_assert(sizeof(ApplicationDownloadState) == 0x20,
|
static_assert(sizeof(ApplicationDownloadState) == 0x20,
|
||||||
"ApplicationDownloadState has incorrect size.");
|
"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 {
|
struct ApplicationRightsOnClient {
|
||||||
u64 application_id;
|
u64 application_id;
|
||||||
Common::UUID uid;
|
Common::UUID uid;
|
||||||
@@ -88,14 +78,74 @@ struct PromotionInfo {
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(PromotionInfo) == 0x20, "PromotionInfo has incorrect size.");
|
static_assert(sizeof(PromotionInfo) == 0x20, "PromotionInfo has incorrect size.");
|
||||||
|
|
||||||
// TODO(Maufeat): NsApplicationViewWithPromotionInfo is on SDK20+ 0x78 bytes
|
struct ApplicationViewV19 {
|
||||||
/// NsApplicationViewWithPromotionInfo
|
u64 application_id;
|
||||||
struct ApplicationViewWithPromotionInfo {
|
u32 version;
|
||||||
ApplicationView view; ///< \ref NsApplicationView
|
u32 flags;
|
||||||
PromotionInfo promotion; ///< \ref NsPromotionInfo
|
ApplicationDownloadState download_state;
|
||||||
|
ApplicationDownloadState download_progress;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(ApplicationViewWithPromotionInfo) == 0x70,
|
static_assert(sizeof(ApplicationViewV19) == 0x50, "ApplicationViewV19 has incorrect size.");
|
||||||
"ApplicationViewWithPromotionInfo 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 {
|
struct ApplicationOccupiedSizeEntity {
|
||||||
FileSys::StorageId storage_id;
|
FileSys::StorageId storage_id;
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// 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 "common/settings.h"
|
||||||
#include "core/file_sys/control_metadata.h"
|
#include "core/file_sys/control_metadata.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
@@ -17,6 +23,49 @@
|
|||||||
|
|
||||||
namespace Service::NS {
|
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(
|
IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterface(
|
||||||
Core::System& system_)
|
Core::System& system_)
|
||||||
: ServiceFramework{system_, "IReadOnlyApplicationControlDataInterface"} {
|
: ServiceFramework{system_, "IReadOnlyApplicationControlDataInterface"} {
|
||||||
@@ -27,8 +76,8 @@ IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterfa
|
|||||||
{2, D<&IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"},
|
{2, D<&IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"},
|
||||||
{3, nullptr, "ConvertLanguageCodeToApplicationLanguage"},
|
{3, nullptr, "ConvertLanguageCodeToApplicationLanguage"},
|
||||||
{4, nullptr, "SelectApplicationDesiredLanguage"},
|
{4, nullptr, "SelectApplicationDesiredLanguage"},
|
||||||
{5, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithoutIcon>, "GetApplicationControlDataWithoutIcon"},
|
{5, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData2>, "GetApplicationControlDataWithoutIcon"},
|
||||||
{19, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithoutIcon>, "GetApplicationControlDataWithoutIcon"},
|
{19, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData3>, "GetApplicationControlDataWithoutIcon3"},
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
@@ -125,11 +174,77 @@ Result IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLan
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
Result IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithoutIcon(
|
Result IReadOnlyApplicationControlDataInterface::GetApplicationControlData2(
|
||||||
OutBuffer<BufferAttr_HipcMapAlias> out_buffer, Out<u64> out_total_size,
|
OutBuffer<BufferAttr_HipcMapAlias> out_buffer, Out<u64> out_total_size,
|
||||||
ApplicationControlSource application_control_source, u64 application_id) {
|
ApplicationControlSource application_control_source, u8 flag1, u8 flag2, u64 application_id) {
|
||||||
LOG_INFO(Service_NS, "called with control_source={}, application_id={:016X}",
|
LOG_INFO(Service_NS, "called with control_source={}, flags=({:02X},{:02X}), application_id={:016X}",
|
||||||
application_control_source, application_id);
|
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(),
|
const FileSys::PatchManager pm{application_id, system.GetFileSystemController(),
|
||||||
system.GetContentProvider()};
|
system.GetContentProvider()};
|
||||||
@@ -158,22 +273,43 @@ Result IReadOnlyApplicationControlDataInterface::GetApplicationControlDataWithou
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto icon_area_size = size - nacp_size;
|
const auto icon_area_size = size - nacp_size;
|
||||||
if (icon_area_size > 0) {
|
std::vector<u8> final_icon_data;
|
||||||
if (control.second != nullptr) {
|
|
||||||
const auto icon_size = control.second->GetSize();
|
if (control.second != nullptr) {
|
||||||
const auto to_copy = static_cast<size_t>((std::min)(icon_size, icon_area_size));
|
size_t full_size = control.second->GetSize();
|
||||||
control.second->Read(out_buffer.data() + nacp_size, to_copy);
|
if (full_size > 0) {
|
||||||
if (to_copy < icon_area_size) {
|
final_icon_data.resize(full_size);
|
||||||
std::memset(out_buffer.data() + nacp_size + to_copy, 0, icon_area_size - to_copy);
|
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();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,21 @@ public:
|
|||||||
u32 supported_languages);
|
u32 supported_languages);
|
||||||
Result ConvertApplicationLanguageToLanguageCode(Out<u64> out_language_code,
|
Result ConvertApplicationLanguageToLanguageCode(Out<u64> out_language_code,
|
||||||
ApplicationLanguage application_language);
|
ApplicationLanguage application_language);
|
||||||
Result GetApplicationControlDataWithoutIcon(
|
Result GetApplicationControlData2(
|
||||||
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
OutBuffer<BufferAttr_HipcMapAlias> out_buffer,
|
||||||
Out<u64> out_total_size,
|
Out<u64> out_total_size,
|
||||||
ApplicationControlSource application_control_source,
|
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);
|
u64 application_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ void BSD::Listen(HLERequestContext& ctx) {
|
|||||||
void BSD::Fcntl(HLERequestContext& ctx) {
|
void BSD::Fcntl(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const s32 fd = rp.Pop<s32>();
|
const s32 fd = rp.Pop<s32>();
|
||||||
const s32 cmd = rp.Pop<s32>();
|
const u32 cmd = rp.Pop<u32>();
|
||||||
const s32 arg = rp.Pop<s32>();
|
const s32 arg = rp.Pop<s32>();
|
||||||
|
|
||||||
LOG_DEBUG(Service, "called. fd={} cmd={} arg={}", fd, cmd, arg);
|
LOG_DEBUG(Service, "called. fd={} cmd={} arg={}", fd, cmd, arg);
|
||||||
@@ -627,23 +627,41 @@ std::pair<s32, Errno> BSD::AcceptImpl(s32 fd, std::vector<u8>& write_buffer) {
|
|||||||
|
|
||||||
Errno BSD::BindImpl(s32 fd, std::span<const u8> addr) {
|
Errno BSD::BindImpl(s32 fd, std::span<const u8> addr) {
|
||||||
if (!IsFileDescriptorValid(fd)) {
|
if (!IsFileDescriptorValid(fd)) {
|
||||||
|
LOG_ERROR(Service, "Bind failed: Invalid fd={}", fd);
|
||||||
return Errno::BADF;
|
return Errno::BADF;
|
||||||
}
|
}
|
||||||
ASSERT(addr.size() == sizeof(SockAddrIn));
|
ASSERT(addr.size() == sizeof(SockAddrIn));
|
||||||
auto addr_in = GetValue<SockAddrIn>(addr);
|
auto addr_in = GetValue<SockAddrIn>(addr);
|
||||||
|
|
||||||
return Translate(file_descriptors[fd]->socket->Bind(Translate(addr_in)));
|
LOG_INFO(Service, "Bind fd={} to {}:{}", fd, Network::IPv4AddressToString(addr_in.ip),
|
||||||
|
addr_in.portno);
|
||||||
|
|
||||||
|
const auto result = Translate(file_descriptors[fd]->socket->Bind(Translate(addr_in)));
|
||||||
|
if (result != Errno::SUCCESS) {
|
||||||
|
LOG_ERROR(Service, "Bind fd={} failed with errno={}", fd, static_cast<int>(result));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno BSD::ConnectImpl(s32 fd, std::span<const u8> addr) {
|
Errno BSD::ConnectImpl(s32 fd, std::span<const u8> addr) {
|
||||||
if (!IsFileDescriptorValid(fd)) {
|
if (!IsFileDescriptorValid(fd)) {
|
||||||
|
LOG_ERROR(Service, "Connect failed: Invalid fd={}", fd);
|
||||||
return Errno::BADF;
|
return Errno::BADF;
|
||||||
}
|
}
|
||||||
|
|
||||||
UNIMPLEMENTED_IF(addr.size() != sizeof(SockAddrIn));
|
UNIMPLEMENTED_IF(addr.size() != sizeof(SockAddrIn));
|
||||||
auto addr_in = GetValue<SockAddrIn>(addr);
|
auto addr_in = GetValue<SockAddrIn>(addr);
|
||||||
|
|
||||||
return Translate(file_descriptors[fd]->socket->Connect(Translate(addr_in)));
|
LOG_INFO(Service, "Connect fd={} to {}:{}", fd, Network::IPv4AddressToString(addr_in.ip),
|
||||||
|
addr_in.portno);
|
||||||
|
|
||||||
|
const auto result = Translate(file_descriptors[fd]->socket->Connect(Translate(addr_in)));
|
||||||
|
if (result != Errno::SUCCESS) {
|
||||||
|
LOG_ERROR(Service, "Connect fd={} failed with errno={}", fd, static_cast<int>(result));
|
||||||
|
} else {
|
||||||
|
LOG_INFO(Service, "Connect fd={} succeeded", fd);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno BSD::GetPeerNameImpl(s32 fd, std::vector<u8>& write_buffer) {
|
Errno BSD::GetPeerNameImpl(s32 fd, std::vector<u8>& write_buffer) {
|
||||||
@@ -719,8 +737,8 @@ Errno BSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector<u8>& o
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (level != static_cast<u32>(SocketLevel::SOCKET)) {
|
if (level != static_cast<u32>(SocketLevel::SOCKET)) {
|
||||||
UNIMPLEMENTED_MSG("Unknown getsockopt level");
|
LOG_WARNING(Service, "(STUBBED) Unknown getsockopt level={}, returning INVAL", level);
|
||||||
return Errno::SUCCESS;
|
return Errno::INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Network::SocketBase* const socket = file_descriptors[fd]->socket.get();
|
Network::SocketBase* const socket = file_descriptors[fd]->socket.get();
|
||||||
@@ -750,32 +768,52 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span<const u8
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (level != static_cast<u32>(SocketLevel::SOCKET)) {
|
if (level != static_cast<u32>(SocketLevel::SOCKET)) {
|
||||||
UNIMPLEMENTED_MSG("Unknown setsockopt level");
|
LOG_WARNING(Service, "(STUBBED) Unknown setsockopt level={}, returning INVAL", level);
|
||||||
return Errno::SUCCESS;
|
return Errno::INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Network::SocketBase* const socket = file_descriptors[fd]->socket.get();
|
Network::SocketBase* const socket = file_descriptors[fd]->socket.get();
|
||||||
|
|
||||||
if (optname == OptName::LINGER) {
|
if (optname == OptName::LINGER) {
|
||||||
ASSERT(optval.size() == sizeof(Linger));
|
if (optval.size() != sizeof(Linger)) {
|
||||||
|
LOG_WARNING(Service, "LINGER optval size mismatch: expected {}, got {}", sizeof(Linger),
|
||||||
|
optval.size());
|
||||||
|
return Errno::INVAL;
|
||||||
|
}
|
||||||
auto linger = GetValue<Linger>(optval);
|
auto linger = GetValue<Linger>(optval);
|
||||||
ASSERT(linger.onoff == 0 || linger.onoff == 1);
|
if (linger.onoff != 0 && linger.onoff != 1) {
|
||||||
|
LOG_WARNING(Service, "Invalid LINGER onoff value: {}", linger.onoff);
|
||||||
|
return Errno::INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
return Translate(socket->SetLinger(linger.onoff != 0, linger.linger));
|
return Translate(socket->SetLinger(linger.onoff != 0, linger.linger));
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(optval.size() == sizeof(u32));
|
if (optval.size() != sizeof(u32)) {
|
||||||
|
LOG_WARNING(Service, "optval size mismatch: expected {}, got {} for optname={}", sizeof(u32),
|
||||||
|
optval.size(), static_cast<u32>(optname));
|
||||||
|
return Errno::INVAL;
|
||||||
|
}
|
||||||
auto value = GetValue<u32>(optval);
|
auto value = GetValue<u32>(optval);
|
||||||
|
|
||||||
switch (optname) {
|
switch (optname) {
|
||||||
case OptName::REUSEADDR:
|
case OptName::REUSEADDR:
|
||||||
ASSERT(value == 0 || value == 1);
|
if (value != 0 && value != 1) {
|
||||||
|
LOG_WARNING(Service, "Invalid REUSEADDR value: {}", value);
|
||||||
|
return Errno::INVAL;
|
||||||
|
}
|
||||||
return Translate(socket->SetReuseAddr(value != 0));
|
return Translate(socket->SetReuseAddr(value != 0));
|
||||||
case OptName::KEEPALIVE:
|
case OptName::KEEPALIVE:
|
||||||
ASSERT(value == 0 || value == 1);
|
if (value != 0 && value != 1) {
|
||||||
|
LOG_WARNING(Service, "Invalid KEEPALIVE value: {}", value);
|
||||||
|
return Errno::INVAL;
|
||||||
|
}
|
||||||
return Translate(socket->SetKeepAlive(value != 0));
|
return Translate(socket->SetKeepAlive(value != 0));
|
||||||
case OptName::BROADCAST:
|
case OptName::BROADCAST:
|
||||||
ASSERT(value == 0 || value == 1);
|
if (value != 0 && value != 1) {
|
||||||
|
LOG_WARNING(Service, "Invalid BROADCAST value: {}", value);
|
||||||
|
return Errno::INVAL;
|
||||||
|
}
|
||||||
return Translate(socket->SetBroadcast(value != 0));
|
return Translate(socket->SetBroadcast(value != 0));
|
||||||
case OptName::SNDBUF:
|
case OptName::SNDBUF:
|
||||||
return Translate(socket->SetSndBuf(value));
|
return Translate(socket->SetSndBuf(value));
|
||||||
@@ -789,8 +827,9 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span<const u8
|
|||||||
LOG_WARNING(Service, "(STUBBED) setting NOSIGPIPE to {}", value);
|
LOG_WARNING(Service, "(STUBBED) setting NOSIGPIPE to {}", value);
|
||||||
return Errno::SUCCESS;
|
return Errno::SUCCESS;
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("Unimplemented optname={}", optname);
|
LOG_WARNING(Service, "(STUBBED) Unimplemented optname={} (0x{:x}), returning INVAL",
|
||||||
return Errno::SUCCESS;
|
static_cast<u32>(optname), static_cast<u32>(optname));
|
||||||
|
return Errno::INVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ void Fermi2D::Blit() {
|
|||||||
UNIMPLEMENTED_IF_MSG(regs.operation != Operation::SrcCopy, "Operation is not copy");
|
UNIMPLEMENTED_IF_MSG(regs.operation != Operation::SrcCopy, "Operation is not copy");
|
||||||
UNIMPLEMENTED_IF_MSG(regs.src.layer != 0, "Source layer is not zero");
|
UNIMPLEMENTED_IF_MSG(regs.src.layer != 0, "Source layer is not zero");
|
||||||
UNIMPLEMENTED_IF_MSG(regs.dst.layer != 0, "Destination layer is not zero");
|
UNIMPLEMENTED_IF_MSG(regs.dst.layer != 0, "Destination layer is not zero");
|
||||||
UNIMPLEMENTED_IF_MSG(regs.src.depth != 1, "Source depth is not one");
|
if (regs.src.depth != 1) {
|
||||||
|
LOG_DEBUG(HW_GPU, "Source depth is {}, expected 1 - using first layer", regs.src.depth);
|
||||||
|
}
|
||||||
UNIMPLEMENTED_IF_MSG(regs.clip_enable != 0, "Clipped blit enabled");
|
UNIMPLEMENTED_IF_MSG(regs.clip_enable != 0, "Clipped blit enabled");
|
||||||
|
|
||||||
const auto& args = regs.pixels_from_memory;
|
const auto& args = regs.pixels_from_memory;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ extern "C" {
|
|||||||
// for querying VAAPI driver information
|
// for querying VAAPI driver information
|
||||||
#include <libavutil/hwcontext_vaapi.h>
|
#include <libavutil/hwcontext_vaapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <libavutil/hwcontext.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace FFmpeg {
|
namespace FFmpeg {
|
||||||
@@ -27,282 +29,287 @@ constexpr AVPixelFormat PreferredGpuFormat = AV_PIX_FMT_NV12;
|
|||||||
constexpr AVPixelFormat PreferredCpuFormat = AV_PIX_FMT_YUV420P;
|
constexpr AVPixelFormat PreferredCpuFormat = AV_PIX_FMT_YUV420P;
|
||||||
constexpr std::array PreferredGpuDecoders = {
|
constexpr std::array PreferredGpuDecoders = {
|
||||||
#if defined (_WIN32)
|
#if defined (_WIN32)
|
||||||
AV_HWDEVICE_TYPE_CUDA,
|
AV_HWDEVICE_TYPE_CUDA,
|
||||||
AV_HWDEVICE_TYPE_D3D11VA,
|
AV_HWDEVICE_TYPE_D3D11VA,
|
||||||
AV_HWDEVICE_TYPE_DXVA2,
|
AV_HWDEVICE_TYPE_DXVA2,
|
||||||
|
AV_HWDEVICE_TYPE_D3D12VA,
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
AV_HWDEVICE_TYPE_VDPAU,
|
AV_HWDEVICE_TYPE_VDPAU,
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
|
||||||
|
#elif defined(ANDROID)
|
||||||
|
AV_HWDEVICE_TYPE_MEDIACODEC,
|
||||||
#elif defined(__unix__)
|
#elif defined(__unix__)
|
||||||
AV_HWDEVICE_TYPE_CUDA,
|
AV_HWDEVICE_TYPE_CUDA,
|
||||||
AV_HWDEVICE_TYPE_VAAPI,
|
AV_HWDEVICE_TYPE_VAAPI,
|
||||||
AV_HWDEVICE_TYPE_VDPAU,
|
AV_HWDEVICE_TYPE_VDPAU,
|
||||||
#endif
|
#endif
|
||||||
AV_HWDEVICE_TYPE_VULKAN,
|
AV_HWDEVICE_TYPE_VULKAN,
|
||||||
};
|
};
|
||||||
|
|
||||||
AVPixelFormat GetGpuFormat(AVCodecContext* codec_context, const AVPixelFormat* pix_fmts) {
|
AVPixelFormat GetGpuFormat(AVCodecContext* codec_context, const AVPixelFormat* pix_fmts) {
|
||||||
const auto desc = av_pix_fmt_desc_get(codec_context->pix_fmt);
|
const auto desc = av_pix_fmt_desc_get(codec_context->pix_fmt);
|
||||||
if (desc && !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
|
if (desc && !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
|
||||||
for (int i = 0;; i++) {
|
for (int i = 0;; i++) {
|
||||||
const AVCodecHWConfig* config = avcodec_get_hw_config(codec_context->codec, i);
|
const AVCodecHWConfig* config = avcodec_get_hw_config(codec_context->codec, i);
|
||||||
if (!config) {
|
if (!config) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto type : PreferredGpuDecoders) {
|
for (const auto type : PreferredGpuDecoders) {
|
||||||
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX && config->device_type == type) {
|
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX && config->device_type == type) {
|
||||||
codec_context->pix_fmt = config->pix_fmt;
|
codec_context->pix_fmt = config->pix_fmt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const AVPixelFormat* p = pix_fmts; *p != AV_PIX_FMT_NONE; ++p) {
|
for (const AVPixelFormat* p = pix_fmts; *p != AV_PIX_FMT_NONE; ++p) {
|
||||||
if (*p == codec_context->pix_fmt) {
|
if (*p == codec_context->pix_fmt) {
|
||||||
return codec_context->pix_fmt;
|
return codec_context->pix_fmt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO(HW_GPU, "Could not find supported GPU pixel format, falling back to CPU decoder");
|
LOG_INFO(HW_GPU, "Could not find supported GPU pixel format, falling back to CPU decoder");
|
||||||
av_buffer_unref(&codec_context->hw_device_ctx);
|
av_buffer_unref(&codec_context->hw_device_ctx);
|
||||||
codec_context->pix_fmt = PreferredCpuFormat;
|
codec_context->pix_fmt = PreferredCpuFormat;
|
||||||
return codec_context->pix_fmt;
|
return codec_context->pix_fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AVError(int errnum) {
|
std::string AVError(int errnum) {
|
||||||
char errbuf[AV_ERROR_MAX_STRING_SIZE] = {};
|
char errbuf[AV_ERROR_MAX_STRING_SIZE] = {};
|
||||||
av_make_error_string(errbuf, sizeof(errbuf) - 1, errnum);
|
av_make_error_string(errbuf, sizeof(errbuf) - 1, errnum);
|
||||||
return errbuf;
|
return errbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Packet::Packet(std::span<const u8> data) {
|
Packet::Packet(std::span<const u8> data) {
|
||||||
m_packet = av_packet_alloc();
|
m_packet = av_packet_alloc();
|
||||||
m_packet->data = const_cast<u8*>(data.data());
|
m_packet->data = const_cast<u8*>(data.data());
|
||||||
m_packet->size = static_cast<s32>(data.size());
|
m_packet->size = static_cast<s32>(data.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
Packet::~Packet() {
|
Packet::~Packet() {
|
||||||
av_packet_free(&m_packet);
|
av_packet_free(&m_packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
Frame::Frame() {
|
Frame::Frame() {
|
||||||
m_frame = av_frame_alloc();
|
m_frame = av_frame_alloc();
|
||||||
}
|
}
|
||||||
|
|
||||||
Frame::~Frame() {
|
Frame::~Frame() {
|
||||||
av_frame_free(&m_frame);
|
av_frame_free(&m_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
Decoder::Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec) {
|
Decoder::Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec) {
|
||||||
const AVCodecID av_codec = [&] {
|
const AVCodecID av_codec = [&] {
|
||||||
switch (codec) {
|
switch (codec) {
|
||||||
case Tegra::Host1x::NvdecCommon::VideoCodec::H264:
|
case Tegra::Host1x::NvdecCommon::VideoCodec::H264:
|
||||||
return AV_CODEC_ID_H264;
|
return AV_CODEC_ID_H264;
|
||||||
case Tegra::Host1x::NvdecCommon::VideoCodec::VP8:
|
case Tegra::Host1x::NvdecCommon::VideoCodec::VP8:
|
||||||
return AV_CODEC_ID_VP8;
|
return AV_CODEC_ID_VP8;
|
||||||
case Tegra::Host1x::NvdecCommon::VideoCodec::VP9:
|
case Tegra::Host1x::NvdecCommon::VideoCodec::VP9:
|
||||||
return AV_CODEC_ID_VP9;
|
return AV_CODEC_ID_VP9;
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("Unknown codec {}", codec);
|
UNIMPLEMENTED_MSG("Unknown codec {}", codec);
|
||||||
return AV_CODEC_ID_NONE;
|
return AV_CODEC_ID_NONE;
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
m_codec = avcodec_find_decoder(av_codec);
|
m_codec = avcodec_find_decoder(av_codec);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceType type) const {
|
bool Decoder::SupportsDecodingOnDevice(AVPixelFormat* out_pix_fmt, AVHWDeviceType type) const {
|
||||||
for (int i = 0;; i++) {
|
for (int i = 0;; i++) {
|
||||||
const AVCodecHWConfig* config = avcodec_get_hw_config(m_codec, i);
|
const AVCodecHWConfig* config = avcodec_get_hw_config(m_codec, i);
|
||||||
if (!config) {
|
if (!config) {
|
||||||
LOG_DEBUG(HW_GPU, "{} decoder does not support device type {}", m_codec->name, av_hwdevice_get_type_name(type));
|
LOG_DEBUG(HW_GPU, "{} decoder does not support device type {}", m_codec->name, av_hwdevice_get_type_name(type));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX && config->device_type == type) {
|
if (config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX && config->device_type == type) {
|
||||||
LOG_INFO(HW_GPU, "Using {} GPU decoder", av_hwdevice_get_type_name(type));
|
LOG_INFO(HW_GPU, "Using {} GPU decoder", av_hwdevice_get_type_name(type));
|
||||||
*out_pix_fmt = config->pix_fmt;
|
*out_pix_fmt = config->pix_fmt;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<AVHWDeviceType> HardwareContext::GetSupportedDeviceTypes() {
|
std::vector<AVHWDeviceType> HardwareContext::GetSupportedDeviceTypes() {
|
||||||
std::vector<AVHWDeviceType> types;
|
std::vector<AVHWDeviceType> types;
|
||||||
AVHWDeviceType current_device_type = AV_HWDEVICE_TYPE_NONE;
|
AVHWDeviceType current_device_type = AV_HWDEVICE_TYPE_NONE;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
current_device_type = av_hwdevice_iterate_types(current_device_type);
|
current_device_type = av_hwdevice_iterate_types(current_device_type);
|
||||||
if (current_device_type == AV_HWDEVICE_TYPE_NONE) {
|
if (current_device_type == AV_HWDEVICE_TYPE_NONE) {
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
types.push_back(current_device_type);
|
types.push_back(current_device_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HardwareContext::~HardwareContext() {
|
HardwareContext::~HardwareContext() {
|
||||||
av_buffer_unref(&m_gpu_decoder);
|
av_buffer_unref(&m_gpu_decoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HardwareContext::InitializeForDecoder(DecoderContext& decoder_context, const Decoder& decoder) {
|
bool HardwareContext::InitializeForDecoder(DecoderContext& decoder_context, const Decoder& decoder) {
|
||||||
const auto supported_types = GetSupportedDeviceTypes();
|
const auto supported_types = GetSupportedDeviceTypes();
|
||||||
for (const auto type : PreferredGpuDecoders) {
|
for (const auto type : PreferredGpuDecoders) {
|
||||||
AVPixelFormat hw_pix_fmt;
|
AVPixelFormat hw_pix_fmt;
|
||||||
|
|
||||||
if (std::ranges::find(supported_types, type) == supported_types.end()) {
|
if (std::ranges::find(supported_types, type) == supported_types.end()) {
|
||||||
LOG_DEBUG(HW_GPU, "{} explicitly unsupported", av_hwdevice_get_type_name(type));
|
LOG_DEBUG(HW_GPU, "{} explicitly unsupported", av_hwdevice_get_type_name(type));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->InitializeWithType(type)) {
|
if (!this->InitializeWithType(type)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decoder.SupportsDecodingOnDevice(&hw_pix_fmt, type)) {
|
if (decoder.SupportsDecodingOnDevice(&hw_pix_fmt, type)) {
|
||||||
decoder_context.InitializeHardwareDecoder(*this, hw_pix_fmt);
|
decoder_context.InitializeHardwareDecoder(*this, hw_pix_fmt);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HardwareContext::InitializeWithType(AVHWDeviceType type) {
|
bool HardwareContext::InitializeWithType(AVHWDeviceType type) {
|
||||||
av_buffer_unref(&m_gpu_decoder);
|
av_buffer_unref(&m_gpu_decoder);
|
||||||
|
|
||||||
if (const int ret = av_hwdevice_ctx_create(&m_gpu_decoder, type, nullptr, nullptr, 0); ret < 0) {
|
if (const int ret = av_hwdevice_ctx_create(&m_gpu_decoder, type, nullptr, nullptr, 0); ret < 0) {
|
||||||
LOG_DEBUG(HW_GPU, "av_hwdevice_ctx_create({}) failed: {}", av_hwdevice_get_type_name(type), AVError(ret));
|
LOG_DEBUG(HW_GPU, "av_hwdevice_ctx_create({}) failed: {}", av_hwdevice_get_type_name(type), AVError(ret));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBVA_FOUND
|
#ifdef LIBVA_FOUND
|
||||||
if (type == AV_HWDEVICE_TYPE_VAAPI) {
|
if (type == AV_HWDEVICE_TYPE_VAAPI) {
|
||||||
// We need to determine if this is an impersonated VAAPI driver.
|
// We need to determine if this is an impersonated VAAPI driver.
|
||||||
auto* hwctx = reinterpret_cast<AVHWDeviceContext*>(m_gpu_decoder->data);
|
auto* hwctx = reinterpret_cast<AVHWDeviceContext*>(m_gpu_decoder->data);
|
||||||
auto* vactx = static_cast<AVVAAPIDeviceContext*>(hwctx->hwctx);
|
auto* vactx = static_cast<AVVAAPIDeviceContext*>(hwctx->hwctx);
|
||||||
const char* vendor_name = vaQueryVendorString(vactx->display);
|
const char* vendor_name = vaQueryVendorString(vactx->display);
|
||||||
if (strstr(vendor_name, "VDPAU backend")) {
|
if (strstr(vendor_name, "VDPAU backend")) {
|
||||||
// VDPAU impersonated VAAPI impls are super buggy, we need to skip them.
|
// VDPAU impersonated VAAPI impls are super buggy, we need to skip them.
|
||||||
LOG_DEBUG(HW_GPU, "Skipping VDPAU impersonated VAAPI driver");
|
LOG_DEBUG(HW_GPU, "Skipping VDPAU impersonated VAAPI driver");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// According to some user testing, certain VAAPI drivers (Intel?) could be buggy.
|
// According to some user testing, certain VAAPI drivers (Intel?) could be buggy.
|
||||||
// Log the driver name just in case.
|
// Log the driver name just in case.
|
||||||
LOG_DEBUG(HW_GPU, "Using VAAPI driver: {}", vendor_name);
|
LOG_DEBUG(HW_GPU, "Using VAAPI driver: {}", vendor_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DecoderContext::DecoderContext(const Decoder& decoder) : m_decoder{decoder} {
|
DecoderContext::DecoderContext(const Decoder& decoder) : m_decoder{decoder} {
|
||||||
m_codec_context = avcodec_alloc_context3(m_decoder.GetCodec());
|
m_codec_context = avcodec_alloc_context3(m_decoder.GetCodec());
|
||||||
av_opt_set(m_codec_context->priv_data, "tune", "zerolatency", 0);
|
av_opt_set(m_codec_context->priv_data, "tune", "zerolatency", 0);
|
||||||
m_codec_context->thread_count = 0;
|
m_codec_context->thread_count = 0;
|
||||||
m_codec_context->thread_type &= ~FF_THREAD_FRAME;
|
m_codec_context->thread_type &= ~FF_THREAD_FRAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
DecoderContext::~DecoderContext() {
|
DecoderContext::~DecoderContext() {
|
||||||
av_buffer_unref(&m_codec_context->hw_device_ctx);
|
av_buffer_unref(&m_codec_context->hw_device_ctx);
|
||||||
avcodec_free_context(&m_codec_context);
|
avcodec_free_context(&m_codec_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecoderContext::InitializeHardwareDecoder(const HardwareContext& context, AVPixelFormat hw_pix_fmt) {
|
void DecoderContext::InitializeHardwareDecoder(const HardwareContext& context, AVPixelFormat hw_pix_fmt) {
|
||||||
m_codec_context->hw_device_ctx = av_buffer_ref(context.GetBufferRef());
|
m_codec_context->hw_device_ctx = av_buffer_ref(context.GetBufferRef());
|
||||||
m_codec_context->get_format = GetGpuFormat;
|
m_codec_context->get_format = GetGpuFormat;
|
||||||
m_codec_context->pix_fmt = hw_pix_fmt;
|
m_codec_context->pix_fmt = hw_pix_fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DecoderContext::OpenContext(const Decoder& decoder) {
|
bool DecoderContext::OpenContext(const Decoder& decoder) {
|
||||||
if (const int ret = avcodec_open2(m_codec_context, decoder.GetCodec(), nullptr); ret < 0) {
|
if (const int ret = avcodec_open2(m_codec_context, decoder.GetCodec(), nullptr); ret < 0) {
|
||||||
LOG_ERROR(HW_GPU, "avcodec_open2 error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "avcodec_open2 error: {}", AVError(ret));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_codec_context->hw_device_ctx) {
|
if (!m_codec_context->hw_device_ctx) {
|
||||||
LOG_INFO(HW_GPU, "Using FFmpeg CPU decoder");
|
LOG_INFO(HW_GPU, "Using FFmpeg CPU decoder");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DecoderContext::SendPacket(const Packet& packet) {
|
bool DecoderContext::SendPacket(const Packet& packet) {
|
||||||
if (const int ret = avcodec_send_packet(m_codec_context, packet.GetPacket()); ret < 0 && ret != AVERROR_EOF && ret != AVERROR(EAGAIN)) {
|
if (const int ret = avcodec_send_packet(m_codec_context, packet.GetPacket()); ret < 0 && ret != AVERROR_EOF && ret != AVERROR(EAGAIN)) {
|
||||||
LOG_ERROR(HW_GPU, "avcodec_send_packet error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "avcodec_send_packet error: {}", AVError(ret));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Frame> DecoderContext::ReceiveFrame() {
|
std::shared_ptr<Frame> DecoderContext::ReceiveFrame() {
|
||||||
auto ReceiveImpl = [&](AVFrame* frame) -> int {
|
auto ReceiveImpl = [&](AVFrame* frame) -> int {
|
||||||
const int ret = avcodec_receive_frame(m_codec_context, frame);
|
const int ret = avcodec_receive_frame(m_codec_context, frame);
|
||||||
if (ret < 0 && ret != AVERROR_EOF && ret != AVERROR(EAGAIN)) {
|
if (ret < 0 && ret != AVERROR_EOF && ret != AVERROR(EAGAIN)) {
|
||||||
LOG_ERROR(HW_GPU, "avcodec_receive_frame error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "avcodec_receive_frame error: {}", AVError(ret));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::shared_ptr<Frame> intermediate_frame = std::make_shared<Frame>();
|
std::shared_ptr<Frame> intermediate_frame = std::make_shared<Frame>();
|
||||||
if (ReceiveImpl(intermediate_frame->GetFrame()) < 0) {
|
if (ReceiveImpl(intermediate_frame->GetFrame()) < 0) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
m_final_frame = std::make_shared<Frame>();
|
m_final_frame = std::make_shared<Frame>();
|
||||||
if (m_codec_context->hw_device_ctx) {
|
if (m_codec_context->hw_device_ctx) {
|
||||||
m_final_frame->SetFormat(PreferredGpuFormat);
|
m_final_frame->SetFormat(PreferredGpuFormat);
|
||||||
if (const int ret = av_hwframe_transfer_data(m_final_frame->GetFrame(), intermediate_frame->GetFrame(), 0); ret < 0) {
|
if (const int ret = av_hwframe_transfer_data(m_final_frame->GetFrame(), intermediate_frame->GetFrame(), 0); ret < 0) {
|
||||||
LOG_ERROR(HW_GPU, "av_hwframe_transfer_data error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "av_hwframe_transfer_data error: {}", AVError(ret));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_final_frame = std::move(intermediate_frame);
|
m_final_frame = std::move(intermediate_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(m_final_frame);
|
return std::move(m_final_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecodeApi::Reset() {
|
void DecodeApi::Reset() {
|
||||||
m_hardware_context.reset();
|
m_hardware_context.reset();
|
||||||
m_decoder_context.reset();
|
m_decoder_context.reset();
|
||||||
m_decoder.reset();
|
m_decoder.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DecodeApi::Initialize(Tegra::Host1x::NvdecCommon::VideoCodec codec) {
|
bool DecodeApi::Initialize(Tegra::Host1x::NvdecCommon::VideoCodec codec) {
|
||||||
this->Reset();
|
this->Reset();
|
||||||
m_decoder.emplace(codec);
|
m_decoder.emplace(codec);
|
||||||
m_decoder_context.emplace(*m_decoder);
|
m_decoder_context.emplace(*m_decoder);
|
||||||
|
|
||||||
// Enable GPU decoding if requested.
|
// Enable GPU decoding if requested.
|
||||||
if (Settings::values.nvdec_emulation.GetValue() == Settings::NvdecEmulation::Gpu) {
|
if (Settings::values.nvdec_emulation.GetValue() == Settings::NvdecEmulation::Gpu) {
|
||||||
m_hardware_context.emplace();
|
m_hardware_context.emplace();
|
||||||
m_hardware_context->InitializeForDecoder(*m_decoder_context, *m_decoder);
|
m_hardware_context->InitializeForDecoder(*m_decoder_context, *m_decoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open the decoder context.
|
// Open the decoder context.
|
||||||
if (!m_decoder_context->OpenContext(*m_decoder)) {
|
if (!m_decoder_context->OpenContext(*m_decoder)) {
|
||||||
this->Reset();
|
this->Reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DecodeApi::SendPacket(std::span<const u8> packet_data) {
|
bool DecodeApi::SendPacket(std::span<const u8> packet_data) {
|
||||||
FFmpeg::Packet packet(packet_data);
|
FFmpeg::Packet packet(packet_data);
|
||||||
return m_decoder_context->SendPacket(packet);
|
return m_decoder_context->SendPacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Frame> DecodeApi::ReceiveFrame() {
|
std::shared_ptr<Frame> DecodeApi::ReceiveFrame() {
|
||||||
// Receive raw frame from decoder.
|
// Receive raw frame from decoder.
|
||||||
return m_decoder_context->ReceiveFrame();
|
return m_decoder_context->ReceiveFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -304,7 +307,7 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
|
|||||||
case Tegra::Texture::WrapMode::Border:
|
case Tegra::Texture::WrapMode::Border:
|
||||||
return GL_CLAMP_TO_BORDER;
|
return GL_CLAMP_TO_BORDER;
|
||||||
case Tegra::Texture::WrapMode::Clamp:
|
case Tegra::Texture::WrapMode::Clamp:
|
||||||
return GL_CLAMP;
|
return GL_CLAMP_TO_EDGE;
|
||||||
case Tegra::Texture::WrapMode::MirrorOnceClampToEdge:
|
case Tegra::Texture::WrapMode::MirrorOnceClampToEdge:
|
||||||
return GL_MIRROR_CLAMP_TO_EDGE;
|
return GL_MIRROR_CLAMP_TO_EDGE;
|
||||||
case Tegra::Texture::WrapMode::MirrorOnceBorder:
|
case Tegra::Texture::WrapMode::MirrorOnceBorder:
|
||||||
@@ -319,9 +322,10 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
|
|||||||
} else {
|
} else {
|
||||||
return GL_MIRROR_CLAMP_TO_EDGE;
|
return GL_MIRROR_CLAMP_TO_EDGE;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
UNIMPLEMENTED_MSG("Unimplemented texture wrap mode={}", wrap_mode);
|
||||||
|
return GL_REPEAT;
|
||||||
}
|
}
|
||||||
UNIMPLEMENTED_MSG("Unimplemented texture wrap mode={}", wrap_mode);
|
|
||||||
return GL_REPEAT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline GLenum DepthCompareFunc(Tegra::Texture::DepthCompareFunc func) {
|
inline GLenum DepthCompareFunc(Tegra::Texture::DepthCompareFunc func) {
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ VkSamplerMipmapMode MipmapMode(Tegra::Texture::TextureMipmapFilter mipmap_filter
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
VkSamplerAddressMode WrapMode(const Device& device, Tegra::Texture::WrapMode wrap_mode,
|
VkSamplerAddressMode WrapMode(const Device& device,
|
||||||
|
Tegra::Texture::WrapMode wrap_mode,
|
||||||
Tegra::Texture::TextureFilter filter) {
|
Tegra::Texture::TextureFilter filter) {
|
||||||
switch (wrap_mode) {
|
switch (wrap_mode) {
|
||||||
case Tegra::Texture::WrapMode::Wrap:
|
case Tegra::Texture::WrapMode::Wrap:
|
||||||
@@ -62,12 +63,6 @@ VkSamplerAddressMode WrapMode(const Device& device, Tegra::Texture::WrapMode wra
|
|||||||
case Tegra::Texture::WrapMode::Border:
|
case Tegra::Texture::WrapMode::Border:
|
||||||
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
|
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
|
||||||
case Tegra::Texture::WrapMode::Clamp:
|
case Tegra::Texture::WrapMode::Clamp:
|
||||||
if (device.GetDriverID() == VK_DRIVER_ID_NVIDIA_PROPRIETARY) {
|
|
||||||
// Nvidia's Vulkan driver defaults to GL_CLAMP on invalid enumerations, we can hack this
|
|
||||||
// by sending an invalid enumeration.
|
|
||||||
return static_cast<VkSamplerAddressMode>(0xcafe);
|
|
||||||
}
|
|
||||||
// TODO(Rodrigo): Emulate GL_CLAMP properly on other vendors
|
|
||||||
switch (filter) {
|
switch (filter) {
|
||||||
case Tegra::Texture::TextureFilter::Nearest:
|
case Tegra::Texture::TextureFilter::Nearest:
|
||||||
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||||
@@ -81,6 +76,8 @@ VkSamplerAddressMode WrapMode(const Device& device, Tegra::Texture::WrapMode wra
|
|||||||
case Tegra::Texture::WrapMode::MirrorOnceBorder:
|
case Tegra::Texture::WrapMode::MirrorOnceBorder:
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
|
return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
|
||||||
|
case Tegra::Texture::WrapMode::MirrorOnceClampOGL:
|
||||||
|
return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", wrap_mode);
|
UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", wrap_mode);
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -97,8 +97,28 @@ VkDescriptorSet DescriptorAllocator::Commit() {
|
|||||||
return sets[index / SETS_GROW_RATE][index % SETS_GROW_RATE];
|
return sets[index / SETS_GROW_RATE][index % SETS_GROW_RATE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VkDescriptorSet DescriptorAllocator::CommitWithTracking(u64 current_frame, const void* descriptor_data) {
|
||||||
|
const size_t index = CommitResource();
|
||||||
|
const size_t group = index / SETS_GROW_RATE;
|
||||||
|
const size_t slot = index % SETS_GROW_RATE;
|
||||||
|
set_states[group][slot].set = sets[group][slot];
|
||||||
|
set_states[group][slot].last_update_frame = current_frame;
|
||||||
|
set_states[group][slot].last_data_ptr = descriptor_data;
|
||||||
|
return set_states[group][slot].set;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DescriptorAllocator::NeedsUpdate(VkDescriptorSet set, u64 current_frame, const void* descriptor_data) const {
|
||||||
|
for (const auto& group : set_states)
|
||||||
|
for (const auto& st : group)
|
||||||
|
if (st.set == set) // Update if pointer changed or the set hasn't been updated this frame
|
||||||
|
return st.last_data_ptr != descriptor_data || st.last_update_frame != current_frame;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void DescriptorAllocator::Allocate(size_t begin, size_t end) {
|
void DescriptorAllocator::Allocate(size_t begin, size_t end) {
|
||||||
sets.push_back(AllocateDescriptors(end - begin));
|
const size_t count = end - begin;
|
||||||
|
sets.push_back(AllocateDescriptors(count));
|
||||||
|
set_states.emplace_back(count); // create parallel state storage
|
||||||
}
|
}
|
||||||
|
|
||||||
vk::DescriptorSets DescriptorAllocator::AllocateDescriptors(size_t count) {
|
vk::DescriptorSets DescriptorAllocator::AllocateDescriptors(size_t count) {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -6,7 +9,7 @@
|
|||||||
#include <shared_mutex>
|
#include <shared_mutex>
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "common/common_types.h"
|
||||||
#include "shader_recompiler/shader_info.h"
|
#include "shader_recompiler/shader_info.h"
|
||||||
#include "video_core/renderer_vulkan/vk_resource_pool.h"
|
#include "video_core/renderer_vulkan/vk_resource_pool.h"
|
||||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||||
@@ -44,7 +47,15 @@ public:
|
|||||||
DescriptorAllocator(const DescriptorAllocator&) = delete;
|
DescriptorAllocator(const DescriptorAllocator&) = delete;
|
||||||
|
|
||||||
VkDescriptorSet Commit();
|
VkDescriptorSet Commit();
|
||||||
|
// commit + remember when/with what we last updated this set
|
||||||
|
struct DescriptorSetState {
|
||||||
|
VkDescriptorSet set = VK_NULL_HANDLE;
|
||||||
|
u64 last_update_frame = 0;
|
||||||
|
const void* last_data_ptr = nullptr; // fast pointer compare
|
||||||
|
};
|
||||||
|
|
||||||
|
VkDescriptorSet CommitWithTracking(u64 current_frame, const void* descriptor_data);
|
||||||
|
bool NeedsUpdate(VkDescriptorSet set, u64 current_frame, const void* descriptor_data) const;
|
||||||
private:
|
private:
|
||||||
explicit DescriptorAllocator(const Device& device_, MasterSemaphore& master_semaphore_,
|
explicit DescriptorAllocator(const Device& device_, MasterSemaphore& master_semaphore_,
|
||||||
DescriptorBank& bank_, VkDescriptorSetLayout layout_);
|
DescriptorBank& bank_, VkDescriptorSetLayout layout_);
|
||||||
@@ -58,6 +69,7 @@ private:
|
|||||||
VkDescriptorSetLayout layout{};
|
VkDescriptorSetLayout layout{};
|
||||||
|
|
||||||
std::vector<vk::DescriptorSets> sets;
|
std::vector<vk::DescriptorSets> sets;
|
||||||
|
std::vector<std::vector<DescriptorSetState>> set_states;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DescriptorPool {
|
class DescriptorPool {
|
||||||
|
|||||||
@@ -515,7 +515,20 @@ void GraphicsPipeline::ConfigureDraw(const RescalingPushConstant& rescaling,
|
|||||||
const bool update_rescaling{scheduler.UpdateRescaling(is_rescaling)};
|
const bool update_rescaling{scheduler.UpdateRescaling(is_rescaling)};
|
||||||
const bool bind_pipeline{scheduler.UpdateGraphicsPipeline(this)};
|
const bool bind_pipeline{scheduler.UpdateGraphicsPipeline(this)};
|
||||||
const void* const descriptor_data{guest_descriptor_queue.UpdateData()};
|
const void* const descriptor_data{guest_descriptor_queue.UpdateData()};
|
||||||
scheduler.Record([this, descriptor_data, bind_pipeline, rescaling_data = rescaling.Data(),
|
|
||||||
|
// allocate/bind descriptor set and only update if needed
|
||||||
|
VkDescriptorSet descriptor_set = VK_NULL_HANDLE;
|
||||||
|
bool needs_update = false;
|
||||||
|
if (descriptor_set_layout && !uses_push_descriptor) {
|
||||||
|
descriptor_set = descriptor_allocator.CommitWithTracking(current_frame_number, descriptor_data);
|
||||||
|
needs_update = descriptor_allocator.NeedsUpdate(descriptor_set, current_frame_number, descriptor_data);
|
||||||
|
if (needs_update) {
|
||||||
|
const vk::Device& dev{device.GetLogical()};
|
||||||
|
dev.UpdateDescriptorSet(descriptor_set, *descriptor_update_template, descriptor_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scheduler.Record([this, descriptor_data, descriptor_set, bind_pipeline, rescaling_data = rescaling.Data(),
|
||||||
is_rescaling, update_rescaling,
|
is_rescaling, update_rescaling,
|
||||||
uses_render_area = render_area.uses_render_area,
|
uses_render_area = render_area.uses_render_area,
|
||||||
render_area_data = render_area.words](vk::CommandBuffer cmdbuf) {
|
render_area_data = render_area.words](vk::CommandBuffer cmdbuf) {
|
||||||
@@ -541,12 +554,8 @@ void GraphicsPipeline::ConfigureDraw(const RescalingPushConstant& rescaling,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (uses_push_descriptor) {
|
if (uses_push_descriptor) {
|
||||||
cmdbuf.PushDescriptorSetWithTemplateKHR(*descriptor_update_template, *pipeline_layout,
|
cmdbuf.PushDescriptorSetWithTemplateKHR(*descriptor_update_template, *pipeline_layout, 0, descriptor_data);
|
||||||
0, descriptor_data);
|
|
||||||
} else {
|
} else {
|
||||||
const VkDescriptorSet descriptor_set{descriptor_allocator.Commit()};
|
|
||||||
const vk::Device& dev{device.GetLogical()};
|
|
||||||
dev.UpdateDescriptorSet(descriptor_set, *descriptor_update_template, descriptor_data);
|
|
||||||
cmdbuf.BindDescriptorSets(VK_PIPELINE_BIND_POINT_GRAPHICS, *pipeline_layout, 0,
|
cmdbuf.BindDescriptorSets(VK_PIPELINE_BIND_POINT_GRAPHICS, *pipeline_layout, 0,
|
||||||
descriptor_set, nullptr);
|
descriptor_set, nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
maxwell3d = maxwell3d_;
|
maxwell3d = maxwell3d_;
|
||||||
gpu_memory = gpu_memory_;
|
gpu_memory = gpu_memory_;
|
||||||
}
|
}
|
||||||
|
void SetFrameNumber(u64 frame) { current_frame_number = frame; }
|
||||||
private:
|
private:
|
||||||
template <typename Spec>
|
template <typename Spec>
|
||||||
bool ConfigureImpl(bool is_indexed);
|
bool ConfigureImpl(bool is_indexed);
|
||||||
@@ -160,6 +160,7 @@ private:
|
|||||||
std::mutex build_mutex;
|
std::mutex build_mutex;
|
||||||
std::atomic_bool is_built{false};
|
std::atomic_bool is_built{false};
|
||||||
bool uses_push_descriptor{false};
|
bool uses_push_descriptor{false};
|
||||||
|
u64 current_frame_number{0};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|||||||
@@ -234,19 +234,17 @@ void RasterizerVulkan::PrepareDraw(bool is_indexed, Func&& draw_func) {
|
|||||||
std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex};
|
std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex};
|
||||||
// update engine as channel may be different.
|
// update engine as channel may be different.
|
||||||
pipeline->SetEngine(maxwell3d, gpu_memory);
|
pipeline->SetEngine(maxwell3d, gpu_memory);
|
||||||
|
pipeline->SetFrameNumber(current_frame_number);
|
||||||
if (!pipeline->Configure(is_indexed))
|
if (!pipeline->Configure(is_indexed))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UpdateDynamicStates();
|
UpdateDynamicStates();
|
||||||
|
|
||||||
HandleTransformFeedback();
|
HandleTransformFeedback();
|
||||||
query_cache.NotifySegment(true);
|
|
||||||
query_cache.CounterEnable(VideoCommon::QueryType::ZPassPixelCount64,
|
query_cache.CounterEnable(VideoCommon::QueryType::ZPassPixelCount64,
|
||||||
maxwell3d->regs.zpass_pixel_count_enable);
|
maxwell3d->regs.zpass_pixel_count_enable);
|
||||||
|
|
||||||
draw_func();
|
draw_func();
|
||||||
|
|
||||||
query_cache.CounterEnable(VideoCommon::QueryType::StreamingByteCount, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerVulkan::Draw(bool is_indexed, u32 instance_count) {
|
void RasterizerVulkan::Draw(bool is_indexed, u32 instance_count) {
|
||||||
@@ -774,6 +772,7 @@ void RasterizerVulkan::FlushCommands() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerVulkan::TickFrame() {
|
void RasterizerVulkan::TickFrame() {
|
||||||
|
current_frame_number++;
|
||||||
draw_counter = 0;
|
draw_counter = 0;
|
||||||
guest_descriptor_queue.TickFrame();
|
guest_descriptor_queue.TickFrame();
|
||||||
compute_pass_descriptor_queue.TickFrame();
|
compute_pass_descriptor_queue.TickFrame();
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ private:
|
|||||||
void UpdateDynamicStates();
|
void UpdateDynamicStates();
|
||||||
|
|
||||||
void HandleTransformFeedback();
|
void HandleTransformFeedback();
|
||||||
|
u64 current_frame_number{0};
|
||||||
void UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& regs);
|
void UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& regs);
|
||||||
void UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs);
|
void UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs);
|
||||||
void UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs);
|
void UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs);
|
||||||
|
|||||||
Reference in New Issue
Block a user