New Redumper Drive Pregap Start option (#920)

* Pregap start option

* Fix DriveType names

* Fix options window

* Update changelist
This commit is contained in:
Deterous
2025-11-24 23:18:28 +09:00
committed by GitHub
parent 3975003686
commit a48f9d1c83
17 changed files with 65 additions and 27 deletions

View File

@@ -73,6 +73,7 @@
- Name some type parameters
- Ensure volume label is trimmed if used in filenames
- Remove DPM identifier for StarForce Keyless
- New Redumper Drive Pregap Start option
### 3.5.0 (2025-10-10)

View File

@@ -363,6 +363,13 @@ namespace MPF.ExecutionContexts.Redumper
(_inputs[FlagStrings.DriveReadMethod] as StringInput)?.SetValue(readMethod!);
}
int drivePregapStart = GetInt32Setting(options, SettingConstants.DrivePregapStart, SettingConstants.DrivePregapStartDefault);
if (drivePregapStart != SettingConstants.DrivePregapStartDefault)
{
this[FlagStrings.DrivePregapStart] = true;
(_inputs[FlagStrings.DrivePregapStart] as Int32Input)?.SetValue(drivePregapStart);
}
string? sectorOrder = GetStringSetting(options, SettingConstants.SectorOrder, SettingConstants.SectorOrderDefault);
if (!string.IsNullOrEmpty(sectorOrder) && sectorOrder != SectorOrder.NONE.ToString())
{

View File

@@ -14,6 +14,9 @@ namespace MPF.ExecutionContexts.Redumper
public const string LeadinRetryCount = "RedumperLeadinRetryCount";
public const int LeadinRetryCountDefault = 4;
public const string DrivePregapStart = "RedumperDrivePregapStart";
public const int DrivePregapStartDefault = 0;
public const string ReadMethod = "RedumperReadMethod";
public static readonly string ReadMethodDefault = Redumper.ReadMethod.NONE.ToString();

View File

@@ -466,31 +466,31 @@ namespace MPF.Frontend
{
"generic" => RedumperDriveType.GENERIC,
"plextor" => RedumperDriveType.PLEXTOR,
"lg_asus8a"
or "lg-asus8a"
or "lgasus8a"
or "lg_asus_8a"
or "lg-asus-8a" => RedumperDriveType.LG_ASU8A,
"lg_asus8b"
or "lg-asus8b"
or "lgasus8b"
or "lg_asus_8b"
or "lg-asus-8b" => RedumperDriveType.LG_ASU8B,
"lg_asus8c"
or "lg-asus8c"
or "lgasus8c"
or "lg_asus_8c"
or "lg-asus-8c" => RedumperDriveType.LG_ASU8C,
"lg_asu8a"
or "lg-asu8a"
or "lgasu8a"
or "lg_asu_8a"
or "lg-asu-8a" => RedumperDriveType.LG_ASU8A,
"lg_asu8b"
or "lg-asu8b"
or "lgasu8b"
or "lg_asu_8b"
or "lg-asu-8b" => RedumperDriveType.LG_ASU8B,
"lg_asu8c"
or "lg-asu8c"
or "lgasu8c"
or "lg_asu_8c"
or "lg-asu-8c" => RedumperDriveType.LG_ASU8C,
"lg_asus3"
or "lg-asus3"
or "lgasus3"
or "lg_asus_3"
or "lg-asus-3" => RedumperDriveType.LG_ASU3,
"lg_asus2"
or "lg-asus2"
or "lgasus2"
or "lg_asus_2"
or "lg-asus-2" => RedumperDriveType.LG_ASU2,
or "lg-asu3"
or "lgasu3"
or "lg_asu_3"
or "lg-asu-3" => RedumperDriveType.LG_ASU3,
"lg_asu2"
or "lg-asu2"
or "lgasu2"
or "lg_asu_2"
or "lg-asu-2" => RedumperDriveType.LG_ASU2,
_ => RedumperDriveType.NONE,
};

View File

@@ -484,6 +484,15 @@ namespace MPF.Frontend
}
}
/// <summary>
/// Currently selected default redumper drive pregap start sector
/// </summary>
public int RedumperDrivePregapStart
{
get { return GetInt32Setting(Settings, RedumperSettings.DrivePregapStart, RedumperSettings.DrivePregapStartDefault); }
set { Settings[RedumperSettings.DrivePregapStart] = value.ToString(); }
}
/// <summary>
/// Currently selected default redumper read method
/// </summary>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Standard-Lesemethode:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Standard-Sektorordnung:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Standard-Laufwerkstyp:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Standard-Laufwerk Pregap Start:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Login-Informationen</system:String>
<system:String x:Key="RetrievalGroupBoxString">Abruf</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Método de lectura predeterminado:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Orden de sectores predeterminado:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Tipo de unidad predeterminado:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Pregap Start de unidad predeterminada:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Información de acceso</system:String>
<system:String x:Key="RetrievalGroupBoxString">Recuperación</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Méthode de lecture par défaut :</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Ordre des secteurs par défaut :</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Type de lecteur par défaut :</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Pregap Start de lecteur par défaut:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Infos de connexion</system:String>
<system:String x:Key="RetrievalGroupBoxString">Récupération</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Metodo di Lettura Predefinito:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Ordine Settori Predefinito:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Tipo Unità Predefinito:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Drive Pregap Start Predefinito:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Informazioni Login</system:String>
<system:String x:Key="RetrievalGroupBoxString">Recupero</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">既定のリード方法:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">既定のセクター順序:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">既定のドライブ種別:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">既定のドライブ プリギャップ スタート:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">ログイン情報</system:String>
<system:String x:Key="RetrievalGroupBoxString">情報取得</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">기본 읽기 방식:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">기본 섹터 순서:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">기본 드라이브 유형:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">기본 드라이브 프리갭 스타트:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">로그인 정보</system:String>
<system:String x:Key="RetrievalGroupBoxString">검색</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Domyślna metoda odczytu:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Domyślna kolejność sektorów:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Domyślny typ napędu:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Domyślny pregap start napęd:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Informacje logowania</system:String>
<system:String x:Key="RetrievalGroupBoxString">Pobieranie</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Метод чтения по умолчанию:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Порядок секторов:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Тип привода по умолчанию:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Pregap Start привода по умолчанию:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Данные входа</system:String>
<system:String x:Key="RetrievalGroupBoxString">Получение</system:String>

View File

@@ -123,6 +123,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Standard läsmetod:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Standard sektorordning:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Standard enhetstyp:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Standard pregap start:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Inloggningsinfo</system:String>
<system:String x:Key="RetrievalGroupBoxString">Hämtning</system:String>

View File

@@ -128,6 +128,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Режим читання за замовчуванням:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Структура сектору за замовчуванням:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Тип приводу за замовчуванням:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Pregap start приводу за замовчуванням:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Інформація для входу</system:String>
<system:String x:Key="RetrievalGroupBoxString">Завантаження</system:String>

View File

@@ -128,6 +128,7 @@
<system:String x:Key="DefaultReadMethodLabelString">Default Read Method:</system:String>
<system:String x:Key="DefaultSectorOrderLabelString">Default Sector Order:</system:String>
<system:String x:Key="DefaultDriveTypeLabelString">Default Drive Type:</system:String>
<system:String x:Key="DefaultDrivePregapStartLabelString">Default Drive Pregap Start:</system:String>
<!-- Login Info Tab -->
<system:String x:Key="LoginInfoTabString">Login Info</system:String>
<system:String x:Key="RetrievalGroupBoxString">Retrieval</system:String>

View File

@@ -445,23 +445,30 @@
/>
<Label/> <!-- Empty label for padding -->
<Label VerticalAlignment="Center" Content="{DynamicResource DefaultReadMethodLabelString}" HorizontalAlignment="Right" />
<Label Content="{DynamicResource DefaultReadMethodLabelString}" VerticalAlignment="Center" HorizontalAlignment="Right" />
<ComboBox x:Name="DefaultRedumperReadMethodComboBox" Height="22" Width="200" HorizontalAlignment="Left"
ItemsSource="{Binding RedumperReadMethods}" SelectedItem="{Binding Options.RedumperReadMethod, Converter={StaticResource ElementConverter}, Mode=TwoWay}"
Style="{DynamicResource CustomComboBoxStyle}" IsEnabled="{Binding Options.RedumperNonRedumpMode}"
/>
<Label VerticalAlignment="Center" Content="{DynamicResource DefaultSectorOrderLabelString}" HorizontalAlignment="Right" />
<Label Content="{DynamicResource DefaultSectorOrderLabelString}" VerticalAlignment="Center" HorizontalAlignment="Right" />
<ComboBox x:Name="DefaultRedumperSectorOrderComboBox" Height="22" Width="200" HorizontalAlignment="Left"
ItemsSource="{Binding RedumperSectorOrders}" SelectedItem="{Binding Options.RedumperSectorOrder, Converter={StaticResource ElementConverter}, Mode=TwoWay}"
Style="{DynamicResource CustomComboBoxStyle}" IsEnabled="{Binding Options.RedumperNonRedumpMode}"
/>
<Label VerticalAlignment="Center" Content="{DynamicResource DefaultDriveTypeLabelString}" HorizontalAlignment="Right" />
<Label Content="{DynamicResource DefaultDriveTypeLabelString}" VerticalAlignment="Center" HorizontalAlignment="Right" />
<ComboBox x:Name="DefaultRedumperDriveTypeComboBox" Height="22" Width="200" HorizontalAlignment="Left"
ItemsSource="{Binding RedumperDriveTypes}" SelectedItem="{Binding Options.RedumperDriveType, Converter={StaticResource ElementConverter}, Mode=TwoWay}"
Style="{DynamicResource CustomComboBoxStyle}" IsEnabled="{Binding Options.RedumperNonRedumpMode}"
/>
<Label Content="{DynamicResource DefaultDrivePregapStartLabelString}" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBox VerticalAlignment="Center" VerticalContentAlignment="Center" Width="200" HorizontalAlignment="Left"
Text="{Binding Options.RedumperDrivePregapStart}"
ToolTip="Specifies negative LBA for drive to start reading disc pregap from"
ToolTipService.ShowOnDisabled="True" IsEnabled="{Binding Options.RedumperNonRedumpMode}"
/>
</UniformGrid>
</GroupBox>
</StackPanel>