summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nfp/nfp_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nfp/nfp_types.h')
-rw-r--r--src/core/hle/service/nfp/nfp_types.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/hle/service/nfp/nfp_types.h b/src/core/hle/service/nfp/nfp_types.h
index 90429baa2..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);
@@ -375,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