AROS i386 boot floppies start with a PC boot sector before the

Amiga BootBlock (that is unused).
This commit is contained in:
2017-07-19 06:02:15 +01:00
parent e3ce75b9a7
commit 1d3d696a08

View File

@@ -219,6 +219,14 @@ namespace DiscImageChef.Filesystems
byte[] sector = imagePlugin.ReadSectors(0 + partitionStart, 2);
BootBlock bblk = BigEndianMarshal.ByteArrayToStructureBigEndian<BootBlock>(sector);
// AROS boot floppies...
if(sector.Length >= 512 && sector[510] == 0x55 && sector[511] == 0xAA &&
(bblk.diskType & FFS_Mask) != FFS_Mask && (bblk.diskType & MuFS_Mask) != MuFS_Mask)
{
sector = imagePlugin.ReadSectors(1 + partitionStart, 2);
bblk = BigEndianMarshal.ByteArrayToStructureBigEndian<BootBlock>(sector);
}
// Not FFS or MuFS?
if((bblk.diskType & FFS_Mask) != FFS_Mask &&
(bblk.diskType & MuFS_Mask) != MuFS_Mask)