Line 1:
Line 1:
[[Category:Services]]
[[Category:Services]]
−
The ACT module handles NNID accounts. This module behaves very similarly to the [https://github.com/devkitPro/wut/blob/master/cafe/nn_act.def Wii U] implementation (nn::act)
The ACT module handles NNID accounts. This module behaves very similarly to the [https://github.com/devkitPro/wut/blob/master/cafe/nn_act.def Wii U] implementation (nn::act)
Line 64:
Line 63:
| 0x001B0084 || AcquireOtherTypePrincipalID (stubbed)
| 0x001B0084 || AcquireOtherTypePrincipalID (stubbed)
|-
|-
−
| 0x001C0342 || [[ACTU:GetServiceToken|GetServiceToken]]
+
| 0x001C0342 || [[ACTU:GetCachedIndependentServiceToken|GetCachedIndependentServiceToken]]
|-
|-
| 0x001D0004 || [[ACTU:InquireMailAddressAvailability|InquireMailAddressAvailability]]
| 0x001D0004 || [[ACTU:InquireMailAddressAvailability|InquireMailAddressAvailability]]
Line 70:
Line 69:
| 0x001E0082 || [[ACTU:AcquireEula|AcquireEula]]
| 0x001E0082 || [[ACTU:AcquireEula|AcquireEula]]
|-
|-
−
| 0x001F0082 || [[ACTU:AcquireEulaList|AcquireEulaList]]
+
| 0x001F0082 || [[ACTU:AcquireEulaLanguageList|AcquireEulaLanguageList]]
|-
|-
| 0x00200382 || [[ACTU:AcquireIndependentServiceTokenV2|AcquireIndependentServiceTokenV2]]
| 0x00200382 || [[ACTU:AcquireIndependentServiceTokenV2|AcquireIndependentServiceTokenV2]]
|-
|-
−
| 0x00210002 || [[ACTU:GetIndepdendentServiceTokenV2|GetIndepdendentServiceTokenV2]]
+
| 0x00210002 || [[ACTU:GetIndependentServiceTokenV2|GetIndepdendentServiceTokenV2]]
|-
|-
−
| 0x00220342 || [[ACTU:GetServiceTokenV2|GetServiceTokenV2]]
+
| 0x00220342 || [[ACTU:GetCachedIndependentServiceTokenV2|GetCachedIndependentServiceTokenV2]]
|}
|}
Line 189:
Line 188:
| 0x04330042 || [[ACTA:CancelTransfer|CancelTransfer]]
| 0x04330042 || [[ACTA:CancelTransfer|CancelTransfer]]
|-
|-
−
| 0x04340003 || [[ACTA:ReloadSaveData|ReloadSaveData]]
+
| 0x04340003 || [[ACTA:ReloadAndBlockSaveData|ReloadAndBlockSaveData]]
|-
|-
| 0x04350042 || [[ACTA:ReserveServerAccountDeletion|ReserveServerAccountDeletion]]
| 0x04350042 || [[ACTA:ReserveServerAccountDeletion|ReserveServerAccountDeletion]]
Line 196:
Line 195:
= Account slots =
= Account slots =
−
Like the friends sysmodule, the ACT module supports multiple accounts internally, although this functionality is not exposed to the users. Unlike the Wii U which supports up to 12 accounts, the 3DS only has 8 account slots.
+
Like the friends sysmodule, the ACT module has support for multiple [[ACT_Services#Console_Accounts|console accounts]]. The ACT sysmodule has support for 8 account "slots", which are 1-indexed numbers (n) referring the to the <code>n</code>th account. This means that up to 8 different [[ACT_Services#Console_Accounts|console accounts]] can be used with the ACT sysmodule, unlike the Wii U, which has support for 12. This multi-account functionality is not exposed to users, and the Nintendo Network ID Settings application only ever uses the default account slot.
+
+
When the ACT sysmodule is started, it loads the default account slot. The default account can be set using [[ACTA:SetDefaultAccount]].
+
+
It is also possible to change the account slot number of an account by using [[ACTA:SwapAccounts]].
+
+
Account slot -2 (0xFE) always refers to the currently loaded account.
+
+
== Console Accounts ==
+
A "console account" refers to a specific account slot, and may or may not be associated with a Nintendo Network ID (server account). By default, there is only one console account.
+
+
More console accounts can be created using [[ACTA:CreateConsoleAccount]], loaded using [[ACTA:LoadConsoleAccount]], unloaded using [[ACTA:UnloadConsoleAccount]], or deleted using [[ACTA:DeleteConsoleAccount]].
+
+
== Server Accounts ==
+
A "server account" is essentially a Nintendo Network ID.
+
+
Associating a console account with a Nintendo Network ID (server-side) is facilitated by the commands [[ACTA:BindToNewServerAccount]] (to create and link an NNID) or [[ACTA:BindToExistentServerAccount]] (to log into an existing linked NNID).
+
+
Nintendo Network IDs can be transferred to other consoles using [[ACTA:ReserveTransfer]] initially, and then [[ACTA:CompleteTransfer]].
+
+
NNIDs can be deleted using either [[ACTA:DeleteServerAccount]], [[ACTA:InactivateAccountDeviceAssociation]], [[ACTA:DeleteAccountDeviceAssociation]] or [[ACTA:ReserveServerAccountDeletion]].
+
+
= Password Management =
+
The ACT sysmodule uses a distinct password management system.
+
+
== Password Hashing Algorithm ==
+
Passwords are not stored in plaintext. Instead, they are hashed using the following algorithm:
+
<pre>
+
void hash_password(void *out_hash, void *input, int input_size, unsigned int num_iterations, unsigned int principal_id) {
+
static const unsigned char constant[4] = { 0x02, 0x65, 0x43, 0x46 };
+
+
unsigned char hash_data[8 + 32] = { 0 };
+
unsigned int bswap_pid = bswap32(principal_id);
+
+
while ( num_iterations-- ) {
+
memcpy(&hash_data[0], &bswap_pid, 4);
+
memcpy(&hash_data[4], &constant, 4);
+
memcpy(&hash_data[8], input, input_size);
+
+
/* output, input, size */
+
sha256(out_hash, hash_data, 8 + input_size);
+
input_size = 32;
+
input = out_hash;
+
}
+
}
+
</pre>
+
+
== Account Password Hash ==
+
The AccountPasswordHash field in the account data is the result of one iteration of the above algorithm, using the plaintext password as the input. It is generally used to verify the input password in [[ACTA:LoadConsoleAccount]].
+
+
This field in the account data is set when [[ACTA:BindToNewServerAccount]], [[ACTA:BindToExistentServerAccount]], or [[ACTA:UpdateAccountPassword]] is used.
+
+
== Account Password Cache ==
+
It is possible to cache the password for an account so the user isn't asked for it every time. This can be configured in Nintendo Network ID settings or during an NNID login prompt (e.g. in the eShop). The AccountPasswordCache field in the account data is the result of two iterations of the above algorithm, using the plaintext password as the input.
+
+
== Account Password Input ==
+
The account password input represents the in-memory input value of the password. It can be thought of as the value that will be autofilled by default in a login form. When the ACT sysmodule is started and the default account is loaded, the AccountPasswordCache is copied to the AccountPasswordInput, allowing automatic login.
+
+
However, it is possible to override this value using [[ACTA:SetAccountPasswordInput]]. The AccountPasswordInput value set using this command can then be saved to the account password cache by using [[ACTA:EnableAccountPasswordCache]].
+
+
The account password cache can be enabled or disabled through [[ACTA:EnableAccountPasswordCache]].
+
+
The AccountPasswordInput is always loaded into memory and is not saved to the system save data.
+
+
= Server Types =
+
The ACT sysmodule uses two different server types for Nintendo Network accounts.
+
+
See below how these types are determined by default. These types can also be overridden using [[ACTA:SetHostServerSettings]], [[ACTA:SetDefaultHostServerSettings]], [[ACTA:SetHostServerSettingsStr]], and [[ACTA:SetDefaultHostServerSettingsStr]].
+
+
The base URL for the Nintendo Network Account Server (NNAS) is: <code>https://[<prefix>]account.nintendo.net</code>.
+
+
== NNAS (Nintendo Network Authentication Server) Types ==
+
This is used to determine the NNAS subdomain used for the account server.
+
{| class="wikitable" border="1"
+
|-
+
! Value !! Description !! NNAS Subdomain !! Complete NNAS URL
+
|-
+
| 0 || Production || (None) || <code><nowiki>https://account.nintendo.net</nowiki></code>
+
|-
+
| 1 || Game Development (also the default for debug mode on developer units) || <code style="border: 1px solid black">game-dev.</code> || <code><nowiki>https://game-dev.account.nintendo.net</nowiki></code>
+
|-
+
| 2 || System Development || <code style="border: 1px solid black">system-dev.</code> || <code><nowiki>https://system-dev.account.nintendo.net</nowiki></code>
+
|-
+
| 3 || Library Development || <code style="border: 1px solid black">library-dev.</code> || <code><nowiki>https://library-dev.account.nintendo.net</nowiki></code>
+
|-
+
| 4 || Staging || <code style="border: 1px solid black">staging.</code> || <code><nowiki>https://staging.account.nintendo.net</nowiki></code>
+
|}
+
+
Values beyond 4 are considered invalid.
+
+
=== Default NNAS Server Types ===
+
By default, ACT uses the letter value from [[FRDU:GetServerTypes]] to determine the correct NNAS subdomain when a Nintendo Network ID is created.
+
+
{| class="wikitable" border="1"
+
|-
+
! Value from [[FRDU:GetServerTypes]] !! NNAS Server Type || Corresponding NNAS Subdomain !! Corresponding complete NNAS URL
+
|-
+
| 0 (L) || Production (default on retail units) || (None) || <code><nowiki>https://account.nintendo.net</nowiki></code>
+
|-
+
| 2 (S) || Staging || <code style="border: 1px solid black">staging.</code> || <code><nowiki>https://staging.account.nintendo.net</nowiki></code>
+
|-
+
| 3 (D) || Game Development (also the default for debug mode on developer units) || <code style="border: 1px solid black">game-dev.</code> || <code><nowiki>https://game-dev.account.nintendo.net</nowiki></code>
+
|-
+
| 5 (T) || Library Development || <code style="border: 1px solid black">library-dev.</code> || <code><nowiki>https://library-dev.account.nintendo.net</nowiki></code>
+
|-
+
| 7 (J) || System Development || <code style="border: 1px solid black">system-dev.</code> || <code><nowiki>https://system-dev.account.nintendo.net</nowiki></code>
+
|}
+
+
== NFS (Nintendo Friend Server) Types ==
+
ACT uses the same [[Friend_Services#Server_Types|Server Types]] as the friends sysmodule as the NfsType.
+
+
A small subset of these types are used in [[ACTA:SetHostServerSettings]], [[ACTA:SetDefaultHostServerSettings]], [[ACTA:SetHostServerSettingsStr]], and [[ACTA:SetDefaultHostServerSettingsStr]]:
+
+
{| class="wikitable" border="1"
+
|-
+
! Input value used in ACT commands || Corresponding [[Friend_Services#Server_Types|Friends Server Type]] value
+
|-
+
| 0 || 0 (L)
+
|-
+
| 1 || 3 (D)
+
|-
+
| 2 || 2 (S)
+
|-
+
| 3 || 5 (T)
+
|-
+
| 4 || 7 (J)
+
|}
+
+
=== Default NFS Server Types ===
+
By default, ACT uses [[FRDU:GetServerTypes]] to obtain the correct [[Friend_Services#Server_Types|NFS (Nintendo Friend Server) environment]] to create Nintendo Network IDs.
−
Some commands require require the account slot as an argument, which is 1-indexed. The value for using the current loaded account is 0xFE.
+
This is necessary to ensure proper online play functionality, because the friends server account is tied to the Nintendo Network ID when one is linked.
= UUIDs =
= UUIDs =
Line 234:
Line 362:
- <code>output_uuid = regular_uuid[0:9] + hash[10] | 0x1 + hash[11:16]</code>
- <code>output_uuid = regular_uuid[0:9] + hash[10] | 0x1 + hash[11:16]</code>
+
+
= Independent Service Tokens =
+
In addition to NEX tokens for gameserver authentication in combination with Nintendo Network, app developers have the ability to use their own independent services. For authenticating with such services through Nintendo Network, the service's client ID is used to request a token from the account server.
+
+
== Independent Service Token Versions ==
+
There are two versions of independent service tokens.
+
+
=== V1 Independent Service Token ===
+
These are more basic, consisting of only a base64 token. These can be requested and cached using [[ACTU:AcquireIndependentServiceToken]], retrieved either immediately after requesting them using [[ACTU:GetIndependentServiceToken]] or from an internal cache using [[ACTU:GetCachedIndependentServiceToken]].
+
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x200 + 1 || base64 NULL-terminated Token
+
|}
+
+
=== V2 Independent Service Token ===
+
V2 indpendent service tokens include more fields like an IV, signature, and account server environment compared to V1 tokens.
+
+
They can be requested and cached using [[ACTU:AcquireIndependentServiceTokenV2]], retrieved either immediately after requesting them using [[ACTU:GetIndependentServiceTokenV2]] or from an internal cache using [[ACTU:GetCachedIndependentServiceTokenV2]].
+
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x200 + 1 || base64 NULL-terminated Token
+
|-
+
| 0x201 || 0x18 + 1 || base64 NULL-terminated IV
+
|-
+
| 0x21A || 0x158 + 1 || base64 NULL-terminated Signature
+
|-
+
| 0x373 || 0x2 + 1 || ASCII [[Friend_Services#Server_Types|Server Environment]] type and number
+
|}
= DataBlocks =
= DataBlocks =
Line 249:
Line 411:
| 0x3 || 0x1 || [[ACTU:GetCommonInfo|GetCommonInfo]] || Default account slot
| 0x3 || 0x1 || [[ACTU:GetCommonInfo|GetCommonInfo]] || Default account slot
|-
|-
−
| 0x4 || 0x8 || [[ACTU:GetCommonInfo|GetCommonInfo]] || Difference between server time and device time (in nanoseconds)
+
| 0x4 || 0x8 || [[ACTU:GetCommonInfo|GetCommonInfo]] || NetworkTimeDifference: Difference between server time and UTC device time (in nanoseconds)
|-
|-
| 0x5 || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || PersistentId
| 0x5 || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || PersistentId
Line 255:
Line 417:
| 0x6 || 0x8 || [[ACTU:GetCommonInfo|GetCommonInfo]]/[[ACTU:GetAccountDataBlock|GetAccountInfo]] || CommonTransferableIdBase on GetCommonInfo / TransferableIdBase on GetAccountInfo
| 0x6 || 0x8 || [[ACTU:GetCommonInfo|GetCommonInfo]]/[[ACTU:GetAccountDataBlock|GetAccountInfo]] || CommonTransferableIdBase on GetCommonInfo / TransferableIdBase on GetAccountInfo
|-
|-
−
| 0x7 || 0x60 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || [[Mii#Mii_format|MiiData]]
+
| 0x7 || 0x60 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || [[ACT_Services#CFLStoreData|Mii CFLStoreData]]
|-
|-
| 0x8 || 0x11 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || AccountId (ASCII NULL-terminated Nintendo Network ID)
| 0x8 || 0x11 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || AccountId (ASCII NULL-terminated Nintendo Network ID)
Line 261:
Line 423:
| 0x9 || 0x101 || [[ACTU:AcquireAccountInfo|AcquireAccountInfo]] || Mail address
| 0x9 || 0x101 || [[ACTU:AcquireAccountInfo|AcquireAccountInfo]] || Mail address
|-
|-
−
| 0xA || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || Birthdate
+
| 0xA || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || [[ACT_Services#Birthdate|Birth Date]]
−
{| class="wikitable" border="1"
−
|-
−
! Offset !! Size !! Description
−
|-
−
| 0x0 || 0x2 || Year
−
|-
−
| 0x2 || 0x1 || Month
−
|-
−
| 0x3 || 0x1 || Day
−
|}
|-
|-
| 0xB || 0x3 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || ASCII NULL-terminated Country Name
| 0xB || 0x3 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || ASCII NULL-terminated Country Name
Line 292:
Line 444:
| 0x8 || 0x8 || u64 TransferableIDBase
| 0x8 || 0x8 || u64 TransferableIDBase
|-
|-
−
| 0x10 || 0x60 || [[Mii#Mii_format|Mii]]
+
| 0x10 || 0x60 || [[ACT_Services#CFLStoreData|Mii CFLStoreData]]
|-
|-
| 0x70 || (10 + 1) * 2 || 10-character UTF-16 Mii Display Name
| 0x70 || (10 + 1) * 2 || 10-character UTF-16 Mii Display Name
Line 300:
Line 452:
| 0x97 || 1 || padding
| 0x97 || 1 || padding
|-
|-
−
| 0x98 || 0x4 || Birthdate
+
| 0x98 || 0x4 || [[ACT_Services#Birthdate|Birth Date]]
−
{| class="wikitable" border="1"
−
|-
−
! Offset !! Size !! Description
−
|-
−
| 0x0 || 0x2 || Year
−
|-
−
| 0x2 || 0x1 || Month
−
|-
−
| 0x3 || 0x1 || Day
−
|}
|-
|-
| 0x9C || 0x4 || u32, PrincipalID
| 0x9C || 0x4 || u32, PrincipalID
|}
|}
|-
|-
−
| 0x12 || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] ||
+
| 0x12 || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || Account server types
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset !! Size !! Description
! Offset !! Size !! Description
|-
|-
−
| 0x0 || 0x1 || NNAS (Nintendo Network Authentication Server) Type
+
| 0x0 || 0x1 || [[ACT_Services#NNAS_.28Nintendo_Network_Authentication_Server.29_Types|NNAS (Nintendo Network Authentication Server) Type]]
|-
|-
−
| 0x1 || 0x1 || [[Friend_Services#Server_Types|NFS (Nintendo Friend Server) Type Value]]
+
| 0x1 || 0x1 || [[ACT_Services#NFS_.28Nintendo_Friend_Server.29_Types|NFS (Nintendo Friend Server) Type Value]]
|-
|-
−
| 0x2 || 0x1 || [[Friend_Services#Server_Types|NFS (Nintendo Friend Server) Number]]
+
| 0x2 || 0x1 || [[ACT_Services#NFS_.28Nintendo_Friend_Server.29_Types|NFS (Nintendo Friend Server) Number]]
|-
|-
| 0x3 || 0x1 || padding (0)
| 0x3 || 0x1 || padding (0)
Line 341:
Line 483:
| 0x19 || 0x8 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || UtcOffset
| 0x19 || 0x8 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || UtcOffset
|-
|-
−
| 0x1A || 0x1 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || IsCommited
+
| 0x1A || 0x1 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || IsCommitted
|-
|-
| 0x1B || 0x16 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || 10-character UTF-16 Mii Name (10 characters + NULL termination)
| 0x1B || 0x16 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || 10-character UTF-16 Mii Name (10 characters + NULL termination)
|-
|-
−
| 0x1C || 0x11 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || ASCII NULL-termiinated NfsPassword
+
| 0x1C || 0x11 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || ASCII NULL-terminated NfsPassword
|-
|-
| 0x1D || 0x1 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || HasEciVirtualAccount (checks whether EciVirtualAccount has a value)
| 0x1D || 0x1 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || HasEciVirtualAccount (checks whether EciVirtualAccount has a value)
Line 365:
Line 507:
|-
|-
| 0x22 || 0x29 || ASCII NULL-terminated refresh token
| 0x22 || 0x29 || ASCII NULL-terminated refresh token
+
|-
+
| 0x4B || 0x1 || padding
+
|}
+
|-
+
| 0x22 || 0x1 || [[ACTU:GetCommonInfo|GetCommonInfo]] || IsApplicationUpdateRequired
+
|-
+
| 0x23 || 0x4 || [[ACTU:GetCommonInfo|GetCommonInfo]] || Default account server types
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x1 || [[ACT_Services#NNAS_.28Nintendo_Network_Authentication_Server.29_Types|NNAS (Nintendo Network Authentication Server) Type]]
+
|-
+
| 0x1 || 0x1 || [[ACT_Services#NFS_.28Nintendo_Friend_Server.29_Types|NFS (Nintendo Friend Server) Type Value]]
+
|-
+
| 0x2 || 0x1 || [[ACT_Services#NFS_.28Nintendo_Friend_Server.29_Types|NFS (Nintendo Friend Server) Number]]
+
|-
+
| 0x3 || 0x1 || padding (0)
|}
|}
|-
|-
Line 380:
Line 540:
! Offset !! Size !! Description
! Offset !! Size !! Description
|-
|-
−
| 0x0 || 0x21 || ASCII NULL-terminated NNAS subdomain
+
| 0x0 || 0x21 || ASCII NULL-terminated [[ACT_Services#NNAS_.28Nintendo_Network_Authentication_Server.29_Types|NNAS]] subdomain
|-
|-
−
| 0x21 || 0x3 || [[Friend_Services#Server_Types|NFS (Nintendo Friend Server) Environment]]
+
| 0x21 || 0x3 || [[ACT_Services#NFS_.28Nintendo_Friend_Server.29_Types|NFS (Nintendo Friend Server) Type]]
|}
|}
|-
|-
Line 390:
Line 550:
! Offset !! Size !! Description
! Offset !! Size !! Description
|-
|-
−
| 0x0 || 0x21 || ASCII NULL-terminated NNAS subdomain
+
| 0x0 || 0x21 || ASCII NULL-terminated [[ACT_Services#NNAS_.28Nintendo_Network_Authentication_Server.29_Types|NNAS]] subdomain
|-
|-
−
| 0x21 || 0x3 || [[Friend_Services#Server_Types|NFS (Nintendo Friend Server) Environment]]
+
| 0x21 || 0x3 || [[ACT_Services#NFS_.28Nintendo_Friend_Server.29_Types|NFS (Nintendo Friend Server) Type]]
|}
|}
|-
|-
−
| 0x2A || 0x8 || [[ACTU:GetCommonInfo|GetCommonInfo]] || first 8 bytes of <code>SHA256 ( [[AM:GetDeviceId]]() as 4 little endian bytes + 'A2257354' )</code>
+
| 0x2A || 0x8 || [[ACTU:GetCommonInfo|GetCommonInfo]] || DeviceHash: first 8 bytes of <code>SHA256 ( [[AM:GetDeviceId]]() as 4 little endian bytes + A2257354 )</code>
|-
|-
| 0x2B || 0x1 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || FpLocalAccountId (local account ID of [[Friend_Services|friends sysmodule]])
| 0x2B || 0x1 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || FpLocalAccountId (local account ID of [[Friend_Services|friends sysmodule]])
Line 406:
Line 566:
|-
|-
| 0x2F || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || [[Cfg:TranslateCountryInfo|Translated]] SimpleAddressId ([[Config_Savegame#CountryInfo|CountryInfo]])
| 0x2F || 0x4 || [[ACTU:GetAccountDataBlock|GetAccountInfo]] || [[Cfg:TranslateCountryInfo|Translated]] SimpleAddressId ([[Config_Savegame#CountryInfo|CountryInfo]])
+
|}
+
+
= Types =
+
== Birthdate ==
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x2 || u16, Year
+
|-
+
| 0x2 || 0x1 || u8, Month
+
|-
+
| 0x3 || 0x1 || u8, Day
+
|}
+
+
== CFLStoreData ==
+
This is the Mii format used in ACT commands.
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x5C || [[Mii#Mii_format|Mii Data]]
+
|-
+
| 0x5C || 0x2 || padding
+
|-
+
| 0x5E || 0x2 || CRC16 over the above 0x5E bytes (see [[Mii#Checksum|Mii Checksum]] for details on the algorithm)
+
|}
+
+
== Mii Image Types ==
+
{| class="wikitable" border="1"
+
|-
+
! Value !! Description
+
|-
+
| 0 || Primary Mii Image
+
|-
+
| 1 || Unknown
+
|-
+
| 2 || Unknown
+
|-
+
| 3 || Unknown
+
|-
+
| 4 || Unknown
+
|-
+
| 5 || Unknown
+
|-
+
| 6 || Unknown
+
|-
+
| 7 || Unknown
+
|-
+
| 8 || Unknown
+
|}
+
+
+
== Timezone ==
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x40 + 1 || ASCII NULL-terminated TimezoneArea (max. 64 characters + NULL termination)
+
|-
+
| 0x41 || 0x3 || padding
+
|-
+
| 0x44 || 0x40 + 1 || ASCII NULL-terminated TimezoneId (max. 64 characters + NULL termination)
+
|-
+
| 0x85 || 0x3 || padding
+
|-
+
| 0x88 || 0x8 || s64, UtcOffset in seconds
+
|}
+
+
== AcquireTimeZoneListData ==
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x4 || u32, Capacity (32)
+
|-
+
| 0x4 || 0x4 || u32, Count
+
|-
+
| 0x8 || 0x90 * Capacity || [[ACT_Services#Timezone|Timezones]]
+
|}
+
+
== EulaInfo ==
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x2 + 1 || ASCII NULL-terminated two-letter country code (2 characters + NULL termination)
+
|-
+
| 0x3 || 0x2 + 1 || ASCII NULL-terminated two-letter language code (2 characters + NULL termination)
+
|-
+
| 0x6 || 0x2 || u16, EULA version
+
|}
+
+
== InquireBindingToExistentServerAccountData ==
+
Represents the device information for the console linked to the NNID.
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x1 || bool, HasMii
+
|-
+
| 0x1 || 0x3 || padding
+
|-
+
| 0x4 || 0x60 || [[ACT_Services#CFLStoreData|Mii CFLStoreData]]
+
|-
+
| 0x64 || 0x4 || u32, PrincipalId
+
|-
+
| 0x68 || 0x1 || bool, CoppaRequiredFlag
+
|-
+
| 0x69 || 0x3 || padding
+
|-
+
| 0x6C || 0x5 + 1 || ASCII 5-character CoppaCode + NULL termination
+
|-
+
| 0x72 || 0x100 + 1 || ASCII 256-character ParentEmail + NULL termination
+
|-
+
| 0x173 || 0x1 || padding
+
|-
+
| 0x174 || 0x4 || [[ACT_Services#Birthdate|Birth Date]]
+
|}
+
+
==SendCoppaCodeMailData==
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x5 + 1 || 5-character ASCII CoppaCode + NULL termination
+
|-
+
| 0x6 || 0x100 + 1 || 256-character ASCII ParentEmail + NULL termination
+
|}
+
+
==AcquireEulaData/AcquireEulaListData==
+
Data returned from [[ACTU:AcquireEula]] and [[ACTU:AcquireEulaList]] uses a special format.
+
+
===EulaHeader===
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x3 || 2-character Country code + NULL termination
+
|-
+
| 0x3 || 0x1 || padding
+
|-
+
| 0x4 || 0x3 || 2-character Language code + NULL termination
+
|-
+
| 0x7 || 0x1 || padding
+
|-
+
| 0x8 || 0x2 || u16, Version
+
|-
+
| 0xA || 0x2 || padding
+
|-
+
| 0xC || 0x4 || u32, end offset of this EULA within full data blob
+
|-
+
| 0x10 || 0x4 || EulaType offset
+
|-
+
| 0x14 || 0x4 || AgreeText offset
+
|-
+
| 0x18 || 0x4 || NonAgreeText offset
+
|-
+
| 0x1C || 0x4 || LanguageName offset
+
|-
+
| 0x20 || 0x4 || MainTitle offset
+
|-
+
| 0x24 || 0x4 || MainText offset
+
|-
+
| 0x28 || 0x4 || SubTitle offset
+
|-
+
| 0x2C || 0x4 || SubText offset
+
|}
+
+
<code>X offset</code> refers to an offset to a NULL-terminated ASCII string value for <code>X</code> within the full EULA data blob (see below).
+
+
===EulaList===
+
This is the full data blob retrieved using [[ACTU:GetAsyncResult]].
+
Each EULA list entry is appended at the very end of the previous one. The end offset in the header can be used to get to subsequent EULA list entries.
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x1 || u8, Number of EULA list entries (n)
+
|-
+
| 0x1 || n * (...) || concatenated EULA list entries
+
{| class="wikitable" border="1"
+
|-
+
! Offset !! Size !! Description
+
|-
+
| 0x0 || 0x30 || [[ACT_Services#EulaHeader|EulaHeader]]
+
|-
+
| 0x30 || ... || EULA data
+
|}
|}
|}