-fixed nand emulation partition set for d2x v8 properly now

-wasted 3 hours finding this stupid bug
This commit is contained in:
fix94.1 2012-01-27 19:38:52 +00:00
parent 8c18d1fa3c
commit cc76da97e1
3 changed files with 25 additions and 12 deletions

View File

@ -42,16 +42,12 @@ static u32 allowedBases[] = { 37, 38, 53, 55, 56, 57, 58 };
/* Check if the cIOS is a D2X. */ /* Check if the cIOS is a D2X. */
bool cIOSInfo::D2X(u8 ios, u8 *base) bool cIOSInfo::D2X(u8 ios, u8 *base)
{ {
bool ret = false;
iosinfo_t *info = GetInfo(ios); iosinfo_t *info = GetInfo(ios);
if(info != NULL) if(!info)
{ return false;
*base = (u8)info->baseios; *base = (u8)info->baseios;
SAFE_FREE(info); SAFE_FREE(info);
ret = true; return true;
}
return ret;
} }
/* /*

View File

@ -1,6 +1,10 @@
#include "menu.hpp" #include "menu.hpp"
#include "nand.hpp"
#include "sys.h" #include "sys.h"
#include "loader/cios.hpp"
#include "loader/alt_ios.h"
#include "gecko/gecko.h"
using namespace std; using namespace std;
@ -186,7 +190,12 @@ int CMenu::_config1(void)
bool disable = m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool("NAND", "disable", true); bool disable = m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool("NAND", "disable", true);
if(!disable) if(!disable)
{ {
bool isD2XnewerThanV6 = IOS_GetRevision() % 100 > 6; Nand::Instance()->Disable_Emu();
bool isD2XnewerThanV6 = false;
iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
if (iosInfo->version > 6)
isD2XnewerThanV6 = true;
Nand::Instance()->Enable_Emu();
u8 limiter = 0; u8 limiter = 0;
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
currentPartition = loopNum(currentPartition + direction, (int)USB8); currentPartition = loopNum(currentPartition + direction, (int)USB8);

View File

@ -1,5 +1,6 @@
#include "menu.hpp" #include "menu.hpp"
#include "nand.hpp"
#include "loader/wdvd.h" #include "loader/wdvd.h"
#include "network/gcard.h" #include "network/gcard.h"
#include "DeviceHandler.hpp" #include "DeviceHandler.hpp"
@ -11,6 +12,8 @@
#include "gecko.h" #include "gecko.h"
#include "sys.h" #include "sys.h"
#include "disc.h" #include "disc.h"
#include "loader/cios.hpp"
#include "loader/alt_ios.h"
using namespace std; using namespace std;
@ -329,7 +332,12 @@ int CMenu::main(void)
_showWaitMessage(); _showWaitMessage();
_hideMain(); _hideMain();
bool isD2XnewerThanV6 = IOS_GetRevision() % 100 > 6; Nand::Instance()->Disable_Emu();
bool isD2XnewerThanV6 = false;
iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
if (iosInfo->version > 6)
isD2XnewerThanV6 = true;
Nand::Instance()->Enable_Emu();
u8 limiter = 0; u8 limiter = 0;
currentPartition = loopNum(currentPartition + 1, (int)USB8); currentPartition = loopNum(currentPartition + 1, (int)USB8);
while(!DeviceHandler::Instance()->IsInserted(currentPartition) || while(!DeviceHandler::Instance()->IsInserted(currentPartition) ||