Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cd/cd_dump.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool check_subcode_shift(int32_t &subcode_shift, int32_t lba, std::span<const ui
subcode_shift = shift;

if(options.verbose)
LOG_R("[LBA: {:6}] subcode desync (shift: {:+})", lba, subcode_shift);
LOGC_R("[LBA: {:6}] subcode desync (shift: {:+})", lba, subcode_shift);
}
}
}
Expand Down Expand Up @@ -435,7 +435,7 @@ export bool redumper_dump_cd(Context &ctx, const Options &options, bool dump)
errors.scsi += CD_DATA_SIZE_SAMPLES;

if(options.verbose)
LOG_R("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
LOGC_R("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
}
}
else
Expand Down Expand Up @@ -491,7 +491,7 @@ export bool redumper_dump_cd(Context &ctx, const Options &options, bool dump)

sector_c2_backup.assign(sector_c2.begin(), sector_c2.end());

LOG_R("[LBA: {:6}] C2 error (bits: {:4}{})", lba, c2_bits_count(sector_c2), difference_message);
LOGC_R("[LBA: {:6}] C2 error (bits: {:4}{})", lba, c2_bits_count(sector_c2), difference_message);
}
}

Expand Down Expand Up @@ -525,7 +525,7 @@ export bool redumper_dump_cd(Context &ctx, const Options &options, bool dump)
if(!dump && lba < lba_end && (data_updated || subcode_updated))
{
if(options.verbose)
LOG_R("[LBA: {:6}] correction success", lba);
LOGC_R("[LBA: {:6}] correction success", lba);
}

break;
Expand Down Expand Up @@ -558,7 +558,7 @@ export bool redumper_dump_cd(Context &ctx, const Options &options, bool dump)
failure = true;

if(failure)
LOG_R("[LBA: {:6}] correction failure{}", lba, data_message);
LOGC_R("[LBA: {:6}] correction failure{}", lba, data_message);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cd/cd_dump_extra.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void mediatek_process_leadout(Context &ctx, const TOC &toc, std::fstream &fs_scr
bool all_types = false;
SPTD::Status status = read_sector(*ctx.sptd, sector_buffer.data(), all_types, ctx.drive_config, lba, false);
if(status.status_code && options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));

status = mediatek_cache_read(*ctx.sptd, cache, mediatek_get_config(ctx.drive_config.type).size_mb * CHUNK_1MB);
if(status.status_code)
Expand Down Expand Up @@ -299,7 +299,7 @@ void mediatek_process_leadout(Context &ctx, const TOC &toc, std::fstream &fs_scr

sector_c2_leadout_backup.assign(sector_c2_leadout.begin(), sector_c2_leadout.end());

LOG_R("[LBA: {:6}] C2 error (bits: {:4}{})", lba + i, c2_bits, difference_message);
LOGC_R("[LBA: {:6}] C2 error (bits: {:4}{})", lba + i, c2_bits, difference_message);
}
}

Expand Down
20 changes: 10 additions & 10 deletions drive/test.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
}
else
{
Expand All @@ -118,7 +118,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(std::all_of(sector_c2_sub.begin(), sector_c2_sub.end(), [](uint8_t value) { return value == 0; }))
{
if(options.verbose)
LOG("warning: subcode is zeroed, skipping (sector type: {}, error field: {}, sub channel: {})", std::get<0>(t), ef.second, sc.second);
LOGC("warning: subcode is zeroed, skipping (sector type: {}, error field: {}, sub channel: {})", std::get<0>(t), ef.second, sc.second);
continue;
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
}
else
{
Expand All @@ -172,7 +172,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(std::all_of(sector_c2_sub.begin(), sector_c2_sub.end(), [](uint8_t value) { return value == 0; }))
{
if(options.verbose)
LOG("warning: subcode is zeroed, skipping (sector type: {}, error field: {}, sub channel: {})", std::get<0>(t), ef.second, sc.second);
LOGC("warning: subcode is zeroed, skipping (sector type: {}, error field: {}, sub channel: {})", std::get<0>(t), ef.second, sc.second);
continue;
}
}
Expand Down Expand Up @@ -215,7 +215,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
}
else
{
Expand All @@ -226,7 +226,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(std::all_of(sector_c2_sub.begin(), sector_c2_sub.end(), [](uint8_t value) { return value == 0; }))
{
if(options.verbose)
LOG("warning: subcode is zeroed, skipping (sector type: {}, error field: {}, sub channel: {})", std::get<0>(t), ef.second, sc.second);
LOGC("warning: subcode is zeroed, skipping (sector type: {}, error field: {}, sub channel: {})", std::get<0>(t), ef.second, sc.second);
continue;
}
}
Expand Down Expand Up @@ -273,7 +273,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", std::get<1>(t), SPTD::StatusMessage(status));
}
else
{
Expand Down Expand Up @@ -310,7 +310,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
}
else
{
Expand All @@ -332,7 +332,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
LOGC("[LBA: {:6}] SCSI error ({})", lba, SPTD::StatusMessage(status));
break;
}
else
Expand All @@ -353,7 +353,7 @@ export int redumper_drive_test(Context &ctx, Options &options)
if(status.status_code)
{
if(options.verbose)
LOG("read cache failed, SCSI ({})", SPTD::StatusMessage(status));
LOGC("read cache failed, SCSI ({})", SPTD::StatusMessage(status));
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions dvd/dvd_dump.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ bool sectors_data_state_update(std::span<State> sectors_state, std::span<uint8_t
updated = true;

if(!dump && options.verbose)
LOG_R("[LBA: {}] correction success", lba + i);
LOGC_R("[LBA: {}] correction success", lba + i);
}
}
else
Expand All @@ -706,7 +706,7 @@ bool sectors_data_state_update(std::span<State> sectors_state, std::span<uint8_t
updated = true;

if(!dump && options.verbose)
LOG_R("[LBA: {}] correction success", lba + i);
LOGC_R("[LBA: {}] correction success", lba + i);
}
}

Expand Down Expand Up @@ -1213,7 +1213,7 @@ export bool redumper_dump_dvd(Context &ctx, const Options &options, bool dump)
if(status.status_code)
throw_line("kreon: failed lock drive, SCSI ({})", SPTD::StatusMessage(status));
if(options.verbose)
LOG_R("[LBA: {}] kreon: drive locked", lba);
LOGC_R("[LBA: {}] kreon: drive locked", lba);
kreon_locked = true;
}

Expand Down Expand Up @@ -1268,7 +1268,7 @@ export bool redumper_dump_dvd(Context &ctx, const Options &options, bool dump)
}

if(options.verbose)
LOG_R("[LBA: {}] SCSI error ({}){}", lba + i, SPTD::StatusMessage(status), status_retries);
LOGC_R("[LBA: {}] SCSI error ({}){}", lba + i, SPTD::StatusMessage(status), status_retries);
}
}
else
Expand All @@ -1284,7 +1284,7 @@ export bool redumper_dump_dvd(Context &ctx, const Options &options, bool dump)
}

if(options.verbose)
LOG_R("[LBA: {}] EDC error{}", lba + i, status_retries);
LOGC_R("[LBA: {}] EDC error{}", lba + i, status_retries);
}
}
}
Expand Down Expand Up @@ -1317,7 +1317,7 @@ export bool redumper_dump_dvd(Context &ctx, const Options &options, bool dump)
else
{
if(options.verbose)
LOG_R("[LBA: {} .. {}] correction failure", lba, lba + (int32_t)sectors_to_read - 1);
LOGC_R("[LBA: {} .. {}] correction failure", lba, lba + (int32_t)sectors_to_read - 1);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion info.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export int redumper_info(Context &ctx, Options &options)
continue;

std::stringstream ss;
system->printInfo(ss, reader.get(), t.first, options.verbose);
system->printInfo(ss, reader.get(), t.first);

if(ss.rdbuf()->in_avail())
{
Expand Down
2 changes: 1 addition & 1 deletion systems/dc.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
auto system_area = iso9660::Browser::readSystemArea(data_reader);
if(system_area.size() < _ROM_HEADER_OFFSET + sizeof(ROMHeader) || memcmp(system_area.data(), dreamcast::SYSTEM_AREA_MAGIC.data(), dreamcast::SYSTEM_AREA_MAGIC.size()))
Expand Down
2 changes: 1 addition & 1 deletion systems/gc.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &track_path, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &track_path) const override
{
std::vector<uint8_t> header_data(FORM1_DATA_SIZE);
data_reader->read((uint8_t *)header_data.data(), 0, 1);
Expand Down
2 changes: 1 addition & 1 deletion systems/mcd.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
auto system_area = iso9660::Browser::readSystemArea(data_reader);
if(system_area.size() < _ROM_HEADER_OFFSET + sizeof(ROMHeader) || memcmp(system_area.data(), _SYSTEM_MAGIC.data(), _SYSTEM_MAGIC.size()))
Expand Down
2 changes: 1 addition & 1 deletion systems/ps2.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public:
}


void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
iso9660::PrimaryVolumeDescriptor pvd;
if(!iso9660::Browser::findDescriptor((iso9660::VolumeDescriptor &)pvd, data_reader, iso9660::VolumeDescriptorType::PRIMARY))
Expand Down
2 changes: 1 addition & 1 deletion systems/ps3.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public:
}


void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
iso9660::PrimaryVolumeDescriptor pvd;
if(!iso9660::Browser::findDescriptor((iso9660::VolumeDescriptor &)pvd, data_reader, iso9660::VolumeDescriptorType::PRIMARY))
Expand Down
2 changes: 1 addition & 1 deletion systems/ps4.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public:
}


void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
iso9660::PrimaryVolumeDescriptor pvd;
if(!iso9660::Browser::findDescriptor((iso9660::VolumeDescriptor &)pvd, data_reader, iso9660::VolumeDescriptorType::PRIMARY))
Expand Down
2 changes: 1 addition & 1 deletion systems/ps5.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public:
}


void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
iso9660::PrimaryVolumeDescriptor pvd;
if(!iso9660::Browser::findDescriptor((iso9660::VolumeDescriptor &)pvd, data_reader, iso9660::VolumeDescriptorType::PRIMARY))
Expand Down
2 changes: 1 addition & 1 deletion systems/psx.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &track_path, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &track_path) const override
{
iso9660::PrimaryVolumeDescriptor pvd;
if(!iso9660::Browser::findDescriptor((iso9660::VolumeDescriptor &)pvd, data_reader, iso9660::VolumeDescriptorType::PRIMARY))
Expand Down
20 changes: 10 additions & 10 deletions systems/s_cdrom.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public:
return Type::RAW_DATA;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool verbose) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
std::vector<std::pair<int32_t, int32_t>> invalid_sync;
uint32_t mode2_form1 = 0;
Expand Down Expand Up @@ -203,23 +203,23 @@ public:
os << std::format(" mode2 (form 2) EDC: {}", mode2_form2_edc ? "yes" : "no") << std::endl;
}
if(auto count = ranges_count(invalid_sync); count)
os << std::format(" invalid sync sectors: {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(invalid_sync)) : "") << std::endl;
os << std::format(" invalid sync sectors: {} (LBA: {})", count, ranges_to_string(invalid_sync)) << std::endl;
if(auto count = ranges_count(invalid_modes); count)
os << std::format(" invalid mode sectors: {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(invalid_modes)) : "") << std::endl;
os << std::format(" invalid mode sectors: {} (LBA: {})", count, ranges_to_string(invalid_modes)) << std::endl;
if(auto count = ranges_count(generated); count)
os << std::format(" generated sectors (0x55): {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(generated)) : "") << std::endl;
os << std::format(" generated sectors (0x55): {} (LBA: {})", count, ranges_to_string(generated)) << std::endl;
if(auto count = ranges_count(msf_errors); count)
os << std::format(" MSF errors: {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(msf_errors)) : "") << std::endl;
os << std::format(" MSF errors: {} (LBA: {})", count, ranges_to_string(msf_errors)) << std::endl;
if(auto count = ranges_count(ecc_nc_errors); count)
os << std::format(" ECC errors (non-compliant): {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(ecc_nc_errors)) : "") << std::endl;
os << std::format(" ECC errors (non-compliant): {} (LBA: {})", count, ranges_to_string(ecc_nc_errors)) << std::endl;
if(auto count = ranges_count(ecc_errors); count)
os << std::format(" ECC errors: {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(ecc_errors)) : "") << std::endl;
os << std::format(" ECC errors: {} (LBA: {})", count, ranges_to_string(ecc_errors)) << std::endl;
if(auto count = ranges_count(edc_errors); count)
os << std::format(" EDC errors: {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(edc_errors)) : "") << std::endl;
os << std::format(" EDC errors: {} (LBA: {})", count, ranges_to_string(edc_errors)) << std::endl;
if(auto count = ranges_count(subheader_mismatches); count)
os << std::format(" CD-XA subheader mismatches: {}{}", count, verbose ? std::format(" (LBA: {})", ranges_to_string(subheader_mismatches)) : "") << std::endl;
os << std::format(" CD-XA subheader mismatches: {} (LBA: {})", count, ranges_to_string(subheader_mismatches)) << std::endl;
os << std::endl;
os << std::format(" REDUMP.ORG errors: {}", redump_errors) << std::endl;
os << std::format(" REDUMP.INFO errors: {}", redump_errors) << std::endl;
}

private:
Expand Down
2 changes: 1 addition & 1 deletion systems/s_hfs.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public:
return Type::DISK;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
auto hfs_partitions = apm::Browser::getPartitions(data_reader) | std::views::filter([](const apm::PartitionMapEntry &v) { return v.partition_type == apm::PARTITION_TYPE_APPLE_HFS; });
for(const auto &partition_map_entry : hfs_partitions)
Expand Down
2 changes: 1 addition & 1 deletion systems/s_high_sierra.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
auto vd = high_sierra::Browser::findDescriptor(data_reader, high_sierra::VolumeDescriptorType::STANDARD_FS);
if(vd)
Expand Down
2 changes: 1 addition & 1 deletion systems/s_iso.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &) const override
{
iso9660::PrimaryVolumeDescriptor pvd;
if(iso9660::Browser::findDescriptor((iso9660::VolumeDescriptor &)pvd, data_reader, iso9660::VolumeDescriptorType::PRIMARY))
Expand Down
2 changes: 1 addition & 1 deletion systems/s_xbox.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public:
return Type::ISO;
}

void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &track_path, bool) const override
void printInfo(std::ostream &os, DataReader *data_reader, const std::filesystem::path &track_path) const override
{
std::filesystem::path security_path = track_extract_basename(track_path.string()) + ".security";
if(!std::filesystem::exists(security_path))
Expand Down
Loading
Loading