Add support for nintendont
This commit is contained in:
parent
2d023be0a2
commit
35b6aa14c0
|
@ -148,8 +148,46 @@ uint64_t getVWiiHBLTitleId() {
|
|||
return titleId;
|
||||
}
|
||||
|
||||
uint64_t getVWiiNintendontTitleId() {
|
||||
// fall back to booting the vWii system menu if anything fails
|
||||
uint64_t titleId = 0;
|
||||
|
||||
FSAInit();
|
||||
auto client = FSAAddClient(nullptr);
|
||||
if (client > 0) {
|
||||
if (Mocha_UnlockFSClientEx(client) == MOCHA_RESULT_SUCCESS) {
|
||||
// mount the slccmpt
|
||||
if (FSAMount(client, "/dev/slccmpt01", "/vol/storage_slccmpt01", FSA_MOUNT_FLAG_GLOBAL_MOUNT, nullptr, 0) >= 0) {
|
||||
FSStat stat;
|
||||
|
||||
// test if the OHBC or HBC is installed
|
||||
if (FSAGetStat(client, "/vol/storage_slccmpt01/title/00010001/57574e44/content/00000000.app", &stat) >= 0) {
|
||||
titleId = 0x0001000157574E44L; // 'Nintendont'
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE("Cannot find Nintendont");
|
||||
}
|
||||
FSAUnmount(client, "/vol/storage_slccmpt01", static_cast<FSAUnmountFlags>(2));
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to mount slccmpt01");
|
||||
}
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to unlock FSClient");
|
||||
}
|
||||
FSADelClient(client);
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to add FSAClient");
|
||||
}
|
||||
return titleId;
|
||||
}
|
||||
|
||||
void bootHomebrewChannel() {
|
||||
uint64_t titleId = getVWiiHBLTitleId();
|
||||
DEBUG_FUNCTION_LINE("Launching vWii title %016llx", titleId);
|
||||
launchvWiiTitle(titleId);
|
||||
}
|
||||
|
||||
void bootNintendont() {
|
||||
uint64_t titleId = getVWiiNintendontTitleId();
|
||||
DEBUG_FUNCTION_LINE("Launching vWii title %016llx", titleId);
|
||||
launchvWiiTitle(titleId);
|
||||
}
|
||||
|
|
|
@ -10,4 +10,8 @@ void bootvWiiMenu();
|
|||
|
||||
void bootHomebrewChannel();
|
||||
|
||||
uint64_t getVWiiHBLTitleId();
|
||||
void bootNintendont();
|
||||
|
||||
uint64_t getVWiiHBLTitleId();
|
||||
|
||||
uint64_t getVWiiNintendontTitleId();
|
|
@ -22,6 +22,7 @@ const char *autoboot_config_strings[] = {
|
|||
"homebrew_launcher",
|
||||
"vwii_system_menu",
|
||||
"vwii_homebrew_channel",
|
||||
"vwii_nintendont",
|
||||
};
|
||||
|
||||
template<typename... Args>
|
||||
|
|
|
@ -25,6 +25,7 @@ enum {
|
|||
BOOT_OPTION_HOMEBREW_LAUNCHER,
|
||||
BOOT_OPTION_VWII_SYSTEM_MENU,
|
||||
BOOT_OPTION_VWII_HOMEBREW_CHANNEL,
|
||||
BOOT_OPTION_VWII_NINTENDONT,
|
||||
};
|
||||
|
||||
int32_t readAutobootOption(std::string &configPath);
|
||||
|
|
|
@ -71,6 +71,7 @@ int32_t main(int32_t argc, char **argv) {
|
|||
}
|
||||
|
||||
bool showvHBL = getVWiiHBLTitleId() != 0;
|
||||
bool showNintendont = getVWiiNintendontTitleId() != 0;
|
||||
bool showHBL = false;
|
||||
std::string configPath = "fs:/vol/external01/wiiu/autoboot.cfg";
|
||||
if (argc >= 1) {
|
||||
|
@ -94,10 +95,14 @@ int32_t main(int32_t argc, char **argv) {
|
|||
if (showvHBL) {
|
||||
menu[BOOT_OPTION_VWII_HOMEBREW_CHANNEL] = "vWii Homebrew Channel";
|
||||
}
|
||||
if (showNintendont) {
|
||||
menu[BOOT_OPTION_VWII_NINTENDONT] = "vWii Nintendont";
|
||||
}
|
||||
|
||||
if ((bootSelection == -1) ||
|
||||
(bootSelection == BOOT_OPTION_HOMEBREW_LAUNCHER && !showHBL) ||
|
||||
(bootSelection == BOOT_OPTION_VWII_HOMEBREW_CHANNEL && !showvHBL) ||
|
||||
(bootSelection == BOOT_OPTION_VWII_NINTENDONT && !showNintendont) ||
|
||||
(vpad.hold & VPAD_BUTTON_PLUS)) {
|
||||
bootSelection = handleMenuScreen(configPath, bootSelection, menu);
|
||||
}
|
||||
|
@ -124,6 +129,13 @@ int32_t main(int32_t argc, char **argv) {
|
|||
}
|
||||
bootHomebrewChannel();
|
||||
break;
|
||||
case BOOT_OPTION_VWII_NINTENDONT:
|
||||
if (!showNintendont) {
|
||||
bootvWiiMenu();
|
||||
break;
|
||||
}
|
||||
bootNintendont();
|
||||
break;
|
||||
default:
|
||||
bootWiiUMenu();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue