mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Some drives crash if you try to read just before the previous read, so seek away first.
This commit is contained in:
@@ -216,12 +216,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Calculate pregap
|
// Calculate pregap
|
||||||
lba = (int)track.TrackStartSector - 151;
|
lba = (int)track.TrackStartSector - 150;
|
||||||
|
|
||||||
pregapFound = false;
|
pregapFound = false;
|
||||||
|
|
||||||
while(lba > (int)previousTrack.TrackStartSector)
|
while(lba > (int)previousTrack.TrackStartSector)
|
||||||
{
|
{
|
||||||
|
// Some drives crash if you try to read just before the previous read, so seek away first
|
||||||
|
GetSectorForPregap(dev, (uint)lba - 10, dbDev, out subBuf);
|
||||||
|
|
||||||
for(retries = 0; retries < 10; retries++)
|
for(retries = 0; retries < 10; retries++)
|
||||||
{
|
{
|
||||||
sense = GetSectorForPregap(dev, (uint)lba, dbDev, out subBuf);
|
sense = GetSectorForPregap(dev, (uint)lba, dbDev, out subBuf);
|
||||||
@@ -357,15 +360,13 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
{
|
{
|
||||||
subBuf = DeinterleaveQ(cmdBuf);
|
subBuf = DeinterleaveQ(cmdBuf);
|
||||||
}
|
}
|
||||||
else
|
else if(dbDev?.ATAPI?.RemovableMedias?.Any(d => d.SupportsPlextorReadCDDA == true) == true ||
|
||||||
{
|
dbDev?.SCSI?.RemovableMedias?.Any(d => d.SupportsPlextorReadCDDA == true) == true ||
|
||||||
if(sense && (dbDev?.ATAPI?.RemovableMedias?.Any(d => d.SupportsPlextorReadCDDA == true) == true ||
|
dev.Manufacturer.ToLowerInvariant() == "plextor")
|
||||||
dbDev?.SCSI?.RemovableMedias?.Any(d => d.SupportsPlextorReadCDDA == true) == true ||
|
sense = dev.PlextorReadCdDa(out cmdBuf, out _, lba, 2448, 1, PlextorSubchannel.All, dev.Timeout,
|
||||||
dev.Manufacturer.ToLowerInvariant() ==
|
out _);
|
||||||
"plextor"))
|
|
||||||
sense = dev.PlextorReadCdDa(out cmdBuf, out _, lba, 2448, 1, PlextorSubchannel.All, dev.Timeout,
|
|
||||||
out _);
|
|
||||||
|
|
||||||
|
{
|
||||||
if(!sense)
|
if(!sense)
|
||||||
{
|
{
|
||||||
byte[] tmpBuf = new byte[96];
|
byte[] tmpBuf = new byte[96];
|
||||||
|
|||||||
Reference in New Issue
Block a user