From 6268ee44a156a575f3a12b7f48a4244b7c8279b0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 24 Aug 2021 08:23:02 -0400 Subject: [PATCH] NWC24Config: Provide name for unk_04 config member According to WiiBrew this is a version number (thanks to Awesomebing1 for documenting this!) --- Source/Core/Core/IOS/Network/KD/NWC24Config.cpp | 12 ++++++------ Source/Core/Core/IOS/Network/KD/NWC24Config.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/IOS/Network/KD/NWC24Config.cpp b/Source/Core/Core/IOS/Network/KD/NWC24Config.cpp index 794b1ff9be..4ff427907c 100644 --- a/Source/Core/Core/IOS/Network/KD/NWC24Config.cpp +++ b/Source/Core/Core/IOS/Network/KD/NWC24Config.cpp @@ -59,7 +59,7 @@ void NWC24Config::ResetConfig() memset(&m_data, 0, sizeof(m_data)); SetMagic(0x57634366); - SetUnk(8); + SetVersion(8); SetCreationStage(NWC24CreationStage::Initial); SetEnableBooting(0); SetEmail("@wii.com"); @@ -110,7 +110,7 @@ s32 NWC24Config::CheckNwc24Config() const return -14; } - if (Unk() != 8) + if (Version() != 8) return -27; return 0; @@ -126,14 +126,14 @@ void NWC24Config::SetMagic(u32 magic) m_data.magic = Common::swap32(magic); } -u32 NWC24Config::Unk() const +u32 NWC24Config::Version() const { - return Common::swap32(m_data.unk_04); + return Common::swap32(m_data.version); } -void NWC24Config::SetUnk(u32 unk_04) +void NWC24Config::SetVersion(u32 version) { - m_data.unk_04 = Common::swap32(unk_04); + m_data.version = Common::swap32(version); } u32 NWC24Config::IdGen() const diff --git a/Source/Core/Core/IOS/Network/KD/NWC24Config.h b/Source/Core/Core/IOS/Network/KD/NWC24Config.h index c792815b3f..30a814cc19 100644 --- a/Source/Core/Core/IOS/Network/KD/NWC24Config.h +++ b/Source/Core/Core/IOS/Network/KD/NWC24Config.h @@ -47,8 +47,8 @@ public: u32 Magic() const; void SetMagic(u32 magic); - u32 Unk() const; - void SetUnk(u32 unk_04); + u32 Version() const; + void SetVersion(u32 version); u32 IdGen() const; void SetIdGen(u32 id_generation); @@ -85,8 +85,8 @@ private: #pragma pack(push, 1) struct ConfigData final { - u32 magic; // 'WcCf' 0x57634366 - u32 unk_04; // must be 8 + u32 magic; // 'WcCf' 0x57634366 + u32 version; // must be 8 u64 nwc24_id; u32 id_generation; NWC24CreationStage creation_stage;