implement a simple sega saturn cd heuristic detection. unknown cues once again are loaded into PCECD
This commit is contained in:
parent
0f5cc4ed25
commit
2631ffbde6
|
@ -116,7 +116,6 @@ namespace BizHawk.DiscSystem
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a SectorEntry from which you can retrieve various interesting pieces of information about the sector.
|
||||
/// The SectorEntry's interface is not likely to be stable, though, but it may be more convenient.
|
||||
|
@ -206,5 +205,19 @@ namespace BizHawk.DiscSystem
|
|||
}
|
||||
return "no data track found";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// this isn't quite right...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool DetectSegaSaturn()
|
||||
{
|
||||
byte[] data = new byte[2048];
|
||||
ReadLBA_2048(0, data, 0);
|
||||
byte[] cmp = System.Text.Encoding.ASCII.GetBytes("SEGA SEGASATURN");
|
||||
byte[] cmp2 = new byte[15];
|
||||
Buffer.BlockCopy(data, 0, cmp2, 0, 15);
|
||||
return System.Linq.Enumerable.SequenceEqual(cmp, cmp2);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1626,6 +1626,8 @@ namespace BizHawk.MultiClient
|
|||
case "Coleco": str += "ColecoVision"; break;
|
||||
case "GBA": str += "Game Boy Advance"; break;
|
||||
case "N64": str += "Nintendo 64"; break;
|
||||
case "SAT": str += "Saturn"; break;
|
||||
case "DGB": str += "Game Boy Link"; break;
|
||||
}
|
||||
|
||||
if (INTERIM) str += " (interim)";
|
||||
|
@ -1932,17 +1934,16 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (Emulation.Consoles.PSX.Octoshock.CheckIsPSX(disc))
|
||||
{
|
||||
game = new GameInfo {System = "PSX", Name = Path.GetFileNameWithoutExtension(file.Name), Hash = hash};
|
||||
game = new GameInfo { System = "PSX", Name = Path.GetFileNameWithoutExtension(file.Name), Hash = hash };
|
||||
disc.Dispose();
|
||||
}
|
||||
/*
|
||||
else if (disc.DetectSegaSaturn())
|
||||
{
|
||||
game = new GameInfo { System = "SAT", Name = Path.GetFileNameWithoutExtension(file.Name), Hash = hash };
|
||||
}
|
||||
else
|
||||
{
|
||||
game = new GameInfo {System = "PCECD", Name = Path.GetFileNameWithoutExtension(file.Name), Hash = hash};
|
||||
}*/
|
||||
else
|
||||
{
|
||||
game = new GameInfo {System = "SAT", Name = Path.GetFileNameWithoutExtension(file.Name), Hash = hash};
|
||||
game = new GameInfo { System = "PCECD", Name = Path.GetFileNameWithoutExtension(file.Name), Hash = hash };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue