Use ESFormats for TMDs
We already have a TMDReader, so let's actually use it. And move ESFormats to IOS::ES, since it's definitely part of IOS. This adds a DiscIO dependency on Core which will be fixed in a follow-up PR.
This commit is contained in:
1 parent
bf1f70db0a
commit
c1a139e8ac
26 files changed
+337
-356
No files matched your search
@@ -102,7 +102,7 @@ bool CBoot::FindMapFile(std::string* existing_map_file, std::string* writable_ma
|
||||
DiscIO::CNANDContentManager::Access().GetNANDLoader(_StartupPara.m_strFilename);
|
||||
if (Loader.IsValid())
|
||||
{
|
||||
u64 TitleID = Loader.GetTitleID();
|
||||
u64 TitleID = Loader.GetTMD().GetTitleId();
|
||||
title_id_str = StringFromFormat("%08X_%08X", (u32)(TitleID >> 32) & 0xFFFFFFFF,
|
||||
(u32)TitleID & 0xFFFFFFFF);
|
||||
}
|
||||
@@ -278,11 +278,7 @@ bool CBoot::BootUp()
|
||||
PanicAlertT("Warning - starting ISO in wrong console mode!");
|
||||
}
|
||||
|
||||
std::vector<u8> tmd_buffer = pVolume.GetTMD();
|
||||
if (!tmd_buffer.empty())
|
||||
{
|
||||
IOS::HLE::ES_DIVerify(tmd_buffer);
|
||||
}
|
||||
IOS::HLE::ES_DIVerify(pVolume.GetTMD());
|
||||
|
||||
_StartupPara.bWii = pVolume.GetVolumeType() == DiscIO::Platform::WII_DISC;
|
||||
|
||||
|
||||
@@ -346,11 +346,9 @@ bool CBoot::EmulatedBS2_Wii()
|
||||
|
||||
PowerPC::ppcState.gpr[1] = 0x816ffff0; // StackPointer
|
||||
|
||||
std::vector<u8> tmd = DVDInterface::GetVolume().GetTMD();
|
||||
IOS::ES::TMDReader tmd = DVDInterface::GetVolume().GetTMD();
|
||||
|
||||
ES::TMDReader tmd_reader{std::move(tmd)};
|
||||
|
||||
if (!SetupWiiMemory(tmd_reader.GetIOSId()))
|
||||
if (!SetupWiiMemory(tmd.GetIOSId()))
|
||||
return false;
|
||||
|
||||
// Execute the apploader
|
||||
|
||||
@@ -78,7 +78,7 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||
if (!ContentLoader.IsValid())
|
||||
return false;
|
||||
|
||||
u64 titleID = ContentLoader.GetTitleID();
|
||||
u64 titleID = ContentLoader.GetTMD().GetTitleId();
|
||||
// create data directory
|
||||
File::CreateFullPath(Common::GetTitleDataPath(titleID, Common::FROM_SESSION_ROOT));
|
||||
|
||||
@@ -86,12 +86,11 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||
IOS::HLE::CreateVirtualFATFilesystem();
|
||||
// setup Wii memory
|
||||
|
||||
u64 ios_title_id = 0x0000000100000000ULL | ContentLoader.GetIosVersion();
|
||||
if (!SetupWiiMemory(ios_title_id))
|
||||
if (!SetupWiiMemory(ContentLoader.GetTMD().GetIOSId()))
|
||||
return false;
|
||||
// DOL
|
||||
const DiscIO::SNANDContent* pContent =
|
||||
ContentLoader.GetContentByIndex(ContentLoader.GetBootIndex());
|
||||
ContentLoader.GetContentByIndex(ContentLoader.GetTMD().GetBootIndex());
|
||||
if (pContent == nullptr)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user