diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-09-19 02:45:11 +0200 |
|---|---|---|
| committer | jduncanator <1518948+jduncanator@users.noreply.github.com> | 2019-09-19 10:45:11 +1000 |
| commit | a0720b5681852f3d786d77bd3793b0359dea321c (patch) | |
| tree | 9d8f61e540d1d1d827999902dad95e5c0c1e076e /Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs | |
| parent | 4af3101b22e6957d6aa48a2768566d658699f4ed (diff) | |
Refactoring HOS folder structure (#771)
* Refactoring HOS folder structure
Refactoring HOS folder structure:
- Added some subfolders when needed (Following structure decided in private).
- Added some `Types` folders when needed.
- Little cleanup here and there.
- Add services placeholders for every HOS services (close #766 and #753).
* Remove Types namespaces
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Ldr/IRoInterface.cs | 82 |
1 files changed, 1 insertions, 81 deletions
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; |
