Commit Graph

61 Commits

Author SHA1 Message Date
Pokechu22 8802f96b7e Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
Admiral H. Curtiss 7ac042d00b
DirectoryBlob: Fix partition size mixup for encrypted Wii discs. 2022-08-10 20:43:52 +02:00
JosJuice a87dffe52d DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound
of the size, and other formats which returned an accurate size. But
now we also have NFS, which returns a lower bound of the size. To
allow VolumeVerifier to make better informed decisions for NFS, let's
use an enum instead of a bool for the type of data size a blob has.
2022-08-04 22:00:59 +02:00
Admiral H. Curtiss ec3cfc01c1
DiscIO/DirectoryBlob: Add callback to modify sys files before they're added to the disc. 2022-07-19 00:55:04 +02:00
Admiral H. Curtiss f5c132580c
DiscIO/DirectoryBlob: Add ContentSource that stores data locally in std::vector. 2022-07-19 00:55:03 +02:00
Minty-Meeo deba9ce256 Added a way to check Block Size, Compression Method, and Compression Level flags to dolphin-tool
New dolphin-tool command: "header"
-b / --block_size
-c / --compression
-l / --compression_level

Informative RVZ/WIA header2 value "compression_level" is now a s32 instead of a u32, because negative compression is a thing.

Speaking of, it is now possible to use negative compression levels in dolphin-tool's convert command (not the GUI, though).
2022-03-19 17:13:28 -05:00
Admiral H. Curtiss 22c6f2fe3b
RiivolutionPatcher: Handle the possibility of the FST already containing a main.dol file. 2021-10-24 00:09:09 +02:00
Admiral H. Curtiss 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
Admiral H. Curtiss 00ef9f2b4f
DiscIO/DirectoryBlob: Allow constructing a DirectoryBlobReader from a VolumeDisc. 2021-10-24 00:09:05 +02:00
Admiral H. Curtiss 3a72a39efd
DiscIO/DirectoryBlob: Allow constructing a DirectoryBlobPartition from a VolumeDisc. 2021-10-24 00:09:00 +02:00
Admiral H. Curtiss b1802f6daa
DiscIO/DirectoryBlob: Add a content source representing a run of padding bytes. 2021-10-23 23:51:23 +02:00
Admiral H. Curtiss f8611f7139
DiscIO/DirectoryBlob: Add a content source that reads data from a DiscIO::Volume. 2021-10-23 16:51:45 +02:00
Admiral H. Curtiss b7a9cc37b1
DiscIO/DirectoryBlob: Add ability to have an offset for a partition ContentSource. 2021-10-23 16:51:45 +02:00
Admiral H. Curtiss a14436fe3f
DiscIO/DirectoryBlob: Add ability to have a start-of-file offset for a file ContentSource. 2021-10-23 16:51:45 +02:00
Admiral H. Curtiss 885e6690c5
DiscIO/DirectoryBlob: Add explanations for DiscContent members. 2021-10-23 16:51:44 +02:00
Admiral H. Curtiss b988ab4441
DiscIO/DirectoryBlob: Consolidate functions that take data for ContentSource to just take a ContentSource. 2021-10-23 16:51:44 +02:00
Admiral H. Curtiss 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
Pokechu22 78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
Admiral H. Curtiss 6684e26ae2
DiscIO/DirectoryBlob: Fix swapped DiscContent comparison operators. 2021-09-21 08:01:21 +02:00
Pierre Bourdon 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
JosJuice 047bb80337 DiscIO: Add parameters to BlobReader::SupportsReadWiiDecrypted
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-08-29 15:18:52 +02:00
JosJuice d494e0230c Show file format details in game properties 2020-06-21 20:47:23 +02:00
JosJuice 162e3be82b Show an OSD message when running a disc image with a large block size
This is intended to catch WIA files which have been created using
wit's default parameters (40 MiB block size), once the WIA PR is
merged. The check does however also work for GCZ files – not that
I think anyone has a GCZ file with a block size that large.
2020-06-07 14:11:00 +02:00
JosJuice 319c508978 DiscIO: Implement re-encryption of Wii partition data 2020-04-24 14:24:12 +02:00
JosJuice a4c7100bcc DiscIO: Use partition data offset for ReadWiiDecrypted parameter
Instead of the partition offset (which is usually 0x20000 less).
2020-04-24 14:16:55 +02:00
Techjar ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
JosJuice 3014dadfa8 DiscIO: Add way of checking whether blob data size is accurate 2019-03-30 12:45:17 +01:00
spycrab 40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
JosJuice 2bcccd893a DirectoryBlob: Remove unused DiscContent member 2017-08-01 22:01:34 +02:00
JosJuice 78fa98f559 DirectoryBlob: Change the return type of Add/CheckSizeAndAdd
Only return the information that isn't already known to the caller.
2017-08-01 21:57:54 +02:00
JosJuice 1b1a75ee3a DirectoryBlob: Lookup DiscContents by offset + size instead of offset
This simplifies DiscContentContainer::Read.
2017-08-01 21:57:48 +02:00
JosJuice d6260e02ce DirectoryBlob: Replace std::set<DiscContent> with a new class 2017-08-01 21:57:24 +02:00
JosJuice b6c6a04f95 DirectoryBlob: Standardize the spelling of disc
DirectoryBlob was using disk in some places and disc in other places.
2017-08-01 11:36:40 +02:00
JosJuice d0c322f6e6 DirectoryBlob: Don't silently set GC region to NTSC-J if bi2.bin is missing
We were already handling the Wii region in region.bin in this way.
2017-08-01 11:36:40 +02:00
JosJuice 3fd0d39a85 DirectoryBlob: Write partition headers properly 2017-08-01 11:36:40 +02:00
JosJuice 5fe3745750 Don't show "extra" files from DirectoryBlobs in game list
For instance, we don't want to show TGC files that might be
inside the /files/ directory of a GameCube DirectoryBlob,
and we don't want to show the /sys/main.dol files for extra
partitions of Wii DirectoryBlobs.
2017-08-01 11:36:40 +02:00
JosJuice 34fd08e7eb DirectoryBlob: Support multiple partitions 2017-08-01 11:36:40 +02:00
JosJuice 955ab72b1d DirectoryBlob: Remove m_root_directory from DirectoryBlob 2017-08-01 11:36:40 +02:00
JosJuice e15b957d53 DirectoryBlob: Implement GetDataSize() 2017-08-01 11:36:40 +02:00
JosJuice d84bee3ff4 DirectoryBlob: Prepare more for supporting multiple partitions 2017-08-01 11:36:40 +02:00
JosJuice a3ee61e1a9 DirectoryBlob: Let DirectoryBlob force GC/Wii for partition 2017-08-01 11:36:40 +02:00
JosJuice ba0ee3f54b DirectoryBlob: Prepare for supporting multiple partitions 2017-08-01 11:36:40 +02:00
JosJuice 953ca9cee1 DirectoryBlob: Make PadToAddress and Write32 static 2017-08-01 11:36:40 +02:00
JosJuice ab4762c4c2 DirectoryBlob: Split out setting BI2 to new function 2017-08-01 11:36:40 +02:00
JosJuice 0d4ad0e39e DirectoryBlob: Remove m_fst_name_offset 2017-08-01 11:36:40 +02:00
JosJuice ef39b4da46 DirectoryBlob: Improve SetApploader
The code gets simpler by using IOFile instead of ReadFileToString.
Also, we now write -1 in all cases where loading fails.
2017-08-01 11:36:40 +02:00
JosJuice 31d8322c5a DirectoryBlob: Don't use member variables for addresses
Now it's clearer that SetDOL depends on SetApploader
and BuildFST depends on SetDOL.

As a side note, we now load the DOL even if there's
no apploader. (I don't think it matters whether we
do it, but it was easier to implement this way.)
2017-08-01 11:36:40 +02:00
JosJuice b28ec0b7ee DirectoryBlob: Split out setting partition table to new function 2017-08-01 11:36:40 +02:00
JosJuice c4879aa48d DirectoryBlob: Split out setting TMD and ticket to new function 2017-08-01 11:36:40 +02:00
JosJuice 8747b1b6ab DirectoryBlob: Support region.bin 2017-08-01 11:36:40 +02:00