2025-09-26 11:57:18 -04:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
2025-09-26 13:06:18 -04:00
|
|
|
|
namespace SabreTools.Data.Models.N3DS
|
2025-09-26 11:57:18 -04:00
|
|
|
|
{
|
|
|
|
|
|
/// <see href="https://www.3dbrew.org/wiki/NCCH/Extended_Header#System_Control_Info"/>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
|
|
|
|
|
public sealed class SystemControlInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Application title (default is "CtrApp")
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>8 bytes</remarks>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
2025-10-31 13:59:28 -04:00
|
|
|
|
public string ApplicationTitle = string.Empty;
|
2025-09-26 11:57:18 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Reserved
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>5 bytes</remarks>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
2025-10-30 20:44:16 -04:00
|
|
|
|
public byte[] Reserved1 = new byte[5];
|
2025-09-26 11:57:18 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Flag (bit 0: CompressExefsCode, bit 1: SDApplication)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public byte Flag;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Remaster version
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ushort RemasterVersion;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Text code set info
|
|
|
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
|
public CodeSetInfo TextCodeSetInfo = new();
|
2025-09-26 11:57:18 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Stack size
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint StackSize;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Read-only code set info
|
|
|
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
|
public CodeSetInfo ReadOnlyCodeSetInfo = new();
|
2025-09-26 11:57:18 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Reserved
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint Reserved2;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Data code set info
|
|
|
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
|
public CodeSetInfo DataCodeSetInfo = new();
|
2025-09-26 11:57:18 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// BSS size
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint BSSSize;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Dependency module (program ID) list
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>48 entries</remarks>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
|
|
|
|
|
|
public ulong[]? DependencyModuleList;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SystemInfo
|
|
|
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
|
public SystemInfo SystemInfo = new();
|
2025-09-26 11:57:18 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|