diff --git a/worlds/cv64/data/patches.py b/worlds/cv64/data/patches.py index 6ef4eafb..4a964612 100644 --- a/worlds/cv64/data/patches.py +++ b/worlds/cv64/data/patches.py @@ -2893,3 +2893,18 @@ dog_bite_ice_trap_fix = [ 0x25291CB8, # ADDIU T1, T1, 0x1CB8 0x01200008 # JR T1 ] + +shimmy_speed_modifier = [ + # Increases the player's speed while shimmying as long as they are not holding down Z. If they are holding Z, it + # will be the normal speed, allowing it to still be used to set up any tricks that might require the normal speed + # (like Left Tower Skip). + 0x3C088038, # LUI T0, 0x8038 + 0x91087D7E, # LBU T0, 0x7D7E (T0) + 0x31090020, # ANDI T1, T0, 0x0020 + 0x3C0A800A, # LUI T2, 0x800A + 0x240B005A, # ADDIU T3, R0, 0x005A + 0x55200001, # BNEZL T1, [forward 0x01] + 0x240B0032, # ADDIU T3, R0, 0x0032 + 0xA14B3641, # SB T3, 0x3641 (T2) + 0x0800B7C3 # J 0x8002DF0C +] diff --git a/worlds/cv64/options.py b/worlds/cv64/options.py index 07e86347..da1e1aba 100644 --- a/worlds/cv64/options.py +++ b/worlds/cv64/options.py @@ -424,6 +424,7 @@ class PantherDash(Choice): class IncreaseShimmySpeed(Toggle): """ Increases the speed at which characters shimmy left and right while hanging on ledges. + Hold Z to use the regular speed in case it's needed to do something. """ display_name = "Increase Shimmy Speed" diff --git a/worlds/cv64/rom.py b/worlds/cv64/rom.py index 1833c781..830bed27 100644 --- a/worlds/cv64/rom.py +++ b/worlds/cv64/rom.py @@ -607,9 +607,10 @@ class CV64PatchExtensions(APPatchExtension): rom_data.write_int32(0xAA530, 0x080FF880) # J 0x803FE200 rom_data.write_int32s(0xBFE200, patches.coffin_cutscene_skipper) - # Increase shimmy speed + # Shimmy speed increase hack if options["increase_shimmy_speed"]: - rom_data.write_byte(0xA4241, 0x5A) + rom_data.write_int32(0x97EB4, 0x803FE9F0) + rom_data.write_int32s(0xBFE9F0, patches.shimmy_speed_modifier) # Disable landing fall damage if options["fall_guard"]: