using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.N3DS
{
///
[StructLayout(LayoutKind.Sequential)]
public sealed class CardInfoHeader
{
///
/// CARD2: Writable Address In Media Units (For 'On-Chip' Savedata). CARD1: Always 0xFFFFFFFF.
///
public uint WritableAddressMediaUnits;
///
/// Card Info Bitmask
///
public uint CardInfoBitmask;
///
/// Reserved
///
/// 0xF8 bytes
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xF8)]
public byte[] Reserved1 = new byte[0xF8];
///
/// Filled size of cartridge
///
public uint FilledSize;
///
/// Reserved
///
/// 0x0C bytes
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x0C)]
public byte[] Reserved2 = new byte[0x0C];
///
/// Title version
///
public ushort TitleVersion;
///
/// Card revision
///
public ushort CardRevision;
///
/// Reserved
///
/// 0x0C bytes
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x0C)]
public byte[] Reserved3 = new byte[0x0C];
///
/// Title ID of CVer in included update partition
///
/// 8 bytes
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public byte[] CVerTitleID = new byte[8];
///
/// Version number of CVer in included update partition
///
public ushort CVerVersionNumber;
///
/// Reserved
///
/// 0xCD6 bytes
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xCD6)]
public byte[] Reserved4 = new byte[0xCD6];
///
/// This data is returned by 16-byte cartridge command 0x82.
///
public InitialData InitialData = new();
}
}