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, CharSet = CharSet.Unicode)]
|
|
|
|
|
|
public class HeaderV1 : Header
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Flags
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.U4)]
|
|
|
|
|
|
public Flags Flags;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Compression type
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.U4)]
|
|
|
|
|
|
public CompressionType Compression;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 512-byte sectors per hunk
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint HunkSize;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Total # of hunks represented
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint TotalHunks;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Number of cylinders on hard disk
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint Cylinders;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Number of heads on hard disk
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint Heads;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Number of sectors on hard disk
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public uint Sectors;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MD5 checksum of raw data
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
|
|
|
|
|
public byte[] MD5 = new byte[16];
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MD5 checksum of parent file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
|
|
|
|
|
public byte[] ParentMD5 = new byte[16];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|