2025-09-26 11:57:18 -04:00
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2025-09-26 13:06:18 -04:00
|
|
|
namespace SabreTools.Data.Models.CHD
|
2025-09-26 11:57:18 -04:00
|
|
|
{
|
2025-10-30 21:27:37 -04:00
|
|
|
/// <see href="https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h"/>
|
2025-09-26 11:57:18 -04:00
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
public sealed class CompressedMapHeaderV5
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Length of compressed map
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint Length;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Offset of first block
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>Actually UInt48</remarks>
|
|
|
|
|
public ulong DataStart;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// CRC-16 of the map
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ushort CRC;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Bits used to encode complength
|
|
|
|
|
/// </summary>
|
|
|
|
|
public byte LengthBits;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Bits used to encode self-refs
|
|
|
|
|
/// </summary>
|
|
|
|
|
public byte HunkBits;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Bits used to encode parent unit refs
|
|
|
|
|
/// </summary>
|
|
|
|
|
public byte ParentUnitBits;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Future use
|
|
|
|
|
/// </summary>
|
|
|
|
|
public byte Reserved;
|
|
|
|
|
}
|
|
|
|
|
}
|