Skip to content

Commit

Permalink
[Common types] Add more information for SyQuest QPAK (SQ100, SQ200 an…
Browse files Browse the repository at this point in the history
…d SQ300) cartridges.
  • Loading branch information
claunia committed Nov 10, 2024
1 parent 3d8ba7d commit f061e8b
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Aaru.CommonTypes/AaruMetadata/Dimensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,14 @@ public static Dimensions FromMediaType(MediaType mediaType)

dmns.Thickness = 15;

return dmns;
case MediaType.SQ100:
case MediaType.SQ200:
case MediaType.SQ300:
dmns.Height = 112.014;
dmns.Width = 109.982;
dmns.Thickness = 10.922;

return dmns;
case MediaType.EZ135:
case MediaType.EZ230:
Expand Down
10 changes: 8 additions & 2 deletions Aaru.CommonTypes/MediaType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,15 @@ public enum MediaType : uint
Quest = 432,
/// <summary>SyQuest SparQ 1Gb cartridge</summary>
SparQ = 433,
/// <summary>SyQuest 5Mb cartridge for SQ306RD drive</summary>
/// <summary>
/// SyQuest 5Mb, 3.9&quot;, 306 tracks, 2 sides, 32 sectors per track, 256 bytes/sector cartridge for SQ306RD
/// drive
/// </summary>
SQ100 = 434,
/// <summary>SyQuest 10Mb cartridge for SQ312RD drive</summary>
/// <summary>
/// SyQuest 10Mb, 3.9&quot;, 615 tracks, 2 sides, 32 sectors per track, 256 bytes/sector cartridge for SQ312RD
/// drive
/// </summary>
SQ200 = 435,
/// <summary>SyQuest 15Mb cartridge for SQ319RD drive</summary>
SQ300 = 436,
Expand Down
4 changes: 2 additions & 2 deletions Aaru.CommonTypes/MediaType.csv
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ Enum,Value,Summary
"EZ230",431,"SyQuest EZFlyer 230Mb cartridge for use in EZFlyer drive"
"Quest",432,"SyQuest 4.7Gb for use in Quest drive"
"SparQ",433,"SyQuest SparQ 1Gb cartridge"
"SQ100",434,"SyQuest 5Mb cartridge for SQ306RD drive"
"SQ200",435,"SyQuest 10Mb cartridge for SQ312RD drive"
"SQ100",434,"SyQuest 5Mb, 3.9"", 306 tracks, 2 sides, 32 sectors per track, 256 bytes/sector cartridge for SQ306RD drive"
"SQ200",435,"SyQuest 10Mb, 3.9"", 615 tracks, 2 sides, 32 sectors per track, 256 bytes/sector cartridge for SQ312RD drive"
"SQ300",436,"SyQuest 15Mb cartridge for SQ319RD drive"
"SQ310",437,"SyQuest 105Mb cartridge for SQ3105 and SQ3270 drives"
"SQ327",438,"SyQuest 270Mb cartridge for SQ3270 drive"
Expand Down
11 changes: 11 additions & 0 deletions Aaru.CommonTypes/MediaTypeFromDevice/FromSbc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,17 @@ static MediaType GetFromSbc(string vendor, string model, byte mediumType, ulong
blockSize);

return MediaType.ECMA_99_26;
case 19584 when vendor.Equals("syquest", StringComparison.InvariantCultureIgnoreCase):
AaruConsole.DebugWriteLine(MODULE_NAME,
"Drive manufacturer is SyQuest, media has 19584 blocks of 256 bytes, setting media type to SQ100.");

return MediaType.SQ200;
case 39360 when vendor.Equals("syquest", StringComparison.InvariantCultureIgnoreCase):
AaruConsole.DebugWriteLine(MODULE_NAME,
"Drive manufacturer is SyQuest, media has 39360 blocks of 256 bytes, setting media type to SQ200.");

return MediaType.SQ200;

case 39168 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase):
case 41004 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase):
AaruConsole.DebugWriteLine(MODULE_NAME,
Expand Down
4 changes: 4 additions & 0 deletions Aaru.Images/ZZZRawImage/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,12 @@ MediaType CalculateDiskType()
return MediaType.XDF_35;
case 2949120:
return MediaType.DOS_35_ED;
case 5013504: // SyQuest SQ100 cartridge
return MediaType.SQ100;
case 9338880:
return MediaType.NEC_35_TD;
case 10076160: // SyQuest SQ100 cartridge
return MediaType.SQ200;
case 20818944:
return MediaType.Floptical;
case 33554432:
Expand Down
17 changes: 17 additions & 0 deletions Aaru.Images/ZZZRawImage/Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ public ErrorNumber Open(IFilter imageFilter)
case 1638400:
_imageInfo.SectorSize = 1024;

break;
case 5013504: // SyQuest SQ100 cartridge
case 10076160: // SyQuest SQ200 cartridge
_imageInfo.SectorSize = 256;

break;
case 35002122240:
_imageInfo.SectorSize = 2048;
Expand Down Expand Up @@ -903,6 +908,18 @@ public ErrorNumber Open(IFilter imageFilter)
_imageInfo.Heads = 2;
_imageInfo.SectorsPerTrack = 23;

break;
case MediaType.SQ100:
_imageInfo.Cylinders = 306;
_imageInfo.Heads = 2;
_imageInfo.SectorsPerTrack = 32;

break;
case MediaType.SQ200:
_imageInfo.Cylinders = 615;
_imageInfo.Heads = 2;
_imageInfo.SectorsPerTrack = 32;

break;

// Following ones are what the device itself report, not the physical geometry
Expand Down

0 comments on commit f061e8b

Please sign in to comment.