diff options
author | bunnei <bunneidev@gmail.com> | 2023-04-19 19:36:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 19:36:28 +0200 |
commit | 799579c8d2d695be7276387b9ae12e9836c4f14b (patch) | |
tree | f32687e5dd1ea05554883c8c49d0ec9cc49a8247 /src/core/hle/service/nfp/nfp_types.h | |
parent | Merge pull request #10030 from Wollnashorn/botw-amd-fix (diff) | |
parent | service: nfp: Implement debug Interface (diff) | |
download | yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.tar yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.tar.gz yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.tar.bz2 yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.tar.lz yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.tar.xz yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.tar.zst yuzu-799579c8d2d695be7276387b9ae12e9836c4f14b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nfp/nfp_types.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/core/hle/service/nfp/nfp_types.h b/src/core/hle/service/nfp/nfp_types.h index 70c878552..1ef047cee 100644 --- a/src/core/hle/service/nfp/nfp_types.h +++ b/src/core/hle/service/nfp/nfp_types.h @@ -109,6 +109,12 @@ enum class AppAreaVersion : u8 { NotSet = 0xFF, }; +enum class BreakType : u32 { + Normal, + Unknown1, + Unknown2, +}; + enum class CabinetMode : u8 { StartNicknameAndOwnerSettings, StartGameDataEraser, @@ -181,6 +187,12 @@ struct AmiiboDate { }; } + void SetWriteDate(const WriteDate& write_date) { + SetYear(write_date.year); + SetMonth(write_date.month); + SetDay(write_date.day); + } + void SetYear(u16 year) { const u16 year_converted = static_cast<u16>((year - 2000) << 9); raw_date = Common::swap16((GetValue() & ~0xFE00) | year_converted); @@ -354,6 +366,15 @@ struct RegisterInfo { }; static_assert(sizeof(RegisterInfo) == 0x100, "RegisterInfo is an invalid size"); +struct RegisterInfoPrivate { + Service::Mii::MiiStoreData mii_store_data; + WriteDate creation_date; + AmiiboName amiibo_name; + u8 font_region; + INSERT_PADDING_BYTES(0x8E); +}; +static_assert(sizeof(RegisterInfoPrivate) == 0x100, "RegisterInfoPrivate is an invalid size"); + struct AdminInfo { u64 application_id; u32 application_area_id; @@ -366,6 +387,39 @@ struct AdminInfo { }; static_assert(sizeof(AdminInfo) == 0x40, "AdminInfo is an invalid size"); +#pragma pack(1) +// This is nn::nfp::NfpData +struct NfpData { + u8 magic; + INSERT_PADDING_BYTES(0x1); + u8 write_counter; + INSERT_PADDING_BYTES(0x1); + u32 settings_crc; + INSERT_PADDING_BYTES(0x38); + CommonInfo common_info; + Service::Mii::Ver3StoreData mii_char_info; + Service::Mii::NfpStoreDataExtension mii_store_data_extension; + WriteDate creation_date; + std::array<u16_be, amiibo_name_length> amiibo_name; + u16 amiibo_name_null_terminated; + Settings settings; + u8 unknown1; + u32 register_info_crc; + std::array<u32, 5> unknown2; + INSERT_PADDING_BYTES(0x64); + u64 application_id; + u32 access_id; + u16 settings_crc_counter; + u8 font_region; + PackedTagType tag_type; + AppAreaVersion console_type; + u8 application_id_byte; + INSERT_PADDING_BYTES(0x2E); + ApplicationArea application_area; +}; +static_assert(sizeof(NfpData) == 0x298, "NfpData is an invalid size"); +#pragma pack() + struct SectorKey { MifareCmd command; u8 unknown; // Usually 1 |