diff options
author | Ac_K <Acoustik666@gmail.com> | 2024-01-25 23:06:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 23:06:53 +0100 |
commit | cd37c75b82f97ad5d3bf6317ffcde62c06a6e920 (patch) | |
tree | db4f6e9630878a4b32c8880ef95f7c877e20aab0 /src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs | |
parent | 43705c2320c2ff7c8f6dca1141f3bf56033966d4 (diff) |
Horizon: Implement arp:r and arp:w services (#5802)1.1.1131
* 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
Diffstat (limited to 'src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs')
-rw-r--r-- | src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs b/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs index 3b066662..79b7d681 100644 --- a/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs +++ b/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs @@ -64,6 +64,18 @@ namespace Ryujinx.Common.Memory } [StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)] + public struct ByteArray3000 : IArray<byte> + { + private const int Size = 3000; + + byte _element; + + public readonly int Length => Size; + public ref byte this[int index] => ref AsSpan()[index]; + public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); + } + + [StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)] public struct ByteArray4096 : IArray<byte> { private const int Size = 4096; |