ACT Services: Difference between revisions

TimmSkiller (talk | contribs)
No edit summary
TimmSkiller (talk | contribs)
Add information about UUID generation
Line 199: Line 199:


Some commands require require the account slot as an argument, which is 1-indexed. The value for using the current loaded account is 0xFE.
Some commands require require the account slot as an argument, which is 1-indexed. The value for using the current loaded account is 0xFE.
= UUIDs =
The ACT service generates UUIDs for accounts and for the console in general.
All UUIDs generated by the service are Version 1 UUIDs [https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-1].
== Node Data ==
In general, the following 48-bit node data is used.
{| class="wikitable" border="1"
|-
! Offset !! Size !! Description
|-
| 0x0 || 0x1 || Always set to 1
|-
| 0x1 || 0x1 || Always set to 0 (related to parental controls?)
|-
| 0x2 || 0x4 || Byte-Swapped value from [[AM:GetDeviceId]]
|}
== UUID Types ==
=== Regular UUIDs ===
These are just standard RFC9562 [https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-1] UUIDs with the above node data.
=== Title-specific UUIDs ===
These UUIDs are specific to the title that requested them to be generated, specifically, using the unique ID portion of the title ID of that title.
The following technique is used internally to generate these UUIDs:
- Generate a regular UUID using the above mentioned node data (<code>regular_uuid</code>)
- <code>hash = SHA256 ( byte-swapped unique ID (thus, big endian) + 095E273A + 48-bit node data from regular_uuid )</code>
- <code>output_uuid = regular_uuid[0:9] + hash[10] | 0x1 + hash[11:16]</code>


= DataBlocks =
= DataBlocks =