From 6fa3aac574b5bdef871df3cdeaa41eefc5c6945f Mon Sep 17 00:00:00 2001 From: emoose Date: Tue, 24 Dec 2019 15:50:31 +0000 Subject: [PATCH] [XAM] xdbf_xbox.h: add X360 GPD settings structs + minor fixups --- src/xenia/kernel/xam/xam_user.cc | 22 +- src/xenia/kernel/xam/xdbf/xdbf.cc | 16 +- src/xenia/kernel/xam/xdbf/xdbf.h | 6 +- src/xenia/kernel/xam/xdbf/xdbf_xbox.h | 337 ++++++++++++++++++++++++-- 4 files changed, 338 insertions(+), 43 deletions(-) diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index 1dfacbefa..b8efb07e9 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -695,8 +695,10 @@ dword_result_t XamUserCreateTitlesPlayedEnumerator( std::vector titles; kernel_state()->user_profile()->GetDashboardGpd()->GetTitles(&titles); - auto e = new XStaticEnumerator(kernel_state(), games_count, - sizeof(xdbf::X_XDBF_GPD_TITLEPLAYED)); + // + 128 bytes for the 64-char titlename + const uint32_t kEntrySize = sizeof(xdbf::X_XDBF_GPD_TITLEPLAYED) + 128; + + auto e = new XStaticEnumerator(kernel_state(), games_count, kEntrySize); e->Initialize(); *handle_ptr = e->handle(); @@ -712,21 +714,7 @@ dword_result_t XamUserCreateTitlesPlayedEnumerator( continue; auto* details = (xdbf::X_XDBF_GPD_TITLEPLAYED*)e->AppendItem(); - details->title_id = title.title_id; - details->achievements_possible = title.achievements_possible; - details->achievements_earned = title.achievements_earned; - details->gamerscore_total = title.gamerscore_total; - details->gamerscore_earned = title.gamerscore_earned; - details->reserved_achievement_count = title.reserved_achievement_count; - details->all_avatar_awards = title.all_avatar_awards; - details->male_avatar_awards = title.male_avatar_awards; - details->female_avatar_awards = title.female_avatar_awards; - details->reserved_flags = title.reserved_flags; - details->last_played = title.last_played; - - xe::copy_and_swap((wchar_t*)details->title_name, - title.title_name.c_str(), - title.title_name.size()); + title.WriteGPD(details); } return X_ERROR_SUCCESS; diff --git a/src/xenia/kernel/xam/xdbf/xdbf.cc b/src/xenia/kernel/xam/xdbf/xdbf.cc index f04a18656..b06d424eb 100644 --- a/src/xenia/kernel/xam/xdbf/xdbf.cc +++ b/src/xenia/kernel/xam/xdbf/xdbf.cc @@ -172,8 +172,8 @@ std::string SpaFile::GetStringTableEntry(Locale locale, auto xstr_head = reinterpret_cast(xstr_table->data.data()); - assert_true(xstr_head->magic == static_cast(SpaID::Xstr)); - assert_true(xstr_head->version == 1); + assert_true(xstr_head->header.magic == static_cast(SpaID::Xstr)); + assert_true(xstr_head->header.version == 1); const uint8_t* ptr = xstr_table->data.data() + sizeof(X_XDBF_TABLE_HEADER); @@ -190,8 +190,8 @@ uint32_t SpaFile::GetAchievements( auto xach_head = reinterpret_cast(xach_table->data.data()); - assert_true(xach_head->magic == static_cast(SpaID::Xach)); - assert_true(xach_head->version == 1); + assert_true(xach_head->header.magic == static_cast(SpaID::Xach)); + assert_true(xach_head->header.version == 1); auto xstr_table = GetEntry(static_cast(SpaSection::kStringTable), static_cast(locale)); @@ -201,8 +201,8 @@ uint32_t SpaFile::GetAchievements( auto xstr_head = reinterpret_cast(xstr_table->data.data()); - assert_true(xstr_head->magic == static_cast(SpaID::Xstr)); - assert_true(xstr_head->version == 1); + assert_true(xstr_head->header.magic == static_cast(SpaID::Xstr)); + assert_true(xstr_head->header.version == 1); const uint8_t* xstr_ptr = xstr_table->data.data() + sizeof(X_XDBF_TABLE_HEADER); @@ -247,7 +247,7 @@ Locale SpaFile::GetDefaultLocale() const { } auto xstc = reinterpret_cast(block->data.data()); - assert_true(xstc->magic == static_cast(SpaID::Xstc)); + assert_true(xstc->header.magic == static_cast(SpaID::Xstc)); return static_cast(static_cast(xstc->default_language)); } @@ -265,7 +265,7 @@ uint32_t SpaFile::GetTitleId() const { } auto xthd = reinterpret_cast(block->data.data()); - assert_true(xthd->magic == static_cast(SpaID::Xthd)); + assert_true(xthd->header.magic == static_cast(SpaID::Xthd)); return xthd->title_id; } diff --git a/src/xenia/kernel/xam/xdbf/xdbf.h b/src/xenia/kernel/xam/xdbf/xdbf.h index de12617af..bf9d0c7c6 100644 --- a/src/xenia/kernel/xam/xdbf/xdbf.h +++ b/src/xenia/kernel/xam/xdbf/xdbf.h @@ -81,9 +81,9 @@ struct TitlePlayed { uint32_t gamerscore_total = 0; uint32_t gamerscore_earned = 0; uint16_t reserved_achievement_count = 0; - uint16_t all_avatar_awards = 0; - uint16_t male_avatar_awards = 0; - uint16_t female_avatar_awards = 0; + X_XDBF_AVATARAWARDS_COUNTER all_avatar_awards = {0, 0}; + X_XDBF_AVATARAWARDS_COUNTER male_avatar_awards = {0, 0}; + X_XDBF_AVATARAWARDS_COUNTER female_avatar_awards = {0, 0}; uint32_t reserved_flags = 0; uint64_t last_played = 0; diff --git a/src/xenia/kernel/xam/xdbf/xdbf_xbox.h b/src/xenia/kernel/xam/xdbf/xdbf_xbox.h index 1a070b225..bde70c91e 100644 --- a/src/xenia/kernel/xam/xdbf/xdbf_xbox.h +++ b/src/xenia/kernel/xam/xdbf/xdbf_xbox.h @@ -48,25 +48,32 @@ struct X_XDBF_FILELOC { }; static_assert_size(X_XDBF_FILELOC, 8); -struct X_XDBF_XSTC_DATA { +struct X_XDBF_SECTION_HEADER { xe::be magic; xe::be version; xe::be size; +}; +static_assert_size(X_XDBF_SECTION_HEADER, 12); + +struct X_XDBF_XSTC_DATA { + X_XDBF_SECTION_HEADER header; xe::be default_language; }; static_assert_size(X_XDBF_XSTC_DATA, 16); struct X_XDBF_XTHD_DATA { - xe::be magic; - xe::be version; - xe::be unk8; + enum class Flags { + kAlwaysIncludeInProfile = 1, + kNeverIncludeInProfile = 2, + }; + X_XDBF_SECTION_HEADER header; xe::be title_id; - xe::be unk10; // always 1? + xe::be title_type; xe::be title_version_major; xe::be title_version_minor; xe::be title_version_build; xe::be title_version_revision; - xe::be unk1C; + xe::be flags; xe::be unk20; xe::be unk24; xe::be unk28; @@ -74,9 +81,7 @@ struct X_XDBF_XTHD_DATA { static_assert_size(X_XDBF_XTHD_DATA, 0x2C); struct X_XDBF_TABLE_HEADER { - xe::be magic; - xe::be version; - xe::be size; + X_XDBF_SECTION_HEADER header; xe::be count; }; static_assert_size(X_XDBF_TABLE_HEADER, 14); @@ -108,6 +113,13 @@ struct X_XDBF_GPD_ACHIEVEMENT { // wchar_t* description; // wchar_t* unlocked_description; }; +static_assert_size(X_XDBF_GPD_ACHIEVEMENT, 0x1C); + +struct X_XDBF_AVATARAWARDS_COUNTER { + uint8_t earned; + uint8_t possible; +}; +static_assert_size(X_XDBF_AVATARAWARDS_COUNTER, 2); // from https://github.com/xemio/testdev/blob/master/xkelib/xam/_xamext.h struct X_XDBF_GPD_TITLEPLAYED { @@ -118,17 +130,312 @@ struct X_XDBF_GPD_TITLEPLAYED { xe::be gamerscore_earned; xe::be reserved_achievement_count; - // the following are meant to be split into possible/earned, 1 byte each - // but who cares - xe::be all_avatar_awards; - xe::be male_avatar_awards; - xe::be female_avatar_awards; + X_XDBF_AVATARAWARDS_COUNTER all_avatar_awards; + X_XDBF_AVATARAWARDS_COUNTER male_avatar_awards; + X_XDBF_AVATARAWARDS_COUNTER female_avatar_awards; xe::be reserved_flags; xe::be last_played; - xe::be title_name[64]; + + // xe::be title_name[64]; // size seems to be variable inside GPDs, + // r/w this seperately }; +static_assert_size(X_XDBF_GPD_TITLEPLAYED, 0x28); #pragma pack(pop) +enum class X_XUSER_DATA_TYPE : uint8_t { + kContext, + kInt32, + kInt64, + kDouble, + kUnicode, + kFloat, + kBinary, + kDateTime, + kNull = 0xFF +}; + +struct X_XUSER_DATA { + X_XUSER_DATA() {} + X_XUSER_DATA(const X_XUSER_DATA& data) { + type = data.type; + i64Data = data.i64Data; + } + + X_XUSER_DATA_TYPE type; + // 7 bytes padding + union { + xe::be nData; // X_XUSER_DATA_TYPE::kInt32 + xe::be i64Data; // X_XUSER_DATA_TYPE::kInt64 + xe::be dblData; // X_XUSER_DATA_TYPE::kDouble + struct // X_XUSER_DATA_TYPE::kUnicode + { + xe::be cbData; // Includes null-terminator + xe::be pwszData; + } string; + xe::be fData; // X_XUSER_DATA_TYPE::kFloat + struct // X_XUSER_DATA_TYPE::kBinary + { + xe::be cbData; + xe::be pbData; + } binary; + xe::be ftData; // X_XUSER_DATA_TYPE::kDateTime + }; +}; +static_assert_size(X_XUSER_DATA, 0x10); + +// Create 32-bit ID from type/size/id combination +#define XPROFILEID(type, size, id) \ + ((((uint32_t)type & 0xF) << 28) | ((size & 0xFFF) << 16) | (id & 0x3FFF)) + +// Extract type from 32-bit ID +#define XPROFILEID_TYPE(id) ((X_XUSER_DATA_TYPE)(((uint32_t)id >> 28) & 0xF)) + +// Extract size from 32-bit ID +#define XPROFILEID_SIZE(id) (((uint32_t)id >> 16) & 0xFFF) + +enum X_XDBF_SETTING_ID : uint32_t { + XPROFILE_PERMISSIONS = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0), // 0x10040000, + XPROFILE_GAMER_TYPE = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 1), // 0x10040001, + XPROFILE_GAMER_YAXIS_INVERSION = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 2), // 0x10040002, + XPROFILE_OPTION_CONTROLLER_VIBRATION = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 3), // 0x10040003, + XPROFILE_TITLE_SPECIFIC1 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x3E8, 0x3FFF), // 0x63E83FFF, + XPROFILE_TITLE_SPECIFIC2 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x3E8, 0x3FFE), // 0x63E83FFE, + XPROFILE_TITLE_SPECIFIC3 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x3E8, 0x3FFD), // 0x63E83FFD, + XPROFILE_GAMERCARD_ZONE = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, + sizeof(uint32_t), 4), // 0x10040004, + XPROFILE_GAMERCARD_REGION = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, + sizeof(uint32_t), 5), // 0x10040005, + XPROFILE_GAMERCARD_CRED = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, + sizeof(uint32_t), 6), // 0x10040006, + XPROFILE_GAMER_PRESENCE_USER_STATE = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 7), // 0x10040007, + XPROFILE_GAMERCARD_HAS_VISION = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 8), // 0x10040008, + XPROFILE_GAMERCARD_REP = + XPROFILEID(X_XUSER_DATA_TYPE::kFloat, sizeof(float), 0xB), // 0x5004000B, + XPROFILE_OPTION_VOICE_MUTED = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0xC), // 0x1004000C, + XPROFILE_OPTION_VOICE_THRU_SPEAKERS = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0xD), // 0x1004000D, + XPROFILE_OPTION_VOICE_VOLUME = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0xE), // 0x1004000E, + XPROFILE_GAMERCARD_PICTURE_KEY = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0xF), // 0x4064000F, + XPROFILE_GAMERCARD_PERSONAL_PICTURE = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0x10), // 0x40640010, + XPROFILE_GAMERCARD_MOTTO = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x2C, 0x11), // 0x402C0011, + XPROFILE_GAMERCARD_TITLES_PLAYED = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x12), // 0x10040012, + XPROFILE_GAMERCARD_ACHIEVEMENTS_EARNED = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x13), // 0x10040013, + XPROFILE_GAMER_DIFFICULTY = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x15), // 0x10040015, + XPROFILE_GAMER_CONTROL_SENSITIVITY = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x18), // 0x10040018, + XPROFILE_GAMER_PREFERRED_COLOR_FIRST = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x1D), // 0x1004001D, + XPROFILE_GAMER_PREFERRED_COLOR_SECOND = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x1E), // 0x1004001E, + XPROFILE_GAMER_ACTION_AUTO_AIM = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x22), // 0x10040022, + XPROFILE_GAMER_ACTION_AUTO_CENTER = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x23), // 0x10040023, + XPROFILE_GAMER_ACTION_MOVEMENT_CONTROL = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x24), // 0x10040024, + XPROFILE_GAMER_RACE_TRANSMISSION = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x26), // 0x10040026, + XPROFILE_GAMER_RACE_CAMERA_LOCATION = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x27), // 0x10040027, + XPROFILE_GAMER_RACE_BRAKE_CONTROL = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x28), // 0x10040028, + XPROFILE_GAMER_RACE_ACCELERATOR_CONTROL = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x29), // 0x10040029, + XPROFILE_GAMERCARD_TITLE_CRED_EARNED = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x38), // 0x10040038, + XPROFILE_GAMERCARD_TITLE_ACHIEVEMENTS_EARNED = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x39), // 0x10040039, + XPROFILE_GAMER_TIER = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x3A), // 0x1004003A, + XPROFILE_MESSENGER_SIGNUP_STATE = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3B), // 0x1004003B, + XPROFILE_MESSENGER_AUTO_SIGNIN = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3C), // 0x1004003C, + XPROFILE_SAVE_WINDOWS_LIVE_PASSWORD = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3D), // 0x1004003D, + XPROFILE_FRIENDSAPP_SHOW_BUDDIES = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3E), // 0x1004003E, + XPROFILE_GAMERCARD_SERVICE_TYPE_FLAGS = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3F), // 0x1004003F, + XPROFILE_GAMERCARD_USER_NAME = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x104, 0x40), // 0x41040040, + XPROFILE_GAMERCARD_USER_LOCATION = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x52, 0x41), // 0x40520041, + XPROFILE_GAMERCARD_USER_URL = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x190, 0x42), // 0x41900042, + XPROFILE_GAMERCARD_USER_BIO = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x3E8, 0x43), // 0x43E80043, + XPROFILE_GAMERCARD_AVATAR_INFO_1 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x3E8, 0x44), // 0x63E80044, + XPROFILE_GAMERCARD_AVATAR_INFO_2 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x3E8, 0x45), // 0x63E80045, + XPROFILE_GAMERCARD_PARTY_INFO = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x100, 0x46), // 0x61000046, + + // IDs exclusive to GFWL, some seem to conflict with X360 IDs though, + // commented out the conflicting IDs All are apparently local-only, and don't + // get synced to the server + // XPROFILE_GFWL_AUTOMIX = + // XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x47 ), + // //0x10040047, + // XPROFILE_GFWL_MICBOOST = + // XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x48 ), + // //0x10040048, + XPROFILE_GFWL_RECDEVICEDESC = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 200, 0x49), // 0x40C80049, + XPROFILE_GFWL_PLAYDEVICE = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x10, 0x4A), // 0x6010004A, + XPROFILE_GFWL_PLAYDEVICEDESC = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 200, 0x4B), // 0x40C8004B, + XPROFILE_GFWL_VOLUMELEVEL = XPROFILEID(X_XUSER_DATA_TYPE::kFloat, + sizeof(float), 0x4C), // 0x5004004C, + XPROFILE_GFWL_RECLEVEL = XPROFILEID(X_XUSER_DATA_TYPE::kFloat, sizeof(float), + 0x4D), // 0x5004004D, + // XPROFILE_GFWL_VADHIGH = + // XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x4E ), + // //0x1004004E, + XPROFILE_GFWL_VADNORMAL = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, + sizeof(uint32_t), 0x4F), // 0x1004004F, + + XPROFILE_TENURE_LEVEL = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, + sizeof(uint32_t), 0x47), // 0x10040047, + XPROFILE_TENURE_MILESTONE = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x48), // 0x10040048, + XPROFILE_TENURE_NEXT_MILESTONE_DATE = + XPROFILEID(X_XUSER_DATA_TYPE::kDateTime, sizeof(uint64_t), + 0x49), // 0x70080049, aka ProfileDateTimeCreated? + XPROFILE_VIDEO_METADATA = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x20, 0x4A), // 0x6020004A, + XPROFILE_SUBSCRIPTION_TYPE_LENGTH_IN_MONTHS = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x4B), // 0x1004004B, + XPROFILE_SUBSCRIPTION_PAYMENT_TYPE = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x4C), // 0x1004004C, + XPROFILE_PEC_INFO = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x4D), // 0x1004004D, + XPROFILE_NUI_BIOMETRIC_SIGNIN = + XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x4E), // 0x1004004E, set by XamUserNuiEnableBiometric + + // 2 unknowns requested by NXE dash + XPROFILE_LAST_LIVE_SIGNIN = + XPROFILEID(X_XUSER_DATA_TYPE::kDateTime, sizeof(uint64_t), + 0x4F), // 0x7008004F, named "LastOnLIVE" in Velocity + XPROFILE_UNK_61180050 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 280, 0x50), // 0x61180050, + + XPROFILE_JUMP_IN_LIST = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x3E8, 0x51), // 0x63E80051, + XPROFILE_BEACONS_SOCIAL_NETWORK_SHARING = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x52), // 0x10040052, + XPROFILE_USER_PREFERENCES = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x53), // 0x10040053, + XPROFILE_GAMERCARD_PARTY_ADDR = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x62, 0x54), // 0x60620054, + + XPROFILE_XBOXONE_GAMERSCORE = + XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x57), // 0x10040057, "XboxOneGamerscore" inside dash.xex + + WEB_EMAIL_FORMAT = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2000), // 0x10042000, + WEB_FLAGS = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2001), // 0x10042001, + WEB_SPAM = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2002), // 0x10042002, + WEB_FAVORITE_GENRE = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2003), // 0x10042003, + WEB_FAVORITE_GAME = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2004), // 0x10042004, + WEB_FAVORITE_GAME1 = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2005), // 0x10042005, + WEB_FAVORITE_GAME2 = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2006), // 0x10042006, + WEB_FAVORITE_GAME3 = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2007), // 0x10042007, + WEB_FAVORITE_GAME4 = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2008), // 0x10042008, + WEB_FAVORITE_GAME5 = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x2009), // 0x10042009, + WEB_PLATFORMS_OWNED = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x200A), // 0x1004200A, + WEB_CONNECTION_SPEED = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x200B), // 0x1004200B, + WEB_FLASH = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x200C), // 0x1004200C, + WEB_VIDEO_PREFERENCE = XPROFILEID(X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), + 0x200D), // 0x1004200D, + + XPROFILE_CRUX_MEDIA_PICTURE = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0x3E8), // 0x406403E8, + XPROFILE_CRUX_MEDIA_STYLE1 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3EA), // 0x100403EA, + XPROFILE_CRUX_MEDIA_STYLE2 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3EB), // 0x100403EB, + XPROFILE_CRUX_MEDIA_STYLE3 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3EC), // 0x100403EC, + XPROFILE_CRUX_TOP_ALBUM1 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3ED), // 0x100403ED, + XPROFILE_CRUX_TOP_ALBUM2 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3EE), // 0x100403EE, + XPROFILE_CRUX_TOP_ALBUM3 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3EF), // 0x100403EF, + XPROFILE_CRUX_TOP_ALBUM4 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3F0), // 0x100403F0, + XPROFILE_CRUX_TOP_ALBUM5 = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3F1), // 0x100403F1, + XPROFILE_CRUX_OFFLINE_ID = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x34, 0x3F2), // 0x603403F2, + XPROFILE_CRUX_BKGD_IMAGE = XPROFILEID( + X_XUSER_DATA_TYPE::kInt32, sizeof(uint32_t), 0x3F3), // 0x100403F3, + XPROFILE_CRUX_LAST_CHANGE_TIME = XPROFILEID( + X_XUSER_DATA_TYPE::kDateTime, sizeof(uint64_t), 0x3F4), // 0x700803F4, + XPROFILE_CRUX_TOP_MUSIC = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0xA8, 0x3F5), // 0x60A803F5, + XPROFILE_CRUX_MEDIA_MOTTO = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x100, 0x3F6), // 0x410003F6, + XPROFILE_CRUX_TOP_MEDIAID1 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x10, 0x3F7), // 0x601003F7, + XPROFILE_CRUX_TOP_MEDIAID2 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x10, 0x3F8), // 0x601003F8, + XPROFILE_CRUX_TOP_MEDIAID3 = + XPROFILEID(X_XUSER_DATA_TYPE::kBinary, 0x10, 0x3F9), // 0x601003F9, + XPROFILE_CRUX_BIO = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x3E8, 0x3FA), // 0x43E803FA, + XPROFILE_CRUX_BG_SMALL_PRIVATE = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0x3FB), // 0x406403FB, + XPROFILE_CRUX_BG_LARGE_PRIVATE = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0x3FC), // 0x406403FC, + XPROFILE_CRUX_BG_SMALL_PUBLIC = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0x3FD), // 0x406403FD, + XPROFILE_CRUX_BG_LARGE_PUBLIC = + XPROFILEID(X_XUSER_DATA_TYPE::kUnicode, 0x64, 0x3FE), // 0x406403FE +}; + +struct X_XDBF_GPD_SETTING { + xe::be setting_id; + // 4 bytes padding + X_XUSER_DATA value; + // usually followed by value.binary.cbData / value.string.pwszData bytes +}; +static_assert_size(X_XDBF_GPD_SETTING, 0x18); + } // namespace xdbf } // namespace xam } // namespace kernel