LDN services: Difference between revisions

 
(4 intermediate revisions by the same user not shown)
Line 269: Line 269:
This cmd was implemented with [20.0.0+], prior to that this just returned an error.
This cmd was implemented with [20.0.0+], prior to that this just returned an error.


The sdk user-process func will pass value 1 to the cmd when the input [[#Protocol|Protocol]] is 0/1, 3 is passed directly if specified, otherwise Abort. User-processes use SetProtocol immediately after initializing ldn.
The sdk user-process func will pass value 1 (2 on Ounce) to the cmd when the input [[#Protocol|Protocol]] is 0, valid values passed directly when recognized, otherwise Abort. User-processes use SetProtocol immediately after initializing ldn.


[20.0.0+] The ldn initialization functionality in sdknso also uses this with value 1 (NX) eventually after the init cmd was used successfully.
[20.0.0+] The ldn initialization functionality in sdknso also uses this with value 1 (NX) eventually after the init cmd was used successfully.
Line 1,467: Line 1,467:
| 2 || [S2]
| 2 || [S2]
|-
|-
| 3 || (NXAndOunce?)
| 3 || [20.0.0+] (NXAndOunce?)
|-
|-
| 4 || [S2]
| 4 || [S2] [20.0.0+]
|}
|}


The Initialize* cmds configure state the same as using [[#SetProtocol|SetProtocol]] with Protocol NX.
The Initialize* cmds configure state the same as using [[#SetProtocol|SetProtocol]] with Protocol NX.


There appears to be S2-only values which enables using Ounce-only keys. The following uses new Ounce-only keys (with S2 hosting):
There's S2-only values which enables using Ounce-only keys. The following uses new Ounce-only keys (with S2 hosting):
* In-game ldn-usage for a S2-only Application.
* In-game ldn-usage for a S2-only Application.
* Local-game-update with a S2-only Application.
* Local-game-update with a S2-only Application.
Line 1,481: Line 1,481:
There's system-titles which [[20.0.0|use]] SetProtocol. While there's game(s) which use SetProtocol, there's no known (?) games using Protocol3 (excluding GameShare which is system).
There's system-titles which [[20.0.0|use]] SetProtocol. While there's game(s) which use SetProtocol, there's no known (?) games using Protocol3 (excluding GameShare which is system).


[S2] Protocol2 and Protocol4 appear to be identical to Protocol3 except for using [[SPL_services|Ounce]] keys (?). It's unknown exactly which Protocol uses which [[SPL_services|Generation]], though presumably 2/4 is Generation 0x0/0x1? lcs (local-content-share) uses Generation 0x1, while Mario Kart World uses 0x0.
[S2] Protocol2 and Protocol4 appear to be identical to Protocol3 except for using [[SPL_services|Ounce]] keys (?). The [[SPL_services|Generation]] is determined with the Protocol: Protocol2 is Generation 0, Protocol4 Generation 1. The following uses each Protocol:
* Protocol2: Mario Kart World
* Protocol4: lcs (local-content-share), Splatoon Raiders (this might be just due to the value used for [[LDN_services#SetProtocol|Default]] being bumped?)


[S2] Keys are generated by passing the SHA256 hash as the KeySource to the relevant [[SPL_services|spl:ldn]] command with the above Generation, with the full hash being passed to the Ounce cmds. Only the first 0x10-bytes of the output key is used, since AES-128 is used even with Ounce.
[S2] Keys are generated by passing the SHA256 hash as the KeySource to the relevant [[SPL_services|spl:ldn]] command with the above Generation, with the full hash being passed to the Ounce cmds. Only the first 0x10-bytes of the output key is used, since AES-128 is used even with Ounce.
Line 2,171: Line 2,173:


== Code-region Memory Layout ==
== Code-region Memory Layout ==
=== S2 20.5.0 ===
=== S2 20.2.0 ===
This is the codebin-region layout for S2 ldn 20.5.0, exact starting version unknown. BuildId is "DC456FA4...".
This is the codebin-region layout for S2 ldn 20.2.0-20.5.0. BuildId is "DC456FA4...".


The on-NX note is for the equivalent memregion location/size, memregion-size/contents compared to NX may vary.
The on-NX note is for the equivalent memregion location/size, memregion-size/contents compared to NX may vary.