mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 10:45:28 +00:00
Updated to latest libnintendo-hac.
This commit is contained in:
parent
d005ff6149
commit
064ee91246
2
deps/libnintendo-hac
vendored
2
deps/libnintendo-hac
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 236726839ca796ea88838fe80730b38b6957be98
|
||||
Subproject commit 9f2314ad98579490cae8832d59ca41f4b483ed8d
|
|
@ -65,7 +65,7 @@ void CnmtProcess::displayCnmt()
|
|||
std::cout << "[ContentMeta]" << std::endl;
|
||||
std::cout << " TitleId: 0x" << std::hex << std::setw(16) << std::setfill('0') << mCnmt.getTitleId() << std::endl;
|
||||
std::cout << " Version: v" << std::dec << mCnmt.getTitleVersion() << " (" << _SPLIT_VER(mCnmt.getTitleVersion()) << ")"<< std::endl;
|
||||
std::cout << " Type: " << nn::hac::ContentMetaUtil::getContentMetaTypeAsString(mCnmt.getContentMetaType()) << " (" << std::dec << mCnmt.getContentMetaType() << ")" << std::endl;
|
||||
std::cout << " Type: " << nn::hac::ContentMetaUtil::getContentMetaTypeAsString(mCnmt.getContentMetaType()) << " (" << std::dec << (uint32_t)mCnmt.getContentMetaType() << ")" << std::endl;
|
||||
std::cout << " Attributes: 0x" << std::hex << (uint32_t)mCnmt.getAttributes() << std::endl;
|
||||
if (mCnmt.getAttributes() != 0)
|
||||
{
|
||||
|
@ -80,22 +80,22 @@ void CnmtProcess::displayCnmt()
|
|||
std::cout << " RequiredDownloadSystemVersion: v" << mCnmt.getRequiredDownloadSystemVersion() << " (" << _SPLIT_VER(mCnmt.getRequiredDownloadSystemVersion()) << ")"<< std::endl;
|
||||
switch(mCnmt.getContentMetaType())
|
||||
{
|
||||
case (nn::hac::cnmt::METATYPE_APPLICATION):
|
||||
case (nn::hac::cnmt::ContentMetaType::Application):
|
||||
std::cout << " ApplicationExtendedHeader:" << std::endl;
|
||||
std::cout << " RequiredSystemVersion: v" << std::dec << mCnmt.getApplicationMetaExtendedHeader().getRequiredSystemVersion() << " (" << _SPLIT_VER(mCnmt.getApplicationMetaExtendedHeader().getRequiredSystemVersion()) << ")"<< std::endl;
|
||||
std::cout << " PatchId: 0x" << std::hex << std::setw(16) << std::setfill('0') << mCnmt.getApplicationMetaExtendedHeader().getPatchId() << std::endl;
|
||||
break;
|
||||
case (nn::hac::cnmt::METATYPE_PATCH):
|
||||
case (nn::hac::cnmt::ContentMetaType::Patch):
|
||||
std::cout << " PatchMetaExtendedHeader:" << std::endl;
|
||||
std::cout << " RequiredSystemVersion: v" << std::dec << mCnmt.getPatchMetaExtendedHeader().getRequiredSystemVersion() << " (" << _SPLIT_VER(mCnmt.getPatchMetaExtendedHeader().getRequiredSystemVersion()) << ")"<< std::endl;
|
||||
std::cout << " ApplicationId: 0x" << std::hex << std::setw(16) << std::setfill('0') << mCnmt.getPatchMetaExtendedHeader().getApplicationId() << std::endl;
|
||||
break;
|
||||
case (nn::hac::cnmt::METATYPE_ADD_ON_CONTENT):
|
||||
case (nn::hac::cnmt::ContentMetaType::AddOnContent):
|
||||
std::cout << " AddOnContentMetaExtendedHeader:" << std::endl;
|
||||
std::cout << " RequiredApplicationVersion: v" << std::dec << mCnmt.getAddOnContentMetaExtendedHeader().getRequiredApplicationVersion() << " (" << _SPLIT_VER(mCnmt.getAddOnContentMetaExtendedHeader().getRequiredApplicationVersion()) << ")" << std::endl;
|
||||
std::cout << " ApplicationId: 0x" << std::hex << std::setw(16) << std::setfill('0') << mCnmt.getAddOnContentMetaExtendedHeader().getApplicationId() << std::endl;
|
||||
break;
|
||||
case (nn::hac::cnmt::METATYPE_DELTA):
|
||||
case (nn::hac::cnmt::ContentMetaType::Delta):
|
||||
std::cout << " DeltaMetaExtendedHeader:" << std::endl;
|
||||
std::cout << " ApplicationId: 0x" << std::hex << std::setw(16) << std::setfill('0') << mCnmt.getDeltaMetaExtendedHeader().getApplicationId() << std::endl;
|
||||
break;
|
||||
|
@ -109,7 +109,7 @@ void CnmtProcess::displayCnmt()
|
|||
{
|
||||
const nn::hac::ContentInfo& info = mCnmt.getContentInfo()[i];
|
||||
std::cout << " " << std::dec << i << std::endl;
|
||||
std::cout << " Type: " << nn::hac::ContentMetaUtil::getContentTypeAsString(info.getContentType()) << " (" << std::dec << info.getContentType() << ")" << std::endl;
|
||||
std::cout << " Type: " << nn::hac::ContentMetaUtil::getContentTypeAsString(info.getContentType()) << " (" << std::dec << (uint32_t)info.getContentType() << ")" << std::endl;
|
||||
std::cout << " Id: " << fnd::SimpleTextOutput::arrayToString(info.getContentId().data, nn::hac::cnmt::kContentIdLen, false, "") << std::endl;
|
||||
std::cout << " Size: 0x" << std::hex << info.getContentSize() << std::endl;
|
||||
std::cout << " Hash: " << fnd::SimpleTextOutput::arrayToString(info.getContentHash().bytes, sizeof(info.getContentHash()), false, "") << std::endl;
|
||||
|
@ -124,7 +124,7 @@ void CnmtProcess::displayCnmt()
|
|||
std::cout << " " << std::dec << i << std::endl;
|
||||
std::cout << " Id: 0x" << std::hex << std::setw(16) << std::setfill('0') << info.getTitleId() << std::endl;
|
||||
std::cout << " Version: v" << std::dec << info.getTitleVersion() << " (" << _SPLIT_VER(info.getTitleVersion()) << ")"<< std::endl;
|
||||
std::cout << " Type: " << nn::hac::ContentMetaUtil::getContentMetaTypeAsString(info.getContentMetaType()) << " (" << std::dec << info.getContentMetaType() << ")" << std::endl;
|
||||
std::cout << " Type: " << nn::hac::ContentMetaUtil::getContentMetaTypeAsString(info.getContentMetaType()) << " (" << std::dec << (uint32_t)info.getContentMetaType() << ")" << std::endl;
|
||||
std::cout << " Attributes: 0x" << std::hex << (uint32_t)info.getAttributes() << std::endl;
|
||||
if (info.getAttributes() != 0)
|
||||
{
|
||||
|
|
|
@ -758,13 +758,13 @@ bool UserSettings::determineValidCnmtFromSample(const fnd::Vec<byte_t>& sample)
|
|||
if (sample.size() < minimum_size)
|
||||
return false;
|
||||
|
||||
if (data->type == nn::hac::cnmt::METATYPE_APPLICATION)
|
||||
if (data->type == (byte_t)nn::hac::cnmt::ContentMetaType::Application)
|
||||
{
|
||||
const nn::hac::sApplicationMetaExtendedHeader* meta = (const nn::hac::sApplicationMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
|
||||
if ((meta->patch_id.get() & data->id.get()) != data->id.get())
|
||||
return false;
|
||||
}
|
||||
else if (data->type == nn::hac::cnmt::METATYPE_PATCH)
|
||||
else if (data->type == (byte_t)nn::hac::cnmt::ContentMetaType::Patch)
|
||||
{
|
||||
const nn::hac::sPatchMetaExtendedHeader* meta = (const nn::hac::sPatchMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
|
||||
if ((meta->application_id.get() & data->id.get()) != meta->application_id.get())
|
||||
|
@ -772,13 +772,13 @@ bool UserSettings::determineValidCnmtFromSample(const fnd::Vec<byte_t>& sample)
|
|||
|
||||
minimum_size += meta->extended_data_size.get();
|
||||
}
|
||||
else if (data->type == nn::hac::cnmt::METATYPE_ADD_ON_CONTENT)
|
||||
else if (data->type == (byte_t)nn::hac::cnmt::ContentMetaType::AddOnContent)
|
||||
{
|
||||
const nn::hac::sAddOnContentMetaExtendedHeader* meta = (const nn::hac::sAddOnContentMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
|
||||
if ((meta->application_id.get() & data->id.get()) != meta->application_id.get())
|
||||
return false;
|
||||
}
|
||||
else if (data->type == nn::hac::cnmt::METATYPE_DELTA)
|
||||
else if (data->type == (byte_t)nn::hac::cnmt::ContentMetaType::Delta)
|
||||
{
|
||||
const nn::hac::sDeltaMetaExtendedHeader* meta = (const nn::hac::sDeltaMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
|
||||
if ((meta->application_id.get() & data->id.get()) != meta->application_id.get())
|
||||
|
|
Loading…
Reference in a new issue