Rename DicConsole to AaruConsole.

This commit is contained in:
2020-02-27 23:48:41 +00:00
parent 073b42655b
commit 895143b790
225 changed files with 5023 additions and 5023 deletions

View File

@@ -393,7 +393,7 @@ namespace Aaru.Core.Devices.Dumping
for(ulong b = i; b < i + _skip; b++)
_resume.BadBlocks.Add(b);
DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
mhddLog.Write(i, cmdDuration < 500 ? 65535 : cmdDuration);
ibgLog.Write(i, 0);

View File

@@ -1017,7 +1017,7 @@ namespace Aaru.Core.Devices.Dumping
{
if(tag.Value is null)
{
DicConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key);
AaruConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key);
continue;
}

View File

@@ -151,7 +151,7 @@ namespace Aaru.Core.Devices.Dumping
UpdateStatus?.
Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
_dumpLog.WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
}

View File

@@ -153,7 +153,7 @@ namespace Aaru.Core.Devices.Dumping
break;
}
DicConsole.DebugWriteLine("Pregap calculator", bcd == true
AaruConsole.DebugWriteLine("Pregap calculator", bcd == true
? "Subchannel is BCD"
: bcd == false
? "Subchannel is not BCD"
@@ -181,7 +181,7 @@ namespace Aaru.Core.Devices.Dumping
if(tracks.Where(t => t.TrackSession == track.TrackSession).OrderBy(t => t.TrackSequence).
FirstOrDefault().TrackSequence == track.TrackSequence)
{
DicConsole.DebugWriteLine("Pregap calculator", "Skipping track {0}", track.TrackSequence);
AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0}", track.TrackSequence);
if(track.TrackSequence > 1)
pregaps[track.TrackSequence] = 150;
@@ -189,7 +189,7 @@ namespace Aaru.Core.Devices.Dumping
continue;
}
DicConsole.DebugWriteLine("Pregap calculator", "Track {0}", track.TrackSequence);
AaruConsole.DebugWriteLine("Pregap calculator", "Track {0}", track.TrackSequence);
int lba = (int)track.TrackStartSector - 1;
bool pregapFound = false;
@@ -209,7 +209,7 @@ namespace Aaru.Core.Devices.Dumping
if(sense)
{
DicConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}", lba, retries + 1,
AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}", lba, retries + 1,
sense);
continue;
@@ -220,7 +220,7 @@ namespace Aaru.Core.Devices.Dumping
CRC16CCITTContext.Data(subBuf, 10, out crc);
DicConsole.DebugWriteLine("Pregap calculator",
AaruConsole.DebugWriteLine("Pregap calculator",
"LBA: {0}, Try {1}, Sense {2}, Q: {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3],
subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9],
@@ -261,7 +261,7 @@ namespace Aaru.Core.Devices.Dumping
if(crcOk)
{
DicConsole.DebugWriteLine("Pregap calculator",
AaruConsole.DebugWriteLine("Pregap calculator",
"LBA: {0}, Try {1}, Sense {2}, Q (FIXED): {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2],
subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8],
@@ -316,7 +316,7 @@ namespace Aaru.Core.Devices.Dumping
CRC16CCITTContext.Data(subBuf, 10, out crc);
DicConsole.DebugWriteLine("Pregap calculator",
AaruConsole.DebugWriteLine("Pregap calculator",
"LBA: {0}, Try {1}, Sense {2}, Q: {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3],
subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9],
@@ -357,7 +357,7 @@ namespace Aaru.Core.Devices.Dumping
if(crcOk)
{
DicConsole.DebugWriteLine("Pregap calculator",
AaruConsole.DebugWriteLine("Pregap calculator",
"LBA: {0}, Try {1}, Sense {2}, Q (FIXED): {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}",
lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2],
subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7],
@@ -430,7 +430,7 @@ namespace Aaru.Core.Devices.Dumping
{
inexactPositioning = true;
DicConsole.DebugWriteLine("Pregap calculator", "All Q empty for LBA {0}", lba);
AaruConsole.DebugWriteLine("Pregap calculator", "All Q empty for LBA {0}", lba);
break;
}
@@ -500,7 +500,7 @@ namespace Aaru.Core.Devices.Dumping
if(diff != 0)
{
DicConsole.DebugWriteLine("Pregap calculator", "Invalid Q position for LBA {0}, got {1}", lba,
AaruConsole.DebugWriteLine("Pregap calculator", "Invalid Q position for LBA {0}, got {1}", lba,
posQ);
inexactPositioning = true;
@@ -512,7 +512,7 @@ namespace Aaru.Core.Devices.Dumping
// If CRC is not OK, only accept pregaps less than 10 sectors longer than previously now
if(crcOk || pregapQ - pregaps[track.TrackSequence] < 10)
{
DicConsole.DebugWriteLine("Pregap calculator", "Pregap for track {0}: {1}",
AaruConsole.DebugWriteLine("Pregap calculator", "Pregap for track {0}: {1}",
track.TrackSequence, pregapQ);
pregaps[track.TrackSequence] = pregapQ;

View File

@@ -532,7 +532,7 @@ namespace Aaru.Core.Devices.Dumping
UpdateStatus?.
Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
_dumpLog.
WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
@@ -609,7 +609,7 @@ namespace Aaru.Core.Devices.Dumping
}
EndProgress?.Invoke();
DicConsole.WriteLine();
AaruConsole.WriteLine();
}
#endregion Error handling
@@ -1008,7 +1008,7 @@ namespace Aaru.Core.Devices.Dumping
UpdateStatus?.
Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
_dumpLog.
WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");

View File

@@ -722,7 +722,7 @@ namespace Aaru.Core.Devices.Dumping
UpdateStatus?.
Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
_dumpLog.
WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
@@ -814,7 +814,7 @@ namespace Aaru.Core.Devices.Dumping
{
if(tag.Value is null)
{
DicConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key);
AaruConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key);
continue;
}

View File

@@ -77,7 +77,7 @@ namespace Aaru.Core.Devices.Dumping
if(!isAdmin)
{
DicConsole.
AaruConsole.
ErrorWriteLine("Because of the commands sent to a device, dumping XGD must be done with administrative privileges. Cannot continue.");
_dumpLog.WriteLine("Cannot dump XGD without administrative privileges.");
@@ -144,7 +144,7 @@ namespace Aaru.Core.Devices.Dumping
mediaTags.Add(MediaTagType.Xbox_SecuritySector, tmpBuf);
// Get video partition size
DicConsole.DebugWriteLine("Dump-media command", "Getting video partition size");
AaruConsole.DebugWriteLine("Dump-media command", "Getting video partition size");
UpdateStatus?.Invoke("Locking drive.");
_dumpLog.WriteLine("Locking drive.");
sense = _dev.KreonLock(out senseBuf, _dev.Timeout, out _);
@@ -189,7 +189,7 @@ namespace Aaru.Core.Devices.Dumping
tmpBuf = new byte[readBuffer.Length - 4];
Array.Copy(readBuffer, 4, tmpBuf, 0, readBuffer.Length - 4);
mediaTags.Add(MediaTagType.DVD_PFI, tmpBuf);
DicConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize);
AaruConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize);
ulong l0Video =
(PFI.Decode(readBuffer).Value.Layer0EndPSN - PFI.Decode(readBuffer).Value.DataAreaStartPSN) + 1;
@@ -226,7 +226,7 @@ namespace Aaru.Core.Devices.Dumping
Array.Copy(coldPfi, 4, tmpBuf, 0, coldPfi.Length - 4);
mediaTags.Remove(MediaTagType.DVD_PFI);
mediaTags.Add(MediaTagType.DVD_PFI, tmpBuf);
DicConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize);
AaruConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize);
l0Video = (PFI.Decode(coldPfi).Value.Layer0EndPSN - PFI.Decode(coldPfi).Value.DataAreaStartPSN) + 1;
@@ -244,7 +244,7 @@ namespace Aaru.Core.Devices.Dumping
}
// Get game partition size
DicConsole.DebugWriteLine("Dump-media command", "Getting game partition size");
AaruConsole.DebugWriteLine("Dump-media command", "Getting game partition size");
UpdateStatus?.Invoke("Unlocking drive (Xtreme).");
_dumpLog.WriteLine("Unlocking drive (Xtreme).");
sense = _dev.KreonUnlockXtreme(out senseBuf, _dev.Timeout, out _);
@@ -272,10 +272,10 @@ namespace Aaru.Core.Devices.Dumping
ulong gameSize =
(ulong)((readBuffer[0] << 24) + (readBuffer[1] << 16) + (readBuffer[2] << 8) + readBuffer[3]) + 1;
DicConsole.DebugWriteLine("Dump-media command", "Game partition total size: {0} sectors", gameSize);
AaruConsole.DebugWriteLine("Dump-media command", "Game partition total size: {0} sectors", gameSize);
// Get middle zone size
DicConsole.DebugWriteLine("Dump-media command", "Getting middle zone size");
AaruConsole.DebugWriteLine("Dump-media command", "Getting middle zone size");
UpdateStatus?.Invoke("Unlocking drive (Wxripper).");
_dumpLog.WriteLine("Unlocking drive (Wxripper).");
sense = _dev.KreonUnlockWxripper(out senseBuf, _dev.Timeout, out _);
@@ -315,7 +315,7 @@ namespace Aaru.Core.Devices.Dumping
return;
}
DicConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", totalSize);
AaruConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", totalSize);
ulong blocks = totalSize + 1;
PFI.PhysicalFormatInformation wxRipperPfi = PFI.Decode(readBuffer).Value;
@@ -615,7 +615,7 @@ namespace Aaru.Core.Devices.Dumping
for(ulong b = i; b < i + _skip; b++)
_resume.BadBlocks.Add(b);
DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
mhddLog.Write(i, cmdDuration < 500 ? 65535 : cmdDuration);
ibgLog.Write(i, 0);
@@ -806,7 +806,7 @@ namespace Aaru.Core.Devices.Dumping
// TODO: Handle errors in video partition
//errored += blocksToRead;
//resume.BadBlocks.Add(l1);
DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf));
mhddLog.Write(l1, cmdDuration < 500 ? 65535 : cmdDuration);
ibgLog.Write(l1, 0);
@@ -860,7 +860,7 @@ namespace Aaru.Core.Devices.Dumping
}
end = DateTime.UtcNow;
DicConsole.WriteLine();
AaruConsole.WriteLine();
mhddLog.Close();
ibgLog.Close(_dev, blocks, BLOCK_SIZE, (end - start).TotalSeconds, currentSpeed * 1024,
@@ -1030,7 +1030,7 @@ namespace Aaru.Core.Devices.Dumping
UpdateStatus?.
Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf));
_dumpLog.
WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive.");
@@ -1120,7 +1120,7 @@ namespace Aaru.Core.Devices.Dumping
{
if(tag.Value is null)
{
DicConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key);
AaruConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key);
continue;
}