From df0bd8afee731609230b90782a2abda98a20af18 Mon Sep 17 00:00:00 2001 From: DeaTh-G Date: Sun, 1 Dec 2024 14:32:26 +0100 Subject: [PATCH] disable storage device option and enable install option on title menu --- .../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 dfb4338f..7f1f9b41 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 cf1661ee..74203c0f 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