mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-30 20:54:30 +01:00
Update NRR structs (#1291)
* Update NRR structs This was based on Switchbrew page: switchbrew.org/wiki/NRR * Address review comments
This commit is contained in:
parent
1c2af7ce92
commit
a78a69a6e7
23
Ryujinx.HLE/HOS/Services/Ro/Types/NRRCertification.cs
Normal file
23
Ryujinx.HLE/HOS/Services/Ro/Types/NRRCertification.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Ryujinx.HLE.HOS.Services.Ro
|
||||||
|
{
|
||||||
|
[StructLayout(LayoutKind.Explicit, Size = 0x220)]
|
||||||
|
unsafe struct NRRCertification
|
||||||
|
{
|
||||||
|
[FieldOffset(0)]
|
||||||
|
public ulong ApplicationIdMask;
|
||||||
|
|
||||||
|
[FieldOffset(0x8)]
|
||||||
|
public ulong ApplicationIdPattern;
|
||||||
|
|
||||||
|
[FieldOffset(0x10)]
|
||||||
|
public fixed byte Reserved[0x10];
|
||||||
|
|
||||||
|
[FieldOffset(0x20)]
|
||||||
|
public fixed byte Modulus[0x100];
|
||||||
|
|
||||||
|
[FieldOffset(0x120)]
|
||||||
|
public fixed byte Signature[0x100];
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Ro
|
namespace Ryujinx.HLE.HOS.Services.Ro
|
||||||
{
|
{
|
||||||
@ -8,31 +8,37 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public uint Magic;
|
public uint Magic;
|
||||||
|
|
||||||
|
[FieldOffset(0x4)]
|
||||||
|
public uint CertificationSignatureKeyGeneration; // 9.0.0+
|
||||||
|
|
||||||
|
[FieldOffset(0x8)]
|
||||||
|
public ulong Reserved;
|
||||||
|
|
||||||
[FieldOffset(0x10)]
|
[FieldOffset(0x10)]
|
||||||
public ulong TitleIdMask;
|
public NRRCertification Certification;
|
||||||
|
|
||||||
[FieldOffset(0x18)]
|
|
||||||
public ulong TitleIdPattern;
|
|
||||||
|
|
||||||
[FieldOffset(0x30)]
|
|
||||||
public fixed byte Modulus[0x100];
|
|
||||||
|
|
||||||
[FieldOffset(0x130)]
|
|
||||||
public fixed byte FixedKeySignature[0x100];
|
|
||||||
|
|
||||||
[FieldOffset(0x230)]
|
[FieldOffset(0x230)]
|
||||||
public fixed byte NrrSignature[0x100];
|
public fixed byte NrrSignature[0x100];
|
||||||
|
|
||||||
[FieldOffset(0x330)]
|
[FieldOffset(0x330)]
|
||||||
public ulong TitleIdMin;
|
public ulong TitleId;
|
||||||
|
|
||||||
[FieldOffset(0x338)]
|
[FieldOffset(0x338)]
|
||||||
public uint NrrSize;
|
public uint NrrSize;
|
||||||
|
|
||||||
|
[FieldOffset(0x33C)]
|
||||||
|
public byte Type; // 7.0.0+
|
||||||
|
|
||||||
|
[FieldOffset(0x33D)]
|
||||||
|
public fixed byte Reserved2[0x3];
|
||||||
|
|
||||||
[FieldOffset(0x340)]
|
[FieldOffset(0x340)]
|
||||||
public uint HashOffset;
|
public uint HashOffset;
|
||||||
|
|
||||||
[FieldOffset(0x344)]
|
[FieldOffset(0x344)]
|
||||||
public uint HashCount;
|
public uint HashCount;
|
||||||
|
|
||||||
|
[FieldOffset(0x348)]
|
||||||
|
public ulong Reserved3;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user