From cd37c75b82f97ad5d3bf6317ffcde62c06a6e920 Mon Sep 17 00:00:00 2001
From: Ac_K <Acoustik666@gmail.com>
Date: Thu, 25 Jan 2024 23:06:53 +0100
Subject: Horizon: Implement arp:r and arp:w services (#5802)

* 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
---
 src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs')

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
@@ -63,6 +63,18 @@ namespace Ryujinx.Common.Memory
         public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
     }
 
+    [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>
     {
-- 
cgit v1.2.3-70-g09d2