Fix edge-case issue where non-rom games have a header offset detected in RomGame.cs (leading to system detection issues further down the line)
This commit is contained in:
parent
7aaa5e8a52
commit
00f46b0e7d
|
@ -66,6 +66,13 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
RomData = FileData;
|
RomData = FileData;
|
||||||
}
|
}
|
||||||
|
else if (file.Extension == ".DSK" || file.Extension == ".TAP" || file.Extension == ".TZX")
|
||||||
|
{
|
||||||
|
// these are not roms. unforunately if treated as such there are certain edge-cases
|
||||||
|
// where a header offset is detected. This should mitigate this issue until a cleaner solution is found
|
||||||
|
// (-Asnivor)
|
||||||
|
RomData = FileData;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if there was a header offset, read the whole file into FileData and then copy it into RomData (this is unfortunate, in case RomData isnt needed)
|
// if there was a header offset, read the whole file into FileData and then copy it into RomData (this is unfortunate, in case RomData isnt needed)
|
||||||
|
|
|
@ -341,8 +341,9 @@ namespace BizHawk.Emulation.Common
|
||||||
|
|
||||||
case ".DSK":
|
case ".DSK":
|
||||||
byte[] head2 = romData.Take(20).ToArray();
|
byte[] head2 = romData.Take(20).ToArray();
|
||||||
if (System.Text.Encoding.Default.GetString(head2).ToUpper().Contains("EXTENDED CPC DSK") ||
|
string ident = System.Text.Encoding.Default.GetString(head2);
|
||||||
System.Text.Encoding.Default.GetString(head2).ToUpper().Contains("MV - CPCEMU"))
|
if (ident.ToUpper().Contains("EXTENDED CPC DSK") ||
|
||||||
|
ident.ToUpper().Contains("MV - CPCEMU"))
|
||||||
game.System = "ZXSpectrum";
|
game.System = "ZXSpectrum";
|
||||||
else
|
else
|
||||||
game.System = "AppleII";
|
game.System = "AppleII";
|
||||||
|
|
Loading…
Reference in New Issue