mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-21 22:35:06 +00:00
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
102 lines
2.4 KiB
C#
102 lines
2.4 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace SabreTools.Data.Models.N3DS
|
|
{
|
|
/// <summary>
|
|
/// RomFS (or Read-Only Filesystem) is part of the NCCH format, and is
|
|
/// used as external file storage.
|
|
/// </summary>
|
|
/// <see href="https://www.3dbrew.org/wiki/RomFS"/>
|
|
/// TODO: Implement the other parts of the RomFS tree structure
|
|
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
|
public sealed class RomFSHeader
|
|
{
|
|
/// <summary>
|
|
/// Magic "IVFC"
|
|
/// </summary>
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
|
|
public string MagicString = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Magic number 0x10000
|
|
/// </summary>
|
|
public uint MagicNumber;
|
|
|
|
/// <summary>
|
|
/// Master hash size
|
|
/// </summary>
|
|
public uint MasterHashSize;
|
|
|
|
/// <summary>
|
|
/// Level 1 logical offset
|
|
/// </summary>
|
|
public ulong Level1LogicalOffset;
|
|
|
|
/// <summary>
|
|
/// Level 1 hashdata size
|
|
/// </summary>
|
|
public ulong Level1HashdataSize;
|
|
|
|
/// <summary>
|
|
/// Level 1 block size, in log2
|
|
/// </summary>
|
|
public uint Level1BlockSizeLog2;
|
|
|
|
/// <summary>
|
|
/// Reserved
|
|
/// </summary>
|
|
public uint Reserved1;
|
|
|
|
/// <summary>
|
|
/// Level 2 logical offset
|
|
/// </summary>
|
|
public ulong Level2LogicalOffset;
|
|
|
|
/// <summary>
|
|
/// Level 2 hashdata size
|
|
/// </summary>
|
|
public ulong Level2HashdataSize;
|
|
|
|
/// <summary>
|
|
/// Level 2 block size, in log2
|
|
/// </summary>
|
|
public uint Level2BlockSizeLog2;
|
|
|
|
/// <summary>
|
|
/// Reserved
|
|
/// </summary>
|
|
public uint Reserved2;
|
|
|
|
/// <summary>
|
|
/// Level 3 logical offset
|
|
/// </summary>
|
|
public ulong Level3LogicalOffset;
|
|
|
|
/// <summary>
|
|
/// Level 3 hashdata size
|
|
/// </summary>
|
|
public ulong Level3HashdataSize;
|
|
|
|
/// <summary>
|
|
/// Level 3 block size, in log2
|
|
/// </summary>
|
|
public uint Level3BlockSizeLog2;
|
|
|
|
/// <summary>
|
|
/// Reserved
|
|
/// </summary>
|
|
public uint Reserved3;
|
|
|
|
/// <summary>
|
|
/// Reserved
|
|
/// </summary>
|
|
public uint Reserved4;
|
|
|
|
/// <summary>
|
|
/// Optional info size.
|
|
/// </summary>
|
|
public uint OptionalInfoSize;
|
|
}
|
|
}
|