From 8a80db141d4c7e0f960bc752a2c5c91f9d8549d9 Mon Sep 17 00:00:00 2001 From: NextinHKRY <38560522+NextinMono@users.noreply.github.com> Date: Thu, 6 Mar 2025 06:46:45 +0100 Subject: [PATCH 01/14] code: Add Disable Boost Filter code (#999) --- UnleashedRecomp/patches/misc_patches.cpp | 10 ++++++++++ UnleashedRecomp/user/config_def.h | 1 + UnleashedRecompLib/config/SWA.toml | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/UnleashedRecomp/patches/misc_patches.cpp b/UnleashedRecomp/patches/misc_patches.cpp index c321e27..9f318fb 100644 --- a/UnleashedRecomp/patches/misc_patches.cpp +++ b/UnleashedRecomp/patches/misc_patches.cpp @@ -146,3 +146,13 @@ PPC_FUNC(sub_824C1E60) __imp__sub_824C1E60(ctx, base); } + +// Remove boost filter +void DisableBoostFilterMidAsmHook(PPCRegister& r11) +{ + if (Config::DisableBoostFilter) + { + if (r11.u32 == 1) + r11.u32 = 0; + } +} diff --git a/UnleashedRecomp/user/config_def.h b/UnleashedRecomp/user/config_def.h index cb282c1..c58c9e9 100644 --- a/UnleashedRecomp/user/config_def.h +++ b/UnleashedRecomp/user/config_def.h @@ -77,6 +77,7 @@ CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIAlignmentMode, UIAlignmentMode, EUIAlig CONFIG_DEFINE_HIDDEN("Codes", bool, AllowCancellingUnleash, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableAutoSaveWarning, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, DisableBoostFilter, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDLCIcon, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDWMRoundedCorners, false); CONFIG_DEFINE_HIDDEN("Codes", bool, EnableEventCollisionDebugView, false); diff --git a/UnleashedRecompLib/config/SWA.toml b/UnleashedRecompLib/config/SWA.toml index 0575ef5..489aa13 100644 --- a/UnleashedRecompLib/config/SWA.toml +++ b/UnleashedRecompLib/config/SWA.toml @@ -1093,3 +1093,8 @@ registers = ["r31", "r29", "r28"] name = "ObjGrindDashPanelAllocMidAsmHook" address = 0x82614948 registers = ["r3"] + +[[midasm_hook]] +name = "DisableBoostFilterMidAsmHook" +address = 0x82B48C9C +registers = ["r11"] From c07a754f4fbf28a2ec008d9c5fe516bec67df1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Francart?= <38794835+Refragg@users.noreply.github.com> Date: Thu, 6 Mar 2025 06:59:22 +0100 Subject: [PATCH 02/14] Add hidden DisableDPadAsAnalogInput option (#604) This commit adds a configuration entry in the 'Codes' section named DisableDPadAsAnalogInput allowing someone to enable or disable the movement of Sonic / the world map cursor using the directional pad buttons. --- UnleashedRecomp/patches/input_patches.cpp | 40 ++++++++++++++++------- UnleashedRecomp/user/config_def.h | 1 + 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/UnleashedRecomp/patches/input_patches.cpp b/UnleashedRecomp/patches/input_patches.cpp index 6c5c981..9db182c 100644 --- a/UnleashedRecomp/patches/input_patches.cpp +++ b/UnleashedRecomp/patches/input_patches.cpp @@ -212,6 +212,9 @@ g_sdlEventListenerForInputPatches; static bool IsDPadThreshold(const SWA::SPadState* pPadState) { + if (Config::DisableDPadAsAnalogInput) + return false; + return pPadState->IsDown(SWA::eKeyState_DpadUp) || pPadState->IsDown(SWA::eKeyState_DpadDown) || pPadState->IsDown(SWA::eKeyState_DpadLeft) || @@ -237,6 +240,9 @@ static bool IsCursorThreshold(double deadzone = 0, bool isBelowThreshold = false static void SetDPadAnalogDirectionX(PPCRegister& pPadState, PPCRegister& x, bool invert, float max = 1.0f) { + if (Config::DisableDPadAsAnalogInput) + return; + auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); if (pGuestPadState->IsDown(SWA::eKeyState_DpadLeft)) @@ -248,6 +254,9 @@ static void SetDPadAnalogDirectionX(PPCRegister& pPadState, PPCRegister& x, bool static void SetDPadAnalogDirectionY(PPCRegister& pPadState, PPCRegister& y, bool invert, float max = 1.0f) { + if (Config::DisableDPadAsAnalogInput) + return; + auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); if (pGuestPadState->IsDown(SWA::eKeyState_DpadUp)) @@ -283,6 +292,9 @@ void PostureDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCRegister& y) void PostureSpaceHurrierDPadSupportXMidAsmHook(PPCRegister& pPadState, PPCVRegister& vector) { + if (Config::DisableDPadAsAnalogInput) + return; + auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); if (pGuestPadState->IsDown(SWA::eKeyState_DpadLeft)) @@ -294,6 +306,9 @@ void PostureSpaceHurrierDPadSupportXMidAsmHook(PPCRegister& pPadState, PPCVRegis void PostureSpaceHurrierDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCVRegister& vector) { + if (Config::DisableDPadAsAnalogInput) + return; + auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); if (pGuestPadState->IsDown(SWA::eKeyState_DpadUp)) @@ -403,17 +418,20 @@ PPC_FUNC(sub_8256C938) pWorldMapCursor->m_LeftStickVertical = rPadState.LeftStickVertical; pWorldMapCursor->m_LeftStickHorizontal = rPadState.LeftStickHorizontal; - if (rPadState.IsDown(SWA::eKeyState_DpadUp)) - pWorldMapCursor->m_LeftStickVertical = 1.0f; - - if (rPadState.IsDown(SWA::eKeyState_DpadDown)) - pWorldMapCursor->m_LeftStickVertical = -1.0f; - - if (rPadState.IsDown(SWA::eKeyState_DpadLeft)) - pWorldMapCursor->m_LeftStickHorizontal = -1.0f; - - if (rPadState.IsDown(SWA::eKeyState_DpadRight)) - pWorldMapCursor->m_LeftStickHorizontal = 1.0f; + if (!Config::DisableDPadAsAnalogInput) + { + if (rPadState.IsDown(SWA::eKeyState_DpadUp)) + pWorldMapCursor->m_LeftStickVertical = 1.0f; + + if (rPadState.IsDown(SWA::eKeyState_DpadDown)) + pWorldMapCursor->m_LeftStickVertical = -1.0f; + + if (rPadState.IsDown(SWA::eKeyState_DpadLeft)) + pWorldMapCursor->m_LeftStickHorizontal = -1.0f; + + if (rPadState.IsDown(SWA::eKeyState_DpadRight)) + pWorldMapCursor->m_LeftStickHorizontal = 1.0f; + } if (sqrtl((pWorldMapCursor->m_LeftStickHorizontal * pWorldMapCursor->m_LeftStickHorizontal) + (pWorldMapCursor->m_LeftStickVertical * pWorldMapCursor->m_LeftStickVertical)) > WORLD_MAP_ROTATE_DEADZONE) diff --git a/UnleashedRecomp/user/config_def.h b/UnleashedRecomp/user/config_def.h index c58c9e9..4138572 100644 --- a/UnleashedRecomp/user/config_def.h +++ b/UnleashedRecomp/user/config_def.h @@ -93,5 +93,6 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseArrowsForTimeOfDayTransition, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDPadAsAnalogInput, false); CONFIG_DEFINE("Update", time_t, LastChecked, 0); From df5e48f528b530c7c7984c3286779c4b75498a37 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Thu, 6 Mar 2025 06:33:13 +0000 Subject: [PATCH 03/14] Increase FPS slider max to 241 (#1082) --- UnleashedRecomp/user/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnleashedRecomp/user/config.h b/UnleashedRecomp/user/config.h index e038d02..5cda9d9 100644 --- a/UnleashedRecomp/user/config.h +++ b/UnleashedRecomp/user/config.h @@ -95,7 +95,7 @@ enum class ETripleBuffering : uint32_t }; static constexpr int32_t FPS_MIN = 15; -static constexpr int32_t FPS_MAX = 240; +static constexpr int32_t FPS_MAX = 241; enum class EAntiAliasing : uint32_t { From 3676c28114ac40b1f37c20aa5b1d9050497720d8 Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Fri, 7 Mar 2025 03:31:13 +0300 Subject: [PATCH 04/14] Fix the unsafe base address assumption. (#1098) --- tools/XenonRecomp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/XenonRecomp b/tools/XenonRecomp index cd6fcb3..7b8e37a 160000 --- a/tools/XenonRecomp +++ b/tools/XenonRecomp @@ -1 +1 @@ -Subproject commit cd6fcb33bdcaff37c8c9d2083c7951e1d73ae9da +Subproject commit 7b8e37aa3758c3ce2361433965cb94f2a0505eb2 From 676c3f0ff418d4eed27132b302a7b7476812d883 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:43:37 +0000 Subject: [PATCH 05/14] Prevent game from closing whilst autosaving (#967) --- UnleashedRecomp/app.h | 1 + UnleashedRecomp/patches/resident_patches.cpp | 2 ++ UnleashedRecomp/ui/game_window.cpp | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/UnleashedRecomp/app.h b/UnleashedRecomp/app.h index dccb251..9714d10 100644 --- a/UnleashedRecomp/app.h +++ b/UnleashedRecomp/app.h @@ -8,6 +8,7 @@ public: static inline bool s_isInit; static inline bool s_isMissingDLC; static inline bool s_isLoading; + static inline bool s_isSaving; static inline bool s_isWerehog; static inline bool s_isSaveDataCorrupt; diff --git a/UnleashedRecomp/patches/resident_patches.cpp b/UnleashedRecomp/patches/resident_patches.cpp index 791b415..64a220d 100644 --- a/UnleashedRecomp/patches/resident_patches.cpp +++ b/UnleashedRecomp/patches/resident_patches.cpp @@ -97,6 +97,8 @@ PPC_FUNC(sub_824E5170) __imp__sub_824E5170(ctx, base); + App::s_isSaving = pSaveIcon->m_IsVisible; + if (pSaveIcon->m_IsVisible) { App::s_isSaveDataCorrupt = false; diff --git a/UnleashedRecomp/ui/game_window.cpp b/UnleashedRecomp/ui/game_window.cpp index cc25ab6..2bd5ad1 100644 --- a/UnleashedRecomp/ui/game_window.cpp +++ b/UnleashedRecomp/ui/game_window.cpp @@ -34,8 +34,14 @@ int Window_OnSDLEvent(void*, SDL_Event* event) switch (event->type) { case SDL_QUIT: + { + if (App::s_isSaving) + break; + App::Exit(); + break; + } case SDL_KEYDOWN: { From 3c050887d8acf770e6c38065838bbd2a1dc8614e Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:43:49 +0000 Subject: [PATCH 06/14] Fix shoe upgrade hints patch breaking sequence flags (#1130) --- UnleashedRecompLib/config/SWA.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnleashedRecompLib/config/SWA.toml b/UnleashedRecompLib/config/SWA.toml index 489aa13..2c070e9 100644 --- a/UnleashedRecompLib/config/SWA.toml +++ b/UnleashedRecompLib/config/SWA.toml @@ -181,8 +181,8 @@ jump_address_on_true = 0x829E40A0 # Disable Chip hints for shoe upgrades [[midasm_hook]] name = "DisableHintsMidAsmHook" -address = 0x82691CB0 -jump_address_on_true = 0x82691E24 +address = 0x82691DD0 +jump_address_on_true = 0x82691DD4 # Disable navigation volumes [[midasm_hook]] From c19a7b1e1100cba75140d6d9fa08c86d6cc993d1 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:45:58 +0000 Subject: [PATCH 07/14] Added check for AVX on boot (#1067) Co-authored-by: Wiseguy <68165316+mr-wiseguy@users.noreply.github.com> --- UnleashedRecomp/CMakeLists.txt | 2 +- UnleashedRecomp/main.cpp | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/UnleashedRecomp/CMakeLists.txt b/UnleashedRecomp/CMakeLists.txt index ce05eb1..66b60a4 100644 --- a/UnleashedRecomp/CMakeLists.txt +++ b/UnleashedRecomp/CMakeLists.txt @@ -352,7 +352,7 @@ if (WIN32) Synchronization winmm ) -endif() +endif() target_link_libraries(UnleashedRecomp PRIVATE fmt::fmt diff --git a/UnleashedRecomp/main.cpp b/UnleashedRecomp/main.cpp index d3d1238..9158abf 100644 --- a/UnleashedRecomp/main.cpp +++ b/UnleashedRecomp/main.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -147,6 +148,29 @@ uint32_t LdrLoadModule(const std::filesystem::path &path) return entry; } +__attribute__((constructor(101), target("no-avx,no-avx2"), noinline)) +void init() +{ +#ifdef __x86_64__ + uint32_t eax, ebx, ecx, edx; + + // Execute CPUID for processor info and feature bits. + __get_cpuid(1, &eax, &ebx, &ecx, &edx); + + // Check for AVX support. + if ((ecx & (1 << 28)) == 0) + { + printf("[*] CPU does not support the AVX instruction set.\n"); + +#ifdef _WIN32 + MessageBoxA(nullptr, "Your CPU does not meet the minimum system requirements.", "Unleashed Recompiled", MB_ICONERROR); +#endif + + std::_Exit(1); + } +#endif +} + int main(int argc, char *argv[]) { #ifdef _WIN32 @@ -156,7 +180,7 @@ int main(int argc, char *argv[]) os::process::CheckConsole(); if (!os::registry::Init()) - LOGN_WARNING("OS doesn't support registry"); + LOGN_WARNING("OS does not support registry."); os::logger::Init(); From c64ef1fe15f4890b0c9aca99bf821722ab300a39 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:47:15 +0000 Subject: [PATCH 08/14] Added error message if included DirectX DLLs are missing (#998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added error message if included DirectX DLLs are missing * locale: added System_Win32_MissingDLLs localisation Co-Authored-By: LJSTAR <31629427+LJSTARbird@users.noreply.github.com> Co-Authored-By: Kitzuku <25226941+Kitzuku@users.noreply.github.com> Co-Authored-By: NextinHKRY <38560522+NextinMono@users.noreply.github.com> Co-Authored-By: brianuuu <38166666+brianuuu@users.noreply.github.com> Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com> * Fix ifdefs --------- Co-authored-by: LJSTAR <31629427+LJSTARbird@users.noreply.github.com> Co-authored-by: Kitzuku <25226941+Kitzuku@users.noreply.github.com> Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com> Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com> Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com> --- UnleashedRecomp/locale/locale.cpp | 11 +++++++++++ UnleashedRecomp/main.cpp | 22 ++++++++++++++++++++++ UnleashedRecomp/user/paths.h | 2 ++ 3 files changed, 35 insertions(+) diff --git a/UnleashedRecomp/locale/locale.cpp b/UnleashedRecomp/locale/locale.cpp index eafb24b..138dc41 100644 --- a/UnleashedRecomp/locale/locale.cpp +++ b/UnleashedRecomp/locale/locale.cpp @@ -692,6 +692,17 @@ std::unordered_map> { ELanguage::Italian, "Impossibile creare un backend D3D12 (Windows) o Vulkan.\n\nAssicurati che:\n\n- Il tuo sistema soddisfi i requisiti minimi.\n- I driver della scheda grafica siano aggiornati.\n- Il tuo sistema operativo sia aggiornato." } } }, + { + "System_Win32_MissingDLLs", + { + { ELanguage::English, "The module \"%s\" could not be found.\n\nPlease make sure that:\n\n- You extracted this copy of Unleashed Recompiled fully and not just the *.exe file.\n- You are not running Unleashed Recompiled from a *.zip file." }, + { ELanguage::Japanese, "モジュール\"%s\"が見つかりませんでした\n\n次の点を確認してください:\n\n※Unleashed Recompiledの*.exeファイルだけを抽出していなく、 コピーを完全に抽出してること\n※Unleashed Recompiledを*.zipファイルから実行していないこと" }, + { ELanguage::German, "Das Modul \"%s\" konnte nicht gefunden werden.\n\nBitte stelle sicher, dass:\n\n- Diese Kopie von Unleashed Recompiled vollständig entpackt wurde und nicht nur die *.exe-Datei.\n- Unleashed Recompiled nicht direkt aus einer *.zip-Datei ausgeführt wird." }, + { ELanguage::French, "Le module \"%s\" n'a pas pu être trouvé.\n\nVeuillez vous assurer que :\n\n- Vous avez extrait Unleashed Recompiled dans son entièreté et pas seulement le fichier *.exe.\n- Vous n'exécutez pas Unleashed Recompiled à partir d'un fichier *.zip." }, + { ELanguage::Spanish, "No se pudo encontrar el módulo \"%s\".\n\nAsegúrese de que:\n\n- Ha extraido esta copia de Unleashed Recompiled por completo y no solo el archivo *.exe.\n- No está ejecutando Unleashed Recompiled desde un archivo *.zip." }, + { ELanguage::Italian, "Impossibile trovare il modulo \"%s\".\n\nAssicurati che:\n\n- Hai estratto questa copia di Unleashed Recompiled correttamente e non solo il file *.exe.\n- Non stai eseguendo Unleashed Recompiled da un file *.zip." } + } + }, { "Common_On", { diff --git a/UnleashedRecomp/main.cpp b/UnleashedRecomp/main.cpp index 9158abf..a55c018 100644 --- a/UnleashedRecomp/main.cpp +++ b/UnleashedRecomp/main.cpp @@ -28,6 +28,15 @@ #include #endif +#if defined(_WIN32) && defined(UNLEASHED_RECOMP_D3D12) +static std::array g_D3D12RequiredModules = +{ + "D3D12/D3D12Core.dll", + "dxcompiler.dll", + "dxil.dll" +}; +#endif + const size_t XMAIOBegin = 0x7FEA0000; const size_t XMAIOEnd = XMAIOBegin + 0x0000FFFF; @@ -204,6 +213,19 @@ int main(int argc, char *argv[]) Config::Load(); +#if defined(_WIN32) && defined(UNLEASHED_RECOMP_D3D12) + for (auto& dll : g_D3D12RequiredModules) + { + if (!std::filesystem::exists(g_executableRoot / dll)) + { + char text[512]; + snprintf(text, sizeof(text), Localise("System_Win32_MissingDLLs").c_str(), dll.data()); + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, GameWindow::GetTitle(), text, GameWindow::s_pWindow); + std::_Exit(1); + } + } +#endif + // Check the time since the last time an update was checked. Store the new time if the difference is more than six hours. constexpr double TimeBetweenUpdateChecksInSeconds = 6 * 60 * 60; time_t timeNow = std::time(nullptr); diff --git a/UnleashedRecomp/user/paths.h b/UnleashedRecomp/user/paths.h index d914213..c083520 100644 --- a/UnleashedRecomp/user/paths.h +++ b/UnleashedRecomp/user/paths.h @@ -8,6 +8,8 @@ #define GAME_INSTALL_DIRECTORY "." #endif +extern std::filesystem::path g_executableRoot; + inline std::filesystem::path GetGamePath() { return GAME_INSTALL_DIRECTORY; From a9e280e11625476d1c9e735d4b345261b2718b4e Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:54:17 +0000 Subject: [PATCH 09/14] Fix Homing Attack on Jump not affecting Cool Edge Act 3 (Day) (#904) --- UnleashedRecomp/patches/input_patches.cpp | 12 ++++++++++++ UnleashedRecomp/patches/player_patches.cpp | 7 ------- UnleashedRecompLib/config/SWA.toml | 7 +++++++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/UnleashedRecomp/patches/input_patches.cpp b/UnleashedRecomp/patches/input_patches.cpp index 9db182c..afc5096 100644 --- a/UnleashedRecomp/patches/input_patches.cpp +++ b/UnleashedRecomp/patches/input_patches.cpp @@ -318,6 +318,18 @@ void PostureSpaceHurrierDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCVRegis vector.f32[3] = -1.0f; } +void SetXButtonHomingMidAsmHook(PPCRegister& r1) +{ + auto pXButtonHoming = (bool*)(g_memory.base + r1.u32 + 0x63); + + *pXButtonHoming = !Config::HomingAttackOnJump; +} + +bool IsHomingAttackOnJump() +{ + return Config::HomingAttackOnJump; +} + // ------------- WORLD MAP ------------- // bool WorldMapDeadzoneMidAsmHook(PPCRegister& pPadState) diff --git a/UnleashedRecomp/patches/player_patches.cpp b/UnleashedRecomp/patches/player_patches.cpp index e951199..cce0a58 100644 --- a/UnleashedRecomp/patches/player_patches.cpp +++ b/UnleashedRecomp/patches/player_patches.cpp @@ -95,13 +95,6 @@ void PostUnleashMidAsmHook(PPCRegister& r30) g_isUnleashCancelled = false; } -void SetXButtonHomingMidAsmHook(PPCRegister& r1) -{ - auto pXButtonHoming = (bool*)(g_memory.base + r1.u32 + 0x63); - - *pXButtonHoming = !Config::HomingAttackOnJump; -} - // SWA::Player::CEvilSonicContext PPC_FUNC_IMPL(__imp__sub_823B49D8); PPC_FUNC(sub_823B49D8) diff --git a/UnleashedRecompLib/config/SWA.toml b/UnleashedRecompLib/config/SWA.toml index 2c070e9..2c0177e 100644 --- a/UnleashedRecompLib/config/SWA.toml +++ b/UnleashedRecompLib/config/SWA.toml @@ -197,11 +197,18 @@ address = 0x823A4FF0 registers = ["r4", "r5"] return_on_false = true +# Set default value for XButtonHoming. [[midasm_hook]] name = "SetXButtonHomingMidAsmHook" address = 0x8237AC90 registers = ["r1"] +# Disable XML reading for XButtonHoming. +[[midasm_hook]] +name = "IsHomingAttackOnJump" +address = 0x8237ACE4 +jump_address_on_true = 0x8237ACE8 + # Down force HFR fix [[midasm_hook]] name = "DownForceDeltaTimeFixMidAsmHook" From 024c35c1fec03f32a1f752c8c60896f1790d2b0d Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Fri, 7 Mar 2025 13:52:01 +0300 Subject: [PATCH 10/14] Force WASAPI on Windows. (#1134) --- UnleashedRecomp/apu/driver/sdl2_driver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UnleashedRecomp/apu/driver/sdl2_driver.cpp b/UnleashedRecomp/apu/driver/sdl2_driver.cpp index f487620..787fab3 100644 --- a/UnleashedRecomp/apu/driver/sdl2_driver.cpp +++ b/UnleashedRecomp/apu/driver/sdl2_driver.cpp @@ -38,6 +38,11 @@ static void CreateAudioDevice() void XAudioInitializeSystem() { +#ifdef _WIN32 + // Force wasapi on Windows. + SDL_setenv("SDL_AUDIODRIVER", "wasapi", true); +#endif + SDL_SetHint(SDL_HINT_AUDIO_CATEGORY, "playback"); SDL_SetHint(SDL_HINT_AUDIO_DEVICE_APP_NAME, "Unleashed Recompiled"); From 45c08801451e283b2741937bf1d7f7763ed05e71 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:52:42 +0000 Subject: [PATCH 11/14] Rename DisableDPadAsAnalogInput to DisableDPadMovement (#1146) --- UnleashedRecomp/patches/input_patches.cpp | 12 ++++++------ UnleashedRecomp/user/config_def.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/UnleashedRecomp/patches/input_patches.cpp b/UnleashedRecomp/patches/input_patches.cpp index afc5096..0ec8f33 100644 --- a/UnleashedRecomp/patches/input_patches.cpp +++ b/UnleashedRecomp/patches/input_patches.cpp @@ -212,7 +212,7 @@ g_sdlEventListenerForInputPatches; static bool IsDPadThreshold(const SWA::SPadState* pPadState) { - if (Config::DisableDPadAsAnalogInput) + if (Config::DisableDPadMovement) return false; return pPadState->IsDown(SWA::eKeyState_DpadUp) || @@ -240,7 +240,7 @@ static bool IsCursorThreshold(double deadzone = 0, bool isBelowThreshold = false static void SetDPadAnalogDirectionX(PPCRegister& pPadState, PPCRegister& x, bool invert, float max = 1.0f) { - if (Config::DisableDPadAsAnalogInput) + if (Config::DisableDPadMovement) return; auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); @@ -254,7 +254,7 @@ static void SetDPadAnalogDirectionX(PPCRegister& pPadState, PPCRegister& x, bool static void SetDPadAnalogDirectionY(PPCRegister& pPadState, PPCRegister& y, bool invert, float max = 1.0f) { - if (Config::DisableDPadAsAnalogInput) + if (Config::DisableDPadMovement) return; auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); @@ -292,7 +292,7 @@ void PostureDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCRegister& y) void PostureSpaceHurrierDPadSupportXMidAsmHook(PPCRegister& pPadState, PPCVRegister& vector) { - if (Config::DisableDPadAsAnalogInput) + if (Config::DisableDPadMovement) return; auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); @@ -306,7 +306,7 @@ void PostureSpaceHurrierDPadSupportXMidAsmHook(PPCRegister& pPadState, PPCVRegis void PostureSpaceHurrierDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCVRegister& vector) { - if (Config::DisableDPadAsAnalogInput) + if (Config::DisableDPadMovement) return; auto pGuestPadState = (SWA::SPadState*)g_memory.Translate(pPadState.u32); @@ -430,7 +430,7 @@ PPC_FUNC(sub_8256C938) pWorldMapCursor->m_LeftStickVertical = rPadState.LeftStickVertical; pWorldMapCursor->m_LeftStickHorizontal = rPadState.LeftStickHorizontal; - if (!Config::DisableDPadAsAnalogInput) + if (!Config::DisableDPadMovement) { if (rPadState.IsDown(SWA::eKeyState_DpadUp)) pWorldMapCursor->m_LeftStickVertical = 1.0f; diff --git a/UnleashedRecomp/user/config_def.h b/UnleashedRecomp/user/config_def.h index 4138572..37fd59c 100644 --- a/UnleashedRecomp/user/config_def.h +++ b/UnleashedRecomp/user/config_def.h @@ -79,7 +79,9 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, AllowCancellingUnleash, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableAutoSaveWarning, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableBoostFilter, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDLCIcon, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDPadMovement, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDWMRoundedCorners, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false); CONFIG_DEFINE_HIDDEN("Codes", bool, EnableEventCollisionDebugView, false); CONFIG_DEFINE_HIDDEN("Codes", bool, EnableGIMipLevelDebugView, false); CONFIG_DEFINE_HIDDEN("Codes", bool, EnableObjectCollisionDebugView, false); @@ -92,7 +94,5 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, SaveScoreAtCheckpoints, false); CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseArrowsForTimeOfDayTransition, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false); -CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false); -CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDPadAsAnalogInput, false); CONFIG_DEFINE("Update", time_t, LastChecked, 0); From 131427e017588fe349e10694bdaf2a37900683d7 Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Fri, 7 Mar 2025 18:52:49 +0300 Subject: [PATCH 12/14] Update version to v1.0.2. (#1149) --- UnleashedRecomp/res/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnleashedRecomp/res/version.txt b/UnleashedRecomp/res/version.txt index e58d90d..a486ce0 100644 --- a/UnleashedRecomp/res/version.txt +++ b/UnleashedRecomp/res/version.txt @@ -1,4 +1,4 @@ VERSION_MILESTONE="" VERSION_MAJOR=1 VERSION_MINOR=0 -VERSION_REVISION=1 +VERSION_REVISION=2 From cc1018a8fca052be3cee05b76346c1ec7a973679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Mon, 10 Mar 2025 12:18:37 +0000 Subject: [PATCH 13/14] Pass release path to upload-artifact step on Windows builds (#1151) --- .github/workflows/validate.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 72b0781..9027616 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -145,13 +145,11 @@ jobs: Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxil.dll" -Destination ".\release\dxil.dll" Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.exe" -Destination ".\release\UnleashedRecomp.exe" - Compress-Archive -Path .\release\* -DestinationPath .\UnleashedRecomp-Windows.zip - - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }} - path: .\UnleashedRecomp-Windows.zip + path: .\release - name: Upload PDB uses: actions/upload-artifact@v4 From d0368665dd0ceda61a71daf401fb79c4abe4aaab Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Tue, 11 Mar 2025 15:26:14 +0000 Subject: [PATCH 14/14] Update README FAQ (#1319) --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abf1a3d..af378c0 100644 --- a/README.md +++ b/README.md @@ -278,9 +278,16 @@ Simply booting at least once in Desktop Mode will enable the Deck to use the fil ## FAQ -### Do you have a Discord server? +### Do you have a website or Discord server? -Unleashed Recompiled is not associated with any Discord servers. Use the [Issues](https://github.com/hedge-dev/UnleashedRecomp/issues) page if you need support. +Unleashed Recompiled does not have an official website, nor is it affiliated with any Discord servers. + +**Please link here when directing anyone to the project.** + +> [!CAUTION] +> Do not download builds of Unleashed Recompiled from anywhere but our [Releases](https://github.com/hedge-dev/UnleashedRecomp/releases/latest) page. +> +> **We will never distribute builds on other websites, via Discord servers or via third-party update tools.** ### Why does the installer say my files are invalid?