Difference between revisions of "FRDU:UnscrambleLocalFriendCode"

From 3dbrew
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
=Request=
 
=Request=
{| class="wikitable" border="1"
+
{{IPC/Request}}
|-
+
{{IPC/RequestHeader|0x001C|1|2}}
!  Index Word
+
{{IPC/RequestEntry|Count}}
!  Description
+
{{IPC/TranslateStaticBuffer|Input scrambled friend codes buffer (12 bytes each)|1}}
|-
+
{{IPC/RequestEnd}}
| 0
 
| Header code [0x001C0042]
 
|-
 
| 1
 
| Friend code count
 
|-
 
| 2
 
| ((count * 12) << 14) <nowiki>|</nowiki> 0x402
 
|-
 
| 3
 
| Pointer to encoded friend codes. Each is 12 bytes large.
 
|}
 
  
The following is located 0x100-bytes after the beginning of the above command buffer:
+
=Request Static Buffers=
{| class="wikitable" border="1"
+
{{IPC/Request}}
|-
+
{{#vardefine:ipc_offset|0}}
!  Index Word
+
{{IPC/TranslateStaticBuffer|Output friend code buffer (u64)|0}}
!  Description
+
{{IPC/RequestEnd}}
|-
 
| 0
 
| ((count * 8) << 14) <nowiki>|</nowiki> 2
 
|-
 
| 1
 
| Pointer to write decoded local friend codes to. Each is 8 bytes large.
 
|}
 
  
 
=Response=
 
=Response=
{| class="wikitable" border="1"
+
{{IPC/Request}}
|-
+
{{#vardefine:ipc_offset|0}}
!  Index Word
+
{{IPC/RequestHeader|0x001C|1|2}}
!  Description
+
{{IPC/RequestEntry|Result code}}
|-
+
{{IPC/TranslateStaticBuffer|Output friend code buffer (u64)|0}}
| 0
+
{{IPC/RequestEnd}}
| Header code
 
|-
 
| 1
 
| Result code
 
|}
 
  
 
=Description=
 
=Description=
This decodes one or more encoded friend codes into local friend codes for use with some friend-related commands. Encoded friend codes seem to generally be retrieved from [[NWM_Services#NWM_local-WLAN_service_.22nwm::UDS.22|NWMUDS]] command [[NWMUDS:GetNodeInformation|GetNodeInformation]].
+
This unscrambles one or more scrambled friend codes. Scrambled friend codes seem to be generally be retrieved from [[NWM_Services#NWM_local-WLAN_service_.22nwm::UDS.22|NWMUDS]] command [[NWMUDS:GetNodeInformation|GetNodeInformation]].

Latest revision as of 23:09, 16 December 2024

Request[edit]

Index Word Description
0
Header 0x001C0042 Cmd 0x001C Param 1 Xlat 2
1 Count
2 Descriptor for static buffer (id 1)
3 Input scrambled friend codes buffer (12 bytes each)

Request Static Buffers[edit]

Index Word Description
0 Descriptor for static buffer (id 0)
1 Output friend code buffer (u64)

Response[edit]

Index Word Description
0
Header 0x001C0042 Cmd 0x001C Param 1 Xlat 2
1 Result code
2 Descriptor for static buffer (id 0)
3 Output friend code buffer (u64)

Description[edit]

This unscrambles one or more scrambled friend codes. Scrambled friend codes seem to be generally be retrieved from NWMUDS command GetNodeInformation.