summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/DirectoryBlob.cpp
AgeCommit message (Collapse)Author
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-10Modernize `std::sort` with rangesmitaclaw
2024-10-07Simplify `std::copy` with `std::copy_n`mitaclaw
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
2023-11-05DiscIO: Remove unintentional use of comma operatorJosJuice
2023-10-01Added CopyReader to BlobReader and all subclassesLillyJadeKatrin
A deep-copy method CopyReader has been added to BlobReader (virtual) and all of its subclasses (override). This should create a second BlobReader to open the same set of data but with an independent read pointer so that it doesn't interfere with any reads done on the original Reader. As part of this, IOFile has added code to create a deep copy IOFile pointer onto the same file, with code based on the platform in question to find the file ID from the file pointer and open a new one. There has also been a small piece added to FileInfo to enable a deep copy, but its only subclass at this time already had a copy constructor so this was relatively minor.
2022-08-10DirectoryBlob: Fix partition size mixup for encrypted Wii discs.Admiral H. Curtiss
2022-08-04DiscIO/VolumeWii: Decouple "is encrypted" from "is hashed"JosJuice
Needed for the next commit. NFS disc images are hashed but not encrypted. While we're at it, also get rid of SupportsIntegrityCheck. It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
2022-07-19DiscIO/DirectoryBlob: Add callback to modify sys files before they're added ↵Admiral H. Curtiss
to the disc.
2022-07-19DiscIO/DirectoryBlob: Add ContentSource that stores data locally in std::vector.Admiral H. Curtiss
2022-01-29IOFile: Make origin parameter to Seek() an enum class.Admiral H. Curtiss
2022-01-23DiscIO: Delete an unused function declarationJosJuice
2022-01-16Use Common::ToLower and Common::ToUpperPokechu22
2021-10-24DiscIO/DirectoryBlob: Add a callback that allows patching the main.dol and ↵Admiral H. Curtiss
FST of the game partition during blob construction.
2021-10-24DiscIO/DirectoryBlob: Allow constructing a DirectoryBlobReader from a ↵Admiral H. Curtiss
VolumeDisc.
2021-10-24DiscIO/DirectoryBlob: Allow constructing a DirectoryBlobPartition from a ↵Admiral H. Curtiss
VolumeDisc.
2021-10-23DiscIO/DirectoryBlob: Add a content source representing a run of padding bytes.Admiral H. Curtiss
2021-10-23DiscIO/DirectoryBlob: Add a content source that reads data from a ↵Admiral H. Curtiss
DiscIO::Volume.
2021-10-23DiscIO/DirectoryBlob: Add ability to have an offset for a partition ↵Admiral H. Curtiss
ContentSource.
2021-10-23DiscIO/DirectoryBlob: Add ability to have a start-of-file offset for a file ↵Admiral H. Curtiss
ContentSource.
2021-10-23DiscIO/DirectoryBlob: Consolidate functions that take data for ContentSource ↵Admiral H. Curtiss
to just take a ContentSource.
2021-10-23DiscIO/DirectoryBlob: Rename the vector-reference variant of ↵Admiral H. Curtiss
DiscContentContainer::Add() to AddReference() to make it clearer at call sites that the given vector must remain in memory.
2021-09-19Core/DiscIO: Extract disc and partition constants to DiscUtils.h.Admiral H. Curtiss
2021-09-14DiscIO/DirectoryBlob: Handle reads between files.Admiral H. Curtiss
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
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-03-27Merge pull request #9545 from leoetlino/es-launch-timingsLéo Lam
IOS: Improve timing accuracy for title launches (both ARM and PPC)
2021-03-10DiscIO: Move magic constants for discs to DiscUtilsJosJuice
2021-03-04IOS/ES: Emulate /sys/launch.sys for more accurate timingsLéo Lam
Also gets rid of one static variable
2021-01-27rename Common/File to Common/IOFileShawn Hoffman
2020-11-11DiscIO: Make use of fmt-capable panic alertsLioncash
Migrates the DiscIO code over to fmt.
2020-10-22DiscIO: Migrate logging over to fmtLioncash
Eliminates quite a bit of the PRI* macros used for handling 64-bit values.
2020-08-29DiscIO: Add parameters to BlobReader::SupportsReadWiiDecryptedJosJuice
It's possible (but rare) for a WIA or RVZ file to support this for some partitions but not all, and for the game and the blob code to disagree on how large a partition is.
2020-04-24DiscIO: Implement re-encryption of Wii partition dataJosJuice
2020-04-24DiscIO: Use partition data offset for ReadWiiDecrypted parameterJosJuice
Instead of the partition offset (which is usually 0x20000 less).
2020-02-09DiscIO: Check for DirectoryBlob seek failureJosJuice
Someone reported a problem with DirectoryBlob at https://forums.dolphin-emu.org/Thread-feature-request-thread?pid=502820#pid502820. I'm not sure if the change in this commit actually fixes that problem, but it's something I found that should be changed regardless.
2020-01-14DiscIO: Add out of bounds checks for blob readingJosJuice
2020-01-04Fix several warningsLéo Lam
A small, nonexhaustive set of warning fixes. The DiscIO Volume change is a workaround for a GCC bug [1] that causes returning an unengaged std::optional to emit annoying -Wmaybe-uninitialized warnings. This last change alone fixes pages upon pages of warnings since Volume.h is included from several files. -Wstringop-truncation is another irrelevant warning for us, but unfortunately there seems to be no way to disable it without adding ugly pragmas wherever the warning appears.
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
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-04-12Reformat all the things!spycrab
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).
2017-08-01DirectoryBlob: Fix reading beyond the end of the discJosJuice
There were two problems with this: 1. If the starting offset was beyond the end of the disc, we would dereference an invalid iterator. 2. The data beyond the end of the disc was non-deterministic.
2017-08-01DirectoryBlob: Remove redundant assertJosJuice
DiscContent::Read contains an equivalent assertion.
2017-08-01DirectoryBlob: Don't add DiscContents with size 0JosJuice
Having DiscContents with size 0 would mean that some DiscContents might not get added to the std::set because of them comparing identically to another DiscContent. This replaces an older piece of code in WriteDirectory that ensures that no two files have the same starting offset. (We now care about the ending offset, not the starting offset. The new solution both ensures that no two files have the same ending offset and that no two files have the same starting offset.)
2017-08-01DirectoryBlob: Change the return type of Add/CheckSizeAndAddJosJuice
Only return the information that isn't already known to the caller.
2017-08-01DirectoryBlob: Lookup DiscContents by offset + size instead of offsetJosJuice
This simplifies DiscContentContainer::Read.
2017-08-01DirectoryBlob: Replace std::set<DiscContent> with a new classJosJuice
2017-08-01DirectoryBlob: Standardize the spelling of discJosJuice
DirectoryBlob was using disk in some places and disc in other places.
2017-08-01DirectoryBlob: Don't silently set GC region to NTSC-J if bi2.bin is missingJosJuice
We were already handling the Wii region in region.bin in this way.
2017-08-01DirectoryBlob: Write partition headers properlyJosJuice