summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
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-06-04NANDImporter: Abort extraction if a NAND FST entry is visited more than onceAdmiral H. Curtiss
2026-05-30Prevent path traversal in NANDImporter::ProcessEntryJosJuice
Reported by MrSynAckster. A specifically crafted NAND dump could use path traversal to overwrite files on the host file system. This is also an accuracy fix for importing NAND dumps that contain file names that Dolphin is supposed to escape. Some games' save files are affected.
2026-05-30Rework NANDImporter::GetPath slash handlingJosJuice
GetPath has two special cases where it doesn't add a slash. The first is for the root entry's special name "/". The next commit will be neater if we can skip calling GetPath for the root entry, because '/' is one of the characters that Common::EscapeFileName replaces with an escape sequence. Let's check for entry number 0 instead. The second is for parent paths that already end in a slash. There's no actual need to check for this - double slashes are harmless, and for comparison, NANDImporter::ExtractCertificates already appends slashes without checking if there already is one. Let's remove this check.
2026-05-11Merge pull request #14613 from JosJuice/wad-tmd-checksAdmiral H. Curtiss
DiscIO: Add extra IsValid checks for VolumeWAD::m_tmd
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-04-20DiscIO: Add extra IsValid checks for VolumeWAD::m_tmdJosJuice
Plus an IsValid check inside TMDReader::GetContents, which is called by VolumeWAD. Fixes https://bugs.dolphin-emu.org/issues/14032.
2026-04-20Replace `find(x) != npos` with `contains(x)` - CoreDr. Dystopia
2026-04-17Improve usage of std::move and const references parametersMartino Fontana
Accomplished using `run-clang-tidy` with `performance-move-const-arg,performance-unnecessary-value-param,modernize-pass-by-value`. Changed arguments to const references, removed them where inappropriate (e.g. sink parameters). Same with std::move. Manually reviewed each change to make sure that it makes sense, and do something more appropriate if possible.
2026-04-11Merge pull request #14500 from Sintendo/span2Jordan Woyak
Replace `const std::vector&` arguments with `std::span`
2026-04-04Improve NAND import progress dialogTillmann Karras
Now with cancel button and an actual progress bar. For simplicity, we do two passes on the progress bar, one for loading the NAND into memory and one for extracting it. The user directory is likely on an SSD, making the extraction pass invisibly fast.
2026-03-23Use more std::span argumentsSintendo
2026-03-15Triforce: Check only first byte in region flag.cristian64
In some Triforce games (e.g. _F-Zero AX_), the bytes that follow the region flag in the `boot.id` file (at `0x38`) happen to be `0x00`. However, in other games (e.g _Mario Kart Arcade GP 2_), it seems the region flag is padded with `0xFF`. _Mario Kart Arcade GP 2_ (`boot.id` in the USA version): ``` 00000 0000: 42 54 49 44 00 00 01 E0 00 00 00 01 00 00 00 01 BTID.... ........ 00000 0010: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ........ ........ 00000 0020: 47 43 41 4D 00 00 01 C0 07 D3 05 0F 00 00 00 07 GCAM.... ........ 00000 0030: 53 42 4E 4C 00 00 00 00 0E FF FF FF FF FF FF FF SBNL.... ........ ----------- ^ | region flag ``` When the region flag was tested in `switch` statements (where a single byte was expected in the `case`s), the test would fail, depending on the game. This issue would lead to the wrong calculation of the country in `VolumeDisc::GetCountry()`, which was then used to build the game ID in `VolumeDisc::GetGameID()`. The solution is to test using only the least meaningful byte in the region flag. Unexpected game IDs were first noticed with USA version of _Mario Kart Arcade GP 2_, which was wrongly assigned the same game ID that is given to the Japan version (i.e. `GNLJ82`). The correct game ID for the USA version is `GNLE82`.
2026-02-24DiscIO: Only allow alphanumeric ASCII in game IDsJosJuice
We often use game IDs in paths, so we should try to make sure path traversal is impossible in game IDs. Admittedly, doing any kind of real attack using the six bytes available in game IDs is unrealistic, but no game ID should contain non-alphanumeric or non-ASCII characters anyway. Might also fix https://bugs.dolphin-emu.org/issues/13982 by skipping converting between encodings for game IDs.
2026-02-24DiscIO: Move DecodeString to Volume.cppJosJuice
This had to be in the header back when it was templated, but 083faa8b made it not templated.
2026-02-15Enums: Unhandled switch statementJoshua Vandaële
2026-02-15DiscIO: Add IsCached virtual function to BlobReader.Jordan Woyak
2026-02-15SI_DeviceAMBaseboard: Add missing bounds checksSepalani
VolumeDisc: Fix Triforce's GetGameID memcpy by checking MakerID's size
2026-02-15Triforce: Code fixes.crediar
Fixed a bug caused by static usage of Core::System::GetInstance() Removed unused headers Removed unneeded code Optimised code Added sanity checks Added SafeCopyFromEmu/SafeCopyToEmu Set Triforce buttons to be translatable
2026-02-15Triforce: Code cleanups.Jordan Woyak
2026-02-15DiscIO: Make Volume::DecodeString take a std::span so it can work with ↵Jordan Woyak
std::array.
2026-02-15Added Triforce supportcrediar
2026-02-06RiivolutionParser: Fix XML Param ParsingGabriela Orzechowska
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...)
2026-01-24Common/FileSearch: Refactor DoFileSearchSintendo
2026-01-17Merge pull request #14267 from jordan-woyak/std-expectediwubcode
Common: Replace Result with std::expected.
2026-01-17Common: Replace Result with C++23's std::expected.Jordan Woyak
2026-01-17Fix various typos and spelling mistakesSintendo
2026-01-04VolumeFileBlobReader: Define default destructor in source fileDentomologist
Fix an error generated by Clang from the destructor of `std::unique_ptr<FileInfo> m_file_info` when setting the standard version to c++23: `invalid application of 'sizeof' to an incomplete type 'DiscIO::FileInfo'`
2026-01-02DiscIO/Volume: Fix CreateVolume for WiiWare.Jordan Woyak
2025-12-22Merge pull request #14174 from JoshuaVandaele/minizips-cmakeJMC47
Use minizip-ng's CMakeLists instead of relying on our own implementation
2025-12-22Merge pull request #14154 from jordan-woyak/result-parameter-orderJMC47
Common/Result: Swap order of template parameters to match C++26's std::expected.
2025-11-27Use minizip-ng's CMakeLists instead of relying on our own implementationJoshua Vandaële
This is a carry over from back when we used `minizip` and had our own CMakeLists for it.
2025-11-23Core/DiscIO: Add a setting to load the running game into memory via ↵Jordan Woyak
CachedBlobReader.
2025-11-23DiscIO: Add CachedBlobReader which takes another BlobReader and reads it ↵Jordan Woyak
into memory in the background.
2025-11-21Common/Result: Swap order of template parameters to match C++26's ↵Jordan Woyak
std::expected, make all member functions constexpr, and add moving "unexpected" conversion constructor for consistency.
2025-11-19Merge pull request #13539 from tygyh/DiscIO-Remove-redundant-castsJordan Woyak
DiscIO: Remove redundant casts
2025-11-09DiscIO: Make all BlobReader implementations use DirectIOFile to make ↵Jordan Woyak
CopyReader functionality thread safe.
2025-10-08MMU: Use templates for Read/Write functionsMartino Fontana
2025-07-04WiiSaveBanner: fall back to $userdir/Load/WiiBannersTillmann Karras
Unlike custom banners which work as an override, this mechanism works as a fallback. The use case is if you have games you don't really play but want to keep around for testing purposes without filling up your NAND with lots of saves. For ease of use, the directory structure is the same but only title/$title_hi/$title_lo/data/banner.bin files are relevant.
2025-06-14Source: Remove redundant lambda parameter listsDr. Dystopia
2025-06-07Merge pull request #13522 from ↵Jordan Woyak
tygyh/Enforce-overriding-destructor-style-Core&UnitTests Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
2025-06-04DiscIO: Remove redundant castsDr. Dystopia
2025-06-04Merge pull request #13379 from JoshuaVandaele/system-ngJMC47
Use minizip-ng in non-compatibility mode
2025-05-25Hide DirectoryBlob header.bin files from game listJosJuice
This is a continuation of 552b6da. That commit hid sys/boot.bin, but not disc/header.bin, which is only present for Wii games. Fixes https://bugs.dolphin-emu.org/issues/13810.
2025-05-22minizip-ng: Stop using compatibility modeJoshua Vandaële
2025-05-16DiscIO: Make functions constantDr. Dystopia
2025-05-07Merge pull request #13542 from ↵Jordan Woyak
tygyh/DiscIO-Pass-parameters-by-constant-reference DiscIO: Pass parameters by constant reference