aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/Loaders/Npdm/Npdm.cs')
-rw-r--r--Ryujinx.HLE/Loaders/Npdm/Npdm.cs70
1 files changed, 35 insertions, 35 deletions
diff --git a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
index 2ffef327..6d74668a 100644
--- a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
+++ b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
@@ -11,62 +11,62 @@ namespace Ryujinx.HLE.Loaders.Npdm
{
private const int MetaMagic = 'M' << 0 | 'E' << 8 | 'T' << 16 | 'A' << 24;
- public byte MmuFlags { get; }
- public bool Is64Bits { get; }
- public byte MainThreadPriority { get; }
- public byte DefaultCpuId { get; }
- public int PersonalMmHeapSize { get; }
- public int ProcessCategory { get; }
- public int MainThreadStackSize { get; }
- public string TitleName { get; }
- public byte[] ProductCode { get; }
-
- public Aci0 Aci0 { get; }
- public Acid Acid { get; }
-
- public Npdm(Stream stream)
+ public byte MmuFlags { get; private set; }
+ public bool Is64Bits { get; private set; }
+ public byte MainThreadPriority { get; private set; }
+ public byte DefaultCpuId { get; private set; }
+ public int PersonalMmHeapSize { get; private set; }
+ public int ProcessCategory { get; private set; }
+ public int MainThreadStackSize { get; private set; }
+ public string TitleName { get; private set; }
+ public byte[] ProductCode { get; private set; }
+
+ public ACI0 ACI0 { get; private set; }
+ public ACID ACID { get; private set; }
+
+ public Npdm(Stream Stream)
{
- BinaryReader reader = new BinaryReader(stream);
+ BinaryReader Reader = new BinaryReader(Stream);
- if (reader.ReadInt32() != MetaMagic)
+ if (Reader.ReadInt32() != MetaMagic)
{
throw new InvalidNpdmException("NPDM Stream doesn't contain NPDM file!");
}
- reader.ReadInt64();
+ Reader.ReadInt64();
- MmuFlags = reader.ReadByte();
+ MmuFlags = Reader.ReadByte();
Is64Bits = (MmuFlags & 1) != 0;
- reader.ReadByte();
+ Reader.ReadByte();
- MainThreadPriority = reader.ReadByte();
- DefaultCpuId = reader.ReadByte();
+ MainThreadPriority = Reader.ReadByte();
+ DefaultCpuId = Reader.ReadByte();
- reader.ReadInt32();
+ Reader.ReadInt32();
- PersonalMmHeapSize = reader.ReadInt32();
+ PersonalMmHeapSize = Reader.ReadInt32();
- ProcessCategory = reader.ReadInt32();
+ ProcessCategory = Reader.ReadInt32();
- MainThreadStackSize = reader.ReadInt32();
+ MainThreadStackSize = Reader.ReadInt32();
- byte[] tempTitleName = reader.ReadBytes(0x10);
+ byte[] TempTitleName = Reader.ReadBytes(0x10);
- TitleName = Encoding.UTF8.GetString(tempTitleName, 0, tempTitleName.Length).Trim('\0');
+ TitleName = Encoding.UTF8.GetString(TempTitleName, 0, TempTitleName.Length).Trim('\0');
- ProductCode = reader.ReadBytes(0x10);
+ ProductCode = Reader.ReadBytes(0x10);
- stream.Seek(0x30, SeekOrigin.Current);
+ Stream.Seek(0x30, SeekOrigin.Current);
- int aci0Offset = reader.ReadInt32();
- int aci0Size = reader.ReadInt32();
- int acidOffset = reader.ReadInt32();
- int acidSize = reader.ReadInt32();
+ int ACI0Offset = Reader.ReadInt32();
+ int ACI0Size = Reader.ReadInt32();
+ int ACIDOffset = Reader.ReadInt32();
+ int ACIDSize = Reader.ReadInt32();
- Aci0 = new Aci0(stream, aci0Offset);
- Acid = new Acid(stream, acidOffset);
+ ACI0 = new ACI0(Stream, ACI0Offset);
+ ACID = new ACID(Stream, ACIDOffset);
}
}
}