mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
VolumeVerifier: Don't show problems with good dumps of Wii Freeloaders
This commit is contained in:
parent
c6da1f050b
commit
742aa765c6
@ -47,10 +47,6 @@ bool DiscScrubber::SetupScrub(const Volume* disc, int block_size)
|
|||||||
// Round up when diving by CLUSTER_SIZE, otherwise MarkAsUsed might write out of bounds
|
// Round up when diving by CLUSTER_SIZE, otherwise MarkAsUsed might write out of bounds
|
||||||
const size_t num_clusters = static_cast<size_t>((m_file_size + CLUSTER_SIZE - 1) / CLUSTER_SIZE);
|
const size_t num_clusters = static_cast<size_t>((m_file_size + CLUSTER_SIZE - 1) / CLUSTER_SIZE);
|
||||||
|
|
||||||
// Warn if not DVD5 or DVD9 size
|
|
||||||
if (num_clusters != 0x23048 && num_clusters != 0x46090)
|
|
||||||
WARN_LOG(DISCIO, "Not a standard sized Wii disc! (%zx blocks)", num_clusters);
|
|
||||||
|
|
||||||
// Table of free blocks
|
// Table of free blocks
|
||||||
m_free_table.resize(num_clusters, 1);
|
m_free_table.resize(num_clusters, 1);
|
||||||
|
|
||||||
|
@ -416,7 +416,9 @@ void VolumeVerifier::CheckPartitions()
|
|||||||
if (std::find(types.cbegin(), types.cend(), PARTITION_UPDATE) == types.cend())
|
if (std::find(types.cbegin(), types.cend(), PARTITION_UPDATE) == types.cend())
|
||||||
AddProblem(Severity::Low, Common::GetStringT("The update partition is missing."));
|
AddProblem(Severity::Low, Common::GetStringT("The update partition is missing."));
|
||||||
|
|
||||||
if (std::find(types.cbegin(), types.cend(), PARTITION_DATA) == types.cend())
|
const bool has_data_partition =
|
||||||
|
std::find(types.cbegin(), types.cend(), PARTITION_DATA) == types.cend();
|
||||||
|
if (!m_is_datel && !has_data_partition)
|
||||||
AddProblem(Severity::High, Common::GetStringT("The data partition is missing."));
|
AddProblem(Severity::High, Common::GetStringT("The data partition is missing."));
|
||||||
|
|
||||||
const bool has_channel_partition =
|
const bool has_channel_partition =
|
||||||
@ -493,10 +495,13 @@ bool VolumeVerifier::CheckPartition(const Partition& partition)
|
|||||||
name.c_str()));
|
name.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckCorrectlySigned(
|
if (!m_is_datel)
|
||||||
partition,
|
{
|
||||||
StringFromFormat(Common::GetStringT("The %s partition is not correctly signed.").c_str(),
|
CheckCorrectlySigned(
|
||||||
name.c_str()));
|
partition,
|
||||||
|
StringFromFormat(Common::GetStringT("The %s partition is not correctly signed.").c_str(),
|
||||||
|
name.c_str()));
|
||||||
|
}
|
||||||
|
|
||||||
if (m_volume.SupportsIntegrityCheck() && !m_volume.CheckH3TableIntegrity(partition))
|
if (m_volume.SupportsIntegrityCheck() && !m_volume.CheckH3TableIntegrity(partition))
|
||||||
{
|
{
|
||||||
@ -541,9 +546,29 @@ bool VolumeVerifier::CheckPartition(const Partition& partition)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prepare for hash verification in the Process step
|
||||||
|
if (m_volume.SupportsIntegrityCheck())
|
||||||
|
{
|
||||||
|
u64 offset = m_volume.PartitionOffsetToRawOffset(0, partition);
|
||||||
|
const std::optional<u64> size =
|
||||||
|
m_volume.ReadSwappedAndShifted(partition.offset + 0x2bc, PARTITION_NONE);
|
||||||
|
const u64 end_offset = offset + size.value_or(0);
|
||||||
|
|
||||||
|
for (size_t i = 0; offset < end_offset; ++i, offset += VolumeWii::BLOCK_TOTAL_SIZE)
|
||||||
|
m_blocks.emplace_back(BlockToVerify{partition, offset, i});
|
||||||
|
|
||||||
|
m_block_errors.emplace(partition, 0);
|
||||||
|
}
|
||||||
|
|
||||||
const DiscIO::FileSystem* filesystem = m_volume.GetFileSystem(partition);
|
const DiscIO::FileSystem* filesystem = m_volume.GetFileSystem(partition);
|
||||||
if (!filesystem)
|
if (!filesystem)
|
||||||
{
|
{
|
||||||
|
if (m_is_datel)
|
||||||
|
{
|
||||||
|
// Datel's Wii Freeloader has an invalid FST in its only partition
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::string text = StringFromFormat(
|
std::string text = StringFromFormat(
|
||||||
Common::GetStringT("The %s partition does not have a valid file system.").c_str(),
|
Common::GetStringT("The %s partition does not have a valid file system.").c_str(),
|
||||||
name.c_str());
|
name.c_str());
|
||||||
@ -582,20 +607,6 @@ bool VolumeVerifier::CheckPartition(const Partition& partition)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare for hash verification in the Process step
|
|
||||||
if (m_volume.SupportsIntegrityCheck())
|
|
||||||
{
|
|
||||||
u64 offset = m_volume.PartitionOffsetToRawOffset(0, partition);
|
|
||||||
const std::optional<u64> size =
|
|
||||||
m_volume.ReadSwappedAndShifted(partition.offset + 0x2bc, PARTITION_NONE);
|
|
||||||
const u64 end_offset = offset + size.value_or(0);
|
|
||||||
|
|
||||||
for (size_t i = 0; offset < end_offset; ++i, offset += VolumeWii::BLOCK_TOTAL_SIZE)
|
|
||||||
m_blocks.emplace_back(BlockToVerify{partition, offset, i});
|
|
||||||
|
|
||||||
m_block_errors.emplace(partition, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -704,6 +715,7 @@ void VolumeVerifier::CheckDiscSize()
|
|||||||
else if (!m_is_tgc)
|
else if (!m_is_tgc)
|
||||||
{
|
{
|
||||||
const Platform platform = m_volume.GetVolumeType();
|
const Platform platform = m_volume.GetVolumeType();
|
||||||
|
const bool is_gc_size = platform == Platform::GameCubeDisc || m_is_datel;
|
||||||
const u64 size = m_volume.GetSize();
|
const u64 size = m_volume.GetSize();
|
||||||
|
|
||||||
const bool valid_gamecube = size == MINI_DVD_SIZE;
|
const bool valid_gamecube = size == MINI_DVD_SIZE;
|
||||||
@ -711,8 +723,8 @@ void VolumeVerifier::CheckDiscSize()
|
|||||||
const bool valid_debug_wii = size == SL_DVD_R_SIZE || size == DL_DVD_R_SIZE;
|
const bool valid_debug_wii = size == SL_DVD_R_SIZE || size == DL_DVD_R_SIZE;
|
||||||
|
|
||||||
const bool debug = IsDebugSigned();
|
const bool debug = IsDebugSigned();
|
||||||
if ((platform == Platform::GameCubeDisc && !valid_gamecube) ||
|
if ((is_gc_size && !valid_gamecube) ||
|
||||||
(platform == Platform::WiiDisc && (debug ? !valid_debug_wii : !valid_retail_wii)))
|
(!is_gc_size && (debug ? !valid_debug_wii : !valid_retail_wii)))
|
||||||
{
|
{
|
||||||
if (debug && valid_retail_wii)
|
if (debug && valid_retail_wii)
|
||||||
{
|
{
|
||||||
@ -722,11 +734,7 @@ void VolumeVerifier::CheckDiscSize()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const bool small =
|
if ((is_gc_size && size < MINI_DVD_SIZE) || (!is_gc_size && size < SL_DVD_SIZE))
|
||||||
(m_volume.GetVolumeType() == Platform::GameCubeDisc && size < MINI_DVD_SIZE) ||
|
|
||||||
(m_volume.GetVolumeType() == Platform::WiiDisc && size < SL_DVD_SIZE);
|
|
||||||
|
|
||||||
if (small)
|
|
||||||
{
|
{
|
||||||
AddProblem(
|
AddProblem(
|
||||||
Severity::Low,
|
Severity::Low,
|
||||||
@ -849,7 +857,8 @@ void VolumeVerifier::CheckMisc()
|
|||||||
{
|
{
|
||||||
AddProblem(Severity::Low, Common::GetStringT("The game ID is unusually short."));
|
AddProblem(Severity::Low, Common::GetStringT("The game ID is unusually short."));
|
||||||
}
|
}
|
||||||
else if (game_id_encrypted != GAMECUBE_PLACEHOLDER_ID && game_id_encrypted != WII_PLACEHOLDER_ID)
|
else if (!m_is_datel && game_id_encrypted != GAMECUBE_PLACEHOLDER_ID &&
|
||||||
|
game_id_encrypted != WII_PLACEHOLDER_ID)
|
||||||
{
|
{
|
||||||
char country_code;
|
char country_code;
|
||||||
if (IsDisc(m_volume.GetVolumeType()))
|
if (IsDisc(m_volume.GetVolumeType()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user