Skip to content

Commit

Permalink
Hash DMI and PFI files for XGD in Redumper
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed Aug 18, 2024
1 parent c6cc697 commit 9f9bfc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Allow separate mounted path for Linux
- Fix cleaning XGD3 SS
- Prepare Redumper for XGD support
- Hash DMI and PFI files for XGD in Redumper

### 3.2.1 (2024-08-05)

Expand Down
23 changes: 17 additions & 6 deletions MPF.Processors/Redumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using SabreTools.Hashing;
using SabreTools.Models.CueSheets;
using SabreTools.RedumpLib;
using SabreTools.RedumpLib.Data;
Expand Down Expand Up @@ -350,7 +351,12 @@ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath
info.CommonDiscInfo.Region = ProcessingTool.GetXGDRegion(xmid.Model.RegionIdentifier);
}

// TODO: Support SS and additional file information when generated
if (HashTool.GetStandardHashes($"{basePath}.manufacturer", out _, out string? dmi1Crc, out _, out _))
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.DMIHash] = dmi1Crc ?? string.Empty;
if (HashTool.GetStandardHashes($"{basePath}.physical", out _, out string? pfi1Crc, out _, out _))
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.PFIHash] = pfi1Crc ?? string.Empty;

// TODO: Support SS information when generated
break;

case RedumpSystem.MicrosoftXbox360:
Expand All @@ -366,7 +372,12 @@ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath
info.CommonDiscInfo.Region = ProcessingTool.GetXGDRegion(xemid.Model.RegionIdentifier);
}

// TODO: Support SS and additional file information when generated
if (HashTool.GetStandardHashes($"{basePath}.manufacturer", out _, out string? dmi23Crc, out _, out _))
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.DMIHash] = dmi23Crc ?? string.Empty;
if (HashTool.GetStandardHashes($"{basePath}.physical", out _, out string? pfi23Crc, out _, out _))
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.PFIHash] = pfi23Crc ?? string.Empty;

// TODO: Support SS information when generated
break;

case RedumpSystem.NamcoSegaNintendoTriforce:
Expand Down Expand Up @@ -1159,23 +1170,23 @@ private static bool GetPlayStationInfo(string log, out string? exeDate, out stri

if (line.StartsWith("anti-modchip:"))
{
// Valid but skip
// Valid but skip
}
else if (line.StartsWith("EXE:"))
{
// Valid but skip
// Valid but skip
}
else if (line.StartsWith("EXE date:"))
{
exeDate = line.Substring("EXE date: ".Length).Trim();
}
else if (line.StartsWith("libcrypt:"))
{
// Valid but skip
// Valid but skip
}
else if (line.StartsWith("region:"))
{
// Valid but skip
// Valid but skip
}
else if (line.StartsWith("serial:"))
{
Expand Down

0 comments on commit 9f9bfc0

Please sign in to comment.