mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-removed neek2o mode. meaning wiiflow will no longer work in neek2o environment. launching channels in neek2o still works.
This commit is contained in:
parent
c5168d89aa
commit
0888312372
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);*/
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -135,10 +135,6 @@ 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 */
|
||||
|
||||
/* load and check wiiflow save for possible new IOS and Port settings */
|
||||
@ -146,9 +142,7 @@ int main(int argc, char **argv)
|
||||
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();
|
||||
|
@ -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;
|
||||
|
||||
/* 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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -215,15 +215,13 @@ 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
|
||||
@ -231,7 +229,6 @@ bool CMenu::_ExitTo(void)
|
||||
error(_fmt("errneek1", L"Cannot launch neek2o. Verify your neek2o setup"));
|
||||
_showExitTo();
|
||||
}
|
||||
}
|
||||
Sys_SetNeekPath(EmuNandPath);
|
||||
}
|
||||
break;
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user