Experimental Wii de Asobu release support

This commit is contained in:
Jack Andersen 2017-08-18 08:33:18 -10:00
parent bd1a1126ce
commit b1e4e1a363
4 changed files with 40 additions and 12 deletions

View File

@ -73,7 +73,7 @@ bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport
} }
m_standalone = true; m_standalone = true;
if (m_isWii && !memcmp(gameID, "R3M", 3)) if (m_isWii && (!memcmp(gameID, "R3M", 3) || !memcmp(gameID, "R3I", 3) || !memcmp(gameID, "R32", 3)))
m_standalone = false; m_standalone = false;
if (m_standalone && !checkStandaloneID(gameID)) if (m_standalone && !checkStandaloneID(gameID))

View File

@ -336,7 +336,11 @@ struct SpecMP1 : SpecBase
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
nod::Node::DirectoryIterator mp1It = root.find("MP1"); nod::Node::DirectoryIterator mp1It = root.find("MP1");
if (mp1It == root.end()) if (mp1It == root.end())
return false; {
mp1It = root.find("MP1JPN");
if (mp1It == root.end())
return false;
}
buildPaks(*mp1It, mp1args, rep); buildPaks(*mp1It, mp1args, rep);
return true; return true;

View File

@ -204,7 +204,11 @@ struct SpecMP2 : SpecBase
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
nod::Node::DirectoryIterator mp2It = root.find("MP2"); nod::Node::DirectoryIterator mp2It = root.find("MP2");
if (mp2It == root.end()) if (mp2It == root.end())
return false; {
mp2It = root.find("MP2JPN");
if (mp2It == root.end())
return false;
}
buildPaks(*mp2It, mp2args, rep); buildPaks(*mp2It, mp2args, rep);
return true; return true;

View File

@ -261,21 +261,30 @@ struct SpecMP3 : SpecBase
nod::Node& root = partition->getFSTRoot(); nod::Node& root = partition->getFSTRoot();
/* MP3 extract */ /* MP3 extract */
if (doMP3) while (doMP3)
{ {
nod::Node::DirectoryIterator dolIt = root.find("rs5mp3_p.dol"); nod::Node::DirectoryIterator dolIt = root.find("rs5mp3_p.dol");
if (dolIt == root.end()) if (dolIt == root.end())
return false; {
doMP3 = false;
break;
}
std::unique_ptr<uint8_t[]> dolBuf = dolIt->getBuf(); std::unique_ptr<uint8_t[]> dolBuf = dolIt->getBuf();
const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19; const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19;
if (!buildInfo) if (!buildInfo)
return false; {
doMP3 = false;
break;
}
/* We don't want no stinking demo dammit */ /* We don't want no stinking demo dammit */
if (!strcmp(buildInfo, "Build v3.068 3/2/2006 14:55:13")) if (!strcmp(buildInfo, "Build v3.068 3/2/2006 14:55:13"))
return false; {
doMP3 = false;
break;
}
/* Root Report */ /* Root Report */
reps.emplace_back(); reps.emplace_back();
@ -291,16 +300,23 @@ struct SpecMP3 : SpecBase
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
nod::Node::DirectoryIterator mp3It = root.find("MP3"); nod::Node::DirectoryIterator mp3It = root.find("MP3");
if (mp3It == root.end()) if (mp3It == root.end())
return false; {
doMP3 = false;
break;
}
buildPaks(*mp3It, mp3args, rep, false); buildPaks(*mp3It, mp3args, rep, false);
break;
} }
/* MPT Frontend extract */ /* MPT Frontend extract */
if (doMPTFE) while (doMPTFE)
{ {
nod::Node::DirectoryIterator dolIt = root.find("rs5fe_p.dol"); nod::Node::DirectoryIterator dolIt = root.find("rs5fe_p.dol");
if (dolIt == root.end()) if (dolIt == root.end())
return false; {
doMPTFE = false;
break;
}
std::unique_ptr<uint8_t[]> dolBuf = dolIt->getBuf(); std::unique_ptr<uint8_t[]> dolBuf = dolIt->getBuf();
const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19; const char* buildInfo = (char*)memmem(dolBuf.get(), dolIt->size(), "MetroidBuildInfo", 16) + 19;
@ -320,11 +336,15 @@ struct SpecMP3 : SpecBase
/* Iterate PAKs and build level options */ /* Iterate PAKs and build level options */
nod::Node::DirectoryIterator feIt = root.find("fe"); nod::Node::DirectoryIterator feIt = root.find("fe");
if (feIt == root.end()) if (feIt == root.end())
return false; {
doMPTFE = false;
break;
}
buildPaks(*feIt, feargs, rep, true); buildPaks(*feIt, feargs, rep, true);
break;
} }
return true; return doMP3 || doMPTFE;
} }
bool extractFromDisc(nod::DiscBase&, bool force, FProgress progress) bool extractFromDisc(nod::DiscBase&, bool force, FProgress progress)