diff --git a/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs b/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs index 2154311d82..204eb0d49e 100644 --- a/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs +++ b/src/BizHawk.Emulation.DiscSystem/DiscIdentifier.cs @@ -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;