Guest User

Untitled

a guest
Jun 13th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. int install_sysmenu(u32 version){
  2. int ret = 0, use_ios_patch = 0;
  3. u16 ver;
  4.  
  5. if (get_installed_title_version(TITLE_ID(1,2)) >= version ||
  6. get_installed_title_version(TITLE_ID(1,30)) > 1040)
  7. use_ios_patch = 1;
  8.  
  9. printf("\x1b[2J\n\n");
  10. patchmii_network_init();
  11. if (use_ios_patch && !using_temp_ios){
  12. printf("Installing temporary IOS35 for IOS/SysMenu downgrade...\n");
  13. ret = install_temporary_ios(51, 4633);
  14. if (ret) goto cleanup;
  15. printf("Loading temporary IOS...\n");
  16. WPAD_Shutdown();
  17. load_temporary_ios();
  18. printf("\nLoaded IOS %d\n", IOS_GetVersion());
  19. using_temp_ios = 1;
  20. printf("Reinitializing...");
  21. miscInit();
  22. patchmii_network_init();
  23. }
  24. ver = get_installed_title_version(TITLE_ID(1,30));
  25. if(ver >= 1040)
  26. {
  27. // printf("\n\nDo you want to support Korean Discs in System Menu?\n");
  28. // printf(WARNING_SIGN "\tIf you are not sure, select 'NO'.\n");
  29. // printf(WARNING_SIGN "\t'YES' then install patched IOS37 to IOS30 for Korean Discs.\n");
  30. // printf(WARNING_SIGN "\tYou may need to install patched IOS40, 41, 43 and 45 additionally\n");
  31. // printf(WARNING_SIGN "\t\tfor playing Korean Discs directly from the System Menu\n");
  32. // if (yes_or_no())
  33. // {
  34. // ret = patchmii_install(1, 37, 2070, 1, 30, 1040, patch_generic_es);
  35. //
  36. // // if failed, it will install original IOS30 .
  37. // if (ret)
  38. // {
  39. // printf ("Error!: failed to install fake IOS30. Installing original IOS30 v1040...\n");
  40. // ret = patchmii_install(1, 30, 1040, 1, 30, 1040, 0);
  41. // }
  42. // }
  43. // else // if (ver != 1040)
  44. // {
  45. ret = patchmii_install(1, 30, 1040, 1, 30, 1040, 0);
  46. // }
  47. }
  48. // if (ret) goto cleanup;
  49. //
  50. //
  51. // printf ("\n\nDo you want to add hacks for the SystemMenu?\n");
  52. // printf(WARNING_SIGN "\tIf you are not sure, select 'NO'.\n");
  53. // printf(WARNING_SIGN "\t\tbecause these may cause your Wii brick.\n");
  54. // printf(WARNING_SIGN "\t'YES' then patching SystemMenu with following features.\n");
  55. // printf(WARNING_SIGN "\t1. Full & Enhanced Disc Region Free (Wii/NGC).\n");
  56. // printf(WARNING_SIGN "\t2. Full Channel Region Free.\n");
  57. // printf(WARNING_SIGN "\t3. Always autoboot in Recovery Mode.\n");
  58. // printf(WARNING_SIGN "\t4. Starfall Recovery Mode\n");
  59. // printf(WARNING_SIGN "\t\t Holding NGC Pad 'Y' button while Wii starting,\n");
  60. // printf(WARNING_SIGN "\t\t then get in recovery mode\n");
  61. //
  62. // if (yes_or_no())
  63. // {
  64. // ret = patchmii_install(1, 2, version, 1, 2, version, patch_systemmenu);
  65. // // if failed, it will install original IOS30 .
  66. // if (ret)
  67. // {
  68. // printf ("Error!: failed to install patched SystemMenu. Installing original...\n");
  69. // ret = patchmii_install(1, 2, version, 1, 2, version, 0);
  70. // }
  71. // }
  72. // else
  73. // {
  74. // ret = patchmii_install(1, 2, version, 1, 2, version, 0);
  75. // }
  76. //
  77. // if (ret)
  78. // {
  79. // goto cleanup;
  80. // }
  81. // else if ((lang == 9) || (area == 7) || (game == 3))
  82. // {
  83. // switch (version - 288)
  84. // {
  85. // case 1:
  86. // lang = 1;
  87. // area = 1;
  88. // game = 1;
  89. // break;
  90. // case 2:
  91. // lang = 1;
  92. // area = 2;
  93. // game = 2;
  94. // break;
  95. // case 0:
  96. // default:
  97. // lang = 0;
  98. // area = 0;
  99. // game = 0;
  100. // break;
  101. // }
  102. //
  103. // saveSettings ();
  104. // }
  105. //
  106. cleanup:
  107. if(use_ios_patch) cleanup_temporary_ios();
  108.  
  109. printf("Press any key to continue");
  110. wait_anyKey();
  111. return ret;
  112. }
Add Comment
Please, Sign In to add comment