diff --git a/out/boot.dol b/out/boot.dol index fe66d03f..468ea3ef 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/channel/channels.cpp b/source/channel/channels.cpp index b1293c65..b465c0dc 100644 --- a/source/channel/channels.cpp +++ b/source/channel/channels.cpp @@ -193,7 +193,7 @@ void Channels::Search() { u32 count; u64 *list = NULL; - if(!neek2o() && NANDemuView) + if(NANDemuView) list = NandHandle.GetChannels(&count); else list = GetChannelList(&count); diff --git a/source/loader/cios.c b/source/loader/cios.c index 99a7c106..ca219500 100644 --- a/source/loader/cios.c +++ b/source/loader/cios.c @@ -120,9 +120,6 @@ bool IOS_D2X(u8 ios, u8 *base) u8 IOS_GetType(u8 slot) { - if(neek2o()) - return IOS_TYPE_NEEK2O; - u32 TMD_Length; signed_blob *TMD_Buffer = GetTMD(slot, &TMD_Length); if(TMD_Buffer == NULL) diff --git a/source/loader/nk.c b/source/loader/nk.c index b1ccad99..5aa6aefa 100644 --- a/source/loader/nk.c +++ b/source/loader/nk.c @@ -35,47 +35,12 @@ #include "memory/mem2.hpp" #include "gecko/gecko.hpp" -//static u32 KeyID; -bool checked = false; -bool neek = false; u32 kernelSize = 0; void *Kernel = NULL; -void check_neek2o(void) -{ - if(checked == true) - return; - checked = true; - - s32 ESHandle = IOS_Open("/dev/es", 0); - neek = (IOS_Ioctlv(ESHandle, 0xA2, 0, 0, NULL) == 0x666c6f77); - IOS_Close(ESHandle); - if(!neek) - { - s32 FSHandle = IOS_Open("/dev/fs", 0); - neek = (IOS_Ioctlv(FSHandle, 0x21, 0, 0, NULL) == 0); - IOS_Close(FSHandle); - } - if(!neek) - { - u32 num = 0; - ISFS_Initialize(); - neek = (ISFS_ReadDir("/sneek", NULL, &num) == 0); - ISFS_Deinitialize(); - } - gprintf("WiiFlow is in %s mode\n", neek ? "neek2o" : "real nand"); -} - -bool neek2o(void) -{ - return neek; -} - bool Load_Neek2o_Kernel() { bool ret = true; - if(neek2o()) - return ret; if(IsOnWiiU()) Kernel = fsop_ReadFile("usb1:/sneek/vwiikernel.bin", &kernelSize); @@ -93,11 +58,6 @@ bool Load_Neek2o_Kernel() s32 Launch_nk(u64 TitleID, const char *nandpath, u64 ReturnTo) { - if(neek2o()) - { - SYS_ResetSystem(SYS_RESTART, 0, 0); - return 1; - } memcpy((void*)0x91000000, Kernel, kernelSize); DCFlushRange((void*)0x91000000, kernelSize); free(Kernel); diff --git a/source/loader/nk.h b/source/loader/nk.h index 4073a0e8..1e20b8d7 100644 --- a/source/loader/nk.h +++ b/source/loader/nk.h @@ -27,8 +27,6 @@ extern "C" { s32 Launch_nk(u64 TitleID, const char *nandpath, u64 ReturnTo); bool Load_Neek2o_Kernel(); -void check_neek2o(void); -bool neek2o(void); /*void NKKeyCreate(u8 *TIK); void NKAESDecryptBlock(u8 *in, u8 *out);*/ diff --git a/source/loader/sys.c b/source/loader/sys.c index 7e9a46fd..c86b3b0d 100644 --- a/source/loader/sys.c +++ b/source/loader/sys.c @@ -178,7 +178,7 @@ bool Sys_HW_Access(void) if(hw_checked == true) return on_hw; - on_hw = AHBPROT_Patched() && !neek2o(); + on_hw = AHBPROT_Patched(); hw_checked = true; return on_hw; } diff --git a/source/main.cpp b/source/main.cpp index 13642964..4a7c3869 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -135,20 +135,14 @@ int main(int argc, char **argv) /* Init NAND handlers */ NandHandle.Init(); - check_neek2o(); - if(neek2o()) - NandHandle.Init_ISFS(); - else - NandHandle.LoadDefaultIOS(); /* safe reload to preferred IOS */ + NandHandle.LoadDefaultIOS(); /* safe reload to preferred IOS */ /* load and check wiiflow save for possible new IOS and Port settings */ if(InternalSave.CheckSave()) InternalSave.LoadSettings(); /* Handle (c)IOS Loading */ - if(neek2o()) /* wont reload anythin */ - iosOK = loadIOS(IOS_GetVersion(), false); - else if(useMainIOS && CustomIOS(IOS_GetType(mainIOS))) /* Requested */ + if(useMainIOS && CustomIOS(IOS_GetType(mainIOS))) /* Requested */ iosOK = loadIOS(mainIOS, false) && CustomIOS(CurrentIOS.Type); /* sys inits */ @@ -170,9 +164,9 @@ int main(int argc, char **argv) /* init configs, folders, coverflow, gui and more */ if(mainMenu.init()) { - if(CurrentIOS.Version != mainIOS && !neek2o()) + if(CurrentIOS.Version != mainIOS) { - if(useMainIOS || !DeviceHandle.UsablePartitionMounted()) + if(useMainIOS || !DeviceHandle.UsablePartitionMounted())// if useMainIOS or there's isn't a FAT or NTFS partition { useMainIOS = false; mainMenu.TempLoadIOS(); diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index d1d50c90..9db90986 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -231,10 +231,7 @@ bool CMenu::init() /* Load cIOS Map */ _installed_cios.clear(); - if(!neek2o()) - _load_installed_cioses(); - else - _installed_cios[CurrentIOS.Version] = CurrentIOS.Version; + _load_installed_cioses(); /* Path Settings */ m_dol = fmt("%s/boot.dol", m_appDir.c_str()); @@ -2603,7 +2600,7 @@ void CMenu::RemoveCover(const char *id) void CMenu::TempLoadIOS(int IOS) { /* Only temp reload in IOS58 mode */ - if(useMainIOS || neek2o()) + if(useMainIOS) return; if(IOS == IOS_TYPE_NORMAL_IOS) diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 923e23c9..ba521eeb 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -1465,7 +1465,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc) int CMenu::_loadIOS(u8 gameIOS, int userIOS, string id, bool RealNAND_Channels) { gprintf("Game ID# %s requested IOS %d. User selected %d\n", id.c_str(), gameIOS, userIOS); - if(neek2o() || (RealNAND_Channels && IOS_GetType(mainIOS) == IOS_TYPE_STUB)) + if(RealNAND_Channels && IOS_GetType(mainIOS) == IOS_TYPE_STUB) { /* doesn't use cIOS so we don't check userIOS */ bool ret = loadIOS(gameIOS, false);//load game requested IOS and patch nothing @@ -1552,7 +1552,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr) string id = string(hdr->id); /* WII_Launch is used for launching real nand channels */ - bool WII_Launch = (m_gcfg2.getBool(id, "custom", false) && (!NANDemuView || neek2o())); + bool WII_Launch = (m_gcfg2.getBool(id, "custom", false) && !NANDemuView); /* use_dol = true to use the channels dol or false to use the old apploader method to boot channel */ bool use_dol = !m_gcfg2.getBool(id, "apploader", false); @@ -1600,11 +1600,11 @@ void CMenu::_launchChannel(dir_discHdr *hdr) int userIOS = m_gcfg2.getInt(id, "ios", 0); u64 gameTitle = TITLE_ID(hdr->settings[0],hdr->settings[1]); - bool useNK2o = (m_gcfg2.getBool(id, "useneek", false) && !neek2o());//if not in neek2o and use neek is set + bool useNK2o = m_gcfg2.getBool(id, "useneek", false);//if not in neek2o and use neek is set bool use_led = m_gcfg2.getBool(id, "led", false); u32 gameIOS = ChannelHandle.GetRequestedIOS(gameTitle); - if(NANDemuView && !neek2o()) + if(NANDemuView) { /* copy real NAND sysconf, settings.txt, & RFL_DB.dat if you want to, they are replaced if they already exist */ NandHandle.PreNandCfg(m_cfg.getBool(CHANNEL_DOMAIN, "real_nand_miis", false), @@ -1619,7 +1619,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr) m_cat.save(true); m_cfg.save(true); - if(NANDemuView && !neek2o()) + if(NANDemuView) { if(useNK2o) { @@ -1657,12 +1657,12 @@ void CMenu::_launchChannel(dir_discHdr *hdr) _exitWiiflow(); } - if((CurrentIOS.Type == IOS_TYPE_D2X || neek2o()) && returnTo != 0) + if(CurrentIOS.Type == IOS_TYPE_D2X && returnTo != 0) { if(D2X_PatchReturnTo(returnTo) >= 0) memset(&returnTo, 0, sizeof(u32));// not needed - always set to 0 in external booter below } - if(NANDemuView && !neek2o()) + if(NANDemuView) { /* Enable our Emu NAND */ DeviceHandle.UnMountAll(); @@ -1705,15 +1705,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg) { string id(hdr->id); string path(hdr->path); - if(neek2o()) - { - int discID = id.c_str()[0] << 24 | id.c_str()[1] << 16 | id.c_str()[2] << 8 | id.c_str()[3]; - if(WDVD_NEEK_LoadDisc((discID&0xFFFFFFFF), 0x5D1C9EA3) > 0)//5D1C9EA3 is wii disc magic - { - dvd = true; - sleep(3); - } - } if(dvd) { @@ -1799,7 +1790,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg) else emulate_mode--; - if(emulate_mode && !dvd && !neek2o()) + if(emulate_mode && !dvd) { int emuPart = _FindEmuPart(SAVES_NAND, true); if(emuPart == -1)//if savepartition is unusable @@ -1886,7 +1877,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg) _loadFile(gameconfig, gameconfigSize, m_txtCheatDir.c_str(), "gameconfig.txt"); int userIOS = m_gcfg2.getInt(id, "ios", 0); - int gameIOS = dvd && !neek2o() ? userIOS : GetRequestedGameIOS(hdr); + int gameIOS = dvd ? userIOS : GetRequestedGameIOS(hdr); m_gcfg1.save(true); m_gcfg2.save(true); @@ -1895,7 +1886,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg) //this is a temp region change of real nand(rn) for gamesave or off or DVD if tempregionrn is set true bool patchregion = false; - if(emulate_mode <= 1 && !neek2o() && m_cfg.getBool("GENERAL", "tempregionrn", false)) + if(emulate_mode <= 1 && m_cfg.getBool("GENERAL", "tempregionrn", false)) { gprintf("Temp region change applied\n"); // change real nand region to game ID[3] region. is reset when you turn wii off. @@ -1907,7 +1898,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg) error(_t("errgame15", L"Missing ext_loader.bin or ext_booter.bin!")); _exitWiiflow(); } - if(!dvd || neek2o()) + if(!dvd) { if(_loadIOS(gameIOS, userIOS, id) == LOAD_IOS_FAILED) { diff --git a/source/menu/menu_home.cpp b/source/menu/menu_home.cpp index dbfbb7e3..3d478bb8 100644 --- a/source/menu/menu_home.cpp +++ b/source/menu/menu_home.cpp @@ -215,22 +215,19 @@ bool CMenu::_ExitTo(void) } else { - //if(m_cfg.getBool("NEEK2O", "launchwiiflow", true) && !neek2o()) + //if(m_cfg.getBool("NEEK2O", "launchwiiflow", true)) // exitHandler(EXIT_TO_WFNK2O); //else exitHandler(EXIT_TO_SMNK2O); /* if exiting to Neek2o we must set the EmuNand Path for sys_exit() in sys.c */ const char *EmuNandPath = NULL; /* but only if we are not already in neek2o mode */ - if(!neek2o()) + if(_FindEmuPart(EMU_NAND, false) >= 0)// make sure emunand exists + EmuNandPath = NandHandle.Get_NandPath(); + else { - if(_FindEmuPart(EMU_NAND, false) >= 0)// make sure emunand exists - EmuNandPath = NandHandle.Get_NandPath(); - else - { - error(_fmt("errneek1", L"Cannot launch neek2o. Verify your neek2o setup")); - _showExitTo(); - } + error(_fmt("errneek1", L"Cannot launch neek2o. Verify your neek2o setup")); + _showExitTo(); } Sys_SetNeekPath(EmuNandPath); } @@ -407,10 +404,7 @@ void CMenu::_textExitTo(void) else m_btnMgr.setText(m_homeBtnExitToPriiloader, _t("prii", L"Priiloader")); m_btnMgr.setText(m_homeBtnExitToBootmii, _t("bootmii", L"Bootmii")); - if(!neek2o()) - m_btnMgr.setText(m_homeBtnExitToNeek, _t("neek2o", L"neek2o")); - else - m_btnMgr.setText(m_homeBtnExitToNeek, _t("real", L"Real Nand")); + m_btnMgr.setText(m_homeBtnExitToNeek, _t("neek2o", L"neek2o")); } /*******************************************************************************/ diff --git a/source/menu/menu_main.cpp b/source/menu/menu_main.cpp index 678d428e..f212ea75 100644 --- a/source/menu/menu_main.cpp +++ b/source/menu/menu_main.cpp @@ -990,7 +990,7 @@ wstringEx CMenu::_getNoticeTranslation(int sorting, wstringEx curLetter) void CMenu::_setPartition(s8 direction) { - if((m_current_view == COVERFLOW_CHANNEL && neek2o()) || (m_source_cnt > 1 && !m_emuSaveNand)) + if(m_source_cnt > 1 && !m_emuSaveNand) return; int FS_Type = 0; /* change partition if direction is not zero */ diff --git a/source/menu/menu_nandemu.cpp b/source/menu/menu_nandemu.cpp index 279f1365..aff7cb34 100644 --- a/source/menu/menu_nandemu.cpp +++ b/source/menu/menu_nandemu.cpp @@ -191,8 +191,6 @@ void CMenu::_checkEmuNandSettings(void) void CMenu::_FullNandCheck(void) { - if(neek2o()) - return; for(u8 i = 0; i < 2; i++) { int emulate_mode;