mirror of
https://github.com/SabreTools/MPF.git
synced 2026-05-07 04:53:57 +00:00
Update to DIC 20240401
This commit is contained in:
17
.github/workflows/build_ui.yml
vendored
17
.github/workflows/build_ui.yml
vendored
@@ -28,6 +28,23 @@ jobs:
|
||||
- name: Build
|
||||
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Debug --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}}
|
||||
|
||||
- name: Bundle DiscImageCreator
|
||||
run: |
|
||||
wget https://github.com/saramibreak/DiscImageCreator/files/14824363/DiscImageCreator_20240401.zip
|
||||
unzip DiscImageCreator_20240401.zip
|
||||
mkdir -p MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator
|
||||
mv Release_ANSI/C2ErrorProtect.txt MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/default.dat MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/DiscImageCreator.exe MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/driveOffset.txt MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/DVDAuth.exe MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/EccEdc.exe MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/E_WISE.INI MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/E_WISE_W.EXE MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/i6comp.exe MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/ReadErrorProtect.txt MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
mv Release_ANSI/unscrambler.exe MPF/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/Programs/Creator/
|
||||
|
||||
- name: Bundle Redumper
|
||||
run: |
|
||||
wget https://github.com/superg/redumper/releases/download/build_325/redumper-2024.05.06_build325-win64.zip
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
- Simplify access within processors
|
||||
- Rename Parameters to ExecutionContext
|
||||
- Ensure check-only implementations still work
|
||||
- Update to DIC 20240401
|
||||
|
||||
### 3.1.9a (2024-05-21)
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
public const string SeventyFour = "/74";
|
||||
public const string SkipSector = "/sk";
|
||||
public const string SubchannelReadLevel = "/s";
|
||||
public const string Tages = "/t";
|
||||
public const string UseAnchorVolumeDescriptorPointer = "/avdp";
|
||||
public const string VideoNow = "/vn";
|
||||
public const string VideoNowColor = "/vnc";
|
||||
|
||||
@@ -89,12 +89,13 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
/// <summary>
|
||||
/// C2 reread options for dumping [CD only]
|
||||
/// [0] - Reread value (default 4000)
|
||||
/// [1] - C2 offset (default: 0)
|
||||
/// [2] - 0 reread issue sector (default), 1 reread all
|
||||
/// [3] - First LBA to reread (default 0)
|
||||
/// [4] - Last LBA to reread (default EOS)
|
||||
/// [1] - Reading speed when fixing the C2 error (default: same as the <DriveSpeed(0-72)>)
|
||||
/// [2] - C2 offset (default: 0)
|
||||
/// [3] - 0 reread issue sector (default), 1 reread all
|
||||
/// [4] - First LBA to reread (default 0)
|
||||
/// [5] - Last LBA to reread (default EOS)
|
||||
/// </summary>
|
||||
public int?[] C2OpcodeValue { get; set; } = new int?[5];
|
||||
public int?[] C2OpcodeValue { get; set; } = new int?[6];
|
||||
|
||||
/// <summary>
|
||||
/// C2 reread options for dumping [DVD/HD-DVD/BD only] (default 10)
|
||||
@@ -126,6 +127,16 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
/// </summary>
|
||||
public byte? PadSectorValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set the range End LBA value (required for DVD)
|
||||
/// </summary>
|
||||
public int? RangeEndLBAValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set the range Start LBA value (required for DVD)
|
||||
/// </summary>
|
||||
public int? RangeStartLBAValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set the reverse End LBA value (required for DVD)
|
||||
/// </summary>
|
||||
@@ -334,19 +345,23 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
}
|
||||
if (C2OpcodeValue[2] != null)
|
||||
{
|
||||
if (C2OpcodeValue[2] == 0)
|
||||
parameters.Add(C2OpcodeValue[2].ToString() ?? string.Empty);
|
||||
}
|
||||
if (C2OpcodeValue[3] != null)
|
||||
{
|
||||
if (C2OpcodeValue[3] == 0)
|
||||
{
|
||||
parameters.Add(C2OpcodeValue[2].ToString() ?? string.Empty);
|
||||
parameters.Add(C2OpcodeValue[3].ToString() ?? string.Empty);
|
||||
}
|
||||
else if (C2OpcodeValue[2] == 1)
|
||||
else if (C2OpcodeValue[3] == 1)
|
||||
{
|
||||
parameters.Add(C2OpcodeValue[2].ToString() ?? string.Empty);
|
||||
if (C2OpcodeValue[3] != null && C2OpcodeValue[4] != null)
|
||||
parameters.Add(C2OpcodeValue[3].ToString() ?? string.Empty);
|
||||
if (C2OpcodeValue[4] != null && C2OpcodeValue[5] != null)
|
||||
{
|
||||
if (C2OpcodeValue[3] > 0 && C2OpcodeValue[4] > 0)
|
||||
if (C2OpcodeValue[4] > 0 && C2OpcodeValue[5] > 0)
|
||||
{
|
||||
parameters.Add(C2OpcodeValue[3].ToString() ?? string.Empty);
|
||||
parameters.Add(C2OpcodeValue[4].ToString() ?? string.Empty);
|
||||
parameters.Add(C2OpcodeValue[5].ToString() ?? string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -503,8 +518,15 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
// Range
|
||||
if (IsFlagSupported(FlagStrings.Range))
|
||||
{
|
||||
if (RangeStartLBAValue == null || RangeEndLBAValue == null)
|
||||
return null;
|
||||
|
||||
if (this[FlagStrings.Range] == true)
|
||||
{
|
||||
parameters.Add(FlagStrings.Range);
|
||||
parameters.Add(RangeStartLBAValue.ToString());
|
||||
parameters.Add(RangeEndLBAValue.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
// Raw read (2064 byte/sector)
|
||||
@@ -613,6 +635,13 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
}
|
||||
}
|
||||
|
||||
// Tages
|
||||
if (IsFlagSupported(FlagStrings.Tages))
|
||||
{
|
||||
if (this[FlagStrings.Tages] == true)
|
||||
parameters.Add(FlagStrings.Tages);
|
||||
}
|
||||
|
||||
// Use Anchor Volume Descriptor Pointer
|
||||
if (IsFlagSupported(FlagStrings.UseAnchorVolumeDescriptorPointer))
|
||||
{
|
||||
@@ -675,6 +704,7 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
FlagStrings.ScanSectorProtect,
|
||||
FlagStrings.SkipSector,
|
||||
FlagStrings.SubchannelReadLevel,
|
||||
FlagStrings.Tages,
|
||||
],
|
||||
|
||||
[CommandStrings.BluRay] =
|
||||
@@ -733,6 +763,7 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
FlagStrings.ScanSectorProtect,
|
||||
FlagStrings.SkipSector,
|
||||
FlagStrings.SubchannelReadLevel,
|
||||
FlagStrings.Tages,
|
||||
],
|
||||
|
||||
[CommandStrings.DigitalVideoDisc] =
|
||||
@@ -909,7 +940,7 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
|
||||
AddOffsetValue = null;
|
||||
BEOpcodeValue = null;
|
||||
C2OpcodeValue = new int?[5];
|
||||
C2OpcodeValue = new int?[6];
|
||||
DVDRereadValue = null;
|
||||
FixValue = null;
|
||||
ForceUnitAccessValue = null;
|
||||
@@ -1483,7 +1514,7 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
if (parts[i] == FlagStrings.C2Opcode && IsFlagSupported(FlagStrings.C2Opcode))
|
||||
{
|
||||
this[FlagStrings.C2Opcode] = true;
|
||||
for (int j = 0; j < 5; j++)
|
||||
for (int j = 0; j < C2OpcodeValue.Length; j++)
|
||||
{
|
||||
if (!DoesExist(parts, i + 1))
|
||||
{
|
||||
@@ -1565,6 +1596,25 @@ namespace MPF.Core.ExecutionContexts.DiscImageCreator
|
||||
if (byteValue != null)
|
||||
PadSectorValue = byteValue;
|
||||
|
||||
// Range
|
||||
if (parts[i] == FlagStrings.Range && IsFlagSupported(FlagStrings.Range))
|
||||
{
|
||||
// DVD specifically requires StartLBA and EndLBA
|
||||
if (BaseCommand == CommandStrings.DigitalVideoDisc)
|
||||
{
|
||||
if (!DoesExist(parts, i + 1) || !DoesExist(parts, i + 2))
|
||||
return false;
|
||||
else if (!IsValidInt32(parts[i + 1], lowerBound: 0) || !IsValidInt32(parts[i + 2], lowerBound: 0))
|
||||
return false;
|
||||
|
||||
RangeStartLBAValue = Int32.Parse(parts[i + 1]);
|
||||
RangeEndLBAValue = Int32.Parse(parts[i + 2]);
|
||||
i += 2;
|
||||
}
|
||||
|
||||
this[FlagStrings.Reverse] = true;
|
||||
}
|
||||
|
||||
// Raw
|
||||
ProcessFlagParameter(parts, FlagStrings.Raw, ref i);
|
||||
|
||||
|
||||
@@ -672,6 +672,7 @@ namespace MPF.Core.Processors
|
||||
info.VersionAndEditions!.Version = InfoTool.GetPlayStation2Version(drive?.Name) ?? string.Empty;
|
||||
break;
|
||||
|
||||
// TODO: Support reading information from outputs -- need examples
|
||||
case RedumpSystem.SonyPlayStation3:
|
||||
info.VersionAndEditions!.Version = InfoTool.GetPlayStation3Version(drive?.Name) ?? string.Empty;
|
||||
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.InternalSerialName] = InfoTool.GetPlayStation3Serial(drive?.Name) ?? string.Empty;
|
||||
@@ -755,6 +756,7 @@ namespace MPF.Core.Processors
|
||||
var deleteableFiles = new List<string>();
|
||||
switch (Type)
|
||||
{
|
||||
// TODO: Handle (Pregap) files -- need examples
|
||||
case MediaType.CDROM:
|
||||
case MediaType.GDROM:
|
||||
if (File.Exists($"{basePath}.img"))
|
||||
|
||||
Reference in New Issue
Block a user