From 06dfaeeb8dcebe4c84efb201f342896948b24c94 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 5 Sep 2025 22:47:52 -0400 Subject: [PATCH 1/2] RestoreChaosSpearFlips Signed-off-by: Isaac Marovitz --- MarathonRecomp/patches/player_patches.cpp | 5 +++++ MarathonRecomp/user/config_def.h | 1 + MarathonRecompLib/config/Marathon.toml | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index a3104b170..b9215cd4c 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -183,3 +183,8 @@ bool ControllableSpinkick() { return Config::ControllableSpinkick; } + +bool RestoreChaosSpearFlips() +{ + return Config::RestoreChaosSpearFlips; +} diff --git a/MarathonRecomp/user/config_def.h b/MarathonRecomp/user/config_def.h index 6ff529718..983203be5 100644 --- a/MarathonRecomp/user/config_def.h +++ b/MarathonRecomp/user/config_def.h @@ -83,6 +83,7 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, FixPowerUpJingleDuration, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false); CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreContextualHUDColours, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreChaosSpearFlips, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableEdgeGrabLeftover, false); CONFIG_DEFINE_HIDDEN("Codes", bool, TailsGauge, false); CONFIG_DEFINE_HIDDEN("Codes", bool, PlayerDebugMode, false); diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index 852886a90..8966ae354 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -337,3 +337,8 @@ jump_address = 0x8258E308 name = "NOP" address = 0x8258E600 jump_address = 0x8258E604 + +[[midasm_hook]] +name = "RestoreChaosSpearFlips" +address = 0x821A6730 +jump_address_on_true = 0x821A6734 From c9224ffaae88aa46b9cedbaf535aa2cfc50c6d06 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 5 Sep 2025 22:56:34 -0400 Subject: [PATCH 2/2] RestoreChaosBoostJump Signed-off-by: Isaac Marovitz --- MarathonRecomp/patches/player_patches.cpp | 9 +++++++++ MarathonRecomp/user/config_def.h | 1 + MarathonRecompLib/config/Marathon.toml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index b9215cd4c..ce583fde4 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -188,3 +188,12 @@ bool RestoreChaosSpearFlips() { return Config::RestoreChaosSpearFlips; } + +void RestoreChaosBoostJump(PPCRegister& r10, PPCRegister& r11) +{ + if (!Config::RestoreChaosBoostJump) + return; + + r10.u32 = 1; + r11.u32 = 2; +} diff --git a/MarathonRecomp/user/config_def.h b/MarathonRecomp/user/config_def.h index 983203be5..e3a22d207 100644 --- a/MarathonRecomp/user/config_def.h +++ b/MarathonRecomp/user/config_def.h @@ -84,6 +84,7 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false); CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreContextualHUDColours, false); CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreChaosSpearFlips, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreChaosBoostJump, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableEdgeGrabLeftover, false); CONFIG_DEFINE_HIDDEN("Codes", bool, TailsGauge, false); CONFIG_DEFINE_HIDDEN("Codes", bool, PlayerDebugMode, false); diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index 8966ae354..3c00a3c7d 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -342,3 +342,8 @@ jump_address = 0x8258E604 name = "RestoreChaosSpearFlips" address = 0x821A6730 jump_address_on_true = 0x821A6734 + +[[midasm_hook]] +name = "RestoreChaosBoostJump" +address = 0x821A6988 +registers = ["r10", "r11"]