From 9e168ab32649c8b83f55f7b8fdd76876f720fffd Mon Sep 17 00:00:00 2001 From: DeaTh-G <55578911+DeaTh-G@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:16:42 +0100 Subject: [PATCH] Disable storage device option and enable install option on title menu (#12) --- .../patches/ui/CTitleStateMenu_patches.cpp | 10 ++++++++++ UnleashedRecompLib/config/SWA.toml | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp b/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp index dfb4338..7f1f9b4 100644 --- a/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp +++ b/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp @@ -36,3 +36,13 @@ PPC_FUNC(sub_825882B8) } } } + +void TitleMenuRemoveStorageDeviceOptionMidAsmHook(PPCRegister& r11) +{ + r11.u32 = 0; +} + +void TitleMenuAddInstallOptionMidAsmHook(PPCRegister& r3) +{ + r3.u32 = 1; +} \ No newline at end of file diff --git a/UnleashedRecompLib/config/SWA.toml b/UnleashedRecompLib/config/SWA.toml index cf1661e..74203c0 100644 --- a/UnleashedRecompLib/config/SWA.toml +++ b/UnleashedRecompLib/config/SWA.toml @@ -542,3 +542,15 @@ registers = ["r27"] name = "AchievementManagerUnlockMidAsmHook" address = 0x82BCFF28 registers = ["r31"] + +[[midasm_hook]] +name = "TitleMenuRemoveStorageDeviceOptionMidAsmHook" +address = 0x825854F8 +registers = ["r11"] +jump_address = 0x825854FC + +[[midasm_hook]] +name = "TitleMenuAddInstallOptionMidAsmHook" +address = 0x8258547C +registers = ["r3"] +jump_address = 0x82585480 \ No newline at end of file