From eaf2c9697d0a99faef173ee6bb2a10649b41a9d1 Mon Sep 17 00:00:00 2001 From: Clippy95 Date: Wed, 6 Nov 2024 20:48:18 +0300 Subject: [PATCH] Sensible max limit for sr1_increase_vehicle_rotation_limit. --- src/xenia/emulator.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index e612a556e63..bbff7d299cd 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -104,11 +104,11 @@ DEFINE_bool(sr_havok_fix_frametime, false, "Performance loss at a higher FPSes.) ", "MouseHook"); -DEFINE_bool( - sr1_increase_vehicle_rotation_limit, true, - "(Saints Row 1) Patch vehicle vertical rotation limit to be the same " - "as on-foot.", - "MouseHook"); +DEFINE_bool(sr1_increase_vehicle_rotation_limit, true, + "(Saints Row 1) Patch vehicle vertical rotation limit to be mostly " + "the same " + "as on-foot.", + "MouseHook"); DEFINE_bool(allow_game_relative_writes, false, "Not useful to non-developers. Allows code to write to paths " @@ -1680,12 +1680,14 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path, uint32_t max_float_addr_lis1; uint32_t max_float_addr_lis2; uint32_t min_float_addr_lis1; + uint32_t write_max_value1; // making it same as on-foot causes the camera + // to clip. }; std::vector supported_builds = { // TU1 Release build {0x82050304, 0x7361696E, 0x60000000, 0x8249db00, 0x8249dd28, 0x8249dd50, 0x82079cbc, 0x82195324, 0x8225BD8C, 0x8211D604, 0x82772D90, 0x8211FC8C, - 0x82772DB0, 0xC108C24C, 0xC00BC24C, 0xC0C8B850}, + 0x82772DB0, 0xC108C88C, 0xC00BC88C, 0xC0C8B850, 0x8208C88C}, }; for (auto& build : supported_builds) { auto* test_addr = (xe::be*)module->memory()->TranslateVirtual( @@ -1724,6 +1726,7 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path, build.max_float_addr_lis2); patch_addr(build.vehicle_rotationYLimit_min_read_addr1, build.min_float_addr_lis1); + patch_addr(build.write_max_value1, 0xbf000000); } break; }