Add Aula support (system_settings.ini); Update ldr_patcher to reflect latest changes in ams loader; Update info on Mariko EMC voltage

This commit is contained in:
KazushiM
2021-10-12 13:13:22 +08:00
parent 3ccc03604a
commit 53fa4dd7d1
3 changed files with 21 additions and 18 deletions

View File

@@ -9,6 +9,13 @@ tskin_rate_table_handheld = str!"[[-1000000, 40000, 0, 0], [36000, 43000, 51, 51
; 0xDAC0 = 56,000 = 56˚C
holdable_tskin = u32!0xDAC0
;Fan Control for Aula (Not tested)
;[tc]
;tskin_rate_table_console = str!"[[-1000000, 40000, 0, 0], [36000, 43000, 51, 51], [43000, 48000, 51, 153], [48000, 55000, 153, 255], [55000, 1000000, 255, 255]]"
;tskin_rate_table_handheld = str!"[[-1000000, 40000, 0, 0], [36000, 43000, 51, 51], [43000, 45000, 51, 102], [45000, 55000, 102, 255], [55000, 1000000, 255, 255], [46500, 1000000, 255, 255]]"
;holdable_tskin = u32!0xD6D8 ;55.0˚C
;touchable_tskin = u32!0xD6D8 ;55.0˚C
;Charger Parameters
[psm]
;5V CDP/DCP (BC1.2/QC?) Charger Current Limit

View File

@@ -114,14 +114,14 @@ namespace ams::ldr {
}
/* Apply IPS patches. */
void LocateAndApplyIpsPatchesToModule(const u8 *build_id, uintptr_t mapped_nso, size_t mapped_size) {
void LocateAndApplyIpsPatchesToModule(const u8 *module_id_data, uintptr_t mapped_nso, size_t mapped_size) {
for(int i = 0; i < VERS; i++)
{
if(memcmp(PcvModuleId[i], build_id, sizeof(PcvModuleId[i])) == 0) {
if(memcmp(PcvModuleId[i], module_id_data, sizeof(PcvModuleId[i])) == 0) {
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(AmModuleId[i], build_id, sizeof(AmModuleId[i])) == 0) {
else if(memcmp(AmModuleId[i], module_id_data, sizeof(AmModuleId[i])) == 0) {
ApplyCopyrightPatch(reinterpret_cast<u8 *>(mapped_nso), mapped_size, i);
}
}
@@ -131,15 +131,15 @@ namespace ams::ldr {
}
ro::ModuleId module_id;
std::memcpy(&module_id.build_id, build_id, sizeof(module_id.build_id));
std::memcpy(&module_id.data, module_id_data, sizeof(module_id.data));
ams::patcher::LocateAndApplyIpsPatchesToModule(LoaderSdMountName, NsoPatchesDirectory, NsoPatchesProtectedSize, NsoPatchesProtectedOffset, &module_id, reinterpret_cast<u8 *>(mapped_nso), mapped_size);
}
/* Apply embedded patches. */
void ApplyEmbeddedPatchesToModule(const u8 *build_id, uintptr_t mapped_nso, size_t mapped_size) {
void ApplyEmbeddedPatchesToModule(const u8 *module_id_data, uintptr_t mapped_nso, size_t mapped_size) {
/* Make module id. */
ro::ModuleId module_id;
std::memcpy(&module_id.build_id, build_id, sizeof(module_id.build_id));
std::memcpy(&module_id.data, module_id_data, sizeof(module_id.data));
if (IsUsb30ForceEnabled()) {
for (const auto &patch : Usb30ForceEnablePatches) {

View File

@@ -76,7 +76,7 @@ namespace ams::ldr {
constexpr u32 EmcVolatageOffsets[VERS][2] = {
{ 0x143998, 0x14399C },
{ 0x142878, 0x14287C },
{ 0x1428C8, 0x1428CC },
{ 0x1428B8, 0x1428BC },
};
constexpr u32 NewEmcVoltage = 1150000;
static_assert(NewEmcVoltage <= 1250000);
@@ -190,19 +190,15 @@ namespace ams::ldr {
};
/* EMC */
// Not available on Mariko
/*constexpr u32 EmcVolatageOffsets[2][2] = {
{
0x145FE4, //max77812_dram
0x144BA4, //max77812_dram
},
{
0x143A84,
0x144EC4,
}
/* Changing EMC volt parameters in mtc table will not make any difference to real voltage
constexpr u32 EmcVolatageOffsets[VERS][2] = {
{ 0x145FE4, 0x144BA4, },
{ 0x143A84, 0x144EC4, },
{ 0x143AC4, 0x144F04, },
};
constexpr u32 NewEmcVoltage = 650000;
static_assert(NewEmcVoltage <= 750000);*/
static_assert(NewEmcVoltage <= 750000);
*/
};
}