aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Ldr
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Ldr')
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs8
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs8
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs82
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs8
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs35
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs38
-rw-r--r--Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs18
7 files changed, 116 insertions, 81 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs
new file mode 100644
index 00000000..d87234da
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ldr/IDebugMonitorInterface.cs
@@ -0,0 +1,8 @@
+namespace Ryujinx.HLE.HOS.Services.Ldr
+{
+ [Service("ldr:dmnt")]
+ class IDebugMonitorInterface : IpcService
+ {
+ public IDebugMonitorInterface(ServiceCtx context) { }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs
new file mode 100644
index 00000000..9f5b5e35
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ldr/IProcessManagerInterface.cs
@@ -0,0 +1,8 @@
+namespace Ryujinx.HLE.HOS.Services.Ldr
+{
+ [Service("ldr:pm")]
+ class IProcessManagerInterface : IpcService
+ {
+ public IProcessManagerInterface(ServiceCtx context) { }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs
index 748a600d..b5ef0f07 100644
--- a/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs
+++ b/Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs
@@ -1,6 +1,5 @@
using ARMeilleure.Memory;
using Ryujinx.Common;
-using Ryujinx.HLE.HOS.Ipc;
using Ryujinx.HLE.HOS.Kernel.Common;
using Ryujinx.HLE.HOS.Kernel.Memory;
using Ryujinx.HLE.HOS.Kernel.Process;
@@ -9,91 +8,12 @@ using Ryujinx.HLE.Utilities;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Runtime.InteropServices;
using System.Security.Cryptography;
namespace Ryujinx.HLE.HOS.Services.Ldr
{
- [StructLayout(LayoutKind.Explicit, Size = 0x350)]
- unsafe struct NrrHeader
- {
- [FieldOffset(0)]
- public uint Magic;
-
- [FieldOffset(0x10)]
- public ulong TitleIdMask;
-
- [FieldOffset(0x18)]
- public ulong TitleIdPattern;
-
- [FieldOffset(0x30)]
- public fixed byte Modulus[0x100];
-
- [FieldOffset(0x130)]
- public fixed byte FixedKeySignature[0x100];
-
- [FieldOffset(0x230)]
- public fixed byte NrrSignature[0x100];
-
- [FieldOffset(0x330)]
- public ulong TitleIdMin;
-
- [FieldOffset(0x338)]
- public uint NrrSize;
-
- [FieldOffset(0x340)]
- public uint HashOffset;
-
- [FieldOffset(0x344)]
- public uint HashCount;
- }
-
- class NrrInfo
- {
- public NrrHeader Header { get; private set; }
- public List<byte[]> Hashes { get; private set; }
- public long NrrAddress { get; private set; }
-
- public NrrInfo(long nrrAddress, NrrHeader header, List<byte[]> hashes)
- {
- NrrAddress = nrrAddress;
- Header = header;
- Hashes = hashes;
- }
- }
-
- class NroInfo
- {
- public NxRelocatableObject Executable { get; private set; }
-
- public byte[] Hash { get; private set; }
- public ulong NroAddress { get; private set; }
- public ulong NroSize { get; private set; }
- public ulong BssAddress { get; private set; }
- public ulong BssSize { get; private set; }
- public ulong TotalSize { get; private set; }
- public ulong NroMappedAddress { get; set; }
-
- public NroInfo(
- NxRelocatableObject executable,
- byte[] hash,
- ulong nroAddress,
- ulong nroSize,
- ulong bssAddress,
- ulong bssSize,
- ulong totalSize)
- {
- Executable = executable;
- Hash = hash;
- NroAddress = nroAddress;
- NroSize = nroSize;
- BssAddress = bssAddress;
- BssSize = bssSize;
- TotalSize = totalSize;
- }
- }
-
[Service("ldr:ro")]
+ [Service("ro:1")] // 7.0.0+
class IRoInterface : IpcService
{
private const int MaxNrr = 0x40;
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs b/Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs
new file mode 100644
index 00000000..856aec52
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ldr/IShellInterface.cs
@@ -0,0 +1,8 @@
+namespace Ryujinx.HLE.HOS.Services.Ldr
+{
+ [Service("ldr:shel")]
+ class IShellInterface : IpcService
+ {
+ public IShellInterface(ServiceCtx context) { }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs b/Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs
new file mode 100644
index 00000000..c65d5413
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ldr/Types/NroInfo.cs
@@ -0,0 +1,35 @@
+using Ryujinx.HLE.Loaders.Executables;
+
+namespace Ryujinx.HLE.HOS.Services.Ldr
+{
+ class NroInfo
+ {
+ public NxRelocatableObject Executable { get; private set; }
+
+ public byte[] Hash { get; private set; }
+ public ulong NroAddress { get; private set; }
+ public ulong NroSize { get; private set; }
+ public ulong BssAddress { get; private set; }
+ public ulong BssSize { get; private set; }
+ public ulong TotalSize { get; private set; }
+ public ulong NroMappedAddress { get; set; }
+
+ public NroInfo(
+ NxRelocatableObject executable,
+ byte[] hash,
+ ulong nroAddress,
+ ulong nroSize,
+ ulong bssAddress,
+ ulong bssSize,
+ ulong totalSize)
+ {
+ Executable = executable;
+ Hash = hash;
+ NroAddress = nroAddress;
+ NroSize = nroSize;
+ BssAddress = bssAddress;
+ BssSize = bssSize;
+ TotalSize = totalSize;
+ }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs
new file mode 100644
index 00000000..a0764d1f
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrHeader.cs
@@ -0,0 +1,38 @@
+using System.Runtime.InteropServices;
+
+namespace Ryujinx.HLE.HOS.Services.Ldr
+{
+ [StructLayout(LayoutKind.Explicit, Size = 0x350)]
+ unsafe struct NrrHeader
+ {
+ [FieldOffset(0)]
+ public uint Magic;
+
+ [FieldOffset(0x10)]
+ public ulong TitleIdMask;
+
+ [FieldOffset(0x18)]
+ public ulong TitleIdPattern;
+
+ [FieldOffset(0x30)]
+ public fixed byte Modulus[0x100];
+
+ [FieldOffset(0x130)]
+ public fixed byte FixedKeySignature[0x100];
+
+ [FieldOffset(0x230)]
+ public fixed byte NrrSignature[0x100];
+
+ [FieldOffset(0x330)]
+ public ulong TitleIdMin;
+
+ [FieldOffset(0x338)]
+ public uint NrrSize;
+
+ [FieldOffset(0x340)]
+ public uint HashOffset;
+
+ [FieldOffset(0x344)]
+ public uint HashCount;
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs
new file mode 100644
index 00000000..3636ce33
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ldr/Types/NrrInfo.cs
@@ -0,0 +1,18 @@
+using System.Collections.Generic;
+
+namespace Ryujinx.HLE.HOS.Services.Ldr
+{
+ class NrrInfo
+ {
+ public NrrHeader Header { get; private set; }
+ public List<byte[]> Hashes { get; private set; }
+ public long NrrAddress { get; private set; }
+
+ public NrrInfo(long nrrAddress, NrrHeader header, List<byte[]> hashes)
+ {
+ NrrAddress = nrrAddress;
+ Header = header;
+ Hashes = hashes;
+ }
+ }
+} \ No newline at end of file