aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-05-09 05:27:33 +0200
committercrueter <crueter@eden-emu.dev>2026-05-09 05:27:33 +0200
commitf87b1dafc83d50b7e363409444a9a2a8fdff76cb (patch)
tree7b7ea7aadd79e1dcc83172421a8a2c945090d276 /src
parent707e8afb2917c7652dbe006961ba8ae735cd79d8 (diff)
[file_sys/sytem_archive] add missing identifiers for +8.0 (#3867)
Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3867 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/system_archive/system_archive.cpp138
1 files changed, 64 insertions, 74 deletions
diff --git a/src/core/file_sys/system_archive/system_archive.cpp b/src/core/file_sys/system_archive/system_archive.cpp
index cb68d5b55e..bbdf27039b 100644
--- a/src/core/file_sys/system_archive/system_archive.cpp
+++ b/src/core/file_sys/system_archive/system_archive.cpp
@@ -15,86 +15,76 @@
namespace FileSys::SystemArchive {
-constexpr u64 SYSTEM_ARCHIVE_BASE_TITLE_ID = 0x0100000000000800;
-constexpr std::size_t SYSTEM_ARCHIVE_COUNT = 0x28;
-
-using SystemArchiveSupplier = VirtualDir (*)();
-
struct SystemArchiveDescriptor {
- u64 title_id;
const char* name;
- SystemArchiveSupplier supplier;
+ VirtualDir (*supplier)();
};
-constexpr std::array<SystemArchiveDescriptor, SYSTEM_ARCHIVE_COUNT> SYSTEM_ARCHIVES{{
- {0x0100000000000800, "CertStore", nullptr},
- {0x0100000000000801, "ErrorMessage", nullptr},
- {0x0100000000000802, "MiiModel", &MiiModel},
- {0x0100000000000803, "BrowserDll", nullptr},
- {0x0100000000000804, "Help", nullptr},
- {0x0100000000000805, "SharedFont", nullptr},
- {0x0100000000000806, "NgWord", &NgWord1},
- {0x0100000000000807, "SsidList", nullptr},
- {0x0100000000000808, "Dictionary", nullptr},
- {0x0100000000000809, "SystemVersion", &SystemVersion},
- {0x010000000000080A, "AvatarImage", nullptr},
- {0x010000000000080B, "LocalNews", nullptr},
- {0x010000000000080C, "Eula", nullptr},
- {0x010000000000080D, "UrlBlackList", nullptr},
- {0x010000000000080E, "TimeZoneBinary", &TimeZoneBinary},
- {0x010000000000080F, "CertStoreCruiser", nullptr},
- {0x0100000000000810, "FontNintendoExtension", &FontNintendoExtension},
- {0x0100000000000811, "FontStandard", &FontStandard},
- {0x0100000000000812, "FontKorean", &FontKorean},
- {0x0100000000000813, "FontChineseTraditional", &FontChineseTraditional},
- {0x0100000000000814, "FontChineseSimple", &FontChineseSimple},
- {0x0100000000000815, "FontBfcpx", nullptr},
- {0x0100000000000816, "SystemUpdate", nullptr},
- {0x0100000000000817, "0100000000000817", nullptr},
- {0x0100000000000818, "FirmwareDebugSettings", nullptr},
- {0x0100000000000819, "BootImagePackage", nullptr},
- {0x010000000000081A, "BootImagePackageSafe", nullptr},
- {0x010000000000081B, "BootImagePackageExFat", nullptr},
- {0x010000000000081C, "BootImagePackageExFatSafe", nullptr},
- {0x010000000000081D, "FatalMessage", nullptr},
- {0x010000000000081E, "ControllerIcon", nullptr},
- {0x010000000000081F, "PlatformConfigIcosa", nullptr},
- {0x0100000000000820, "PlatformConfigCopper", nullptr},
- {0x0100000000000821, "PlatformConfigHoag", nullptr},
- {0x0100000000000822, "ControllerFirmware", nullptr},
- {0x0100000000000823, "NgWord2", &NgWord2},
- {0x0100000000000824, "PlatformConfigIcosaMariko", nullptr},
- {0x0100000000000825, "ApplicationBlackList", nullptr},
- {0x0100000000000826, "RebootlessSystemUpdateVersion", nullptr},
- {0x0100000000000827, "ContentActionTable", nullptr},
-}};
-
-VirtualFile SynthesizeSystemArchive(const u64 title_id) {
- if (title_id < SYSTEM_ARCHIVES.front().title_id || title_id > SYSTEM_ARCHIVES.back().title_id) {
- return nullptr;
- }
-
- const auto& desc = SYSTEM_ARCHIVES[title_id - SYSTEM_ARCHIVE_BASE_TITLE_ID];
-
- LOG_INFO(Service_FS, "Synthesizing system archive '{}' (0x{:016X}).", desc.name, desc.title_id);
-
- if (desc.supplier == nullptr) {
- return nullptr;
+constexpr inline SystemArchiveDescriptor GetSystemArchive(u64 title_id) {
+ switch (title_id) {
+ case 0x0100000000000800: return {"CertStore", nullptr};
+ case 0x0100000000000801: return {"ErrorMessage", nullptr};
+ case 0x0100000000000802: return {"MiiModel", &MiiModel};
+ case 0x0100000000000803: return {"BrowserDll", nullptr};
+ case 0x0100000000000804: return {"Help", nullptr};
+ case 0x0100000000000805: return {"SharedFont", nullptr};
+ case 0x0100000000000806: return {"NgWord", &NgWord1};
+ case 0x0100000000000807: return {"SsidList", nullptr};
+ case 0x0100000000000808: return {"Dictionary", nullptr};
+ case 0x0100000000000809: return {"SystemVersion", &SystemVersion};
+ case 0x010000000000080A: return {"AvatarImage", nullptr};
+ case 0x010000000000080B: return {"LocalNews", nullptr};
+ case 0x010000000000080C: return {"Eula", nullptr};
+ case 0x010000000000080D: return {"UrlBlackList", nullptr};
+ case 0x010000000000080E: return {"TimeZoneBinary", &TimeZoneBinary};
+ case 0x010000000000080F: return {"CertStoreCruiser", nullptr};
+ case 0x0100000000000810: return {"FontNintendoExtension", &FontNintendoExtension};
+ case 0x0100000000000811: return {"FontStandard", &FontStandard};
+ case 0x0100000000000812: return {"FontKorean", &FontKorean};
+ case 0x0100000000000813: return {"FontChineseTraditional", &FontChineseTraditional};
+ case 0x0100000000000814: return {"FontChineseSimple", &FontChineseSimple};
+ case 0x0100000000000815: return {"FontBfcpx", nullptr};
+ case 0x0100000000000816: return {"SystemUpdate", nullptr};
+ case 0x0100000000000817: return {"0100000000000817", nullptr};
+ case 0x0100000000000818: return {"FirmwareDebugSettings", nullptr};
+ case 0x0100000000000819: return {"BootImagePackage", nullptr};
+ case 0x010000000000081A: return {"BootImagePackageSafe", nullptr};
+ case 0x010000000000081B: return {"BootImagePackageExFat", nullptr};
+ case 0x010000000000081C: return {"BootImagePackageExFatSafe", nullptr};
+ case 0x010000000000081D: return {"FatalMessage", nullptr};
+ case 0x010000000000081E: return {"ControllerIcon", nullptr};
+ case 0x010000000000081F: return {"PlatformConfigIcosa", nullptr};
+ case 0x0100000000000820: return {"PlatformConfigCopper", nullptr};
+ case 0x0100000000000821: return {"PlatformConfigHoag", nullptr};
+ case 0x0100000000000822: return {"ControllerFirmware", nullptr};
+ case 0x0100000000000823: return {"NgWord2", &NgWord2};
+ case 0x0100000000000824: return {"PlatformConfigIcosaMariko", nullptr};
+ case 0x0100000000000825: return {"ApplicationBlackList", nullptr};
+ case 0x0100000000000826: return {"RebootlessSystemUpdateVersion", nullptr};
+ case 0x0100000000000827: return {"ContentActionTable", nullptr};
+ case 0x0100000000000828: return {"FunctionBlackList", nullptr};
+ case 0x0100000000000829: return {"PlatformConfigCalcio", nullptr};
+ case 0x0100000000000830: return {"NgWordT", nullptr};
+ case 0x0100000000000831: return {"PlatformConfigAula", nullptr};
+ case 0x0100000000000832: return {"CradleFirmware", nullptr};
+ case 0x0100000000000835: return {"ErrorMessageUtf8", nullptr};
+ case 0x0100000000000859: return {"ClientCertData", nullptr};
+ case 0x010000000000085C: return {"GameCardConfigurationData", nullptr};
+ default: return {nullptr, nullptr};
}
+}
- const auto dir = desc.supplier();
-
- if (dir == nullptr) {
- return nullptr;
- }
-
- const auto romfs = CreateRomFS(dir);
-
- if (romfs == nullptr) {
- return nullptr;
+VirtualFile SynthesizeSystemArchive(const u64 title_id) {
+ auto const desc = GetSystemArchive(title_id);
+ LOG_INFO(Service_FS, "Synthesizing system archive '{}' (0x{:016X}).", desc.name, title_id);
+ if (desc.supplier != nullptr) {
+ if (auto const dir = desc.supplier(); dir != nullptr) {
+ if (auto const romfs = CreateRomFS(dir); romfs != nullptr) {
+ LOG_INFO(Service_FS, " - System archive generation successful!");
+ return romfs;
+ }
+ }
}
-
- LOG_INFO(Service_FS, " - System archive generation successful!");
- return romfs;
+ return nullptr;
}
} // namespace FileSys::SystemArchive