mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Added long sector sizes for floppies and SuperDisk.
This commit is contained in:
@@ -152,8 +152,13 @@ namespace DiscImageChef.Core.Devices
|
||||
{
|
||||
if(blockSize == 512)
|
||||
{
|
||||
// Long sector sizes for 512-byte magneto-opticals
|
||||
foreach(ushort testSize in new[] { 600, 610, 630 })
|
||||
foreach(ushort testSize in new[] {
|
||||
// Long sector sizes for floppies
|
||||
514,
|
||||
// Long sector sizes for SuperDisk
|
||||
536, 558,
|
||||
// Long sector sizes for 512-byte magneto-opticals
|
||||
600, 610, 630 })
|
||||
{
|
||||
testSense = dev.ReadLong16(out readBuffer, out senseBuf, false, 0, testSize, timeout, out duration);
|
||||
if(!testSense && !dev.Error)
|
||||
@@ -176,21 +181,28 @@ namespace DiscImageChef.Core.Devices
|
||||
}
|
||||
else if(blockSize == 1024)
|
||||
{
|
||||
testSense = dev.ReadLong16(out readBuffer, out senseBuf, false, 0, 1200, timeout, out duration);
|
||||
if(!testSense && !dev.Error)
|
||||
foreach(ushort testSize in new[] {
|
||||
// Long sector sizes for floppies
|
||||
1026,
|
||||
// Long sector sizes for 1024-byte magneto-opticals
|
||||
1200 })
|
||||
{
|
||||
readLong16 = true;
|
||||
longBlockSize = 1200;
|
||||
readRaw = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
testSense = dev.ReadLong10(out readBuffer, out senseBuf, false, false, 0, 1200, timeout, out duration);
|
||||
testSense = dev.ReadLong16(out readBuffer, out senseBuf, false, 0, testSize, timeout, out duration);
|
||||
if(!testSense && !dev.Error)
|
||||
{
|
||||
readLong16 = true;
|
||||
longBlockSize = testSize;
|
||||
readRaw = true;
|
||||
break;
|
||||
}
|
||||
|
||||
testSense = dev.ReadLong10(out readBuffer, out senseBuf, false, false, 0, testSize, timeout, out duration);
|
||||
if(!testSense && !dev.Error)
|
||||
{
|
||||
readLong10 = true;
|
||||
longBlockSize = 1200;
|
||||
longBlockSize = testSize;
|
||||
readRaw = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,8 +527,13 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
{
|
||||
if(mediaTest.BlockSize == 512)
|
||||
{
|
||||
// Long sector sizes for 512-byte magneto-opticals
|
||||
foreach(ushort testSize in new[] { 600, 610, 630 })
|
||||
foreach(ushort testSize in new[] {
|
||||
// Long sector sizes for floppies
|
||||
514,
|
||||
// Long sector sizes for SuperDisk
|
||||
536, 558,
|
||||
// Long sector sizes for 512-byte magneto-opticals
|
||||
600, 610, 630 })
|
||||
{
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, testSize, timeout, out duration);
|
||||
if(!sense && !dev.Error)
|
||||
@@ -542,12 +547,20 @@ namespace DiscImageChef.Core.Devices.Report.SCSI
|
||||
}
|
||||
else if(mediaTest.BlockSize == 1024)
|
||||
{
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 1200, timeout, out duration);
|
||||
if(!sense && !dev.Error)
|
||||
foreach(ushort testSize in new[] {
|
||||
// Long sector sizes for floppies
|
||||
1026,
|
||||
// Long sector sizes for 1024-byte magneto-opticals
|
||||
1200 })
|
||||
{
|
||||
mediaTest.SupportsReadLong = true;
|
||||
mediaTest.LongBlockSize = 1200;
|
||||
mediaTest.LongBlockSizeSpecified = true;
|
||||
sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, testSize, timeout, out duration);
|
||||
if(!sense && !dev.Error)
|
||||
{
|
||||
mediaTest.SupportsReadLong = true;
|
||||
mediaTest.LongBlockSize = testSize;
|
||||
mediaTest.LongBlockSizeSpecified = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(mediaTest.BlockSize == 2048)
|
||||
|
||||
Reference in New Issue
Block a user