DirectoryBlob: Split out setting BI2 to new function

This commit is contained in:
JosJuice 2017-06-10 13:20:23 +02:00
parent 2ea0a1a086
commit ab4762c4c2
2 changed files with 9 additions and 5 deletions

View File

@ -156,11 +156,7 @@ DirectoryBlobReader::DirectoryBlobReader(const std::string& root_directory)
: m_root_directory(root_directory)
{
SetDiscHeaderAndDiscType();
constexpr u64 BI2_ADDRESS = 0x440;
constexpr u64 BI2_SIZE = 0x2000;
AddFileToContents(&m_virtual_disc, m_root_directory + "sys/bi2.bin", BI2_ADDRESS, BI2_SIZE);
SetBI2();
BuildFST(SetDOL(SetApploader()));
if (m_is_wii)
@ -282,6 +278,13 @@ void DirectoryBlobReader::SetDiscHeaderAndDiscType()
}
}
void DirectoryBlobReader::SetBI2()
{
constexpr u64 BI2_ADDRESS = 0x440;
constexpr u64 BI2_SIZE = 0x2000;
AddFileToContents(&m_virtual_disc, m_root_directory + "sys/bi2.bin", BI2_ADDRESS, BI2_SIZE);
}
void DirectoryBlobReader::SetPartitionTable()
{
constexpr u64 PARTITION_TABLE_ADDRESS = 0x40000;

View File

@ -77,6 +77,7 @@ private:
bool ReadInternal(u64 offset, u64 length, u8* buffer, const std::set<DiscContent>& contents);
void SetDiscHeaderAndDiscType();
void SetBI2();
void SetPartitionTable();
void SetWiiRegionData();
void SetTMDAndTicket();