Implement absurd speed for OmniDrive.

This commit is contained in:
2026-07-05 02:42:48 +01:00
parent 1e0c6ff694
commit c322f4790a
3 changed files with 21 additions and 5 deletions

View File

@@ -108,8 +108,13 @@ partial class Dump
double elapsed = 0;
var speedSectorCounter = 0;
if(_absurdSpeed)
{
UpdateStatus?.Invoke("[slateblue1]Yes, sir! Setting absurd speed sir![/]");
if(_hyperSpeed)
_dev.SetCdSpeed(out _, RotationalControl.ClvAndImpureCav, 0xFFFF, 0, _dev.Timeout, out _);
}
else if(_hyperSpeed)
{
Track t = tracks.FirstOrDefault(t => t.StartSector <= _resume.NextBlock &&
t.EndSector >= _resume.NextBlock);
@@ -199,7 +204,9 @@ partial class Dump
if(speedSectorCounter > 1000)
{
if(_hyperSpeed)
if(_absurdSpeed)
_dev.SetCdSpeed(out _, RotationalControl.ClvAndImpureCav, 0xFFFF, 0, _dev.Timeout, out _);
else if(_hyperSpeed)
{
Track t = tracks.FirstOrDefault(t => t.StartSector <= _resume.NextBlock &&
t.EndSector >= _resume.NextBlock);

View File

@@ -90,6 +90,7 @@ public partial class Dump
readonly bool _force;
readonly Dictionary<string, string> _formatOptions;
readonly bool _generateSubchannels;
readonly bool _hyperSpeed;
readonly uint _ignoreCdrRunOuts;
readonly Stopwatch _imageCloseStopwatch;
readonly bool _metadata;
@@ -113,13 +114,13 @@ public partial class Dump
readonly Stopwatch _trimStopwatch;
readonly Stopwatch _writeStopwatch;
bool _aborted;
readonly bool _absurdSpeed;
int _correctSectors;
AaruContext _ctx; // Main database context
Database.Models.Device _dbDev; // Device database entry
bool _dumpFirstTrackPregap;
bool _fixOffset;
int _fixedSectors;
readonly bool _hyperSpeed;
uint _maximumReadable; // Maximum number of sectors drive can read at once
IMediaGraph _mediaGraph;
bool _missingTitleKeysDirty;
@@ -188,7 +189,8 @@ public partial class Dump
bool fixSubchannel, bool fixSubchannelCrc, bool skipCdireadyHole, ErrorLog errorLog,
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 cureParanoia, bool bypassWiiDecryption, bool startReverse, int errorRecovery, bool hyperSpeed,
bool absurdSpeed)
{
_doResume = doResume;
_dev = dev;
@@ -236,6 +238,7 @@ public partial class Dump
_startReverse = startReverse;
_errorRecovery = errorRecovery;
_hyperSpeed = hyperSpeed;
_absurdSpeed = absurdSpeed;
_dumpStopwatch = new Stopwatch();
_sidecarStopwatch = new Stopwatch();
_speedStopwatch = new Stopwatch();

View File

@@ -129,6 +129,7 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
AaruLogging.Debug(MODULE_NAME, "--start-reverse={0}", settings.StartReverse);
AaruLogging.Debug(MODULE_NAME, "--error-recovery={0}", settings.ErrorRecovery);
AaruLogging.Debug(MODULE_NAME, "--hyper-speed={0}", settings.HyperSpeed);
AaruLogging.Debug(MODULE_NAME, "--absurd-speed={0}", settings.AbsurdSpeed);
Dictionary<string, string> parsedOptions = Options.Parse(settings.Options);
AaruLogging.Debug(MODULE_NAME, UI.Parsed_options);
@@ -552,7 +553,8 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
settings.BypassWiiDecryption,
settings.StartReverse,
settings.ErrorRecovery,
settings.HyperSpeed);
settings.HyperSpeed,
settings.AbsurdSpeed);
AnsiConsole.Progress()
.AutoClear(true)
@@ -836,6 +838,10 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
[DefaultValue(false)]
[CommandOption("--hyper-speed")]
public bool HyperSpeed { get; set; }
[Description("(OmniDrive only) Use maximum speed always")]
[DefaultValue(false)]
[CommandOption("--absurd-speed")]
public bool AbsurdSpeed { get; set; }
}
#endregion