mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use UTF-8 string literals whenever possible.
This commit is contained in:
Submodule Aaru.Checksums updated: 99535bcd71...c26d833e6a
Submodule Aaru.CommonTypes updated: 77acc07c72...0312d5a812
@@ -45,40 +45,13 @@ namespace Aaru.Core.Devices.Dumping;
|
|||||||
|
|
||||||
public partial class Dump
|
public partial class Dump
|
||||||
{
|
{
|
||||||
static readonly byte[] _sfcExtension =
|
static readonly byte[] _sfcExtension = "SFC"u8.ToArray();
|
||||||
{
|
static readonly byte[] _genesisExtension = "BIN"u8.ToArray();
|
||||||
0x53, 0x46, 0x43
|
static readonly byte[] _smsExtension = "SMS"u8.ToArray();
|
||||||
};
|
static readonly byte[] _z64Extension = "Z64"u8.ToArray();
|
||||||
|
static readonly byte[] _gbExtension = "GB "u8.ToArray();
|
||||||
static readonly byte[] _genesisExtension =
|
static readonly byte[] _gbcExtension = "GBC"u8.ToArray();
|
||||||
{
|
static readonly byte[] _gbaExtension = "GBA"u8.ToArray();
|
||||||
0x42, 0x49, 0x4E
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _smsExtension =
|
|
||||||
{
|
|
||||||
0x53, 0x4D, 0x53
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _z64Extension =
|
|
||||||
{
|
|
||||||
0x5A, 0x36, 0x34
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _gbExtension =
|
|
||||||
{
|
|
||||||
0x47, 0x42, 0x20
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _gbcExtension =
|
|
||||||
{
|
|
||||||
0x47, 0x42, 0x43
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _gbaExtension =
|
|
||||||
{
|
|
||||||
0x47, 0x42, 0x41
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>Dumps a game cartridge using a Retrode adapter</summary>
|
/// <summary>Dumps a game cartridge using a Retrode adapter</summary>
|
||||||
void Retrode()
|
void Retrode()
|
||||||
|
|||||||
@@ -42,14 +42,8 @@ namespace Aaru.Core.Devices.Dumping;
|
|||||||
|
|
||||||
public partial class Dump
|
public partial class Dump
|
||||||
{
|
{
|
||||||
static readonly byte[] _fatSignature =
|
static readonly byte[] _fatSignature = "FAT16 "u8.ToArray();
|
||||||
{
|
static readonly byte[] _isoExtension = "ISO"u8.ToArray();
|
||||||
0x46, 0x41, 0x54, 0x31, 0x36, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
static readonly byte[] _isoExtension =
|
|
||||||
{
|
|
||||||
0x49, 0x53, 0x4F
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>Dumps a CFW PlayStation Portable UMD</summary>
|
/// <summary>Dumps a CFW PlayStation Portable UMD</summary>
|
||||||
void PlayStationPortable()
|
void PlayStationPortable()
|
||||||
|
|||||||
@@ -91,31 +91,11 @@ public static class MMC
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>Present on first two seconds of second track, says "COPYRIGHT BANDAI"</summary>
|
/// <summary>Present on first two seconds of second track, says "COPYRIGHT BANDAI"</summary>
|
||||||
static readonly byte[] _playdiaCopyright =
|
static readonly byte[] _playdiaCopyright = "COPYRIGHT BANDAI"u8.ToArray();
|
||||||
{
|
static readonly byte[] _pcEngineSignature = "PC Engine CD-ROM SYSTEM"u8.ToArray();
|
||||||
0x43, 0x4F, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x42, 0x41, 0x4E, 0x44, 0x41, 0x49
|
static readonly byte[] _pcFxSignature = "PC-FX:Hu_CD-ROM"u8.ToArray();
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _pcEngineSignature =
|
|
||||||
{
|
|
||||||
0x50, 0x43, 0x20, 0x45, 0x6E, 0x67, 0x69, 0x6E, 0x65, 0x20, 0x43, 0x44, 0x2D, 0x52, 0x4F, 0x4D, 0x20, 0x53,
|
|
||||||
0x59, 0x53, 0x54, 0x45, 0x4D
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _pcFxSignature =
|
|
||||||
{
|
|
||||||
0x50, 0x43, 0x2D, 0x46, 0x58, 0x3A, 0x48, 0x75, 0x5F, 0x43, 0x44, 0x2D, 0x52, 0x4F, 0x4D
|
|
||||||
};
|
|
||||||
|
|
||||||
static readonly byte[] _atariSignature =
|
static readonly byte[] _atariSignature =
|
||||||
{
|
"TAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTAIRTARA IPARPVODED TA AEHDAREA RT"u8.ToArray();
|
||||||
0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41,
|
|
||||||
0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52,
|
|
||||||
0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41,
|
|
||||||
0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x49, 0x52, 0x54, 0x41, 0x52, 0x41, 0x20, 0x49, 0x50, 0x41,
|
|
||||||
0x52, 0x50, 0x56, 0x4F, 0x44, 0x45, 0x44, 0x20, 0x54, 0x41, 0x20, 0x41, 0x45, 0x48, 0x44, 0x41, 0x52, 0x45,
|
|
||||||
0x41, 0x20, 0x52, 0x54
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>This is some kind of header. Every 10 bytes there's an audio byte.</summary>
|
/// <summary>This is some kind of header. Every 10 bytes there's an audio byte.</summary>
|
||||||
static readonly byte[] _videoNowColorFrameMarker =
|
static readonly byte[] _videoNowColorFrameMarker =
|
||||||
|
|||||||
Submodule Aaru.Decoders updated: abbde2d4fe...c58d1f2261
@@ -39,8 +39,5 @@ namespace Aaru.Filesystems;
|
|||||||
public sealed partial class AODOS
|
public sealed partial class AODOS
|
||||||
{
|
{
|
||||||
const string FS_TYPE = "aodos";
|
const string FS_TYPE = "aodos";
|
||||||
readonly byte[] _identifier =
|
readonly byte[] _identifier = " AO-DOS "u8.ToArray();
|
||||||
{
|
|
||||||
0x20, 0x41, 0x4F, 0x2D, 0x44, 0x4F, 0x53, 0x20
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -37,8 +37,5 @@ namespace Aaru.Filesystems;
|
|||||||
public sealed partial class ECMA67
|
public sealed partial class ECMA67
|
||||||
{
|
{
|
||||||
const string FS_TYPE = "ecma67";
|
const string FS_TYPE = "ecma67";
|
||||||
readonly byte[] _magic =
|
readonly byte[] _magic = "VOL"u8.ToArray();
|
||||||
{
|
|
||||||
0x56, 0x4F, 0x4C
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -34,14 +34,8 @@ public sealed partial class HPOFS
|
|||||||
{
|
{
|
||||||
0x48, 0x50, 0x4F, 0x46, 0x53, 0x00, 0x00, 0x00
|
0x48, 0x50, 0x4F, 0x46, 0x53, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
readonly byte[] _medinfoSignature =
|
readonly byte[] _medinfoSignature = "MEDINFO "u8.ToArray();
|
||||||
{
|
readonly byte[] _volinfoSignature = "VOLINFO "u8.ToArray();
|
||||||
0x4D, 0x45, 0x44, 0x49, 0x4E, 0x46, 0x4F, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _volinfoSignature =
|
|
||||||
{
|
|
||||||
0x56, 0x4F, 0x4C, 0x49, 0x4E, 0x46, 0x4F, 0x20
|
|
||||||
};
|
|
||||||
|
|
||||||
// Do not translate
|
// Do not translate
|
||||||
const string FS_TYPE = "hpofs";
|
const string FS_TYPE = "hpofs";
|
||||||
|
|||||||
@@ -40,11 +40,6 @@ namespace Aaru.Filesystems;
|
|||||||
public sealed partial class exFAT
|
public sealed partial class exFAT
|
||||||
{
|
{
|
||||||
readonly Guid _oemFlashParameterGuid = new("0A0C7E46-3399-4021-90C8-FA6D389C4BA2");
|
readonly Guid _oemFlashParameterGuid = new("0A0C7E46-3399-4021-90C8-FA6D389C4BA2");
|
||||||
|
readonly byte[] _signature = "EXFAT "u8.ToArray();
|
||||||
readonly byte[] _signature =
|
|
||||||
{
|
|
||||||
0x45, 0x58, 0x46, 0x41, 0x54, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
|
|
||||||
const string FS_TYPE = "exfat";
|
const string FS_TYPE = "exfat";
|
||||||
}
|
}
|
||||||
@@ -50,31 +50,12 @@ public sealed class AppleDouble : IFilter
|
|||||||
const uint MAGIC = 0x00051607;
|
const uint MAGIC = 0x00051607;
|
||||||
const uint VERSION = 0x00010000;
|
const uint VERSION = 0x00010000;
|
||||||
const uint VERSION2 = 0x00020000;
|
const uint VERSION2 = 0x00020000;
|
||||||
readonly byte[] _dosHome =
|
readonly byte[] _dosHome = "MS-DOS "u8.ToArray();
|
||||||
{
|
readonly byte[] _macintoshHome = "Macintosh "u8.ToArray();
|
||||||
0x4D, 0x53, 0x2D, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
readonly byte[] _osxHome = "Mac OS X "u8.ToArray();
|
||||||
};
|
readonly byte[] _proDosHome = "ProDOS "u8.ToArray();
|
||||||
|
readonly byte[] _unixHome = "Unix "u8.ToArray();
|
||||||
readonly byte[] _macintoshHome =
|
readonly byte[] _vmsHome = "VAX VMS "u8.ToArray();
|
||||||
{
|
|
||||||
0x4D, 0x61, 0x63, 0x69, 0x6E, 0x74, 0x6F, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _osxHome =
|
|
||||||
{
|
|
||||||
0x4D, 0x61, 0x63, 0x20, 0x4F, 0x53, 0x20, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _proDosHome =
|
|
||||||
{
|
|
||||||
0x50, 0x72, 0x6F, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _unixHome =
|
|
||||||
{
|
|
||||||
0x55, 0x6E, 0x69, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _vmsHome =
|
|
||||||
{
|
|
||||||
0x56, 0x41, 0x58, 0x20, 0x56, 0x4D, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
Entry _dataFork;
|
Entry _dataFork;
|
||||||
Header _header;
|
Header _header;
|
||||||
string _headerPath;
|
string _headerPath;
|
||||||
|
|||||||
@@ -50,31 +50,12 @@ public sealed class AppleSingle : IFilter
|
|||||||
const uint MAGIC = 0x00051600;
|
const uint MAGIC = 0x00051600;
|
||||||
const uint VERSION = 0x00010000;
|
const uint VERSION = 0x00010000;
|
||||||
const uint VERSION2 = 0x00020000;
|
const uint VERSION2 = 0x00020000;
|
||||||
readonly byte[] _dosHome =
|
readonly byte[] _dosHome = "MS-DOS "u8.ToArray();
|
||||||
{
|
readonly byte[] _macintoshHome = "Macintosh "u8.ToArray();
|
||||||
0x4D, 0x53, 0x2D, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
readonly byte[] _osxHome = "Mac OS X "u8.ToArray();
|
||||||
};
|
readonly byte[] _proDosHome = "ProDOS "u8.ToArray();
|
||||||
|
readonly byte[] _unixHome = "Unix "u8.ToArray();
|
||||||
readonly byte[] _macintoshHome =
|
readonly byte[] _vmsHome = "VAX VMS "u8.ToArray();
|
||||||
{
|
|
||||||
0x4D, 0x61, 0x63, 0x69, 0x6E, 0x74, 0x6F, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _osxHome =
|
|
||||||
{
|
|
||||||
0x4D, 0x61, 0x63, 0x20, 0x4F, 0x53, 0x20, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _proDosHome =
|
|
||||||
{
|
|
||||||
0x50, 0x72, 0x6F, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _unixHome =
|
|
||||||
{
|
|
||||||
0x55, 0x6E, 0x69, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
readonly byte[] _vmsHome =
|
|
||||||
{
|
|
||||||
0x56, 0x41, 0x58, 0x20, 0x56, 0x4D, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
|
|
||||||
};
|
|
||||||
byte[] _bytes;
|
byte[] _bytes;
|
||||||
Entry _dataFork;
|
Entry _dataFork;
|
||||||
Header _header;
|
Header _header;
|
||||||
|
|||||||
@@ -35,8 +35,5 @@ namespace Aaru.DiscImages;
|
|||||||
public sealed partial class Alcohol120
|
public sealed partial class Alcohol120
|
||||||
{
|
{
|
||||||
const byte MAXIMUM_SUPPORTED_VERSION = 1;
|
const byte MAXIMUM_SUPPORTED_VERSION = 1;
|
||||||
readonly byte[] _alcoholSignature =
|
readonly byte[] _alcoholSignature = "MEDIA DESCRIPTOR"u8.ToArray();
|
||||||
{
|
|
||||||
0x4d, 0x45, 0x44, 0x49, 0x41, 0x20, 0x44, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x4f, 0x52
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -53,27 +53,17 @@ public sealed partial class AppleNib
|
|||||||
{
|
{
|
||||||
0, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, 15
|
0, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, 15
|
||||||
};
|
};
|
||||||
readonly byte[] _driString =
|
readonly byte[] _driString = "COPYRIGHT (C) 1979, DIGITAL RESEARCH"u8.ToArray();
|
||||||
{
|
|
||||||
0x43, 0x4F, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x28, 0x43, 0x29, 0x20, 0x31, 0x39, 0x37, 0x39,
|
|
||||||
0x2C, 0x20, 0x44, 0x49, 0x47, 0x49, 0x54, 0x41, 0x4C, 0x20, 0x52, 0x45, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48
|
|
||||||
};
|
|
||||||
readonly byte[] _pascalSign =
|
readonly byte[] _pascalSign =
|
||||||
{
|
{
|
||||||
0x08, 0xA5, 0x0F, 0x29
|
0x08, 0xA5, 0x0F, 0x29
|
||||||
};
|
};
|
||||||
readonly byte[] _pascalString =
|
readonly byte[] _pascalString = "SYSTE.APPLE"u8.ToArray();
|
||||||
{
|
|
||||||
0x53, 0x59, 0x53, 0x54, 0x45, 0x2E, 0x41, 0x50, 0x50, 0x4C, 0x45
|
|
||||||
};
|
|
||||||
readonly byte[] _pascal2Sign =
|
readonly byte[] _pascal2Sign =
|
||||||
{
|
{
|
||||||
0xFF, 0xA2, 0x00, 0x8E
|
0xFF, 0xA2, 0x00, 0x8E
|
||||||
};
|
};
|
||||||
readonly byte[] _prodosString =
|
readonly byte[] _prodosString = "PRODOS"u8.ToArray();
|
||||||
{
|
|
||||||
0x50, 0x52, 0x4F, 0x44, 0x4F, 0x53
|
|
||||||
};
|
|
||||||
readonly ulong[] _proDosSkewing =
|
readonly ulong[] _proDosSkewing =
|
||||||
{
|
{
|
||||||
0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15
|
0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15
|
||||||
|
|||||||
@@ -35,8 +35,5 @@ namespace Aaru.DiscImages;
|
|||||||
public sealed partial class BlindWrite4
|
public sealed partial class BlindWrite4
|
||||||
{
|
{
|
||||||
/// <summary>"BLINDWRITE TOC FILE"</summary>
|
/// <summary>"BLINDWRITE TOC FILE"</summary>
|
||||||
readonly byte[] _bw4Signature =
|
readonly byte[] _bw4Signature = "BLINDWRITE TOC FILE"u8.ToArray();
|
||||||
{
|
|
||||||
0x42, 0x4C, 0x49, 0x4E, 0x44, 0x57, 0x52, 0x49, 0x54, 0x45, 0x20, 0x54, 0x4F, 0x43, 0x20, 0x46, 0x49, 0x4C, 0x45
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -35,13 +35,7 @@ namespace Aaru.DiscImages;
|
|||||||
public sealed partial class BlindWrite5
|
public sealed partial class BlindWrite5
|
||||||
{
|
{
|
||||||
/// <summary>"BWT5 STREAM FOOT"</summary>
|
/// <summary>"BWT5 STREAM FOOT"</summary>
|
||||||
readonly byte[] _bw5Footer =
|
readonly byte[] _bw5Footer = "BWT5 STREAM FOOT"u8.ToArray();
|
||||||
{
|
|
||||||
0x42, 0x57, 0x54, 0x35, 0x20, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4D, 0x20, 0x46, 0x4F, 0x4F, 0x54
|
|
||||||
};
|
|
||||||
/// <summary>"BWT5 STREAM SIGN"</summary>
|
/// <summary>"BWT5 STREAM SIGN"</summary>
|
||||||
readonly byte[] _bw5Signature =
|
readonly byte[] _bw5Signature = "BWT5 STREAM SIGN"u8.ToArray();
|
||||||
{
|
|
||||||
0x42, 0x57, 0x54, 0x35, 0x20, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4D, 0x20, 0x53, 0x49, 0x47, 0x4E
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -48,10 +48,7 @@ namespace Aaru.DiscImages;
|
|||||||
public sealed partial class Chd : IOpticalMediaImage, IVerifiableImage
|
public sealed partial class Chd : IOpticalMediaImage, IVerifiableImage
|
||||||
{
|
{
|
||||||
/// <summary>"MComprHD"</summary>
|
/// <summary>"MComprHD"</summary>
|
||||||
readonly byte[] _chdTag =
|
readonly byte[] _chdTag = "MComprHD"u8.ToArray();
|
||||||
{
|
|
||||||
0x4D, 0x43, 0x6F, 0x6D, 0x70, 0x72, 0x48, 0x44
|
|
||||||
};
|
|
||||||
SectorBuilder _sectorBuilder;
|
SectorBuilder _sectorBuilder;
|
||||||
uint _bytesPerHunk;
|
uint _bytesPerHunk;
|
||||||
byte[] _cis;
|
byte[] _cis;
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ public sealed partial class CopyTape
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] footer = Encoding.ASCII.GetBytes("CPTP:EOT\n");
|
byte[] footer = "CPTP:EOT\n"u8.ToArray();
|
||||||
|
|
||||||
_dataStream.Write(footer, 0, footer.Length);
|
_dataStream.Write(footer, 0, footer.Length);
|
||||||
_dataStream.Flush();
|
_dataStream.Flush();
|
||||||
@@ -231,7 +231,7 @@ public sealed partial class CopyTape
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] marker = Encoding.ASCII.GetBytes("CPTP:MRK\n");
|
byte[] marker = "CPTP:MRK\n"u8.ToArray();
|
||||||
|
|
||||||
_dataStream.Write(marker, 0, marker.Length);
|
_dataStream.Write(marker, 0, marker.Length);
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,5 @@ public sealed partial class Dim
|
|||||||
{
|
{
|
||||||
/// <summary>Start of data sectors in disk image, should be 0x100</summary>
|
/// <summary>Start of data sectors in disk image, should be 0x100</summary>
|
||||||
const uint DATA_OFFSET = 0x100;
|
const uint DATA_OFFSET = 0x100;
|
||||||
readonly byte[] _headerId =
|
readonly byte[] _headerId = "DIFC HEADER "u8.ToArray();
|
||||||
{
|
|
||||||
0x44, 0x49, 0x46, 0x43, 0x20, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x20, 0x20
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using Aaru.CommonTypes;
|
using Aaru.CommonTypes;
|
||||||
using Aaru.CommonTypes.AaruMetadata;
|
using Aaru.CommonTypes.AaruMetadata;
|
||||||
using Aaru.CommonTypes.Enums;
|
using Aaru.CommonTypes.Enums;
|
||||||
@@ -109,7 +108,7 @@ public sealed partial class DriDiskCopy
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Array.Copy(Encoding.ASCII.GetBytes("DiskImage 2.01 (C) 1990,1991 Digital Research Inc"), 0, _footer.signature,
|
Array.Copy("DiskImage 2.01 (C) 1990,1991 Digital Research Inc"u8.ToArray(), 0, _footer.signature,
|
||||||
0, 49);
|
0, 49);
|
||||||
|
|
||||||
_footer.bpbcopy = _footer.bpb;
|
_footer.bpbcopy = _footer.bpb;
|
||||||
|
|||||||
@@ -44,12 +44,6 @@ public sealed partial class Parallels
|
|||||||
const uint MAX_CACHE_SIZE = 16777216;
|
const uint MAX_CACHE_SIZE = 16777216;
|
||||||
const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / 512;
|
const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / 512;
|
||||||
const uint DEFAULT_CLUSTER_SIZE = 1048576;
|
const uint DEFAULT_CLUSTER_SIZE = 1048576;
|
||||||
readonly byte[] _extMagic =
|
readonly byte[] _extMagic = "WithouFreSpacExt"u8.ToArray();
|
||||||
{
|
readonly byte[] _magic = "WithoutFreeSpace"u8.ToArray();
|
||||||
0x57, 0x69, 0x74, 0x68, 0x6F, 0x75, 0x46, 0x72, 0x65, 0x53, 0x70, 0x61, 0x63, 0x45, 0x78, 0x74
|
|
||||||
};
|
|
||||||
readonly byte[] _magic =
|
|
||||||
{
|
|
||||||
0x57, 0x69, 0x74, 0x68, 0x6F, 0x75, 0x74, 0x46, 0x72, 0x65, 0x65, 0x53, 0x70, 0x61, 0x63, 0x65
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -37,12 +37,6 @@ public sealed partial class PartClone
|
|||||||
const int CRC_SIZE = 4;
|
const int CRC_SIZE = 4;
|
||||||
const uint MAX_CACHE_SIZE = 16777216;
|
const uint MAX_CACHE_SIZE = 16777216;
|
||||||
const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / 512;
|
const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / 512;
|
||||||
readonly byte[] _biTmAgIc =
|
readonly byte[] _biTmAgIc = "BiTmAgIc"u8.ToArray();
|
||||||
{
|
readonly byte[] _partCloneMagic = "partclone-image"u8.ToArray();
|
||||||
0x42, 0x69, 0x54, 0x6D, 0x41, 0x67, 0x49, 0x63
|
|
||||||
};
|
|
||||||
readonly byte[] _partCloneMagic =
|
|
||||||
{
|
|
||||||
0x70, 0x61, 0x72, 0x74, 0x63, 0x6C, 0x6F, 0x6E, 0x65, 0x2D, 0x69, 0x6D, 0x61, 0x67, 0x65
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -37,15 +37,9 @@ public sealed partial class SuperCardPro
|
|||||||
/// <summary>SuperCardPro footer signature: "FPCS"</summary>
|
/// <summary>SuperCardPro footer signature: "FPCS"</summary>
|
||||||
const uint FOOTER_SIGNATURE = 0x53435046;
|
const uint FOOTER_SIGNATURE = 0x53435046;
|
||||||
/// <summary>SuperCardPro header signature: "SCP"</summary>
|
/// <summary>SuperCardPro header signature: "SCP"</summary>
|
||||||
readonly byte[] _scpSignature =
|
readonly byte[] _scpSignature = "SCP"u8.ToArray();
|
||||||
{
|
|
||||||
0x53, 0x43, 0x50
|
|
||||||
};
|
|
||||||
/// <summary>SuperCardPro track header signature: "TRK"</summary>
|
/// <summary>SuperCardPro track header signature: "TRK"</summary>
|
||||||
readonly byte[] _trkSignature =
|
readonly byte[] _trkSignature = "TRK"u8.ToArray();
|
||||||
{
|
|
||||||
0x54, 0x52, 0x4B
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>SuperCardPro device default capture resolution: 25 nanoseconds.</summary>
|
/// <summary>SuperCardPro device default capture resolution: 25 nanoseconds.</summary>
|
||||||
const ushort DEFAULT_RESOLUTION = 25000;
|
const ushort DEFAULT_RESOLUTION = 25000;
|
||||||
|
|||||||
@@ -34,8 +34,5 @@ namespace Aaru.DiscImages;
|
|||||||
|
|
||||||
public sealed partial class UkvFdi
|
public sealed partial class UkvFdi
|
||||||
{
|
{
|
||||||
readonly byte[] _signature =
|
readonly byte[] _signature = "FDI"u8.ToArray();
|
||||||
{
|
|
||||||
0x46, 0x44, 0x49
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,6 @@ public sealed partial class VMware
|
|||||||
{
|
{
|
||||||
const uint VMWARE_EXTENT_MAGIC = 0x564D444B;
|
const uint VMWARE_EXTENT_MAGIC = 0x564D444B;
|
||||||
const uint VMWARE_COW_MAGIC = 0x44574F43;
|
const uint VMWARE_COW_MAGIC = 0x44574F43;
|
||||||
|
|
||||||
const string VM_TYPE_CUSTOM = "custom";
|
const string VM_TYPE_CUSTOM = "custom";
|
||||||
const string VM_TYPE_MONO_SPARSE = "monolithicSparse";
|
const string VM_TYPE_MONO_SPARSE = "monolithicSparse";
|
||||||
const string VM_TYPE_MONO_FLAT = "monolithicFlat";
|
const string VM_TYPE_MONO_FLAT = "monolithicFlat";
|
||||||
@@ -58,9 +57,7 @@ public sealed partial class VMware
|
|||||||
const string VMFS_TYPE_RAW = "vmfsRaw";
|
const string VMFS_TYPE_RAW = "vmfsRaw";
|
||||||
const string VMFS_TYPE = "vmfs";
|
const string VMFS_TYPE = "vmfs";
|
||||||
const string VM_TYPE_STREAM = "streamOptimized";
|
const string VM_TYPE_STREAM = "streamOptimized";
|
||||||
|
|
||||||
const string DDF_MAGIC = "# Disk DescriptorFile";
|
const string DDF_MAGIC = "# Disk DescriptorFile";
|
||||||
|
|
||||||
const string REGEX_VERSION = @"^\s*version\s*=\s*(?<version>\d+)$";
|
const string REGEX_VERSION = @"^\s*version\s*=\s*(?<version>\d+)$";
|
||||||
const string REGEX_CID = @"^\s*CID\s*=\s*(?<cid>[0123456789abcdef]{8})$";
|
const string REGEX_CID = @"^\s*CID\s*=\s*(?<cid>[0123456789abcdef]{8})$";
|
||||||
const string REGEX_CID_PARENT = @"^\s*parentCID\s*=\s*(?<cid>[0123456789abcdef]{8})$";
|
const string REGEX_CID_PARENT = @"^\s*parentCID\s*=\s*(?<cid>[0123456789abcdef]{8})$";
|
||||||
@@ -73,22 +70,15 @@ public sealed partial class VMware
|
|||||||
const string REGEX_DDB_HEADS = @"^\s*ddb\.geometry\.heads\s*=\s*\""(?<heads>\d+)\""$";
|
const string REGEX_DDB_HEADS = @"^\s*ddb\.geometry\.heads\s*=\s*\""(?<heads>\d+)\""$";
|
||||||
const string REGEX_DDB_CYLINDERS = @"^\s*ddb\.geometry\.cylinders\s*=\s*\""(?<cylinders>\d+)\""$";
|
const string REGEX_DDB_CYLINDERS = @"^\s*ddb\.geometry\.cylinders\s*=\s*\""(?<cylinders>\d+)\""$";
|
||||||
const string PARENT_REGEX = @"^\s*parentFileNameHint\s*=\s*\""(?<filename>.+)\""$";
|
const string PARENT_REGEX = @"^\s*parentFileNameHint\s*=\s*\""(?<filename>.+)\""$";
|
||||||
|
|
||||||
const uint FLAGS_VALID_NEW_LINE = 0x01;
|
const uint FLAGS_VALID_NEW_LINE = 0x01;
|
||||||
const uint FLAGS_USE_REDUNDANT_TABLE = 0x02;
|
const uint FLAGS_USE_REDUNDANT_TABLE = 0x02;
|
||||||
const uint FLAGS_ZERO_GRAIN_GTE = 0x04;
|
const uint FLAGS_ZERO_GRAIN_GTE = 0x04;
|
||||||
const uint FLAGS_COMPRESSION = 0x10000;
|
const uint FLAGS_COMPRESSION = 0x10000;
|
||||||
const uint FLAGS_MARKERS = 0x20000;
|
const uint FLAGS_MARKERS = 0x20000;
|
||||||
|
|
||||||
const ushort COMPRESSION_NONE = 0;
|
const ushort COMPRESSION_NONE = 0;
|
||||||
const ushort COMPRESSION_DEFLATE = 1;
|
const ushort COMPRESSION_DEFLATE = 1;
|
||||||
|
|
||||||
const uint MAX_CACHE_SIZE = 16777216;
|
const uint MAX_CACHE_SIZE = 16777216;
|
||||||
const uint SECTOR_SIZE = 512;
|
const uint SECTOR_SIZE = 512;
|
||||||
const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / SECTOR_SIZE;
|
const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / SECTOR_SIZE;
|
||||||
readonly byte[] _ddfMagicBytes =
|
readonly byte[] _ddfMagicBytes = "# Disk DescriptorFile"u8.ToArray();
|
||||||
{
|
|
||||||
0x23, 0x20, 0x44, 0x69, 0x73, 0x6B, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6F, 0x72, 0x46,
|
|
||||||
0x69, 0x6C, 0x65
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,7 @@ public class Adler32
|
|||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom =
|
static readonly byte[] _expectedRandom =
|
||||||
{
|
{
|
||||||
|
// ReSharper disable once UseUtf8StringLiteral
|
||||||
0x37, 0x28, 0xd1, 0x86
|
0x37, 0x28, 0xd1, 0x86
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class Crc16Ccitt
|
|||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom =
|
static readonly byte[] _expectedRandom =
|
||||||
{
|
{
|
||||||
|
// ReSharper disable once UseUtf8StringLiteral
|
||||||
0x36, 0x40
|
0x36, 0x40
|
||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom15 =
|
static readonly byte[] _expectedRandom15 =
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class Crc16Ibm
|
|||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom =
|
static readonly byte[] _expectedRandom =
|
||||||
{
|
{
|
||||||
|
// ReSharper disable once UseUtf8StringLiteral
|
||||||
0x2d, 0x6d
|
0x2d, 0x6d
|
||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom15 =
|
static readonly byte[] _expectedRandom15 =
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class Crc32
|
|||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom =
|
static readonly byte[] _expectedRandom =
|
||||||
{
|
{
|
||||||
|
// ReSharper disable once UseUtf8StringLiteral
|
||||||
0x2b, 0x6e, 0x68, 0x54
|
0x2b, 0x6e, 0x68, 0x54
|
||||||
};
|
};
|
||||||
static readonly byte[] _expectedRandom15 =
|
static readonly byte[] _expectedRandom15 =
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using Aaru.Helpers;
|
|||||||
using FluentAssertions.Execution;
|
using FluentAssertions.Execution;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
// ReSharper disable UseUtf8StringLiteral
|
||||||
|
|
||||||
namespace Aaru.Tests.Devices.MultiMediaCard;
|
namespace Aaru.Tests.Devices.MultiMediaCard;
|
||||||
|
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class CSD
|
|||||||
|
|
||||||
readonly byte[] speeds =
|
readonly byte[] speeds =
|
||||||
{
|
{
|
||||||
|
// ReSharper disable once UseUtf8StringLiteral
|
||||||
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50
|
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user