Difference between revisions of "MP:GetHandle"

From 3dbrew
Jump to navigation Jump to search
 
Line 18: Line 18:
 
This loads a handle from MP-sysmodule state.
 
This loads a handle from MP-sysmodule state.
  
* When the index is <16, the handle is loaded from an array of handles(presumably for each node on the network).
+
* When the index is <16, the handle is loaded from an array of event handles. When eventhandle[nodeID] is signaled, this indicates that data is available via [[MP:RecvDataFrame]] with that same nodeID.
 
* When the index is 16, the handle is loaded from stateptrother+{someoffset}.
 
* When the index is 16, the handle is loaded from stateptrother+{someoffset}.
 
* When the index is >16(accessed via 17 by the user-process normally), the handle is loaded from stateptrother+{someoffsetother}. This is 0x3000-byte sharedmem, the user-process maps it with mypermissions=read-only and otherpermission=DONTCARE.
 
* When the index is >16(accessed via 17 by the user-process normally), the handle is loaded from stateptrother+{someoffsetother}. This is 0x3000-byte sharedmem, the user-process maps it with mypermissions=read-only and otherpermission=DONTCARE.

Latest revision as of 01:56, 26 January 2017

Request[edit]

Index Word Description
0 Header code [0x00010040]
1 s32 index

Response[edit]

Index Word Description
0 Header code
1 Result code
2 0x0 Translate header for handle-transfer
3 Output handle

Description[edit]

This loads a handle from MP-sysmodule state.

  • When the index is <16, the handle is loaded from an array of event handles. When eventhandle[nodeID] is signaled, this indicates that data is available via MP:RecvDataFrame with that same nodeID.
  • When the index is 16, the handle is loaded from stateptrother+{someoffset}.
  • When the index is >16(accessed via 17 by the user-process normally), the handle is loaded from stateptrother+{someoffsetother}. This is 0x3000-byte sharedmem, the user-process maps it with mypermissions=read-only and otherpermission=DONTCARE.