mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-08-19 08:49:23 +00:00
Add system application title ID
This commit is contained in:
parent
7cd102f2da
commit
a14867c613
1 changed files with 4 additions and 1 deletions
|
@ -75,6 +75,7 @@ std::optional<u32> NCCHArchive::readFile(FileSession* file, u64 offset, u32 size
|
|||
const u32 highProgramID = *(u32*)&archivePath[4];
|
||||
|
||||
// High Title ID of the archive (from Citra). https://3dbrew.org/wiki/Title_list.
|
||||
constexpr u32 systemApplication = 0x00040010;
|
||||
constexpr u32 sharedDataArchive = 0x0004009B;
|
||||
constexpr u32 systemDataArchive = 0x000400DB;
|
||||
|
||||
|
@ -85,7 +86,9 @@ std::optional<u32> NCCHArchive::readFile(FileSession* file, u64 offset, u32 size
|
|||
constexpr u32 sharedFont = 0x00014002;
|
||||
std::vector<u8> fileData;
|
||||
|
||||
if (highProgramID == sharedDataArchive) {
|
||||
if (highProgramID == systemApplication) {
|
||||
Helpers::panic("[NCCH archive] Read from system application. ID: %08X", lowProgramID);
|
||||
} else if (highProgramID == sharedDataArchive) {
|
||||
if (lowProgramID == miiData) fileData = std::vector<u8>(std::begin(MII_DATA), std::end(MII_DATA));
|
||||
else if (lowProgramID == regionManifest) fileData = std::vector<u8>(std::begin(COUNTRY_LIST_DATA), std::end(COUNTRY_LIST_DATA));
|
||||
else Helpers::panic("[NCCH archive] Read unimplemented NAND file. ID: %08X", lowProgramID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue