diff --git a/source/channel/nand.cpp b/source/channel/nand.cpp index f69c3587..2966e11b 100644 --- a/source/channel/nand.cpp +++ b/source/channel/nand.cpp @@ -1057,6 +1057,7 @@ void Nand::Enable_ISFS_Patches(void) { if(AHBRPOT_Patched()) { + gprintf("Enabling ISFS Patches\n"); // Disable memory protection write16(MEM_PROT, 0); // Do patches @@ -1071,6 +1072,7 @@ void Nand::Disable_ISFS_Patches(void) { if(AHBRPOT_Patched()) { + gprintf("Disabling ISFS Patches\n"); // Disable memory protection write16(MEM_PROT, 0); // Do patches @@ -1082,15 +1084,15 @@ void Nand::Disable_ISFS_Patches(void) void Nand::Init_ISFS() { - //gprintf("Init ISFS\n"); + gprintf("Init ISFS\n"); + ISFS_Initialize(); if(IOS_GetVersion() == 58 && !neek2o()) Enable_ISFS_Patches(); - ISFS_Initialize(); } void Nand::DeInit_ISFS() { - //gprintf("Deinit ISFS\n"); + gprintf("Deinit ISFS\n"); ISFS_Deinitialize(); if(IOS_GetVersion() == 58 && !neek2o()) Disable_ISFS_Patches(); diff --git a/source/loader/nk.c b/source/loader/nk.c index b3580734..2b6a2ec7 100644 --- a/source/loader/nk.c +++ b/source/loader/nk.c @@ -45,6 +45,11 @@ bool neek2o(void) s32 ESHandle = IOS_Open("/dev/es", 0); neek = IOS_Ioctlv(ESHandle, 0xA2, 0, 0, NULL) == 0x666c6f77; IOS_Close(ESHandle); + if(!neek) + { + u32 num = 0; + neek = (ISFS_ReadDir("/sneek", NULL, &num) == 0); + } gprintf("WiiFlow is in %s mode\n", neek ? "neek2o" : "real nand"); checked = true; } diff --git a/source/main.cpp b/source/main.cpp index 63e24195..89539b7e 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -29,16 +29,14 @@ int main(int argc, char **argv) { mainIOS = DOL_MAIN_IOS; __exception_setreload(5); - InitGecko(); - - // Init video - m_vid.init(); - - DeviceHandle.Init(); - Nand::Instance()->Init_ISFS(); - MEM_init(); //Inits both mem1lo and mem2 + InitGecko(); //USB Gecko and SD buffer gprintf(" \nWelcome to %s (%s-r%s)!\nThis is the debug output.\n", APP_NAME, APP_VERSION, SVN_REV); + m_vid.init(); // Init video + Nand::Instance()->Init_ISFS(); //Just init ISFS, no patches yet + MEM_init(); //Inits both mem1lo and mem2 + DeviceHandle.Init(); + char *gameid = NULL; bool Emulator_boot = false; bool iosOK = false;