update for HOS 12.1.0

This commit is contained in:
KazushiM
2021-07-07 12:27:09 +08:00
parent c70a8226fa
commit 0907208e60
6 changed files with 13 additions and 109 deletions

View File

@@ -10,7 +10,8 @@ Overclocking suite for Switch(Erista and Mariko) running on Atmosphere CFW.
### Failure to read this README carefully or Doing CPU/GPU Overclocking on Erista will brick or fry your device (in the short term or long term, who knows).
- Erista support will be dropped later.
- HOS 12.1.0 doesn't change anything (regarding this patch suite), except for introducing new master key revision(0b) and updating nifm module.
- Erista support will be dropped later(13.0.0?).
@@ -25,7 +26,7 @@ Overclocking suite for Switch(Erista and Mariko) running on Atmosphere CFW.
- RAM Overclock up to 2131.2 MHz for Erista and 1996.8 MHz for Mariko
- Disable some background services, less power consumption in standby mode (Optional)
- Disable Push Notifications service, less power consumption in standby mode (Optional)
- Sync sys-clk profiles with ReverseNX(-Tools and -RT), no need to change clocks after toggling modes
@@ -33,7 +34,7 @@ Overclocking suite for Switch(Erista and Mariko) running on Atmosphere CFW.
- Game recording and SysDVR streaming @ 60fps with high video bitrate (Optional)
- Remove copyright watermark in screenshots/recordings and bypass connection test, courtesy of [HookedBehemoth](https://github.com/HookedBehemoth/exefs_patches)
- Remove copyright watermark in screenshots/recordings, courtesy of [HookedBehemoth](https://github.com/HookedBehemoth/exefs_patches)
### Details
@@ -98,7 +99,7 @@ Overclocking suite for Switch(Erista and Mariko) running on Atmosphere CFW.
**Steps:**
1. Make sure you are running targeted HOS (12.0.x), and have `prod.keys` dumped by [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM).
1. Make sure you are running targeted HOS (12.0.x and 12.1.0), and have `prod.keys` *with latest master key (0b for 12.1.0+)* dumped by [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM).
2. Loader patches for Atmosphere: Grab from the web and apply. I won't provide them here. (Or build AMS with `ValidateAcidSignature()` stubbed.)
@@ -186,8 +187,8 @@ Simply build `loader.kip` from Atmosphere and load it with hekate if you don't f
- **For Erista:**
- Remove the "Fan Control for Mariko" section.
- Remove the "disable services" part if you use Nintendo Online services like friends, cloud saving and notifications, or use Tesla overlays in Docked mode.
- **Known Issue**: Tesla Menu and its overlays will sometimes crash atmosphere in Docked mode when some services are disabled.
- Remove the "Disable Push Notifications service" part if you use Nintendo Online services.
- ~~**Known Issue**: Tesla Menu and its overlays will sometimes crash atmosphere in Docked mode when some services are disabled.~~ Only `[npns]` is reserved, I don't have time to screen all the rest one by one.
- For "Game Recording FPS and Bitrate", if you play demanding games or don't care about streaming/framerate/bitrate, comment out this section.
@@ -223,7 +224,7 @@ Simply build `loader.kip` from Atmosphere and load it with hekate if you don't f
- CTCaer for modded Hekate bootloader, RE and hardware research
- HookedBehemoth for nifm_ctest and am_no_copyright [patches](https://github.com/HookedBehemoth/exefs_patches)
- HookedBehemoth for am_no_copyright [patch](https://github.com/HookedBehemoth/exefs_patches)
- masagrator for [ReverseNX-RT](https://github.com/masagrator/ReverseNX-RT)

View File

@@ -15,90 +15,10 @@ continuous_recording_fps=u32!60
;~7.5Mbps, default is ~5Mbps, VBR(Variable Bitrate)
continuous_recording_video_bit_rate=u32!0x780000
;Disable services for power saving in standby mode
;Disable Push Notifications service for power saving in standby mode
;Delete following part if you use Nintendo Online Services
[bgtc]
enable_halfawake = u32!0x0
minimum_interval_normal = u32!0x7FFFFFFF
minimum_interval_save = u32!0x7FFFFFFF
battery_threshold_save = u32!0x64
battery_threshold_stop = u32!0x0
[npns]
background_processing = u8!0x0
sleep_periodic_interval = u32!0x7FFFFFFF
sleep_processing_timeout = u32!0x0
sleep_max_try_count = u32!0x0
[ns.notification]
enable_download_task_list = u8!0x0
enable_download_ticket = u8!0x0
enable_network_update = u8!0x0
enable_random_wait = u8!0x0
enable_request_on_cold_boot = u8!0x0
enable_send_rights_usage_status_request = u8!0x0
enable_sync_elicense_request = u8!0x0
enable_version_list = u8!0x0
retry_interval_min = u32!0x7FFFFFFF
retry_interval_max = u32!0x7FFFFFFF
[ns.rights]
register_na_ids_as_valid_accounts_forcibly_even_if_not_exist = u8!0x1
[account]
na_required_for_network_service = u8!0x0
na_license_verification_enabled = u8!0x0
[account.daemon]
background_awaking_periodicity = u32!0x7FFFFFFF
initial_schedule_delay = u32!0x7FFFFFFF
profile_sync_interval = u32!0x7FFFFFFF
na_info_refresh_interval = u32!0x7FFFFFFF
[capsrv]
enable_album_screenshot_filedata_verification = u8!0x0
enable_album_movie_filehash_verification = u8!0x0
enable_album_movie_filesign_verification = u8!0x0
[friends]
background_processing = u8!0x0
[notification.presenter]
snooze_interval_in_seconds = u32!0x7FFFFFFF
connection_retry_count = u32!0x0
alarm_pattern_total_repeat_count = u32!0x0
alarm_pattern_with_vibration_repeat_count = u32!0x0
[prepo]
;background_processing = u8!0x0 (shutdown directly when entering sleep mode)
transmission_interval_min = u32!0x7FFFFFFF
transmission_retry_interval_min = u32!0x7FFFFFFF
transmission_retry_interval_max = u32!0x7FFFFFFF
transmission_interval_in_sleep = u32!0x7FFFFFFF
statistics_save_interval_min = u32!0x7FFFFFFF
statistics_post_interval = u32!0x7FFFFFFF
save_system_report = u8!0x0
[olsc]
default_auto_upload_global_setting = u8!0x0
default_auto_download_global_setting = u8!0x0
autonomy_registration_interval_seconds = u32!0x7FFFFFFF
network_service_license_info_cache_expiration_seconds = u32!0x7FFFFFFF
postponed_transfer_task_processing_interval_seconds = u32!0x7FFFFFFF
retry_offset_seconds = u32!0x7FFFFFFF
network_trouble_detection_span_seconds = u32!0x7FFFFFFF
network_connection_polling_interval_seconds = u32!0x7FFFFFFF
is_save_data_backup_policy_check_required = u8!0x0
is_global_transfer_task_autonomy_registration_enabled = u8!0x0
is_on_event_transfer_task_registration_enabled = u8!0x0
is_periodic_transfer_task_registration_enabled = u8!0x0
[ntc]
is_autonomic_correction_enabled = u8!0x0
autonomic_correction_interval_seconds = u32!0x7FFFFFFF
autonomic_correction_failed_retry_interval_seconds = u32!0x7FFFFFFF
autonomic_correction_immediate_try_count_max = u32!0x0
autonomic_correction_immediate_try_interval_milliseconds = u32!0x7FFFFFFF
[systemupdate]
bgnup_retry_seconds = u32!0x7FFFFFFF

View File

@@ -1,6 +1,6 @@
--- stratosphere/loader/source/ldr_patcher.cpp @a672917
+++ stratosphere/loader/source/ldr_patcher.cpp
@@ -15,11 +15,27 @@
@@ -15,11 +15,22 @@
*/
#include <stratosphere.hpp>
#include "ldr_patcher.hpp"
@@ -12,23 +12,18 @@
+ constexpr u8 PcvModuleId[2][20] = {
+ { 0x91, 0xD6, 0x1D, 0x59, 0xD7, 0x00, 0x23, 0x78, 0xE3, 0x55, 0x84, 0xFC, 0x0B, 0x38, 0xC7, 0x69, 0x3A, 0x3A, 0xBA, 0xB5, }, //11.0.0
+ { 0xC5, 0x03, 0xE9, 0x65, 0x50, 0xF3, 0x02, 0xE1, 0x21, 0x87, 0x31, 0x36, 0xB8, 0x14, 0xA5, 0x29, 0x86, 0x3D, 0x94, 0x9B, }, //12.0.0
+ };
+
+ constexpr u8 NifmModuleId[2][20] = {
+ { 0x7A, 0x43, 0xF8, 0x40, 0x33, 0x7C, 0x28, 0xD4, 0x53, 0x71, 0x88, 0x43, 0x60, 0x8E, 0xEF, 0xF7, 0x8A, 0xFD, 0x46, 0x0B, }, //11.0.0
+ { 0xA8, 0x5F, 0x50, 0xFB, 0xA1, 0x0E, 0x06, 0xA3, 0xEB, 0xA3, 0xD3, 0xFA, 0xCB, 0x9E, 0x07, 0x5B, 0x21, 0x8C, 0x7D, 0x6D, },
+ { 0xC5, 0x03, 0xE9, 0x65, 0x50, 0xF3, 0x02, 0xE1, 0x21, 0x87, 0x31, 0x36, 0xB8, 0x14, 0xA5, 0x29, 0x86, 0x3D, 0x94, 0x9B, }, //12.0.0-12.1.0
+ };
+
+ constexpr u8 AmModuleId[2][20] = {
+ { 0x25, 0x50, 0x97, 0xEF, 0x11, 0xC0, 0x75, 0x9B, 0x1F, 0x36, 0x13, 0x2F, 0x73, 0xBD, 0xDB, 0x04, 0xC3, 0xEF, 0x9A, 0xBE, }, //11.0.0
+ { 0x5E, 0x5F, 0x1C, 0xC2, 0x4D, 0x37, 0x45, 0x91, 0xAF, 0xC2, 0xA2, 0x33, 0x6C, 0x94, 0x53, 0xCC, 0xFA, 0x39, 0x61, 0xC1, },
+ { 0x5E, 0x5F, 0x1C, 0xC2, 0x4D, 0x37, 0x45, 0x91, 0xAF, 0xC2, 0xA2, 0x33, 0x6C, 0x94, 0x53, 0xCC, 0xFA, 0x39, 0x61, 0xC1, }, //12.0.0-12.1.0
+ };
+
constexpr const char *NsoPatchesDirectory = "exefs_patches";
/* Exefs patches want to prevent modification of header, */
@@ -113,6 +129,20 @@ namespace ams::ldr {
@@ -113,6 +124,17 @@ namespace ams::ldr {
/* Apply IPS patches. */
void LocateAndApplyIpsPatchesToModule(const u8 *build_id, uintptr_t mapped_nso, size_t mapped_size) {
@@ -38,9 +33,6 @@
+ ApplyPcvPatch(reinterpret_cast<u8 *>(mapped_nso), mapped_size, i);
+ return; // Return here since pcv module loads before sd card can be mounted
+ }
+ else if(memcmp(NifmModuleId[i], build_id, sizeof(NifmModuleId[i])) == 0) {
+ ApplyCtestPatch(reinterpret_cast<u8 *>(mapped_nso), mapped_size, i);
+ }
+ else if(memcmp(AmModuleId[i], build_id, sizeof(AmModuleId[i])) == 0) {
+ ApplyCopyrightPatch(reinterpret_cast<u8 *>(mapped_nso), mapped_size, i);
+ }

View File

@@ -9,8 +9,6 @@ namespace ams::ldr {
namespace {
constexpr u32 CtestOffset[2] = { 0xF400, 0x1079C };
constexpr u32 CopyrightOffset[2] = { 0xC6128, 0xCA414 }; //am_no_copyright port
constexpr u8 BehemothPatch[8] = { 0xE0, 0x03, 0x1F, 0xAA, 0xC0, 0x03, 0x5F, 0xD6 }; //🤔
@@ -255,11 +253,6 @@ namespace ams::ldr {
return;
}
void ApplyCtestPatch(u8 *mapped_module, size_t mapped_size, int i) {
AMS_ABORT_UNLESS(CtestOffset[i] - 0x100 <= mapped_size);
std::memcpy(mapped_module + CtestOffset[i] - 0x100, BehemothPatch, sizeof(BehemothPatch));
}
void ApplyCopyrightPatch(u8 *mapped_module, size_t mapped_size, int i) {
AMS_ABORT_UNLESS(CopyrightOffset[i] - 0x100 <= mapped_size);
std::memcpy(mapped_module + CopyrightOffset[i] - 0x100, BehemothPatch, sizeof(BehemothPatch));

View File

@@ -7,8 +7,6 @@ namespace ams::ldr {
void ApplyPcvPatch(u8 *mapped_module, size_t mapped_size, int i);
void ApplyCtestPatch(u8 *mapped_module, size_t mapped_size, int i);
void ApplyCopyrightPatch(u8 *mapped_module, size_t mapped_size, int i);
}