mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Partitions/Human68k.cs:
* DiscImageChef.Partitions/DiscImageChef.Partitions.csproj: Added Human68k partition table. * DiscImageChef.Partitions/RioKarma.cs: Corrected typo. * DiscImageChef.DiscImages/ZZZRawImage.cs: Detect X68000 SASI hard disks that use 256 bytes/sector. Correct size of ECMA-154 magnetoptical. * DiscImageChef.Partitions/PC98.cs: Correct handling of partition name, do not directly marshal as it may crash. Prevent false positives checking for sanity and partition type, so this limits it to FreeBSD right now. * DiscImageChef.Partitions/Acorn.cs: Do not try to read past device. * DiscImageChef.Helpers/BigEndianMarshal.cs: * DiscImageChef.Helpers/BigEndianStructure.cs: * DiscImageChef.Helpers/DiscImageChef.Helpers.csproj: Reworked big endian marshal. Does not traverse nested structures. * DiscImageChef.Partitions/SGI.cs: Corrected big endian marshaling, manually traversing nested structures. * DiscImageChef.Decoders/LisaTag.cs: Removed temporal variable. * DiscImageChef.Partitions/Sun.cs: Sun insists all devices must be 512 bytes/sector. Really. Even CDs. But this allows bigger ones.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
|
||||
@@ -81,15 +82,21 @@ namespace DiscImageChef.PartPlugins
|
||||
part.PartitionSectors = CHStoLBA(entry.dp_ecyl, entry.dp_ehd, entry.dp_esect) - part.PartitionStartSector;
|
||||
part.PartitionLength = part.PartitionSectors * imagePlugin.GetSectorSize();
|
||||
part.PartitionType = string.Format("{0}", (entry.dp_sid << 8) | entry.dp_mid);
|
||||
part.PartitionName = entry.dp_name;
|
||||
part.PartitionName = StringHandlers.CToString(entry.dp_name, Encoding.GetEncoding(932));
|
||||
part.PartitionSequence = counter;
|
||||
|
||||
partitions.Add(part);
|
||||
counter++;
|
||||
if((entry.dp_sid & 0x7F) == 0x44 &&
|
||||
(entry.dp_mid & 0x7F) == 0x14 &&
|
||||
part.PartitionStartSector < imagePlugin.ImageInfo.sectors &&
|
||||
part.PartitionSectors + part.PartitionStartSector <= imagePlugin.ImageInfo.sectors)
|
||||
{
|
||||
partitions.Add(part);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return partitions.Count > 0;
|
||||
}
|
||||
|
||||
static uint CHStoLBA(ushort cyl, byte head, byte sector)
|
||||
@@ -123,7 +130,7 @@ namespace DiscImageChef.PartPlugins
|
||||
public byte dp_ehd;
|
||||
public ushort dp_ecyl;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public string dp_name;
|
||||
public byte[] dp_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user