Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions overlay/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class GuiToggle final : public tsl::Gui {
list->addItem(new tsl::elm::CategoryHeader("NIFM - 010000000000000F"));
list->addItem(config_ctest.create_list_item("ctest"));
list->addItem(config_ctest2.create_list_item("ctest2"));
list->addItem(config_ctest3.create_list_item("ctest3"));

list->addItem(new tsl::elm::CategoryHeader("NIM - 0100000000000025"));
list->addItem(config_nim_old.create_list_item("nim_old"));
Expand Down Expand Up @@ -145,6 +146,7 @@ class GuiToggle final : public tsl::Gui {
ConfigEntry config_es3{"es", "es3", true};
ConfigEntry config_ctest{"nifm", "ctest", true};
ConfigEntry config_ctest2{"nifm", "ctest2", true};
ConfigEntry config_ctest3{"nifm", "ctest3", true};
ConfigEntry config_nim_old{"nim_old", "nim_old", true};
ConfigEntry config_nim_new{"nim_new", "nim_new", true};
ConfigEntry config_ssl1{"ssl", "disablecaverification1", false};
Expand Down
8 changes: 7 additions & 1 deletion sysmod/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ constexpr auto b_cond(u32 inst) -> bool {
return type == 0x14 || type == 0x17;
}

constexpr auto stp_cond(u32 inst) -> bool {
return (inst >> 24) == 0xA9; // stp x29, x30, [sp, #-0x30]!
}

// to view patches, use https://armconverter.com/?lock=arm64
constexpr PatchData ret0_patch_data{ "0xE0031F2A" };
constexpr PatchData ret1_patch_data{ "0x10000014" };
Expand Down Expand Up @@ -285,9 +289,11 @@ constinit Patterns es_patterns[] = {

constinit Patterns nifm_patterns[] = {
{ "ctest", "....................F40300AA....F30314AAE00314AA9F0201397F8E04F8", 16, -16, ctest_cond, ctest_patch, ctest_applied, true, FW_VER_ANY, MAKEHOSVERSION(18,1,0) }, // 1.0.0 - 18.1.0
{ "ctest2", "14...........91...........97...............14", 37, 4, b_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(19,0,0), FW_VER_ANY }, //19.0.0 - 20.0.1+
{ "ctest2", "14...........91...........97...............14", 41, 0, stp_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(19,0,0), MAKEHOSVERSION(20,5,0) }, //19.0.0 - 20.5.0
{ "ctest3", "14...........91...........97...............14", 49, 0, stp_cond, ctest_patch, ctest_applied, true, MAKEHOSVERSION(21,0,0), FW_VER_ANY }, //21.0.0
};


constinit Patterns nim_patterns[] = {
{ "nim_old", "0x.0F00351F2003D5", 8, 0, adr_cond, mov2_patch, mov2_applied, true, MAKEHOSVERSION(17,0,0), MAKEHOSVERSION(20,5,0) },
{ "nim_new", "0x.0700351F2003D5", 8, 0, adr_cond, mov2_patch, mov2_applied, true, MAKEHOSVERSION(21,0,0), FW_VER_ANY },
Expand Down