From 846e24152367eb45117d3a1885a5cb346e7c788c Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 14 Dec 2013 20:35:03 +0000 Subject: [PATCH] Started adding image formats support. git-svn-id: svn://claunia.com/FileSystemIDandChk@23 17725271-3d32-4980-a8cb-9ff532f270ba --- FileSystemIDandChk/FileSystemIDandChk.csproj | 2 ++ FileSystemIDandChk/PartPlugins/MBR.cs | 2 ++ FileSystemIDandChk/Plugins/FAT.cs | 17 +++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/FileSystemIDandChk/FileSystemIDandChk.csproj b/FileSystemIDandChk/FileSystemIDandChk.csproj index eacdb32f..cbb6322b 100644 --- a/FileSystemIDandChk/FileSystemIDandChk.csproj +++ b/FileSystemIDandChk/FileSystemIDandChk.csproj @@ -67,11 +67,13 @@ + + diff --git a/FileSystemIDandChk/PartPlugins/MBR.cs b/FileSystemIDandChk/PartPlugins/MBR.cs index 066530b0..b063928e 100644 --- a/FileSystemIDandChk/PartPlugins/MBR.cs +++ b/FileSystemIDandChk/PartPlugins/MBR.cs @@ -826,6 +826,8 @@ namespace FileSystemIDandChk.PartPlugins return "NetWare NSS"; case 0x70: return "DiskSecure Multi-Boot"; + case 0x72: + return "UNIX 7th Edition"; case 0x75: return "IBM PC/IX"; case 0x80: diff --git a/FileSystemIDandChk/Plugins/FAT.cs b/FileSystemIDandChk/Plugins/FAT.cs index bed746f1..f8bac0d2 100644 --- a/FileSystemIDandChk/Plugins/FAT.cs +++ b/FileSystemIDandChk/Plugins/FAT.cs @@ -253,6 +253,23 @@ namespace FileSystemIDandChk.Plugins public UInt32 hsectors; // 0x1C, Hidden sectors before BPB public UInt32 big_sectors; // 0x20, Sectors in volume if > 65535 } + + // This only applies for bootable disks + // From http://info-coach.fr/atari/software/FD-Soft.php + public struct AtariBootBlock + { + public UInt16 hsectors; // 0x01C, Atari ST use 16 bit for hidden sectors, probably so did old DOS + public UInt16 xflag; // 0x01E, indicates if COMMAND.PRG must be executed after OS load + public UInt16 ldmode; // 0x020, load mode for, or 0 if fname indicates boot file + public UInt16 bsect; // 0x022, sector from which to boot + public UInt16 bsects_no; // 0x024, how many sectors to boot + public UInt32 ldaddr; // 0x026, RAM address where boot should be located + public UInt32 fatbuf; // 0x02A, RAM address to copy the FAT and root directory + public string fname; // 0x02E, 11 bytes, name of boot file + public UInt16 reserved; // 0x039, unused + public byte[] boot_code; // 0x03B, 451 bytes boot code + public UInt16 checksum; // 0x1FE, the sum of all the BPB+ABB must be 0x1234, so this bigendian value works as adjustment + } public struct ExtendedParameterBlock {