Fix reading of CPCDSK disk images where the headers have different case.

This commit is contained in:
2021-06-03 12:03:20 +01:00
parent 87607cfa5d
commit 140a9380f9
4 changed files with 59 additions and 41 deletions

View File

@@ -35,26 +35,15 @@ namespace Aaru.DiscImages
public sealed partial class Cpcdsk
{
/// <summary>Identifier for CPCEMU disk images, "MV - CPC" + usually : "EMU Disk-File\r\nDisk-Info\r\n" but not required</summary>
readonly byte[] _cpcdskId =
{
0x4D, 0x56, 0x20, 0x2D, 0x20, 0x43, 0x50, 0x43
};
const string _cpcdskId = "MV - CPCEMU Disk-File";
/// <summary>Identifier for DU54 disk images, "MV - CPC format Disk Image (DU54)"</summary>
readonly byte[] _du54Id =
{
0x4D, 0x56, 0x20, 0x2D, 0x20, 0x43, 0x50, 0x43, 0x20, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x20, 0x44, 0x69,
0x73, 0x6B, 0x20
};
/// <summary>Identifier for Extended CPCEMU disk images, "EXTENDED CPC DSK File"</summary>
readonly byte[] _edskId =
{
0x45, 0x58, 0x54, 0x45, 0x4E, 0x44, 0x45, 0x44, 0x20, 0x43, 0x50, 0x43, 0x20, 0x44, 0x53, 0x4B, 0x20, 0x46,
0x69, 0x6C, 0x65
};
/// <summary>Identifier for track information, "Track-Info\r\n"</summary>
readonly byte[] _trackId =
{
0x54, 0x72, 0x61, 0x63, 0x6B, 0x2D, 0x49, 0x6E, 0x66, 0x6F
};
const string _du54Id = "MV - CPC format Disk Image (DU54)";
/// <summary>Identifier for Extended CPCEMU disk images</summary>
const string _edskId = "EXTENDED CPC DSK File";
/// <summary>Identifier for track information, </summary>
const string _trackId = "Track-Info";
}
}