LDN services: Difference between revisions

 
(6 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 540: Line 540:
[18.0.0+] The sdknso uses SessionManager with this, where the additional session-count is 0x3.
[18.0.0+] The sdknso uses SessionManager with this, where the additional session-count is 0x3.


[S2] There appears to be 2 ldn:u services, this appears to be for having separate [[#Protocol|Protocol]] permissions for NX and Ounce games. The Creator object has the same vtable for both of these. However the vtable for IUserLocalCommunicationService appears to be larger even with NX, which likely indicates there's new commands?
[S2] There appears to be 2 ldn:u services, this appears to be for having separate [[#Protocol|Protocol]] permissions for NX and Ounce games. The Creator object has the same vtable for both of these. However the vtable for IUserLocalCommunicationService appears to be larger even with NX, which likely indicates there's new commands? There also appears to be 4 additional max-sessions allocated to ldn*, this is probably for one of these ldn:u services?


{| class="wikitable" border="1"
{| class="wikitable" border="1"
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,889: Line 1,889:
| 0x0 || 0x10 || [[#NetworkInfo]]+0x50
| 0x0 || 0x10 || [[#NetworkInfo]]+0x50
|-
|-
| 0x10 || 0x8 || [[#NetworkInfo]]+0x478
| 0x10 || 0x8 || [[#NetworkInfo]]+0x478 [S2] The Station seems to verify that this is 0 when the Challenge is unused (ldn:s)? Throws an error if set before connecting to an [[#Protocol|Ounce]] network.
|-
|-
| 0x18 || 0x1 || [[#NetworkInfo]]+0x60
| 0x18 || 0x1 || [[#NetworkInfo]]+0x60
Line 2,169: Line 2,169:


[S2] Various objects/state have the same size/layout as S1, generally?(Other than IPC-related differences) There's also stack differences.
[S2] Various objects/state have the same size/layout as S1, generally?(Other than IPC-related differences) There's also stack differences.
== Code-region Memory Layout ==
=== S2 20.2.0 ===
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.
Total size is 0x24F000-bytes.
{| class="wikitable" border="1"
|-
! Offset
! Size
! Permissions
! Description
|-
| 0x0 || 0xE1000 || --X || .text
|-
| 0xE1000 || 0x3D000 || R-- || RO-region
|-
| 0x11E000 || 0x3A000 || RW || On NX this is at 0xEF000. The main ExpHeap is at +0x2000, on NX it's at +0x1000.
|-
| 0x158000 || 0x8000 || non-RW || On NX this is at 0x123000.
|-
| 0x160000 || 0x8000 || RW || On NX this is at 0x12B000.
|-
| 0x168000 || 0xF000 || non-RW || On NX this is at 0x139000.
|-
| 0x177000 || 0x3000 || RW || On NX this is at 0x13F000.
|-
| 0x17A000 || 0x24000 || non-RW || On NX this is at 0x14B000.
|-
| 0x19E000 || 0x4E000 || RW || On NX this is at 0x16F000.
|-
| 0x1EC000 || 0x2000 || -- || On NX this is at 0x1BD000.
|-
| 0x1EE000 || 0x2000 || {accessible} || On NX this is at 0x1BF000.
|-
| 0x1EF000 || 0x5000 || -- || On NX this is at 0x1E2000.
|-
| 0x1F4000 || 0x21000 || {accessible} || On NX this is at 0x1EA000.
|-
| 0x218000 || 0x8000 || -- ||
|-
| 0x220000 || 0x2F000 || {accessible}
|}


[[Category:Services]]
[[Category:Services]]