Commit graph

1053 commits

Author SHA1 Message Date
JosJuice
711b36075c Fix scrubbing unencrypted Wii disc images (for real this time)
Unlike what my past self apparently thought, % is in fact not the
"round down" operator.

https://bugs.dolphin-emu.org/issues/11906
2019-12-08 19:41:40 +01:00
Stenzek
dd23a1ee79 Update VS projects/solutions to VS2019 2019-11-30 13:42:52 +10:00
Anthony
44f85bbc5e
Merge pull request #8496 from JosJuice/volumewii-check-decrypted-order
VolumeWii: Check SupportsReadWiiDecrypted before m_encrypted
2019-11-27 15:33:43 -08:00
JosJuice
59633f5309 VolumeVerifier: Detect broken Super Paper Mario
https://bugs.dolphin-emu.org/issues/11900
2019-11-27 18:26:22 +01:00
JosJuice
23fc5f9e35 VolumeWii: Check SupportsReadWiiDecrypted before m_encrypted
Fixes using DirectoryBlob on extracted games that were unencrypted
prior to being extracted.

(One day I'll make DirectoryBlob actually support raw reads and then
the order of these two won't matter...)
2019-11-26 20:09:40 +01:00
JosJuice
4e713238d9 VolumeVerifier: Fix a copypaste error
This was completely wrong, but I guess it happened to work correctly
anyway due to timing reasons (MD5 is faster than SHA-1 + AES).
2019-11-22 13:39:04 +01:00
Connor McLaughlin
9700b1e320
Merge pull request #8367 from JosJuice/missing-company-ids
DiscIO: Add missing company IDs
2019-11-08 11:15:27 +10:00
JosJuice
56d37d773b RedumpVerifier: Show an error when datfile lacks serials or versions
This happens if someone manually downloads a regular datfile from
redump.org and puts it where Dolphin stores datfiles. Dolphin needs
"special" datfiles that contain fields for serials and versions.

Before this change, all discs (except Datel discs) would show up as
"Unknown disc" when using a regular datfile.
2019-11-02 16:49:20 +01:00
Mat M
78fad0aafa
Merge pull request #8443 from JosJuice/redumpverifier-datel-wii
RedumpVerifier: Fix handling of Datel Wii disc serials
2019-10-30 05:37:08 -04:00
JosJuice
f9705fd117 Return nothing from VolumeWii::GetGameTDBID if Datel
RedumpVerifier relies on this.
2019-10-30 10:23:33 +01:00
JosJuice
42ec861469 RedumpVerifier: Fix handling of Datel Wii disc serials
GC Datel discs have empty serials, but Wii Datel discs have
serials starting with DS followed by some digits.
2019-10-30 10:11:24 +01:00
JosJuice
49977446dd RedumpVerifier: Don't crash on missing hyphen in serial 2019-10-30 09:58:37 +01:00
JosJuice
e2ef248260 VolumeVerifier: Fix "The data partition is missing" false positive
My bad...
2019-10-30 09:38:18 +01:00
Mat M
427d4501bc
Merge pull request #8429 from JosJuice/redump-create-path
Create necessary folder when using Redump.org integration
2019-10-26 15:51:25 -04:00
JosJuice
2f1b2c6adf Create necessary folder when using Redump.org integration
This was making it impossible to use the Redump.org integration
without first manually creating a Redump folder in the Cache folder.
https://bugs.dolphin-emu.org/issues/11885
2019-10-25 11:07:50 +02:00
JosJuice
742aa765c6 VolumeVerifier: Don't show problems with good dumps of Wii Freeloaders 2019-10-25 10:03:12 +02:00
Mat M
780d34dbca
Merge pull request #8426 from JosJuice/volumeverifier-region-mismatch
VolumeVerifier: Improve region/game ID mismatch checking
2019-10-23 20:15:31 -04:00
JosJuice
2c79c63608
Merge pull request #8330 from JosJuice/redump-integration
VolumeVerifier: Add Redump.org integration
2019-10-23 16:43:52 +02:00
JosJuice
77b9a70d6c VolumeVerifier: Don't consider region mismatch for placeholder game IDs 2019-10-23 10:43:34 +02:00
JosJuice
97c4e8ff3a VolumeVerifier: Include revision when checking region mismatch 2019-10-23 10:39:19 +02:00
JosJuice
f8a4975274 DiscIO: Make company names match GameTDB's list better 2019-09-25 13:38:39 +02:00
JosJuice
2300ce385e DiscIO: Add missing company IDs 2019-09-22 23:12:31 +02:00
Dexter Gerig
5c4b591536 Add Wii Mini system menu version detection 2019-09-21 12:55:49 -05:00
JosJuice
87c5e0b30e VolumeVerifier: Add Redump.org downloading 2019-08-25 12:53:19 +02:00
JosJuice
3eb360b818 VolumeVerifier: Add zip support for datfile 2019-08-24 16:37:19 +02:00
JosJuice
22933d8502 VolumeVerifier: Add datfile parsing 2019-08-24 16:37:19 +02:00
JosJuice
393709a45a Also override the SYSCONF country setting
Fixes https://bugs.dolphin-emu.org/issues/10066
2019-08-09 17:33:05 +02:00
JosJuice
8c8bab3657 VolumeVerifier: Show underdump warnings for WBFS/CISO too 2019-08-09 16:13:50 +02:00
Connor McLaughlin
e87a3f91a9
Merge pull request #8303 from JosJuice/volumeverifier-very-small
Fix problems with running VolumeVerifier on very small disc images
2019-08-09 22:16:33 +10:00
JosJuice
107291dc5a Fix problems with running VolumeVerifier on very small disc images 2019-08-07 19:48:10 +02:00
JosJuice
34fb608dd6 VolumeVerifier: Multithreading 2019-08-06 16:42:59 +02:00
JosJuice
f754a1a548 VolumeVerifier: Don't read data multiple times 2019-08-06 16:32:01 +02:00
Lioncash
db3b31c246 DiscIO/Volume: Make Partition's interface constexpr
PARTITION_NONE technically has a runtime static constructor otherwise.
This allows compile-time instances of Partition to be created without
the use of a static constructor.
2019-08-02 18:25:09 -04:00
Léo Lam
c8c1a0d747
Merge pull request #8253 from JosJuice/fakesigned-common-key-fix
Re-implement FixCommonKeyIndex for WAD files
2019-07-23 09:41:46 +08:00
Anthony
136264d340
Merge pull request #8245 from JosJuice/volumeverifier-wii-menu-region
Fix VolumeVerifier considering Wii Menu WADs to have wrong region
2019-07-22 15:06:07 -07:00
JosJuice
4b73d18eaa Re-implement FixCommonKeyIndex for WAD files
The old implementation of this was not able to distinguish between
a title that had the common key index set to 1 because it actually
was Korean and a title that had the common key index set to 1 due to
fakesigning. This new implementation solves the problem by
decrypting a content with each possible common key and checking
which result matches the provided SHA-1 hash.

The problem that the old implementation causes has only been reported
to affect a certain pirated WAD of Chronos Twins DX (WC6EUP), but it's
possible that the problem would start affecting more WADs if we add
support for the vWii common key (which uses index 2). Adding support
for the vWii common key would also prevent us from using the simpler
solution of always forcing the index to 0 if the title is not Korean.
2019-07-21 09:58:16 +02:00
JosJuice
4ee73dbad3 IOS: Put common key handles in an array 2019-07-21 09:37:06 +02:00
JosJuice
34f32898e6 DiscIO: Merge WiiWAD into VolumeWAD
These two classes are very similar, so let's merge them.
2019-07-18 22:29:04 +02:00
JosJuice
0f5a4b37ee DiscIO: Add functions CreateDisc and CreateWAD
...in addition to the existing function CreateVolume
(renamed from CreateVolumeFromFilename).

Lets code easily add constraints such as not letting the user
select a WAD file when using the disc changing functionality.
2019-07-18 22:29:04 +02:00
JosJuice
0b11f15158 Fix VolumeVerifier considering Wii Menu WADs to have wrong region 2019-07-15 12:42:13 +02:00
Lioncash
4f1f55093f Common/MsgHandler: Namespace code within the Common namespace
Closes another gap in the Common library where code isn't being
namespaced under it.
2019-06-19 16:03:55 -04:00
Connor McLaughlin
ab66e91766
Merge pull request #8134 from JosJuice/filesystem-string-view
DiscIO: Use std::string_view in FileSystem::FindFileInfo
2019-06-08 20:52:34 +10:00
Lioncash
5512876842 General: Migrate from deprecated mbedTLS functions
As indicated by mbedTLS' documentation, all of the relevant functions
have been superseded by _ret-suffixed variants in mbedTLS version
2.7.0.
2019-06-07 22:51:58 -04:00
Lioncash
a9663669dc Common/CommonFuncs: Remove now-unneccessary ArraySize function
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.

In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.

In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
2019-06-01 10:07:57 -04:00
Lioncash
cbcafd6830 DiscIO/CMakeLists: Specify headers in target sources 2019-05-31 06:54:25 -04:00
JosJuice
f25367a7a2 DiscIO: Avoid copies when comparing FileSystemGCWii file names 2019-05-29 14:53:39 +02:00
JosJuice
d4b069f458 DiscIO: Use std::string_view in FileSystem::FindFileInfo
...and in the functions that call it.
2019-05-29 08:29:56 +02:00
Lioncash
d220e33862 DiscIO/VolumeVerifier: Make no-argument overload of GetBiggestUsedOffset() const
The overload taking a partition is already a const member function, so
this one can be turned into one as well.
2019-05-27 10:40:41 -04:00
Lioncash
bf6948c1d4 DiscIO/VolumeVerifier: Use structured bindings where applicable
Allows providing better names than "first" or "second".
2019-05-27 10:40:38 -04:00
Lioncash
fa57396e97 DiscIO/VolumeVerifier: In-class initialize members where applicable
Removes redundant initializers from the constructor and provides
initializers for all members that don't already have one for consistency
(and deterministic initial state).
2019-05-27 10:40:17 -04:00