mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Fix indentation issues.
This commit is contained in:
@@ -88,9 +88,7 @@ public static class BCA
|
||||
|
||||
if(BCAResponse.Length != 68)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Found_incorrect_Blu_ray_BCA_size_0_bytes,
|
||||
BCAResponse.Length);
|
||||
AaruLogging.Debug(MODULE_NAME, Localization.Found_incorrect_Blu_ray_BCA_size_0_bytes, BCAResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -125,7 +123,7 @@ public static class BCA
|
||||
#endif
|
||||
|
||||
sb.AppendLine(Localization.Blu_ray_Burst_Cutting_Area_in_hex_follows);
|
||||
sb.AppendLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(response.BCA, color:true)));
|
||||
sb.AppendLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(response.BCA, color: true)));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ public static class Cartridge
|
||||
if(CSResponse.Length != 8)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Found_incorrect_Blu_ray_Cartridge_Status_size_0_bytes,
|
||||
CSResponse.Length);
|
||||
Localization.Found_incorrect_Blu_ray_Cartridge_Status_size_0_bytes,
|
||||
CSResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -91,9 +91,8 @@ public static class Spare
|
||||
if(SAIResponse.Length != 16)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization
|
||||
.Spare_Decode_Found_incorrect_Blu_ray_Spare_Area_Information_size_0_bytes,
|
||||
SAIResponse.Length);
|
||||
Localization.Spare_Decode_Found_incorrect_Blu_ray_Spare_Area_Information_size_0_bytes,
|
||||
SAIResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -68,9 +68,8 @@ public static class ATIP
|
||||
if(CDATIPResponse.Length != 32 && CDATIPResponse.Length != 28)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization
|
||||
.Expected_CD_ATIP_size_32_bytes_is_not_received_size_0_bytes_not_decoding,
|
||||
CDATIPResponse.Length);
|
||||
Localization.Expected_CD_ATIP_size_32_bytes_is_not_received_size_0_bytes_not_decoding,
|
||||
CDATIPResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -119,15 +119,14 @@ public static class CDTextOnLeadIn
|
||||
if(decoded.DataLength + 2 != CDTextResponse.Length)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization
|
||||
.Expected_CD_TEXT_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2,
|
||||
CDTextResponse.Length);
|
||||
Localization.Expected_CD_TEXT_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2,
|
||||
CDTextResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 18; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 18; i++)
|
||||
{
|
||||
decoded.DataPacks[i].HeaderID1 = CDTextResponse[0 + i * 18 + 4];
|
||||
decoded.DataPacks[i].HeaderID2 = CDTextResponse[1 + i * 18 + 4];
|
||||
|
||||
@@ -72,15 +72,15 @@ public static class Session
|
||||
if(decoded.DataLength + 2 != CDSessionInfoResponse.Length)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization
|
||||
.Expected_CDSessionInfo_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2,
|
||||
CDSessionInfoResponse.Length);
|
||||
Localization
|
||||
.Expected_CDSessionInfo_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2,
|
||||
CDSessionInfoResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + i * 8 + 4] & 0xF0) >> 4);
|
||||
|
||||
@@ -75,15 +75,14 @@ public static class TOC
|
||||
if(decoded.DataLength + 2 != CDTOCResponse.Length)
|
||||
{
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization
|
||||
.Expected_CD_TOC_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2,
|
||||
CDTOCResponse.Length);
|
||||
Localization.Expected_CD_TOC_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2,
|
||||
CDTOCResponse.Length);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
for(var i = 0; i < (decoded.DataLength - 2) / 8; i++)
|
||||
{
|
||||
decoded.TrackDescriptors[i].Reserved1 = CDTOCResponse[0 + i * 8 + 4];
|
||||
decoded.TrackDescriptors[i].ADR = (byte)((CDTOCResponse[1 + i * 8 + 4] & 0xF0) >> 4);
|
||||
|
||||
@@ -158,24 +158,24 @@ public static class Apple2
|
||||
{
|
||||
if(data is not { Length: 410 }) return null;
|
||||
|
||||
byte[] buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
var buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
|
||||
for(int i = 0; i < data.Length; i++)
|
||||
for(var i = 0; i < data.Length; i++)
|
||||
{
|
||||
carry ^= ReadTable5and3[data[i]];
|
||||
buffer[i] = carry;
|
||||
}
|
||||
|
||||
byte[] output = new byte[256];
|
||||
var output = new byte[256];
|
||||
|
||||
for(int i = 0; i < 51; i++)
|
||||
for(var i = 0; i < 51; i++)
|
||||
{
|
||||
byte b1 = buffer[51 * 3 - i];
|
||||
byte b2 = buffer[51 * 2 - i];
|
||||
byte b3 = buffer[51 - i];
|
||||
byte b4 = (byte)(((b1 & 2) << 1 | b2 & 2 | (b3 & 2) >> 1) & 0xFF);
|
||||
byte b5 = (byte)(((b1 & 1) << 2 | (b2 & 1) << 1 | b3 & 1) & 0xFF);
|
||||
var b4 = (byte)(((b1 & 2) << 1 | b2 & 2 | (b3 & 2) >> 1) & 0xFF);
|
||||
var b5 = (byte)(((b1 & 1) << 2 | (b2 & 1) << 1 | b3 & 1) & 0xFF);
|
||||
output[250 - 5 * i] = (byte)((buffer[i + 51 * 3 + 1] << 3 | b1 >> 2 & 0x7) & 0xFF);
|
||||
output[251 - 5 * i] = (byte)((buffer[i + 51 * 4 + 1] << 3 | b2 >> 2 & 0x7) & 0xFF);
|
||||
output[252 - 5 * i] = (byte)((buffer[i + 51 * 5 + 1] << 3 | b3 >> 2 & 0x7) & 0xFF);
|
||||
@@ -194,16 +194,16 @@ public static class Apple2
|
||||
{
|
||||
if(data is not { Length: 342 }) return null;
|
||||
|
||||
byte[] buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
var buffer = new byte[data.Length];
|
||||
byte carry = 0;
|
||||
|
||||
for(int i = 0; i < data.Length; i++)
|
||||
for(var i = 0; i < data.Length; i++)
|
||||
{
|
||||
carry ^= ReadTable6and2[data[i]];
|
||||
buffer[i] = carry;
|
||||
}
|
||||
|
||||
byte[] output = new byte[256];
|
||||
var output = new byte[256];
|
||||
|
||||
for(uint i = 0; i < 256; i++)
|
||||
{
|
||||
@@ -284,39 +284,39 @@ public static class Apple2
|
||||
};
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Volume_0,
|
||||
((sector.addressField.volume[0] & 0x55) << 1 |
|
||||
sector.addressField.volume[1] & 0x55) &
|
||||
0xFF);
|
||||
Localization.Volume_0,
|
||||
((sector.addressField.volume[0] & 0x55) << 1 |
|
||||
sector.addressField.volume[1] & 0x55) &
|
||||
0xFF);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Core.Track_0,
|
||||
((sector.addressField.track[0] & 0x55) << 1 |
|
||||
sector.addressField.track[1] & 0x55) &
|
||||
0xFF);
|
||||
Core.Track_0,
|
||||
((sector.addressField.track[0] & 0x55) << 1 |
|
||||
sector.addressField.track[1] & 0x55) &
|
||||
0xFF);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Sector_0,
|
||||
((sector.addressField.sector[0] & 0x55) << 1 |
|
||||
sector.addressField.sector[1] & 0x55) &
|
||||
0xFF);
|
||||
Localization.Sector_0,
|
||||
((sector.addressField.sector[0] & 0x55) << 1 |
|
||||
sector.addressField.sector[1] & 0x55) &
|
||||
0xFF);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Checksum_0,
|
||||
((sector.addressField.checksum[0] & 0x55) << 1 |
|
||||
sector.addressField.checksum[1] & 0x55) &
|
||||
0xFF);
|
||||
Localization.Checksum_0,
|
||||
((sector.addressField.checksum[0] & 0x55) << 1 |
|
||||
sector.addressField.checksum[1] & 0x55) &
|
||||
0xFF);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Epilogue_0_1_2,
|
||||
sector.addressField.epilogue[0],
|
||||
sector.addressField.epilogue[1],
|
||||
sector.addressField.epilogue[2]);
|
||||
Localization.Epilogue_0_1_2,
|
||||
sector.addressField.epilogue[0],
|
||||
sector.addressField.epilogue[1],
|
||||
sector.addressField.epilogue[2]);
|
||||
|
||||
position += 14;
|
||||
int syncCount = 0;
|
||||
bool onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
var syncCount = 0;
|
||||
var onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
|
||||
while(data[position] == 0xFF)
|
||||
{
|
||||
@@ -358,9 +358,7 @@ public static class Apple2
|
||||
|
||||
sector.dataField.data = gaps.ToArray();
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Data_has_0_bytes,
|
||||
sector.dataField.data.Length);
|
||||
AaruLogging.Debug(MODULE_NAME, Localization.Data_has_0_bytes, sector.dataField.data.Length);
|
||||
|
||||
sector.dataField.checksum = data[position];
|
||||
sector.dataField.epilogue = new byte[3];
|
||||
@@ -454,12 +452,12 @@ public static class Apple2
|
||||
public static RawTrack MarshalTrack(byte[] data, out int endOffset, int offset = 0)
|
||||
{
|
||||
int position = offset;
|
||||
bool firstSector = true;
|
||||
bool onSync = false;
|
||||
var firstSector = true;
|
||||
var onSync = false;
|
||||
var gaps = new MemoryStream();
|
||||
int count = 0;
|
||||
var count = 0;
|
||||
List<RawSector> sectors = [];
|
||||
byte[] trackNumber = new byte[2];
|
||||
var trackNumber = new byte[2];
|
||||
endOffset = offset;
|
||||
|
||||
while(position < data.Length && data[position] == 0xFF)
|
||||
@@ -496,13 +494,11 @@ public static class Apple2
|
||||
}
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
Localization.Adding_sector_0_of_track_1,
|
||||
((sector.addressField.sector[0] & 0x55) << 1 |
|
||||
sector.addressField.sector[1] & 0x55) &
|
||||
0xFF,
|
||||
((sector.addressField.track[0] & 0x55) << 1 |
|
||||
sector.addressField.track[1] & 0x55) &
|
||||
0xFF);
|
||||
Localization.Adding_sector_0_of_track_1,
|
||||
((sector.addressField.sector[0] & 0x55) << 1 | sector.addressField.sector[1] & 0x55) &
|
||||
0xFF,
|
||||
((sector.addressField.track[0] & 0x55) << 1 | sector.addressField.track[1] & 0x55) &
|
||||
0xFF);
|
||||
|
||||
sectors.Add(sector);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,8 @@ public static partial class Modes
|
||||
{
|
||||
if(header.Value.MediumType != MediumTypes.Default)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Medium_is_0}[/]", $"[italic][fuchsia]{GetMediumTypeDescription(header.Value.MediumType)}[/][/]")
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.Medium_is_0}[/]",
|
||||
$"[italic][fuchsia]{GetMediumTypeDescription(header.Value.MediumType)}[/][/]")
|
||||
.AppendLine();
|
||||
}
|
||||
|
||||
@@ -160,18 +161,20 @@ public static partial class Modes
|
||||
{
|
||||
if(descriptor.Blocks == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_0_and_are_1_bytes_each}[/]",
|
||||
$"[lime]{density}[/]",
|
||||
$"[lime]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_0_and_are_1_bytes_each}[/]",
|
||||
$"[lime]{density}[/]",
|
||||
$"[lime]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_1_and_are_2_bytes_each}[/]",
|
||||
$"[lime]{descriptor.Blocks}[/]",
|
||||
$"[lime]{density}[/]",
|
||||
$"[lime{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_1_and_are_2_bytes_each}[/]",
|
||||
$"[lime]{descriptor.Blocks}[/]",
|
||||
$"[lime]{density}[/]",
|
||||
$"[lime{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
else if(descriptor.Blocks == 0)
|
||||
@@ -211,11 +214,12 @@ public static partial class Modes
|
||||
break;
|
||||
case 2:
|
||||
sb.AppendLine($"\t[green]{
|
||||
Localization.Device_uses_a_write_cache_but_doesn_t_return_until_cache_is_flushed}[/]");
|
||||
Localization.Device_uses_a_write_cache_but_doesn_t_return_until_cache_is_flushed}[/]");
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat($"\t[green]{Localization.Unknown_buffered_mode_code_0}[/]", $"[teal]{header.Value.BufferedMode}[/]")
|
||||
sb.AppendFormat($"\t[green]{Localization.Unknown_buffered_mode_code_0}[/]",
|
||||
$"[teal]{header.Value.BufferedMode}[/]")
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
@@ -224,7 +228,8 @@ public static partial class Modes
|
||||
if(header.Value.Speed == 0)
|
||||
sb.AppendLine($"\t[green]{Localization.Device_uses_default_speed}[/]");
|
||||
else
|
||||
sb.AppendFormat($"\t[green]{Localization.Device_uses_speed_0}[/]", $"[teal]{header.Value.Speed}[/]").AppendLine();
|
||||
sb.AppendFormat($"\t[green]{Localization.Device_uses_speed_0}[/]", $"[teal]{header.Value.Speed}[/]")
|
||||
.AppendLine();
|
||||
|
||||
if(header.Value.WriteProtected) sb.AppendLine($"\t[red]{Localization.Medium_is_write_protected}[/]");
|
||||
|
||||
@@ -1086,15 +1091,15 @@ public static partial class Modes
|
||||
if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{
|
||||
Localization
|
||||
.All_remaining_blocks_conform_to_0_and_have_a_variable_length}[/]",
|
||||
Localization
|
||||
.All_remaining_blocks_conform_to_0_and_have_a_variable_length}[/]",
|
||||
$"[fuchsia]{density}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{
|
||||
Localization.All_remaining_blocks_conform_to_0_and_are_1_bytes_each}[/]",
|
||||
Localization.All_remaining_blocks_conform_to_0_and_are_1_bytes_each}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
@@ -1102,37 +1107,42 @@ public static partial class Modes
|
||||
}
|
||||
else if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_conform_to_1_and_have_a_variable_length}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization._0_blocks_conform_to_1_and_have_a_variable_length}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_conform_to_1_and_are_2_bytes_each}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization._0_blocks_conform_to_1_and_are_2_bytes_each}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
else if(descriptor.Blocks == 0)
|
||||
{
|
||||
if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_a_variable_length}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_a_variable_length}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_are_0_bytes_each}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_are_0_bytes_each}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
else if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_a_variable_length}[/]", $"[teal]{descriptor.Blocks}[/]")
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_a_variable_length}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
@@ -1165,7 +1175,8 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat($"\t[red]{Localization.Unknown_buffered_mode_code_0}[/]", $"[teal]{header.Value.BufferedMode}[/]")
|
||||
sb.AppendFormat($"\t[red]{Localization.Unknown_buffered_mode_code_0}[/]",
|
||||
$"[teal]{header.Value.BufferedMode}[/]")
|
||||
.AppendLine();
|
||||
|
||||
break;
|
||||
@@ -1215,7 +1226,8 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat(Localization.an_unknown_medium_type_0, $"[teal]{(byte)header.Value.MediumType}[/]");
|
||||
sb.AppendFormat(Localization.an_unknown_medium_type_0,
|
||||
$"[teal]{(byte)header.Value.MediumType}[/]");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1225,7 +1237,8 @@ public static partial class Modes
|
||||
|
||||
if(header.Value.WriteProtected) sb.AppendLine($"\t[red]{Localization.Medium_is_write_protected}[/]");
|
||||
|
||||
if(header.Value.EBC) sb.AppendLine($"\t[green]{Localization.Blank_checking_during_write_is_enabled}[/]");
|
||||
if(header.Value.EBC)
|
||||
sb.AppendLine($"\t[green]{Localization.Blank_checking_during_write_is_enabled}[/]");
|
||||
|
||||
if(header.Value.DPOFUA) sb.AppendLine($"\t[green]{Localization.Drive_supports_DPO_and_FUA_bits}[/]");
|
||||
|
||||
@@ -1288,24 +1301,26 @@ public static partial class Modes
|
||||
if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{
|
||||
Localization.All_remaining_blocks_are_0_and_have_a_variable_length}[/]",
|
||||
Localization.All_remaining_blocks_are_0_and_have_a_variable_length}[/]",
|
||||
$"[fuchsia]{density}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_are_0_and_are_1_bytes_each}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_are_0_and_are_1_bytes_each}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
else if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_are_1_and_have_a_variable_length}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization._0_blocks_are_1_and_have_a_variable_length}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1320,19 +1335,22 @@ public static partial class Modes
|
||||
{
|
||||
if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_a_variable_length}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_a_variable_length}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_are_0_bytes_each}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_are_0_bytes_each}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
else if(descriptor.BlockLength == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_a_variable_length}[/]", $"[teal]{descriptor.Blocks}[/]")
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_a_variable_length}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
@@ -1503,7 +1521,8 @@ public static partial class Modes
|
||||
|
||||
break;
|
||||
default:
|
||||
sb.AppendFormat(Localization.Unknown_medium_type_0, $"[teal]{(byte)header.Value.MediumType}[/]");
|
||||
sb.AppendFormat(Localization.Unknown_medium_type_0,
|
||||
$"[teal]{(byte)header.Value.MediumType}[/]");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1567,18 +1586,20 @@ public static partial class Modes
|
||||
{
|
||||
if(descriptor.Blocks == 0)
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_0_and_are_1_bytes_each}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization.All_remaining_blocks_have_0_and_are_1_bytes_each}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_1_and_are_2_bytes_each}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
sb
|
||||
.AppendFormat($"\t[slateblue1]{Localization._0_blocks_have_1_and_are_2_bytes_each}[/]",
|
||||
$"[teal]{descriptor.Blocks}[/]",
|
||||
$"[fuchsia]{density}[/]",
|
||||
$"[teal]{descriptor.BlockLength}[/]")
|
||||
.AppendLine();
|
||||
}
|
||||
}
|
||||
else if(descriptor.Blocks == 0)
|
||||
|
||||
@@ -59,61 +59,55 @@ public static class Dreamcast
|
||||
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.maker_id = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.maker_id = \"{0}\"", Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.spare_space1 = \"{0}\"", (char)ipbin.spare_space1);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.dreamcast_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.dreamcast_media));
|
||||
"dreamcast_ipbin.dreamcast_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.dreamcast_media));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.disc_no_separator = \"{0}\"",
|
||||
(char)ipbin.disc_no_separator);
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.disc_no_separator = \"{0}\"", (char)ipbin.disc_no_separator);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.disc_total_nos = \"{0}\"", (char)ipbin.disc_total_nos);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.spare_space2 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.spare_space2));
|
||||
"dreamcast_ipbin.spare_space2 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.spare_space2));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
"dreamcast_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
"dreamcast_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.product_no = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_no));
|
||||
"dreamcast_ipbin.product_no = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_no));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.product_version = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_version));
|
||||
"dreamcast_ipbin.product_version = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_version));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
"dreamcast_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.spare_space3 = \"{0}\"", (char)ipbin.spare_space3);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.boot_filename = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.boot_filename));
|
||||
"dreamcast_ipbin.boot_filename = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.boot_filename));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "dreamcast_ipbin.producer = \"{0}\"", Encoding.ASCII.GetString(ipbin.producer));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.producer = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.producer));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"dreamcast_ipbin.product_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_name));
|
||||
"dreamcast_ipbin.product_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_name));
|
||||
|
||||
return Encoding.ASCII.GetString(ipbin.SegaHardwareID) == "SEGA SEGAKATANA " ? ipbin : null;
|
||||
}
|
||||
@@ -199,7 +193,7 @@ public static class Dreamcast
|
||||
}
|
||||
}
|
||||
|
||||
int iPeripherals = int.Parse(Encoding.ASCII.GetString(ipbin.peripherals), NumberStyles.HexNumber);
|
||||
var iPeripherals = int.Parse(Encoding.ASCII.GetString(ipbin.peripherals), NumberStyles.HexNumber);
|
||||
|
||||
if((iPeripherals & 0x00000001) == 0x00000001) IPBinInformation.AppendLine(Localization.Game_uses_Windows_CE);
|
||||
|
||||
|
||||
@@ -59,53 +59,47 @@ public static class Saturn
|
||||
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.maker_id = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
AaruLogging.Debug(MODULE_NAME, "saturn_ipbin.maker_id = \"{0}\"", Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "saturn_ipbin.product_no = \"{0}\"", Encoding.ASCII.GetString(ipbin.product_no));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.product_no = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_no));
|
||||
"saturn_ipbin.product_version = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_version));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.product_version = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_version));
|
||||
"saturn_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.saturn_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.saturn_media));
|
||||
"saturn_ipbin.saturn_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.saturn_media));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "saturn_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.disc_no_separator = \"{0}\"",
|
||||
(char)ipbin.disc_no_separator);
|
||||
AaruLogging.Debug(MODULE_NAME, "saturn_ipbin.disc_no_separator = \"{0}\"", (char)ipbin.disc_no_separator);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME, "saturn_ipbin.disc_total_nos = {0}", (char)ipbin.disc_total_nos);
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
"saturn_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.spare_space1 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.spare_space1));
|
||||
"saturn_ipbin.spare_space1 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.spare_space1));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
"saturn_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
"saturn_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
|
||||
AaruLogging.Debug(MODULE_NAME,
|
||||
"saturn_ipbin.product_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_name));
|
||||
"saturn_ipbin.product_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_name));
|
||||
|
||||
return Encoding.ASCII.GetString(ipbin.SegaHardwareID) == "SEGA SEGASATURN " ? ipbin : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user