mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.DiscImages/DiskCopy42.cs:
Added support for LisaEm created images. * DiscImageChef.Metadata/MediaType.cs: * DiscImageChef.Metadata/Dimensions.cs: * DiscImageChef.CommonTypes/MediaType.cs: Added Apple Profile, Widget and HD20.
This commit is contained in:
@@ -778,6 +778,12 @@ namespace DiscImageChef.CommonTypes
|
||||
PD650_WORM,
|
||||
#endregion Miscellaneous
|
||||
|
||||
#region Apple Hard Disks
|
||||
AppleProfile,
|
||||
AppleWidget,
|
||||
AppleHD20,
|
||||
#endregion Apple Hard Disks
|
||||
|
||||
#region Generic hard disks
|
||||
Microdrive,
|
||||
RDX,
|
||||
|
||||
@@ -90,6 +90,8 @@ namespace DiscImageChef.ImagePlugins
|
||||
const byte kSonyFormat1680K = 0x04;
|
||||
/// <summary>Defined by Sigma Seven's BLU</summary>
|
||||
const byte kSigmaFormatTwiggy = 0x54;
|
||||
/// <summary>Defined by LisaEm</summary>
|
||||
const byte kNotStandardFormat = 0x5D;
|
||||
// There should be a value for Apple HD20 hard disks, unknown...
|
||||
// fmyByte byte
|
||||
// Based on GCR nibble
|
||||
@@ -110,6 +112,8 @@ namespace DiscImageChef.ImagePlugins
|
||||
const byte kSonyFmtByteProDos = 0x24;
|
||||
/// <summary>Unformatted sectors</summary>
|
||||
const byte kInvalidFmtByte = 0x96;
|
||||
/// <summary>Defined by LisaEm</summary>
|
||||
const byte kFmtNotStandard = 0x93;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -202,7 +206,8 @@ namespace DiscImageChef.ImagePlugins
|
||||
return false;
|
||||
|
||||
if(tmp_header.format != kSonyFormat400K && tmp_header.format != kSonyFormat800K && tmp_header.format != kSonyFormat720K &&
|
||||
tmp_header.format != kSonyFormat1440K && tmp_header.format != kSonyFormat1680K && tmp_header.format != kSigmaFormatTwiggy)
|
||||
tmp_header.format != kSonyFormat1440K && tmp_header.format != kSonyFormat1680K && tmp_header.format != kSigmaFormatTwiggy &&
|
||||
tmp_header.format != kNotStandardFormat)
|
||||
{
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.format = 0x{0:X2} value", tmp_header.format);
|
||||
|
||||
@@ -210,7 +215,8 @@ namespace DiscImageChef.ImagePlugins
|
||||
}
|
||||
|
||||
if(tmp_header.fmtByte != kSonyFmtByte400K && tmp_header.fmtByte != kSonyFmtByte800K && tmp_header.fmtByte != kSonyFmtByte800KIncorrect &&
|
||||
tmp_header.fmtByte != kSonyFmtByteProDos && tmp_header.fmtByte != kInvalidFmtByte && tmp_header.fmtByte != kSigmaFmtByteTwiggy)
|
||||
tmp_header.fmtByte != kSonyFmtByteProDos && tmp_header.fmtByte != kInvalidFmtByte && tmp_header.fmtByte != kSigmaFmtByteTwiggy &&
|
||||
tmp_header.fmtByte != kFmtNotStandard)
|
||||
{
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.fmtByte = 0x{0:X2} value", tmp_header.fmtByte);
|
||||
|
||||
@@ -275,7 +281,7 @@ namespace DiscImageChef.ImagePlugins
|
||||
return false;
|
||||
|
||||
if(header.format != kSonyFormat400K && header.format != kSonyFormat800K && header.format != kSonyFormat720K &&
|
||||
header.format != kSonyFormat1440K && header.format != kSonyFormat1680K && header.format != kSigmaFormatTwiggy)
|
||||
header.format != kSonyFormat1440K && header.format != kSonyFormat1680K && header.format != kSigmaFormatTwiggy && header.format != kNotStandardFormat)
|
||||
{
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "Unknown header.format = 0x{0:X2} value", header.format);
|
||||
|
||||
@@ -283,7 +289,7 @@ namespace DiscImageChef.ImagePlugins
|
||||
}
|
||||
|
||||
if(header.fmtByte != kSonyFmtByte400K && header.fmtByte != kSonyFmtByte800K && header.fmtByte != kSonyFmtByte800KIncorrect &&
|
||||
header.fmtByte != kSonyFmtByteProDos && header.fmtByte != kInvalidFmtByte && header.fmtByte != kSigmaFmtByteTwiggy)
|
||||
header.fmtByte != kSonyFmtByteProDos && header.fmtByte != kInvalidFmtByte && header.fmtByte != kSigmaFmtByteTwiggy && header.fmtByte != kFmtNotStandard)
|
||||
{
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.fmtByte = 0x{0:X2} value", header.fmtByte);
|
||||
|
||||
@@ -307,10 +313,12 @@ namespace DiscImageChef.ImagePlugins
|
||||
|
||||
if(header.tagSize != 0)
|
||||
{
|
||||
if(header.tagSize / 12 != ImageInfo.sectors)
|
||||
{
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "header.tagSize / 12 != sectors");
|
||||
bptag = (uint)(header.tagSize / ImageInfo.sectors);
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "bptag = {0} bytes", bptag);
|
||||
|
||||
if(bptag != 12 && bptag != 20 && bptag != 24)
|
||||
{
|
||||
DicConsole.DebugWriteLine("DC42 plugin", "Unknown tag size");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -342,6 +350,26 @@ namespace DiscImageChef.ImagePlugins
|
||||
case kSigmaFormatTwiggy:
|
||||
ImageInfo.mediaType = MediaType.AppleFileWare;
|
||||
break;
|
||||
case kNotStandardFormat:
|
||||
switch(ImageInfo.sectors)
|
||||
{
|
||||
case 9728:
|
||||
ImageInfo.mediaType = MediaType.AppleProfile;
|
||||
break;
|
||||
case 19456:
|
||||
ImageInfo.mediaType = MediaType.AppleProfile;
|
||||
break;
|
||||
case 38912:
|
||||
ImageInfo.mediaType = MediaType.AppleWidget;
|
||||
break;
|
||||
case 39040:
|
||||
ImageInfo.mediaType = MediaType.AppleHD20;
|
||||
break;
|
||||
default:
|
||||
ImageInfo.mediaType = MediaType.Unknown;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ImageInfo.mediaType = MediaType.Unknown;
|
||||
break;
|
||||
|
||||
@@ -892,6 +892,24 @@ namespace DiscImageChef.Metadata
|
||||
return dmns;
|
||||
#endregion CD/DVD/BD
|
||||
|
||||
#region Apple Hard Disks
|
||||
// TODO: Find Apple Widget size
|
||||
case CommonTypes.MediaType.AppleProfile:
|
||||
dmns.Height = 223.8;
|
||||
dmns.HeightSpecified = true;
|
||||
dmns.Width = 438.9;
|
||||
dmns.WidthSpecified = true;
|
||||
dmns.Thickness = 111.5;
|
||||
return dmns;
|
||||
case CommonTypes.MediaType.AppleHD20:
|
||||
dmns.Height = 246.4;
|
||||
dmns.HeightSpecified = true;
|
||||
dmns.Width = 266.7;
|
||||
dmns.WidthSpecified = true;
|
||||
dmns.Thickness = 78.7;
|
||||
return dmns;
|
||||
#endregion Apple Hard Disks
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -664,6 +664,18 @@ namespace DiscImageChef.Metadata
|
||||
DiscType = "Iomega ZIP";
|
||||
DiscSubType = "Iomega ZIP750";
|
||||
break;
|
||||
case CommonTypes.MediaType.AppleProfile:
|
||||
DiscType = "HDD";
|
||||
DiscSubType = "Apple Profile";
|
||||
break;
|
||||
case CommonTypes.MediaType.AppleWidget:
|
||||
DiscType = "HDD";
|
||||
DiscSubType = "Apple Widget";
|
||||
break;
|
||||
case CommonTypes.MediaType.AppleHD20:
|
||||
DiscType = "HDD";
|
||||
DiscSubType = "Apple HD20";
|
||||
break;
|
||||
default:
|
||||
DiscType = "Unknown";
|
||||
DiscSubType = "Unknown";
|
||||
|
||||
Reference in New Issue
Block a user