diff --git a/CHANGELIST.md b/CHANGELIST.md
index 31b2bd7b..63645df4 100644
--- a/CHANGELIST.md
+++ b/CHANGELIST.md
@@ -121,6 +121,7 @@
- Create ProcessingTool and move some methods
- Remove unused byte array helper methods
- Move GetSupportStatus to DumpEnvironment
+- Call psxt001z direct from DIC processor
### 3.1.9a (2024-05-21)
diff --git a/MPF.Core/MPF.Core.csproj b/MPF.Core/MPF.Core.csproj
index 8f90ddc8..95e9a2d2 100644
--- a/MPF.Core/MPF.Core.csproj
+++ b/MPF.Core/MPF.Core.csproj
@@ -49,7 +49,6 @@
-
diff --git a/MPF.Core/Utilities/ProtectionTool.cs b/MPF.Core/Utilities/ProtectionTool.cs
index 780f74b4..4e2bb4e1 100644
--- a/MPF.Core/Utilities/ProtectionTool.cs
+++ b/MPF.Core/Utilities/ProtectionTool.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using BinaryObjectScanner;
-using psxt001z;
#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute'.
@@ -171,20 +170,6 @@ namespace MPF.Core.Utilities
#endif
}
- ///
- /// Get if LibCrypt data is detected in the subchannel file, if possible
- ///
- /// .sub file location
- /// Status of the LibCrypt data, if possible
- public static bool? GetLibCryptDetected(string sub)
- {
- // If the file doesn't exist, we can't get info from it
- if (!File.Exists(sub))
- return null;
-
- return LibCrypt.DetectLibCrypt([sub]);
- }
-
///
/// Sanitize unnecessary protection duplication from output
///
diff --git a/MPF.Processors/DiscImageCreator.cs b/MPF.Processors/DiscImageCreator.cs
index a9bf59dd..0bff3e93 100644
--- a/MPF.Processors/DiscImageCreator.cs
+++ b/MPF.Processors/DiscImageCreator.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Text.RegularExpressions;
using MPF.Core;
using MPF.Core.Utilities;
+using psxt001z;
using SabreTools.Models.Logiqx;
using SabreTools.RedumpLib;
using SabreTools.RedumpLib.Data;
@@ -1305,39 +1306,40 @@ namespace MPF.Processors
/// Status of the LibCrypt data, if possible
private static void GetLibCryptDetected(string basePath, out YesNo detected, out string? data)
{
- bool? psLibCryptStatus = ProtectionTool.GetLibCryptDetected(basePath + ".sub");
- if (psLibCryptStatus == true)
+ string subPath = basePath + ".sub";
+ if (!File.Exists(subPath))
{
- // Guard against false positives
- if (File.Exists(basePath + "_subIntention.txt"))
- {
- string libCryptData = ProcessingTool.GetFullFile(basePath + "_subIntention.txt") ?? "";
- if (string.IsNullOrEmpty(libCryptData))
- {
- detected = YesNo.No;
- data = null;
- }
- else
- {
- detected = YesNo.Yes;
- data = libCryptData;
- }
- }
- else
+ detected = YesNo.NULL;
+ data = "LibCrypt could not be detected because subchannel file is missing";
+ return;
+ }
+
+ if (!LibCrypt.DetectLibCrypt([subPath]))
+ {
+ detected = YesNo.No;
+ data = null;
+ return;
+ }
+
+ // Guard against false positives
+ if (File.Exists(basePath + "_subIntention.txt"))
+ {
+ string libCryptData = ProcessingTool.GetFullFile(basePath + "_subIntention.txt") ?? "";
+ if (string.IsNullOrEmpty(libCryptData))
{
detected = YesNo.No;
data = null;
}
- }
- else if (psLibCryptStatus == false)
- {
- detected = YesNo.No;
- data = null;
+ else
+ {
+ detected = YesNo.Yes;
+ data = libCryptData;
+ }
}
else
{
- detected = YesNo.NULL;
- data = "LibCrypt could not be detected because subchannel file is missing";
+ detected = YesNo.No;
+ data = null;
}
}
diff --git a/MPF.Processors/MPF.Processors.csproj b/MPF.Processors/MPF.Processors.csproj
index 8f52cb47..42a23980 100644
--- a/MPF.Processors/MPF.Processors.csproj
+++ b/MPF.Processors/MPF.Processors.csproj
@@ -43,6 +43,7 @@
+