mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-07-08 17:56:18 +00:00
Add option to skip retrying sectors usually used by SafeDisc copy protection.
This commit is contained in:
@@ -260,6 +260,8 @@ partial class Dump
|
||||
break;
|
||||
}
|
||||
|
||||
if(_skipSafedisc && badSector is >= 800 and <= 10000) continue;
|
||||
|
||||
if(forward)
|
||||
{
|
||||
PulseProgress?.Invoke(runningPersistent
|
||||
@@ -542,9 +544,8 @@ partial class Dump
|
||||
|
||||
// MEDIUM ERROR, retry with ignore error below
|
||||
if(decSense is { ASC: 0x11 })
|
||||
{
|
||||
if(!sectorsNotEvenPartial.Contains(badSector)) sectorsNotEvenPartial.Add(badSector);
|
||||
}
|
||||
if(!sectorsNotEvenPartial.Contains(badSector))
|
||||
sectorsNotEvenPartial.Add(badSector);
|
||||
}
|
||||
|
||||
// Because one block has been partially used to fix the offset
|
||||
|
||||
@@ -122,6 +122,8 @@ partial class Dump
|
||||
break;
|
||||
}
|
||||
|
||||
if(_skipSafedisc && badSector is >= 800 and <= 10000) continue;
|
||||
|
||||
PulseProgress?.Invoke(string.Format(Localization.Core.Trimming_sector_0, badSector));
|
||||
|
||||
Track track = tracks.OrderBy(static t => t.StartSector).LastOrDefault(t => badSector >= t.StartSector);
|
||||
|
||||
@@ -94,6 +94,7 @@ public partial class Dump
|
||||
readonly bool _hyperSpeed;
|
||||
readonly uint _ignoreCdrRunOuts;
|
||||
readonly Stopwatch _imageCloseStopwatch;
|
||||
readonly bool _leadout;
|
||||
readonly bool _metadata;
|
||||
readonly string _outputPath;
|
||||
readonly IBaseWritableImage _outputPlugin;
|
||||
@@ -121,7 +122,6 @@ public partial class Dump
|
||||
bool _dumpFirstTrackPregap;
|
||||
bool _fixOffset;
|
||||
int _fixedSectors;
|
||||
readonly bool _leadout;
|
||||
uint _maximumReadable; // Maximum number of sectors drive can read at once
|
||||
IMediaGraph _mediaGraph;
|
||||
bool _missingTitleKeysDirty;
|
||||
@@ -131,6 +131,7 @@ public partial class Dump
|
||||
Sidecar _sidecarClass;
|
||||
uint _skip;
|
||||
bool _skipCdireadyHole;
|
||||
readonly bool _skipSafedisc;
|
||||
int _speed;
|
||||
int _speedMultiplier;
|
||||
bool _supportsPlextorD8;
|
||||
@@ -191,7 +192,7 @@ public partial class Dump
|
||||
bool generateSubchannels, uint maximumReadable, bool useBufferedReads, bool storeEncrypted,
|
||||
bool titleKeys, uint ignoreCdrRunOuts, bool createGraph, uint dimensions, bool paranoia,
|
||||
bool cureParanoia, bool bypassWiiDecryption, bool startReverse, int errorRecovery, bool hyperSpeed,
|
||||
bool absurdSpeed, bool leadout)
|
||||
bool absurdSpeed, bool leadout, bool skipSafedisc)
|
||||
{
|
||||
_doResume = doResume;
|
||||
_dev = dev;
|
||||
@@ -241,6 +242,7 @@ public partial class Dump
|
||||
_hyperSpeed = hyperSpeed;
|
||||
_absurdSpeed = absurdSpeed;
|
||||
_leadout = leadout;
|
||||
_skipSafedisc = skipSafedisc;
|
||||
_dumpStopwatch = new Stopwatch();
|
||||
_sidecarStopwatch = new Stopwatch();
|
||||
_speedStopwatch = new Stopwatch();
|
||||
|
||||
@@ -766,6 +766,7 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false);
|
||||
|
||||
new Thread(DoWork).Start();
|
||||
|
||||
@@ -131,6 +131,7 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
AaruLogging.Debug(MODULE_NAME, "--hyper-speed={0}", settings.HyperSpeed);
|
||||
AaruLogging.Debug(MODULE_NAME, "--absurd-speed={0}", settings.AbsurdSpeed);
|
||||
AaruLogging.Debug(MODULE_NAME, "--lead-out={0}", settings.LeadOut);
|
||||
AaruLogging.Debug(MODULE_NAME, "--skip-safedisc={0}", settings.SkipSafeDisc);
|
||||
|
||||
Dictionary<string, string> parsedOptions = Options.Parse(settings.Options);
|
||||
AaruLogging.Debug(MODULE_NAME, UI.Parsed_options);
|
||||
@@ -556,7 +557,8 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
settings.ErrorRecovery,
|
||||
settings.HyperSpeed,
|
||||
settings.AbsurdSpeed,
|
||||
settings.LeadOut);
|
||||
settings.LeadOut,
|
||||
settings.SkipSafeDisc);
|
||||
|
||||
AnsiConsole.Progress()
|
||||
.AutoClear(true)
|
||||
@@ -848,6 +850,10 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--lead-out")]
|
||||
public bool LeadOut { get; set; }
|
||||
[Description("Skip retrying sectors from 800 to 10000, that are typically used by SafeDisc protection")]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--skip-safedisc")]
|
||||
public bool SkipSafeDisc { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user