MP:GetHandle

From 3dbrew
Revision as of 01:56, 26 January 2017 by Yellows8 (talk | contribs) (→‎Description)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Request

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

Response

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

Description

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.