Finish formatter

This commit is contained in:
Pdawg11239
2025-03-17 03:11:11 -04:00
parent 2a15f045bc
commit 7c0fb0d416
24 changed files with 332 additions and 482 deletions

View File

@@ -5,21 +5,17 @@ namespace BadBuilder.Formatter
// Reference: https://cscie92.dce.harvard.edu/spring2024/K70F120M/fsInfo.h
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 512)]
internal struct FAT32FsInfoSector
internal unsafe struct FAT32FsInfoSector
{
[FieldOffset(0)] public uint LeadSignature;
[FieldOffset(4)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 480)]
public byte[] Reserved1; // Zeros
[FieldOffset(4)] public fixed byte Reserved1[480]; // Zeros
[FieldOffset(484)] public uint StructureSignature;
[FieldOffset(488)] public uint FreeClusterCount;
[FieldOffset(492)] public uint NextFreeCluster;
[FieldOffset(496)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
public byte[] Reserved2;
[FieldOffset(496)] public fixed byte Reserved2[12];
[FieldOffset(508)] public uint TrailSignature;
}