diff --git a/Assets/dll/encore.dll b/Assets/dll/encore.dll new file mode 100644 index 0000000000..fd841c0baa Binary files /dev/null and b/Assets/dll/encore.dll differ diff --git a/Dist/Package.sh b/Dist/Package.sh index c69a67f172..7e253e6b7f 100755 --- a/Dist/Package.sh +++ b/Dist/Package.sh @@ -13,11 +13,11 @@ if [ "$1" = "windows-x64" ]; then rm -f "EmuHawkMono.sh" cd "dll" rm -f "libe_sqlite3.so" "libSDL2.so" "OpenTK.dll.config" \ - "libbizlynx.dll.so" "libbizswan.dll.so" "libblip_buf.so" "libbizhash.so" "libcitra-headless.so" "libdarm.so" "libemu83.so" "libfwunpack.so" "libgambatte.so" "libLibretroBridge.so" "libquicknes.dll.so.0.7.0" "librcheevos.so" "libsameboy.so" "libmgba.dll.so" "libMSXHawk.so" "libwaterboxhost.so" + "libbizlynx.dll.so" "libbizswan.dll.so" "libblip_buf.so" "libbizhash.so" "libdarm.so" "libemu83.so" "libencore.so" "libfwunpack.so" "libgambatte.so" "libLibretroBridge.so" "libquicknes.dll.so.0.7.0" "librcheevos.so" "libsameboy.so" "libmgba.dll.so" "libMSXHawk.so" "libwaterboxhost.so" else find . -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755 cd "dll" rm -f "e_sqlite3.dll" "lua54.dll" "SDL.dll" "SDL2.dll" \ "mupen64plus-audio-bkm.dll" "mupen64plus-input-bkm.dll" "mupen64plus-rsp-cxd4-sse2.dll" "mupen64plus-rsp-hle.dll" "mupen64plus-video-angrylion-rdp.dll" "mupen64plus-video-glide64.dll" "mupen64plus-video-glide64mk2.dll" "mupen64plus-video-GLideN64.dll" "mupen64plus-video-rice.dll" "mupen64plus.dll" "octoshock.dll" \ - "bizlynx.dll" "bizswan.dll" "blip_buf.dll" "libbizhash.dll" "libdarm.dll" "libemu83.dll" "libfwunpack.dll" "libgambatte.dll" "libLibretroBridge.dll" "libquicknes.dll" "librcheevos.dll" "libsameboy.dll" "mgba.dll" "MSXHawk.dll" "waterboxhost.dll" "citra-headless.dll" + "bizlynx.dll" "bizswan.dll" "blip_buf.dll" "libbizhash.dll" "libdarm.dll" "libemu83.dll" "libfwunpack.dll" "libgambatte.dll" "libLibretroBridge.dll" "libquicknes.dll" "librcheevos.dll" "libsameboy.dll" "mgba.dll" "MSXHawk.dll" "waterboxhost.dll" "encore.dll" fi diff --git a/contributing.md b/contributing.md index 7315f9c190..079fec645c 100644 --- a/contributing.md +++ b/contributing.md @@ -4,7 +4,7 @@ Jump to: - [For any: .NET project](#for-any-net-project) - Projects - [blip_buf](#blip_buf) - - [Citra](#citra) + - [Encore](#encore) - [Cygne](#cygne) - [DiscoHawk](#discohawk) - [EmuHawk](#emuhawk) @@ -89,8 +89,8 @@ Uses C. -## Citra -> Build scripts for the (unmanaged side of the) Citra port. +## Encore +> Build scripts for the (unmanaged side of the) Encore port. Uses C++. diff --git a/encore/.gitignore b/encore/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/encore/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/encore/build_release.bat b/encore/build_release.bat new file mode 100644 index 0000000000..9868cea286 --- /dev/null +++ b/encore/build_release.bat @@ -0,0 +1,7 @@ +rmdir /s /q build +mkdir build +cd build +cmake ..\encore -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON -DCMAKE_C_COMPILER=cl ^ + -DCMAKE_CXX_COMPILER=cl -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded +ninja +cd .. diff --git a/encore/build_release.sh b/encore/build_release.sh new file mode 100644 index 0000000000..982031d921 --- /dev/null +++ b/encore/build_release.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e +if [ -z "$CC" ]; then export CC="clang"; fi +if [ -z "$CXX" ]; then export CXX="clang++"; fi + +# stdlibc++ has a bug in some versions (at least in Ubuntu 22.04, probably Debian 12 too) that will cause compilation to fail for Encore +# Debian 11's stdlibc++ is unaffected (and probably Ubuntu 20.04's too) +# Note that Debian 10's stdlibc++ is too old (nearly no c++20 support), so at least Debian 11 must be used to compile this core +# At least cmake 3.20 must be present too, so get cmake from bullseye-backports + +rm -rf build +mkdir build +cd build +cmake ../encore -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_FLAGS="-Wno-deprecated -include limits.h" -G Ninja +ninja diff --git a/encore/encore b/encore/encore new file mode 160000 index 0000000000..ab248a1beb --- /dev/null +++ b/encore/encore @@ -0,0 +1 @@ +Subproject commit ab248a1beb2c7993f1da92afa4da663802643904 diff --git a/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs b/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs index 29aecf7ca4..acaf485ddd 100644 --- a/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs +++ b/src/BizHawk.Client.Common/DisplayManager/DisplayManagerBase.cs @@ -480,7 +480,7 @@ namespace BizHawk.Client.Common return GlobalEmulator switch { NDS nds => new ScreenControlNDS(nds), - Encore citra => new ScreenControl3DS(citra), + Encore encore => new ScreenControl3DS(encore), _ => null }; } diff --git a/src/BizHawk.Client.Common/config/PathEntry.cs b/src/BizHawk.Client.Common/config/PathEntry.cs index eeddf5347f..2759c56fa1 100644 --- a/src/BizHawk.Client.Common/config/PathEntry.cs +++ b/src/BizHawk.Client.Common/config/PathEntry.cs @@ -52,7 +52,7 @@ namespace BizHawk.Client.Common // some cores "Palettes" => 0x30, - // currently Citra only + // currently Encore only // potentially applicable for future cores (Dolphin?) "User" => 0x40, diff --git a/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.GameVerification.cs b/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.GameVerification.cs index 9ceceb40de..dc3986945a 100644 --- a/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.GameVerification.cs +++ b/src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.GameVerification.cs @@ -292,7 +292,7 @@ namespace BizHawk.Client.EmuHawk // Stuff needed for 3DS hashing... private readonly LibRCheevos.rc_hash_3ds_get_cia_normal_key_func _getCiaNormalKeyFunc; private readonly LibRCheevos.rc_hash_3ds_get_ncch_normal_keys_func _getNcchNormalKeysFunc; - // https://github.com/citra-emu/citra/blob/2b20082581906fe973e26ed36bef695aa1f64527/src/core/hw/aes/key.cpp#L23-L30 + // https://github.com/CasualPokePlayer/encore/blob/2b20082581906fe973e26ed36bef695aa1f64527/src/core/hw/aes/key.cpp#L23-L30 private static readonly BigInteger GENERATOR_CONSTANT = BigInteger.Parse("1FF9E9AAC5FE0408024591DC5D52768A", NumberStyles.HexNumber, CultureInfo.InvariantCulture); private static readonly BigInteger U128_MAX = BigInteger.Parse("0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", NumberStyles.HexNumber, CultureInfo.InvariantCulture);