summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
AgeCommit message (Collapse)Author
2026-06-22VolumeVerifier: Remove SystemNotAvailableJosJuice
We had some code in VolumeVerifier to catch the error message that Redump.org used to show when trying to access the Wii datfile without logging in. This restriction was removed from Redump.org around the start of 2022, and the code has been unnecessary ever since.
2026-06-22Don't send Dolphin version in user agent to RedumpJosJuice
When we added the RetroAchievements integration, we had a discussion about whether sending version information in the user agent was fine from a privacy standpoint. We reached the conclusion that it was okay, but it was conditional on the website having a privacy policy. Neither incarnation of Redump has that, and Redump also never asked us to send version information like RetroAchievements did, so let's use a user agent that just says "Dolphin" when connecting to Redump.
2026-06-22Use redump.info instead of redump.orgJosJuice
All the staff of Redump (except the absentee sysadmin) have decided to start a new version of the website at redump.info. It has every disc from the old site, it has HTTPS, it isn't buckling under the load of AI scrapers, and moving forward, all adding and verifying of discs is going to be happening on the new website only. Let's move over. I've taken the unusual step of updating the translation files manually. This is because we're very close to a release and because the change is simple enough that I feel confident about making the change to languages I don't speak. (I double checked that the Korean translation doesn't ever follow "Redump.org" by a particle that has a different form depending on whether there's a final consonant.)
2026-04-20VolumeVerifier: Add extra validity checks for ticket and TMDJosJuice
This fixes VolumeVerifier potentially calling TMDReader::GetIOSId for invalid TMDs. VolumeVerifier also has a call to TMDReader::GetContent that doesn't check if the TMD is valid. In practice, this can't get called with an invalid TMD because the previous commit made it so GetContentOffsets returns an empty vector if the TMD is invalid, but I've added a check inside TMDReader::GetContent just to be on the safe side. I also made VolumeVerifier show a specifically worded problem if the ticket or TMD is invalid. Before, invalid TMDs in Wii discs and WADs and invalid tickets in WADs would show a more generic problem.
2026-03-23Use more std::span argumentsSintendo
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2025-05-22minizip-ng: Stop using compatibility modeJoshua Vandaële
2025-04-22Merge pull request #13540 from tygyh/DiscIO-Remove-redundant-qualifiersJordan Woyak
DiscIO: Remove redundant qualifiers
2025-04-22DiscIO: Remove redundant qualifiersDr. Dystopia
2025-04-21Add Triforce platform and preliminary boot.id parsingZopolis4
2025-03-29Merge pull request #13221 from mitaclaw/nrvo-fails-1JMC47
GCC: Remedy NRVO Fails
2025-03-10GCC: Remedy NRVO Failsmitaclaw
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
2025-03-09Modernize `std::stable_sort` with ranges and projectionsmitaclaw
2025-03-09Modernize `std::sort` with ranges and projectionsmitaclaw
In PPCTables.cpp, the code is currently unused so I was unable to test it. In CustomPipeline.cpp, a pointer to member function cannot be used due to 16.4.5.2.1 of the C++ Standard regarding "addressable functions". https://eel.is/c++draft/namespace.std#6 In Fs.cpp and DirectoryBlob.cpp, these examples used projections in a previous iteration of this commit, but no longer do. Still, they remain in this commit because the PR they would actually belong to is already merged.
2025-01-19Fix build with minizip-ng 4.0.8Joshua Vandaële
2025-01-01Simplify `std::search` with `Common::ContainsSubrange`mitaclaw
2025-01-01Simplify `std::find` with `Common::Contains`mitaclaw
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp). The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2024-12-15Modernize `std::any_of` with rangesmitaclaw
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-11Merge pull request #13095 from mitaclaw/ranges-modernization-6-nTilka
Ranges Algorithms Modernization - N
2024-10-10Modernize `std::find_if` with rangesmitaclaw
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
2024-10-10Modernize `std::binary_search` with rangesmitaclaw
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
2024-10-07Simplify `std::copy` with `std::copy_n`mitaclaw
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
2024-09-28VolumeVerifier: Promote `DEBUG_ASSERT` to `static_assert`mitaclaw
This runtime assertion was added before `std::is_sorted` became constexpr in the codebase.
2023-08-19DiscIO: Don't keep volume pointer in DiscScrubberJosJuice
Keeping the pointer creates use-after-free opportunities, and we don't have much reason to keep it around anyway.
2023-05-15IOS/ES: Split ESDevice into ESCore and ESDevice.Admiral H. Curtiss
ESCore implements the core functionality that can also be used outside of emulation. ESDevice implements the IOS device and is only available during emulation.
2023-01-24Common: Replace StringBeginsWith/StringEndsWith with std equivalentsLioncash
Obsoletes these functions in favor of the standard member functions added in C++20.
2022-10-29VolumeVerifier: fix bogus "serial/version missing" errorTillmann Karras
When searching for a disc where the revision doesn't match any disc in the datfile, the loop would never get to the part where serials_exist is set to true, leading to a bogus error message.
2022-09-23VolumeVerifier: Add missing assignment to summary_text.Admiral H. Curtiss
2022-08-16fix verifying wii dev signaturesShawn Hoffman
allows verifying dev-signed discs and wads
2022-08-04DiscIO/VolumeVerifier: Add a note about NFS bad dumpsJosJuice
2022-08-04DiscIO/VolumeVerifier: Small logic cleanupJosJuice
Just for ease of reading. No behavioral difference.
2022-08-04DiscIO: Adjust GetDataSizeType logic for NFSJosJuice
2022-08-04DiscIO: Replace IsDataSizeAccurate with GetDataSizeTypeJosJuice
Previously, we had WBFS and CISO which both returned an upper bound of the size, and other formats which returned an accurate size. But now we also have NFS, which returns a lower bound of the size. To allow VolumeVerifier to make better informed decisions for NFS, let's use an enum instead of a bool for the type of data size a blob has.
2022-08-04DiscIO/VolumeWii: Decouple "is encrypted" from "is hashed"JosJuice
Needed for the next commit. NFS disc images are hashed but not encrypted. While we're at it, also get rid of SupportsIntegrityCheck. It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
2022-08-02VolumeVerifier: enable fast hash functions by defaultShawn Hoffman
sets defaults based on cpu support.
2022-08-01Common/Hash: use zlib-ng for adler32. small cleanups.Shawn Hoffman
2022-07-30Merge pull request #10899 from shuffle2/sha1Admiral H. Curtiss
add hw-accelerated SHA1
2022-07-28VolumeVerifier: Fix read_succeeded conditionJosJuice
We shouldn't set m_read_errors_occurred to true just because is_data_needed was false.
2022-07-26introduce wrapper for SHA1 functionalityShawn Hoffman
2022-07-25StripSpaces: only strip spacesShawn Hoffman
StripWhitespace maintains old behavior
2022-07-17VolumeVerifier: Ignore case when looking for IOS on update partitionJosJuice
One of the Dragon Quest X expansions (S4SJGD) uses lowercase instead of the usual uppercase for the IOS59 file on its update partition.
2022-07-13DiscIO/VolumeVerifier: Don't try to verify data that would read out of bounds.Admiral H. Curtiss
2022-06-06CMake: rename minizip to minizip-ngTillmann Karras
minizip-ng is the new name used by the upstream project as well as all distros other than Fedora (but it looks like it will be renamed there).
2022-03-12VolumeVerifier: Skip "lacks some data" check for Datel discsJosJuice
Turns out there's some Freeloader disc for the GC that triggers this despite being a good dump. This warning is mostly intended to catch Wii games that have been truncated at the 4.00 GiB or 4.38 GiB mark anyway, and if someone does have a Datel dump that has been truncated, they'll still get the "unusual size" warning.
2022-02-13Fix integer sign difference comparison warningsPokechu22
2022-01-14Fix static initialisation order fiasco issue for Version variablesLéo Lam
Fixes a crash that could occur if the static constructor function for the MainSettings.cpp TU happened to run before the variables in Common/Version.cpp are initialised. (This is known as the static initialisation order fiasco.) By using wrapper functions, those variables are now guaranteed to be constructed on first use.
2022-01-01Replace remaining uses of zlib crc32 with Common/Hash.hPokechu22
2021-08-15VolumeVerifier: Use correct IOS filename for development discs.David Korth
Retail-signed discs use the format: IOS56-64-v5661.wad Debug-signed discs use the format: firmware.64.56.22.29.wad Debug-signed discs usually have a 128 version of the firmware as well, since some devkits have 128 MB MEM2. (Retail has 64 MB.)
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.