Commit Graph

1318 Commits

Author SHA1 Message Date
e26b59bab3 Core: Add RiivolutionParser to parse a Riivolution XML. 2021-10-24 00:09:06 +02:00
09fc39e2e5 DiscIO: Add CreateDisc/WAD/Volume() overloads that take a BlobReader directly. 2021-10-24 00:09:05 +02:00
e3f1de023f DiscIO/DirectoryBlob: Add a callback that allows patching the main.dol and FST of the game partition during blob construction. 2021-10-24 00:09:05 +02:00
00ef9f2b4f DiscIO/DirectoryBlob: Allow constructing a DirectoryBlobReader from a VolumeDisc. 2021-10-24 00:09:05 +02:00
3a72a39efd DiscIO/DirectoryBlob: Allow constructing a DirectoryBlobPartition from a VolumeDisc. 2021-10-24 00:09:00 +02:00
b1802f6daa DiscIO/DirectoryBlob: Add a content source representing a run of padding bytes. 2021-10-23 23:51:23 +02:00
f8611f7139 DiscIO/DirectoryBlob: Add a content source that reads data from a DiscIO::Volume. 2021-10-23 16:51:45 +02:00
b7a9cc37b1 DiscIO/DirectoryBlob: Add ability to have an offset for a partition ContentSource. 2021-10-23 16:51:45 +02:00
a14436fe3f DiscIO/DirectoryBlob: Add ability to have a start-of-file offset for a file ContentSource. 2021-10-23 16:51:45 +02:00
885e6690c5 DiscIO/DirectoryBlob: Add explanations for DiscContent members. 2021-10-23 16:51:44 +02:00
b988ab4441 DiscIO/DirectoryBlob: Consolidate functions that take data for ContentSource to just take a ContentSource. 2021-10-23 16:51:44 +02:00
7f57c24172 DiscIO/DirectoryBlob: Rename the vector-reference variant of DiscContentContainer::Add() to AddReference() to make it clearer at call sites that the given vector must remain in memory. 2021-10-23 16:51:44 +02:00
78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
6684e26ae2 DiscIO/DirectoryBlob: Fix swapped DiscContent comparison operators. 2021-09-21 08:01:21 +02:00
ad410009bb Core/DiscIO: Extract disc and partition constants to DiscUtils.h. 2021-09-19 22:43:52 +02:00
06d41c53ce DiscIO/DirectoryBlob: Handle reads between files. 2021-09-14 07:09:55 +02:00
815b590dfe Update clang-format to version 12
12 is the latest release and various editors (VS, VSCode and CLion)
ship with clang-format 12 by default.
2021-08-30 00:20:18 +02:00
0f628ff882 Merge pull request #10028 from GerbilSoft/bugfix/RVT-firmware-filenames
VolumeVerifier: Use correct IOS filename for development discs.
2021-08-16 20:47:07 +01:00
95d3416305 VolumeVerifier: Use correct IOS filename for development discs.
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-08-15 12:41:35 -04:00
4ef87194a4 revert workaround for msvc arm64 ICE in WIABlob 2021-08-14 03:57:53 -07:00
5fe23ccc3e DiscIO: Fix broken workaround for MSVC ARM64 ICE
The workaround added in 30f9f31 caused a regression where Dolphin
incorrectly replaced runs of one byte with runs of another byte
when writing WIA and RVZ files. ReuseID::operator< was always
returning false unless the ReuseIDs being compared had different
partition keys, which caused std::map<ReuseID, GroupEntry>
to treat all ReuseIDs with the same partition key as equal.
2021-07-24 13:29:03 +02:00
39e14b6b5f Merge pull request #9854 from JosJuice/wia-ice
DiscIO: Store partition key directly in ReuseID
2021-07-06 13:05:09 +02:00
f4e34703c0 licensing: convert "public domain" to CC0 1.0
Public domain does not have an internationally agreed upon definition,
As such it's generally preferred to use an extremely liberal license,
which can explicitly list the rights granted by the copyright holder.
The CC0 license is the usual choice here.

This "relicensing" is done without hunting down copyright holders, since
it is presumed that their release of this work into the public domain
authorizes us to redistribute this code under any other license of our
choosing.
2021-07-05 04:43:55 +02:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
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.
2021-07-05 04:35:56 +02:00
eafa2784d6 DiscIO: Store partition key directly in ReuseID
This lets us reuse blocks in the case where different partition
entries use the same key (which probably isn't very common).
2021-06-30 09:06:20 +02:00
30f9f31a69 DiscIO: Add workaround for MSVC ARM64 ICE 2021-06-29 10:24:09 +02:00
2c598e46ab VolumeVerifier: increase problem severity for incorrectly signed TMDs 2021-05-26 05:52:21 -04:00
1a9e72c9bb DiscIO: Use MathUtil::SaturatingCast 2021-04-06 23:27:23 +02:00
e89ae71cec Merge pull request #9388 from JosJuice/default-locale
Set console's default language/country/region based on computer settings
2021-04-06 12:34:58 +02:00
004dfd1586 Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
a1000afacc Add utility functions for GameCube language codes 2021-03-27 09:46:46 +01:00
8d2b0fff8a Merge pull request #9545 from leoetlino/es-launch-timings
IOS: Improve timing accuracy for title launches (both ARM and PPC)
2021-03-27 01:47:28 +01:00
c0eb95481f VolumeVerifier: Align partition reads to groups
This improves the speed of verifying Wii WIA/RVZ files.
For me, the verification speed for LZMA2-compressed files
has gone from 11-12 MiB/s to 13-14 MiB/s.

One thing VolumeVerifier does to achieve parallelism is to
compute hashes for one chunk of data while reading the next
chunk of data. In master, when reading data from a Wii
partition, each such chunk is 32 KiB. This is normally fine,
but with WIA and RVZ it leads to rather lopsided read times
(without the compute times being lopsided): The first 32 KiB
of each 2 MiB takes a long time to read, and the remaining
part of the 2 MiB can be read nearly instantly. (The WIA/RVZ
code has to read the entire 2 MiB in order to compute hashes
which appear at the beginning of the 2 MiB, and then caches
the result afterwards.) This leads to us at times not doing
much reading and at other times not doing much computation.
To improve this, this change makes us use 2 MiB chunks
instead of 32 KiB chunks when reading from Wii partitions.

(block = 32 KiB, group = 2 MiB)
2021-03-22 21:07:01 +01:00
bbacefeb75 VolumeVerifier: Handle contents overlapping
This can't actually happen in practice due to how WAD files work,
but it's very easy to add support for thanks to the last commit,
so we might as well add support for it.
2021-03-22 20:05:11 +01:00
10e1acf25c VolumeVerifier: Handle overlapping blocks more efficiently
The performance gains of doing this aren't too important since you
normally wouldn't run into any disc image that has overlapping blocks
(which by extension means overlapping partitions), but this change also
lets us get rid of things like VolumeVerifier's mutex that used to
exist just for the sake of handling overlapping blocks.
2021-03-22 20:05:11 +01:00
d1946aded6 Avoid using panic alerts in DiscIO
Panic alerts in DiscIO can potentially be very annoying since
large amounts of them can pop up when loading the game list
if you have some particularly weird files in your game list.

This was a much bigger problem back in 5.0 with its
"Tried to decrypt data from a non-Wii volume" panic alert, but
I figured I would take it all the way and remove the remaining
panic alerts that can show up when loading the game list.

I have exempted uses of ASSERT/ASSERT_MSG since they indicate
a bug in Dolphin rather than a malformed file.
2021-03-20 12:58:54 +01:00
f44f20560d Merge pull request #9573 from JosJuice/volumeverifier-cancel-crash
VolumeVerifier: Fix potential crash when cancelling
2021-03-16 11:10:47 +01:00
b7f931fc6b Merge pull request #9570 from JosJuice/wia-partial-exception-list
DiscIO: Fix reading certain WIA chunks with many exceptions
2021-03-16 11:10:12 +01:00
7d570f1edb DiscIO: Move magic constants for discs to DiscUtils 2021-03-10 00:16:37 +01:00
b14bf82732 DiscIO: Move some code from VolumeVerifier to DiscUtils 2021-03-10 00:16:12 +01:00
49ccc77ebb DiscIO: Move some code from DiscExtractor to new file DiscUtils 2021-03-09 20:34:24 +01:00
14bfc0be78 DiscIO: Fix reading certain WIA chunks with many exceptions
The loop in WIARVZFileReader::Chunk::Read could terminate
prematurely if the size argument was smaller than the size
of an exception list which had only been partially loaded.
2021-03-07 14:14:45 +01:00
96ebf01ea8 VolumeVerifier: Fix potential crash when cancelling
The async operations may contain references to class members, so
any running async operations must end before destroying the class.
2021-03-07 13:56:06 +01:00
aef0760efe IOS/ES: Emulate /sys/launch.sys for more accurate timings
Also gets rid of one static variable
2021-03-04 18:41:13 +01:00
522cb6b137 IOS: Use less ambiguous names for classes
Some of the device names can be ambiguous and require fully or partly
qualifying the name (e.g. IOS::HLE::FS::) in a somewhat verbose way.

Additionally, insufficiently qualified names are prone to breaking.
Consider the example of IOS::HLE::FS:: (namespace) and
IOS::HLE::Device::FS (class). If we use FS::Foo in a file that doesn't
know about the class, everything will work fine. However, as soon as
Device::FS is declared via a header include or even just forward
declared, that code will cease to compile because FS:: now resolves
to Device::FS if FS::Foo was used in the Device namespace.

It also leads to having to write IOS::ES:: to access ES types and
utilities even for code that is already under the IOS namespace.

The fix for this is simple: rename the device classes and give them
a "device" suffix in their names if the existing ones may be ambiguous.
This makes it clear whether we're referring to the device class or to
something else.

This is not any longer to type, considering it lets us get rid of the
Device namespace, which is now wholly unnecessary.

There are no functional changes in this commit.

A future commit will fix unnecessarily qualified names.
2021-02-12 21:40:31 +01:00
500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
84128d9532 rename Common/File to Common/IOFile 2021-01-27 14:29:48 -08:00
b43f7c85cc DiscIO: Fix recursive directory extraction
https://bugs.dolphin-emu.org/issues/12331
2020-12-03 21:13:53 +01:00
9a01c3fb9f Use positional arguments in all translatable fmt strings
We want to use positional arguments in translatable strings
that have more than one argument so that translators can change
the order of them, but the question is: Should we also use
positional arguments in translatable strings with only one
argument? I think it makes most sense that way, partially
so that translators don't even have to be aware of the
non-positional syntax and partially because "translatable
strings use positional arguments" is an easier rule for us
to remember than "transitional strings which have more than
one argument use positional arguments". But let me know if
you have a different opinion.
2020-11-16 13:28:11 +01:00
ec5313fe24 Merge pull request #9204 from fbastos1/master
fix emulator issue #12139
2020-11-12 14:43:35 +01:00