| Age | Commit message (Collapse) | Author |
|
|
|
I must've goofed or something last time I changed this.
|
|
As suggested by https://github.com/dolphin-emu/dolphin/pull/7487#issuecomment-429528407
|
|
See the comments of https://github.com/dolphin-emu/dolphin/pull/7440.
|
|
Callers don't need to know that these functions are implemented
with a switch statement.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Partial revert of a1db82a.
Should fix https://bugs.dolphin-emu.org/issues/11404.
|
|
Read Wii disc metadata from the unencrypted header
|
|
Untested with unencrypted Wii disc images, because I don't have any.
I tested that normal Wii disc images still work, though.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
CheckIntegrity()
Also make this a little more robust by handling the failure case for
the read as well.
|
|
We can just use the relevant array to derive these sizes instead of hardcoding
them directly.
|
|
Drops prefixed underscores and normalizes names to follow our coding
style.
|
|
Makes the function names conform to our coding style.
|
|
Given this is within Common, it should be in the Common namespace
itself.
|
|
Amends the function names to follow our coding style.
|
|
|
|
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.)
|
|
Fixes https://bugs.dolphin-emu.org/issues/10938
and makes PNG banners available in DolphinQt2 for the first time.
|
|
Brings more common code under the Common namespace.
|
|
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.
|
|
Also, use the target name introduced via find_package(ZLIB) instead
of hardcoding the 'z' name in the link libraries.
|
|
|
|
Also removing some prefixes that we don't need now that we're
using enum classes instead of plain enums.
|
|
ExtractDirectory()
|
|
Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c
|
|
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
|
|
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).
|
|
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.
|
|
|
|
Gets rid of a warning when compiling on macOS.
|
|
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.)
|
|
When NAND is damaged, show title names from save files
|
|
Update maker information to match the wiki
|
|
|
|
This class is similar to the BannerLoaderWii class that was
removed in ee694e32.
|
|
NANDImporter: Construct strings correctly
|
|
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.
|
|
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).
|
|
|