-fixed regular neek2o usage (untested)

This commit is contained in:
fix94.1 2012-10-15 05:12:18 +00:00
parent a38e80ee28
commit 8f79a359ea
3 changed files with 16 additions and 11 deletions

View File

@ -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();

View File

@ -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;
}

View File

@ -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;