From 036a8b72779856b4a6791c4bded9648803e01551 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sat, 27 Sep 2025 17:31:12 -0400 Subject: [PATCH 1/2] InfiniteLives Signed-off-by: Isaac Marovitz --- MarathonRecomp/patches/player_patches.cpp | 4 ++++ MarathonRecomp/user/config_def.h | 1 + MarathonRecompLib/config/Marathon.toml | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index 5672ed423..b2a6d7dde 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -465,3 +465,7 @@ void SonicGaugeRestorationGaugeFlagFix(PPCRegister& r_gauge, PPCRegister& r_cont } } } + +bool InfiniteLives() { + return Config::InfiniteLives; +} diff --git a/MarathonRecomp/user/config_def.h b/MarathonRecomp/user/config_def.h index 419d9c93b..00024fa8e 100644 --- a/MarathonRecomp/user/config_def.h +++ b/MarathonRecomp/user/config_def.h @@ -97,5 +97,6 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, MidairControlForSnowboards, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableTeleportDash, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableBoundAttack, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableSpinkick, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, InfiniteLives, false); CONFIG_DEFINE("Update", time_t, LastChecked, 0); diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index b8fcc0881..f26a01e0b 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -575,3 +575,8 @@ registers = ["r29"] name = "SonicGaugeRestorationGaugeGemSpriteResetFix" address = 0x82177DFC registers = ["r31"] + +[[midasm_hook]] +name = "InfiniteLives" +address = 0x821857B0 +jump_address_on_true = 0x821857B4 From 78b9147bce42a3111f85349689b861e0513282c6 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sun, 19 Oct 2025 14:56:18 -0400 Subject: [PATCH 2/2] Indentation Signed-off-by: Isaac Marovitz --- MarathonRecomp/patches/player_patches.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index b2a6d7dde..0df8a3770 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -466,6 +466,7 @@ void SonicGaugeRestorationGaugeFlagFix(PPCRegister& r_gauge, PPCRegister& r_cont } } -bool InfiniteLives() { +bool InfiniteLives() +{ return Config::InfiniteLives; }