2021-10-24 22:13:20 +00:00
|
|
|
using Ryujinx.HLE.Utilities;
|
2020-01-12 02:10:55 +00:00
|
|
|
using System.IO;
|
|
|
|
|
2022-03-22 19:46:16 +00:00
|
|
|
namespace Ryujinx.HLE.FileSystem
|
2020-01-12 02:10:55 +00:00
|
|
|
{
|
|
|
|
public class SystemVersion
|
|
|
|
{
|
|
|
|
public byte Major { get; }
|
|
|
|
public byte Minor { get; }
|
|
|
|
public byte Micro { get; }
|
|
|
|
public byte RevisionMajor { get; }
|
|
|
|
public byte RevisionMinor { get; }
|
|
|
|
public string PlatformString { get; }
|
|
|
|
public string Hex { get; }
|
|
|
|
public string VersionString { get; }
|
|
|
|
public string VersionTitle { get; }
|
|
|
|
|
|
|
|
public SystemVersion(Stream systemVersionFile)
|
|
|
|
{
|
|
|
|
using (BinaryReader reader = new BinaryReader(systemVersionFile))
|
|
|
|
{
|
|
|
|
Major = reader.ReadByte();
|
|
|
|
Minor = reader.ReadByte();
|
|
|
|
Micro = reader.ReadByte();
|
|
|
|
|
|
|
|
reader.ReadByte(); // Padding
|
|
|
|
|
|
|
|
RevisionMajor = reader.ReadByte();
|
|
|
|
RevisionMinor = reader.ReadByte();
|
|
|
|
|
|
|
|
reader.ReadBytes(2); // Padding
|
|
|
|
|
2021-10-24 22:13:20 +00:00
|
|
|
PlatformString = StringUtils.ReadInlinedAsciiString(reader, 0x20);
|
|
|
|
Hex = StringUtils.ReadInlinedAsciiString(reader, 0x40);
|
|
|
|
VersionString = StringUtils.ReadInlinedAsciiString(reader, 0x18);
|
|
|
|
VersionTitle = StringUtils.ReadInlinedAsciiString(reader, 0x80);
|
2020-01-12 02:10:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|