IRUSER Shared Memory

From 3dbrew
Revision as of 14:13, 22 February 2017 by Wwylele (talk | contribs)
Jump to navigation Jump to search

This is the shared-memory for "ir:USER", which is provided by the application via InitializeIrnop or InitializeIrnopShared. The size of the shared memory is determined by parameters of the Init functions above.

Overall Structure

The shared memory consists of 2 or 5 components, depending on which Init function is called. For InitializeIrnopShared, ir service puts more information to the shared memory and applications can read it directly; for InitializeIrnop, ir service puts less information and store the rest in its local storage. All these components are adjacent to each other, without any padding, which means the data can be unaligned if the size specified in Init is unaligned.

Size Description
0x10 StatusInfo. Only presents when InitializeIrnopShared is called
0x10 ReceiveBufferInfo. Only presents when InitializeIrnopShared is called
(specified by Init paramter) ReceiveBuffer
0x10 SendBufferInfo. Only presents when InitializeIrnopShared is called
(specified by Init paramter) SendBuffer


Relative offset Size Description
0x0 0x4 Latest receive error result. Read by IRUSER:GetLatestReceiveErrorResult
0x4 0x4 Latest Send error result. Read by IRUSER:GetLatestSendErrorResult
0x8 0x1 Connection status. Read by IRUSER:GetConnectionStatus
0x9 0x1 Trying to connect status. Read by IRUSER:GetTryingToConnectStatus
0xA 0x1 Connection role. Read by IRUSER:GetConnectionRole
0xB 0x1 Machine ID. Set by IRUSER:SetOwnMachineId
0xC 0x4 Unknown