DirectoryBlob: Rename DISKHEADERINFO_ADDRESS to BI2_ADDRESS
Because DISKHEADERINFO is too easy confuse with DISKHEADER. Also adding BI2_SIZE and DISKHEADER_SIZE contants.
This commit is contained in:
parent
975b2b40fa
commit
8afa230787
|
@ -43,8 +43,10 @@ constexpr u8 ENTRY_SIZE = 0x0c;
|
||||||
constexpr u8 FILE_ENTRY = 0;
|
constexpr u8 FILE_ENTRY = 0;
|
||||||
constexpr u8 DIRECTORY_ENTRY = 1;
|
constexpr u8 DIRECTORY_ENTRY = 1;
|
||||||
constexpr u64 DISKHEADER_ADDRESS = 0;
|
constexpr u64 DISKHEADER_ADDRESS = 0;
|
||||||
|
constexpr u64 DISKHEADER_SIZE = 0x440;
|
||||||
constexpr u64 NONPARTITION_DISKHEADER_SIZE = 0x100;
|
constexpr u64 NONPARTITION_DISKHEADER_SIZE = 0x100;
|
||||||
constexpr u64 DISKHEADERINFO_ADDRESS = 0x440;
|
constexpr u64 BI2_ADDRESS = 0x440;
|
||||||
|
constexpr u64 BI2_SIZE = 0x2000;
|
||||||
constexpr u64 APPLOADER_ADDRESS = 0x2440;
|
constexpr u64 APPLOADER_ADDRESS = 0x2440;
|
||||||
|
|
||||||
constexpr u64 GAME_PARTITION_ADDRESS = 0x50000;
|
constexpr u64 GAME_PARTITION_ADDRESS = 0x50000;
|
||||||
|
@ -159,7 +161,7 @@ std::unique_ptr<DirectoryBlobReader> DirectoryBlobReader::Create(const std::stri
|
||||||
|
|
||||||
DirectoryBlobReader::DirectoryBlobReader(const std::string& root_directory)
|
DirectoryBlobReader::DirectoryBlobReader(const std::string& root_directory)
|
||||||
: m_root_directory(root_directory), m_data_start_address(UINT64_MAX),
|
: m_root_directory(root_directory), m_data_start_address(UINT64_MAX),
|
||||||
m_disk_header(DISKHEADERINFO_ADDRESS), m_fst_address(0), m_dol_address(0)
|
m_disk_header(DISKHEADER_SIZE), m_fst_address(0), m_dol_address(0)
|
||||||
{
|
{
|
||||||
SetDiscHeaderAndDiscType();
|
SetDiscHeaderAndDiscType();
|
||||||
|
|
||||||
|
@ -169,9 +171,8 @@ DirectoryBlobReader::DirectoryBlobReader(const std::string& root_directory)
|
||||||
|
|
||||||
BuildFST();
|
BuildFST();
|
||||||
|
|
||||||
m_virtual_disc.emplace(DISKHEADER_ADDRESS, DISKHEADERINFO_ADDRESS, m_disk_header.data());
|
m_virtual_disc.emplace(DISKHEADER_ADDRESS, DISKHEADER_SIZE, m_disk_header.data());
|
||||||
AddFileToContents(&m_virtual_disc, m_root_directory + "sys/bi2.bin", DISKHEADERINFO_ADDRESS,
|
AddFileToContents(&m_virtual_disc, m_root_directory + "sys/bi2.bin", BI2_ADDRESS, BI2_SIZE);
|
||||||
APPLOADER_ADDRESS - DISKHEADERINFO_ADDRESS);
|
|
||||||
m_virtual_disc.emplace(APPLOADER_ADDRESS, m_apploader.size(), m_apploader.data());
|
m_virtual_disc.emplace(APPLOADER_ADDRESS, m_apploader.size(), m_apploader.data());
|
||||||
m_virtual_disc.emplace(m_fst_address, m_fst_data.size(), m_fst_data.data());
|
m_virtual_disc.emplace(m_fst_address, m_fst_data.size(), m_fst_data.data());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue