summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
AgeCommit message (Collapse)Author
2018-10-20Update to Visual Studio's default Windows SDKTillmann Karras
2018-10-19DiscIO: Restore the Korean case in CountryCodeToCountryJosJuice
I must've goofed or something last time I changed this.
2018-10-14Show 1.0U instead of 1.0 for Wii Menu 1.0JosJuice
As suggested by https://github.com/dolphin-emu/dolphin/pull/7487#issuecomment-429528407
2018-10-12Treat Wii Menu 1.0 as NTSC-UJosJuice
See the comments of https://github.com/dolphin-emu/dolphin/pull/7440.
2018-10-12DiscIO: Rename RegionSwitch/CountrySwitchJosJuice
Callers don't need to know that these functions are implemented with a switch statement.
2018-10-12DiscIO: Add more RegionSwitch/CountrySwitch commentsJosJuice
2018-10-12DiscIO: Fix CountrySwitch's 'M' comment (and clarify other VC comments)JosJuice
2018-10-08DiscIO: Fix the 'W', 'X', 'Y' and 'Z' country codesJosJuice
These country codes have the unfortunate property that they are used by Wii disc games in two different regions. We already correct for this in VolumeGC::GetCountry and VolumeWii::GetCountry, so this commit shouldn't really have any effect on how the game list behaves, but it will be useful if we in the future would want to call CountrySwitch directly without having extra code in the caller for handling region weirdness.
2018-10-08DiscIO: Add the missing 'V' country codeJosJuice
2018-10-08DiscIO: Move the Korean GC mess out of VolumeGCJosJuice
2018-10-05DiscIO: Merge RegionSwitchGC and RegionSwitchWiiJosJuice
2018-09-30Fix reading title IDs of Wii discsJosJuice
Partial revert of a1db82a. Should fix https://bugs.dolphin-emu.org/issues/11404.
2018-09-28Merge pull request #7411 from JosJuice/wii-metadata-unencryptedMat M
Read Wii disc metadata from the unencrypted header
2018-09-20Fix scrubbing unencrypted Wii disc imagesJosJuice
Untested with unencrypted Wii disc images, because I don't have any. I tested that normal Wii disc images still work, though.
2018-09-20Refactor DiscScrubber::MarkAsUsedEJosJuice
2018-09-12Read Wii disc metadata from the unencrypted headerJosJuice
The header of a Wii disc can be read from two places: The unencrypted area at the beginning of the disc, or the beginning of the game partition. The two copies are usually identical (except for 0x60 and 0x61), but there are exceptions. For most of Dolphin's history, we have been reading from the header inside the game partition when getting metadata. This was however not the case starting with 4.0-4901 and ending with 5.0-3762. This commit once again makes Dolphin read metadata from the unencrypted header, because of the following reasons that I recently was informed about: - The "pink fish" disc has the game ID 410E01 in the unencrypted header but the placeholder game ID RELSAB in the partition header. - The revisions of some games differ between the two headers, with the unencrypted one making more sense. (See https://bugs.dolphin-emu.org/issues/11387) For better or worse, this also means that sloppily hacked games where only the game ID in the unencrypted header has been changed now will use that modified game ID. And unlike with the partition header, there is no signing or hashing that can tell us whether the unencrypted header has been modified by someone other than Nintendo.
2018-08-02ExportDOL: ActionReplay has a 0'd dol offset. Don't try to extract.booto
2018-06-09ChunkFile: Remove unnecessary includesLioncash
ChunkFile doesn't use any of the file utilities, so we can drop these headers to avoid pulling in unnecessary dependencies. This also uncovered a few indirect inclusions.
2018-06-02Qt/FilesystemWidget: Add size columnspycrab
2018-05-30VolumeWii: Shorten padding checking code within CheckIntegrity()Lioncash
We can just use std::any_of here to collapse the checking code down to a single assignment as opposed to a loop. This also slightly improves on the existing code, as this won't continue to iterate through the cluster metadata if an entry that's non-zero is encountered.
2018-05-30VolumeWii: Use ReadSwapped for retrieving the partition data size in ↵Lioncash
CheckIntegrity() Also make this a little more robust by handling the failure case for the read as well.
2018-05-30VolumeGC/VolumeWii: Dehardcode sizes where applicableLioncash
We can just use the relevant array to derive these sizes instead of hardcoding them directly.
2018-05-30Volume/VolumeGC/VolumeWii: Amend variable namingLioncash
Drops prefixed underscores and normalizes names to follow our coding style.
2018-05-27ColorUtil: Amend function name casingLioncash
Makes the function names conform to our coding style.
2018-05-27ColorUtil: Namespace code under the Common namespaceLioncash
Given this is within Common, it should be in the Common namespace itself.
2018-05-27CDUtils: Amend function namesLioncash
Amends the function names to follow our coding style.
2018-05-27CDUtils: Namespace code under the Common namespaceLioncash
2018-05-23Make the support for unencrypted Wii disc images less brokenJosJuice
These disc images are only used on dev units and not retail units. There are two important differences compared to normal Wii disc images: - The data starts 0x8000 bytes into each partition instead of 0x20000 - The data of a partition is stored unencrypted and contains no hashes Our old implementation was just guesswork and doesn't work at all. According to testing by GerbilSoft, this commit's implementation is able to read and extract files in the filesystem correctly, but the tested game still isn't able to boot. (It's thanks to their info about unencrypted disc images that I was able to make this commit.)
2018-05-20Reimplement custom PNG banners in game listJosJuice
Fixes https://bugs.dolphin-emu.org/issues/10938 and makes PNG banners available in DolphinQt2 for the first time.
2018-05-16Common/Hash: Namespace code under the Common namespaceLioncash
Brings more common code under the Common namespace.
2018-05-04NandPaths: Return paths that are relative to Wii NANDLéo Lam
Since all FS access will go through the new FS interface (PR #6421) in order to keep track of metadata properly, there is no need to return absolute paths anymore. In fact, returning host paths is a roadblock to using the FS interface. This starts the migration work by adding a way to get paths that are relative to the Wii NAND instead of always getting absolute paths on the host FS. To prepare for future changes, this commit also makes returned paths canonical by removing the trailing slash when it's unneeded. Eventually, once everything has been migrated to the new interface, we can remove the "from" parameter.
2018-04-13CMakeLists: Link in zlib privately where applicableLioncash
Also, use the target name introduced via find_package(ZLIB) instead of hardcoding the 'z' name in the link libraries.
2018-04-12Reformat all the things!spycrab
2018-03-31DiscIO: Don't use all uppercase for enum valuesJosJuice
Also removing some prefixes that we don't need now that we're using enum classes instead of plain enums.
2018-03-27DiscExtractor: Pass partition by reference rather than by value in ↵Lioncash
ExtractDirectory()
2018-03-24DiscIO/CMakeLists: Migrate off add_dolphin_libraryLioncash
Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c
2018-03-16Assert: Remove unused parameter from DEBUG_ASSERTLioncash
This brings the macro in line with the regular ASSERT macro, which only has one macro parameter.
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2018-03-09Unify ISOFile (wx) with GameFile (Qt) and put it in UICommonJosJuice
The original reason I wanted to do this was so that we can replace the Android-specific code with this in the future, but of course, just deduplicating between DolphinWX and DolphinQt2 is nice too. Fixes: - DolphinQt2 showing the wrong size for split WBFS disc images. - DolphinQt2 being case sensitive when checking if a file is a DOL/ELF. - DolphinQt2 not detecting when a Wii banner has become available after the game list cache was created. Removes: - DolphinWX's ability to load PNGs as custom banners. But it was already rather broken (see https://bugs.dolphin-emu.org/issues/10365 and https://bugs.dolphin-emu.org/issues/10366). The reason I removed this was because PNG decoding relied on wx code and we don't have any good non-wx/Qt code for loading PNG files right now (let's not use SOIL), but we should be able to use libpng directly to implement PNG loading in the future. - DolphinQt2's ability to ignore a cached game if the last modified time differs. We currently don't have a non-wx/Qt way to get the time.
2017-12-03WiiSaveBanner: Resolve a -Wreorder warningLioncash
2017-11-19VolumeGC: Correct printf specifier in LoadBannerFile()Lioncash
Gets rid of a warning when compiling on macOS.
2017-11-08Avoid forbidden characters when extracting disc partitionsJosJuice
We shouldn't try to create folder names that contain characters such as : or / since they are forbidden or have special meanings. (No officially released disc uses such characters, though.)
2017-11-06Merge pull request #6162 from JosJuice/nand-check-save-game-nameAnthony
When NAND is damaged, show title names from save files
2017-11-06Merge pull request #6109 from t27duck/missing_wiiware_makers_2JosJuice
Update maker information to match the wiki
2017-11-03Avoid UB when reading Wii volume namesJosJuice
2017-11-03Add WiiSaveBanner classJosJuice
This class is similar to the BannerLoaderWii class that was removed in ee694e32.
2017-10-29Merge pull request #6148 from leoetlino/null-bugLeo Lam
NANDImporter: Construct strings correctly
2017-10-28NANDImporter: Construct strings correctlyLéo Lam
Use std::string(cstring, strnlen(cstring, max_length)) instead of trying to remove extra null characters manually, which is a bit ugly and error prone. And indeed, the original code contained a bug which would cause extra NULLs to not be removed at all if the string did not end with a NULL -- causing issues down the road when constructing paths for sub-entries.
2017-10-28NANDImporter: Add support for dumps that don't include keysLéo Lam
This adds support for NAND images that only include the NAND (i.e. without the OTP/SEEPROM dump appended at the end of the file).
2017-10-24DiscIO: Remove comments that state obvious factsLéo Lam