mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Remove GD-ROM version fallback method
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
- Move BEE method to better location
|
||||
- Use new BEE method in code
|
||||
- Include serial for UMD
|
||||
- Remove GD-ROM version fallback method
|
||||
|
||||
### 3.2.1 (2024-08-05)
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@ namespace MPF.Processors
|
||||
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.InternalSerialName] = serial ?? string.Empty;
|
||||
info.CommonDiscInfo.EXEDateBuildDate = buildDate ?? string.Empty;
|
||||
// TODO: Support region setting from parsed value
|
||||
info.VersionAndEditions!.Version = version ?? GetGDROMVersion(info.Extras.Header) ?? string.Empty;
|
||||
info.VersionAndEditions!.Version = version ?? string.Empty;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -413,7 +413,7 @@ namespace MPF.Processors
|
||||
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.InternalSerialName] = serial ?? string.Empty;
|
||||
info.CommonDiscInfo.EXEDateBuildDate = buildDate ?? string.Empty;
|
||||
// TODO: Support region setting from parsed value
|
||||
info.VersionAndEditions!.Version = version ?? GetGDROMVersion(info.Extras.Header) ?? string.Empty;
|
||||
info.VersionAndEditions!.Version = version ?? string.Empty;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace MPF.Processors
|
||||
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.InternalSerialName] = serial ?? string.Empty;
|
||||
info.CommonDiscInfo.EXEDateBuildDate = buildDate ?? string.Empty;
|
||||
// TODO: Support region setting from parsed value
|
||||
info.VersionAndEditions!.Version = version ?? GetGDROMVersion(info.Extras.Header) ?? string.Empty;
|
||||
info.VersionAndEditions!.Version = version ?? string.Empty;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -443,7 +443,7 @@ namespace MPF.Processors
|
||||
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.InternalSerialName] = serial ?? string.Empty;
|
||||
info.CommonDiscInfo.EXEDateBuildDate = buildDate ?? string.Empty;
|
||||
// TODO: Support region setting from parsed value
|
||||
info.VersionAndEditions!.Version = version ?? GetGDROMVersion(info.Extras.Header) ?? string.Empty;
|
||||
info.VersionAndEditions!.Version = version ?? string.Empty;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -458,7 +458,7 @@ namespace MPF.Processors
|
||||
info.CommonDiscInfo!.CommentsSpecialFields![SiteCode.InternalSerialName] = serial ?? string.Empty;
|
||||
info.CommonDiscInfo.EXEDateBuildDate = buildDate ?? string.Empty;
|
||||
// TODO: Support region setting from parsed value
|
||||
info.VersionAndEditions!.Version = version ?? GetGDROMVersion(info.Extras.Header) ?? string.Empty;
|
||||
info.VersionAndEditions!.Version = version ?? string.Empty;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1007,31 +1007,6 @@ namespace MPF.Processors
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the build info from a GD-ROM LD area, if possible
|
||||
/// </summary>
|
||||
/// <<param name="segaHeader">String representing a formatter variant of the GD-ROM header</param>
|
||||
/// <returns>Version on successful extraction of info, null otherwise</returns>
|
||||
private static string? GetGDROMVersion(string? segaHeader)
|
||||
{
|
||||
// If the input header is null, we can't do a thing
|
||||
if (string.IsNullOrEmpty(segaHeader))
|
||||
return null;
|
||||
|
||||
// Now read it in cutting it into lines for easier parsing
|
||||
try
|
||||
{
|
||||
string[] header = segaHeader!.Split('\n');
|
||||
string versionLine = header[4].Substring(58);
|
||||
return versionLine.Substring(10, 6).TrimStart('V', 'v');
|
||||
}
|
||||
catch
|
||||
{
|
||||
// We don't care what the error is
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get hardware information from the input file, if possible
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user