using System.Collections.Generic; namespace SabreTools.Data.Models.XDVDFS { /// /// Xbox DVD Filesystem (aka "XISO"), 2048-byte sector size /// Present in XGD1, XGD2, and XGD3 discs /// Gaps between directory and file extents are filled with pseudo-random filler data (unless intentionally wiped) /// Some early XGD1 filesystems use a simpler PRNG algorithm that can have its seed brute forced /// Gaps also include the security sector ranges, 4096 sectors each that cannot be read from discs (usually zeroed) /// /// /// public class Volume { /// /// Reserved Area, made up of 32 sectors /// Contains pseudo-random filler data on-disc /// Some XDVDFS images zero the reserved area /// /// 65,536 bytes public byte[] ReservedArea { get; set; } = new byte[0x10000]; /// /// XDVDFS Volume Descriptor /// /// 2048 bytes public VolumeDescriptor VolumeDescriptor { get; set; } = new(); /// /// Xbox DVD Layout Descriptor, immediately follows Volume Descriptor /// XGD1: Contains version numbers and signature bytes /// XGD2: Zeroed apart from initial signature bytes /// XGD3: Sector not present /// /// 2048 bytes public LayoutDescriptor? LayoutDescriptor { get; set; } /// /// Map of sector numbers and the directory descriptor at that sector number /// The root directory descriptor is not guaranteed to be the earliest /// public Dictionary DirectoryDescriptors { get; set; } = []; } }