Add detection of ISO 14517 512bps and 1024bps magneto-optical.

This commit is contained in:
2020-10-18 04:45:12 +01:00
parent c5ac4c1d77
commit 3225283e04
5 changed files with 36 additions and 0 deletions

View File

@@ -1019,6 +1019,10 @@ namespace Aaru.CommonTypes
ECMA_322_1k = 800,
/// <summary>5,25", M.O., ??????? sectors, 512 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart</summary>
ECMA_322_512 = 801,
/// <summary>5,25", M.O., 1273011 sectors, 1024 bytes/sector, ISO 14517, 2.6Gb/cart</summary>
ISO_14517 = 802,
/// <summary>5,25", M.O., 2244958 sectors, 512 bytes/sector, ISO 14517, 2.3Gb/cart</summary>
ISO_14517_512 = 803,
#endregion Magneto-optical, types 800 to 819
}
}

View File

@@ -115,6 +115,12 @@ namespace Aaru.CommonTypes
mediumType, blocks, blockSize);
return MediaType.ECMA_195_512;
case 2244958:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.",
mediumType, blocks, blockSize);
return MediaType.ISO_14517_512;
default:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.",
@@ -166,6 +172,12 @@ namespace Aaru.CommonTypes
mediumType, blocks, blockSize);
return MediaType.ECMA_238;
case 1273011:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.",
mediumType, blocks, blockSize);
return MediaType.ISO_14517;
case 2319786:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 15286 conforming 5¼\" magneto-optical.",

View File

@@ -653,6 +653,12 @@ namespace Aaru.CommonTypes
"Drive manufacturer is IOMEGA, drive model is JAZ, media has 2091050 blocks of 512 bytes, setting media type to 1Gb JAZ.");
return MediaType.Jaz;
case 2244958 when mediumType == 0x01 || mediumType == 0x02:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.",
mediumType, blocks, blockSize);
return MediaType.ISO_14517_512;
case 3915600 when model.ToLowerInvariant().StartsWith("jaz", StringComparison.Ordinal):
AaruConsole.DebugWriteLine("Media detection",
"Drive manufacturer is IOMEGA, drive model is JAZ, media has 3915600 blocks of 512 bytes, setting media type to 2Gb JAZ.");
@@ -761,6 +767,12 @@ namespace Aaru.CommonTypes
mediumType, blocks, blockSize);
return MediaType.ECMA_238;
case 1273011 when mediumType == 0x01 || mediumType == 0x02:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.",
mediumType, blocks, blockSize);
return MediaType.ISO_14517;
case 2319786 when mediumType == 0x01 || mediumType == 0x02:
AaruConsole.DebugWriteLine("Media detection",
"SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 15286 conforming 5¼\" magneto-optical.",

View File

@@ -207,6 +207,8 @@ namespace Aaru.CommonTypes.Metadata
case CommonTypes.MediaType.ISO_10089_512:
case CommonTypes.MediaType.ECMA_322_1k:
case CommonTypes.MediaType.ECMA_322_512:
case CommonTypes.MediaType.ISO_14517:
case CommonTypes.MediaType.ISO_14517_512:
// According to ECMA-183 et al
dmns.Height = 153;
dmns.HeightSpecified = true;

View File

@@ -1873,6 +1873,12 @@ namespace Aaru.CommonTypes.Metadata
discType = "5.25\" magneto-optical";
discSubType = "ISO-15286";
break;
case CommonTypes.MediaType.ISO_14517:
case CommonTypes.MediaType.ISO_14517_512:
discType = "5.25\" magneto-optical";
discSubType = "ISO-14517";
break;
case CommonTypes.MediaType.GigaMo:
discType = "3.5\" magneto-optical";