summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWiiCrypted.cpp
AgeCommit message (Collapse)Author
2017-06-03Replace {{}} with {}JosJuice
IIRC we were only using {{}} because {} used to cause errors on the FreeBSD buildbot.
2017-05-26Check TMD sizes using the actual constantLéo Lam
0x49e4 is the actual maximum TMD size (which is checked against in ES). IsValidTMDSize is added to ESFormats to avoid duplicating the constant.
2017-05-20VolumeWiiCrypted: Get title keys from TicketReaderJosJuice
2017-05-20VolumeWiiCrypted: Get title IDs from TicketReaderJosJuice
2017-05-20VolumeWiiCrypted: Cache TMDs and ticketsJosJuice
2017-05-19Replace some usages of IVolume::ReadSwapped with IBlobReader::ReadSwappedJosJuice
Skips needing to specify PARTITION_NONE.
2017-05-19Remove CBlobBigEndianReaderJosJuice
We can simply put ReadSwapped directly in IBlobReader.
2017-05-19DiscIO: Remove VolumeCreatorJosJuice
This file is pretty small now that it doesn't handle Wii partitions anymore, so let's move its contents to Volume.cpp. This is also more consistent with how blob creation works.
2017-05-16Check file system validity before reading opening.bnrJosJuice
This happened to work without any problems because the only way for a file system to be invalid was to not have the right GC/Wii magic word in the unencrypted area, and a volume could not be created without having the right GC/Wii magic word there. Now that file systems read the magic word from a partition instead, a fix is needed.
2017-05-16VolumeWiiCrypted: Replace ChangePartition with a partition parameterJosJuice
By removing mutable state in VolumeWiiCrypted, this change makes partition-related code simpler. It also gets rid of other ugly things, like ISOProperties's "over 9000" loop that creates a list of partitions by trying possible combinations, and DiscScrubber's volume swapping that recreates the entire volume when it needs to change partition.
2017-05-16VolumeWiiCrypted: Turn m_dataOffset into a constantJosJuice
2017-05-14VolumeWiiCrypted: Use std::minJosJuice
2017-05-14VolumeWiiCrypted: Store last decrypted offset instead of block numberJosJuice
This makes it unnecessary to reset m_last_decrypted_offset when changing partition.
2017-03-25DiscIO: make sure to initialize out args to ReadSwappedMichael Maltese
Fixes warnings: ``` ../Source/Core/DiscIO/VolumeGC.cpp: In member function 'virtual u8 DiscIO::CVolumeGC::GetDiscNumber() const': ../Source/Core/DiscIO/VolumeGC.cpp:178:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized] return disc_number; ^ ../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual u8 DiscIO::CVolumeWiiCrypted::GetDiscNumber() const': ../Source/Core/DiscIO/VolumeWiiCrypted.cpp:258:10: error: 'disc_number' may be used uninitialized in this function [-Werror=maybe-uninitialized] return disc_number; ^ ../Source/Core/DiscIO/VolumeWiiCrypted.cpp: In member function 'virtual IOS::ES::TMDReader DiscIO::CVolumeWiiCrypted::GetTMD() const': ../Source/Core/DiscIO/VolumeWiiCrypted.cpp:123:20: error: 'tmd_address' may be used uninitialized in this function [-Werror=maybe-uninitialized] tmd_address <<= 2; ^ ```
2017-03-20Merge pull request #4901 from JosJuice/filemonitor-redesignAnthony
FileMonitor redesign
2017-03-18Return a more meaningful type from GetSysMenuRegionJosJuice
2017-03-13FileMonitor redesignJosJuice
Advantages: * Simpler code in general * No extra volume objects created * Now actually notices if the disc or partition gets changed while the core is running * No longer picks up on disc access done by the GUI (it used to do so as long as the core was running) * Gets rid of a Core dependency in DiscIO There are two performance disadvantages: * FileMonitor is now a bit slower when used with VolumeDirectory because FileMonitor now always uses the FileSystemGCWii code for finding filenames instead of VolumeDirectory finding the filename on its own and directly hooking into FileMonitor. But this isn't such a big deal, because it's happening on the DVD thread, and my currently unmerged file system PR will make FileSystemGCWii's file finding code about as fast as VolumeDirectory's. * FileMonitor's creation of the file system object is now done on the CPU thread instead of the DVD thread, and it will be done even if FileMonitor logging is disabled. This will be fixed in the next commit.
2017-03-13Remove Blob nullptr checks from Volume codeJosJuice
There's no point in creating a volume without a blob, since essentially all the functionality of a volume requires a blob to be used. Also, VolumeCreator doesn't support creating volumes without blobs (it can't even figure out the volume type unless it gets a blob), so it's currently impossible for a volume to be created without a blob.
2017-03-09Volume: Use ReadSwapped moreJosJuice
Most of the Volume code was written before this convenience function was added. Let's use it more. Also deleting m_pReader nullptr checks that are unnecessary because of Read (which ReadSwapped calls) already having a nullptr check.
2017-03-09Get the right game ID for SSBB's Masterpiece partitionsJosJuice
2017-03-03Common: Move byte swapping utilities into their own headerLioncash
This moves all the byte swapping utilities into a header named Swap.h. A dedicated header is much more preferable here due to the size of the code itself. In general usage throughout the codebase, CommonFuncs.h was generally only included for these functions anyway. These being in their own header avoids dumping the lesser used utilities into scope. As well as providing a localized area for more utilities related to byte swapping in the future (should they be needed). This also makes it nicer to identify which files depend on the byte swapping utilities in particular. Since this is a completely new header, moving the code uncovered a few indirect includes, as well as making some other inclusions unnecessary.
2017-03-02IOS/ES: Keep track of the active title properlyLéo Lam
This changes ES to keep track of the active title properly, just like IOS: * It is NOT changed on resource manager open/close. * It is reset on IOS reload. * It is changed by ES_DIVerify and ES_Launch. IOS stores the active title in a structure like this: struct ESTitleContext { Ticket* ticket; TMD* tmd; u32 active; }; With this commit, we also do keep the Ticket and TMD around. This makes some of the DI ioctlvs (which return data about the current active title) trivial to implement in the future. This fixes the System Menu not being able to see update partitions and also allows us to change Dolphin's active game info in the future.
2017-02-26Use ESFormats for TMDsLéo Lam
We already have a TMDReader, so let's actually use it. And move ESFormats to IOS::ES, since it's definitely part of IOS. This adds a DiscIO dependency on Core which will be fixed in a follow-up PR.
2017-02-12DVDInterface: Translate Wii partition offsets for timing purposesJosJuice
Until now, Dolphin has been using the wrong values for calculating DVD timing for decrypted Wii reads (which Wii games essentially always use).
2017-02-11VolumeWiiCrypted: Use constant naming style for constantsJosJuice
2017-01-02DiscIO: Add GetRegion function and Region enumJosJuice
Instead of needing different switch cases for converting countries to regions in multiple places, we now only need a single country-to-region switch case (in DiscIO/Enums.cpp), and we get a nice Region type.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
2016-10-01Reorganise a ton of logs levelaldelaro5
Most of this commits changes performance decreasing logs from info to debug and also cleans up innacurate levels.
2016-07-13Move DiscIO enums to a new fileJosJuice
At first there weren't many enums in Volume.h, but the number has been growing, and I'm planning to add one more for regions. To not make Volume.h too large, and to avoid needing to include Volume.h in code that doesn't use volume objects, I'm moving the enums to a new file. I'm also turning them into enum classes while I'm at it.
2016-06-26GCVolume: supports reading all opening.bnr informationRukai
DQT2: Game properties dialog contains info tab giving information about the selected iso.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-01-15DiscIO: Use specified Wii region for discsbooto
2015-12-19Volume: Make GetTMD return a vectorLioncash
2015-12-15Merge pull request #3309 from JosJuice/reload-banner-without-volumeMarkus Wick
Don't read from volume when reloading Wii banners
2015-12-08DiscIO: Get rid of a few explicit deletesLioncash
2015-12-03Don't read from volume when reloading Wii bannersJosJuice
Should make loading cached Wii games that lack banners slightly faster.
2015-10-03Merge pull request #3091 from Tilka/mbedtlsshuffle2
Update mbed TLS (PolarSSL)
2015-09-27DiscIO: Add a way to get blob typeJosJuice
2015-09-26Display all compressed formats in blue in GUIJosJuice
In the past, only GCZ was shown as compressed, not CISO and WBFS.
2015-09-25mbedTLS: run rename.pl script and fix errorsTillmann Karras
2015-09-22DiscIO: Do swapping in GetTitleID implementationsLioncash
Gets rid of external swaps at every usage.
2015-09-12Merge pull request #2829 from JosJuice/fix-wii-fst-size-2Lioncash
Fix reading Wii FST size (for real this time)
2015-08-31VolumeCreator: Fix a typo in VolumeKeyForPartition's nameLioncash
2015-08-31VolumeCreator: Use a unique_ptr in CreateVolumeFromFilenameLioncash
2015-08-10Fix reading Wii FST size (for real this time)JosJuice
04fcb72 fixed an issue with reading the Wii FST size, but I found a second issue when working on PR #2820 - the size must be shifted left by 2. DiscScrubber and Boot already do this correctly using separate code.
2015-06-18Volume: Use DecodeString moreJosJuice
DecodeString handles the case where there is no trailing null byte, so using it lets the code be a bit simpler.
2015-06-08Volume: Add prefer_long parameter to GetNamesJosJuice
GC games with long names store two variations of the name in opening.bnr. This makes the shorter of those names available. For volumes other than GC discs, prefer_long is ignored.
2015-06-04Volume: Return volume type as an enumJosJuice
ISOFile and GameFile were using IsWiiDisc() and IsWadFile() to set an enum value. The volume might as well return an enum directly. I increased the Qt CACHE_REVISION because m_platform now is saved as u32 instead of int, but increasing the wx CACHE_REVISION is not necessary.
2015-05-29Volume: Use more appropriate types for some returned valuesJosJuice
Disc number is changed from bool to u8, and revision is changed from int to u16 (WADs can use all 16 bits, but discs can only use 8 bits).
2015-05-25Merge pull request #2339 from JosJuice/fix-wii-fst-sizeRyan Houdek
Fix reading Wii FST size