mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-10-02 16:50:20 -07:00

* Horizon: Implement arp:r and arp:w services * Fix formatting * Remove HLE arp services * Revert "Remove HLE arp services" This reverts commit c576fcccadb963db56b96bacabd1c1ac7abfb1ab. * Keep LibHac impl since it's used in bcat * Addresses gdkchan's feedback * ArpApi in PrepoIpcServer and remove LmApi * Fix 2 * Fixes ArpApi init * Fix encoding * Update PrepoService.cs * Fix prepo
23 lines
898 B
C#
23 lines
898 B
C#
namespace Ryujinx.Horizon.Sdk.Sf.Hipc
|
|
{
|
|
readonly struct HipcBufferDescriptor
|
|
{
|
|
#pragma warning disable CS0649 // Field is never assigned to
|
|
private readonly uint _sizeLow;
|
|
private readonly uint _addressLow;
|
|
private readonly uint _word2;
|
|
#pragma warning restore CS0649
|
|
|
|
public ulong Address => _addressLow | (((ulong)_word2 << 4) & 0xf00000000UL) | (((ulong)_word2 << 34) & 0x7000000000UL);
|
|
public ulong Size => _sizeLow | ((ulong)_word2 << 8) & 0xf00000000UL;
|
|
public HipcBufferMode Mode => (HipcBufferMode)(_word2 & 3);
|
|
|
|
public HipcBufferDescriptor(ulong address, ulong size, HipcBufferMode mode)
|
|
{
|
|
_sizeLow = (uint)size;
|
|
_addressLow = (uint)address;
|
|
_word2 = (uint)mode | ((uint)(address >> 34) & 0x1c) | ((uint)(size >> 32) << 24) | ((uint)(address >> 4) & 0xf0000000);
|
|
}
|
|
}
|
|
}
|