From a973271b8c5415cafd4d3bbcad872a2a3ae670aa Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 25 Mar 2019 23:30:56 -0400 Subject: file_sys/control_metadata: Amend naming of members Quite a bit of these were out of sync with Switchbrew (and in some cases entirely wrong). While we're at it, also expand the section of named members. A segment within the control metadata is used to specify maximum values for the user, device, and cache storage max sizes and journal sizes. These appear to be generally used by the am service (e.g. in CreateCacheStorage, etc). --- src/core/file_sys/control_metadata.cpp | 6 +++--- src/core/file_sys/control_metadata.h | 30 +++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/file_sys/control_metadata.cpp b/src/core/file_sys/control_metadata.cpp index 83c184750..60ea9ad12 100644 --- a/src/core/file_sys/control_metadata.cpp +++ b/src/core/file_sys/control_metadata.cpp @@ -67,7 +67,7 @@ std::string NACP::GetDeveloperName(Language language) const { } u64 NACP::GetTitleId() const { - return raw.title_id; + return raw.save_data_owner_id; } u64 NACP::GetDLCBaseTitleId() const { @@ -80,11 +80,11 @@ std::string NACP::GetVersionString() const { } u64 NACP::GetDefaultNormalSaveSize() const { - return raw.normal_save_data_size; + return raw.user_account_save_data_size; } u64 NACP::GetDefaultJournalSaveSize() const { - return raw.journal_sava_data_size; + return raw.user_account_save_data_journal_size; } std::vector NACP::GetRawBytes() const { diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index 7b9cdc910..280710ddf 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h @@ -38,23 +38,35 @@ struct RawNACP { u8 video_capture_mode; bool data_loss_confirmation; INSERT_PADDING_BYTES(1); - u64_le title_id; + u64_le presence_group_id; std::array rating_age; std::array version_string; u64_le dlc_base_title_id; - u64_le title_id_2; - u64_le normal_save_data_size; - u64_le journal_sava_data_size; - INSERT_PADDING_BYTES(0x18); - u64_le product_code; + u64_le save_data_owner_id; + u64_le user_account_save_data_size; + u64_le user_account_save_data_journal_size; + u64_le device_save_data_size; + u64_le device_save_data_journal_size; + u64_le bcat_delivery_cache_storage_size; + char application_error_code_category[8]; std::array local_communication; u8 logo_type; u8 logo_handling; bool runtime_add_on_content_install; INSERT_PADDING_BYTES(5); - u64_le title_id_update; - std::array bcat_passphrase; - INSERT_PADDING_BYTES(0xEC0); + u64_le seed_for_pseudo_device_id; + std::array bcat_passphrase; + INSERT_PADDING_BYTES(7); + u64_le user_account_save_data_max_size; + u64_le user_account_save_data_max_journal_size; + u64_le device_save_data_max_size; + u64_le device_save_data_max_journal_size; + u64_le temporary_storage_size; + u64_le cache_storage_size; + u64_le cache_storage_journal_size; + u64_le cache_storage_data_and_journal_max_size; + u64_le cache_storage_max_index; + INSERT_PADDING_BYTES(0xE70); }; static_assert(sizeof(RawNACP) == 0x4000, "RawNACP has incorrect size."); -- cgit v1.2.3