Reorder the optical disk id checks
Seems like PS2 games have an appId of PLAYSTATION sometimes, so move the SYSTEM.CNF;1 check first
This commit is contained in:
parent
9af25f7180
commit
8e8575ad69
|
@ -190,6 +190,14 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
//its a cheap win for a lot of systems, but ONLY if the iso.Parse() method is quick running (might have to time it)
|
||||
if (isIso)
|
||||
{
|
||||
if (iso.Root.Children.TryGetValue("SYSTEM.CNF;1", out var cnf))
|
||||
{
|
||||
if (SectorContains("BOOT2", (int)cnf.Offset))
|
||||
return DiscType.SonyPS2;
|
||||
else if (SectorContains("BOOT", (int)cnf.Offset))
|
||||
return DiscType.SonyPSX;
|
||||
}
|
||||
|
||||
var appId = Encoding.ASCII.GetString(iso.VolumeDescriptors[0].ApplicationIdentifier).TrimEnd('\0', ' ');
|
||||
var sysId = Encoding.ASCII.GetString(iso.VolumeDescriptors[0].SystemIdentifier).TrimEnd('\0', ' ');
|
||||
|
||||
|
@ -222,14 +230,6 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
return DiscType.Amiga;
|
||||
}
|
||||
|
||||
if (iso.Root.Children.TryGetValue("SYSTEM.CNF;1", out var cnf))
|
||||
{
|
||||
if (SectorContains("BOOT2", (int)cnf.Offset))
|
||||
return DiscType.SonyPS2;
|
||||
else if (SectorContains("BOOT", (int)cnf.Offset))
|
||||
return DiscType.SonyPSX;
|
||||
}
|
||||
|
||||
// NeoGeoCD Check
|
||||
var absTxt = iso.Root.Children.Where(kvp => kvp.Key.Contains("ABS.TXT")).Select(kvp => kvp.Value).FirstOrDefault();
|
||||
if (absTxt != null && SectorContains("abstracted by snk", Convert.ToInt32(absTxt.Offset))) return DiscType.NeoGeoCD;
|
||||
|
|
Loading…
Reference in New Issue