namespace SabreTools.Data.Models.OperaFS { /// /// OperaFS Volume Descriptor, first sector of filesystem /// /// public class VolumeDescriptor { /// /// Should be 0x01 /// public byte RecordType { get; set; } /// /// "ZZZZZ" /// public byte[] VolumeSyncBytes { get; set; } = new byte[5]; /// /// Should be 0x01 /// public byte StructureVersion { get; set; } /// /// Should be 0x00 for all 3DO discs /// Is used by M2 discs? /// public VolumeFlags VolumeFlags { get; set; } /// /// Usually zeroed /// public byte[] VolumeCommentary { get; set; } = new byte[32]; /// /// ASCII "CD-ROM" /// public byte[] VolumeIdentifier { get; set; } = new byte[32]; /// /// Hash or just a random value to identify disc /// public uint VolumeUniqueIdentifier { get; set; } /// /// Sector size in volume /// Usually 0x800 (2048) /// public uint VolumeBlockSize { get; set; } /// /// Number of sectors in volume /// Usually size of disc image minus 300 /// public uint VolumeBlockCount { get; set; } /// /// Hash or just a random value to identify root directory /// public uint RootUniqueIdentifier { get; set; } /// /// Number of sectors for root directory /// Usually 0x01 /// public uint RootDirectoryBlockCount { get; set; } /// /// Sector size in root directory /// Usually 0x800 /// public uint RootDirectoryBlockSize { get; set; } /// /// Number of duplicates of the root directory provided /// Should be between 0 and 7 /// public uint RootDirectoryLastAvatarIndex { get; set; } /// /// Array of 8 offsets pointing to the root directory /// Contents of each root directory should be identical /// If RootDirectoryLastAvatarIndex is less than 7, remaining values are zeroed /// public uint[] RootDirectoryAvatarList { get; set; } = new uint[8]; /// /// Rom tag count /// /// Extended volume data, present on M2 discs only public uint? RomTagCount { get; set; } /// /// Application ID /// /// Extended volume data, present on M2 discs only public uint? ApplicationID { get; set; } /// /// 36 reserved (zeroed) bytes /// /// Extended volume data, present on M2 discs only public byte[]? Reserved { get; set; } /// /// "iamaduck" repeated, aligned to each QWORD (0x0 or 0x8) /// i.e. if padding starts at offset ending in 0x4 or 0xC, then it begins with "duck" /// Is 0x77C long for M1 discs, and 0x750 long for M2 discs /// public byte[] Padding { get; set; } = []; } }