summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeDirectory.cpp
AgeCommit message (Collapse)Author
2017-08-01Turn VolumeDirectory into DirectoryBlobJosJuice
This lets VolumeDirectory/DirectoryBlob skip implementing various volume functions like GetGameID, GetBanner, etc. It also lets us view extracted discs in the game list. This ends up breaking the boot process for Wii DirectoryBlobs due to workarounds being removed from the boot process, but that will be fixed later by adding proper DirectoryBlob support for things like TMDs. We now expect the directories to be laid out in a certain format (based on the format that WIT uses) instead of requiring the user to set the DVD root and apploader path settings.
2017-06-15Move IOFile to a separate fileJosJuice
Reduces the number of files that need to be recompiled when making changes to FileUtil.h.
2017-06-09VolumeDirectory: That's not what "4 byte" meansJosJuice
2017-06-09VolumeDirectory: Use correct endianness when writing apploader -1JosJuice
2017-06-07fix various instances of -1 being assigned to unsigned typesShawn Hoffman
2017-06-06DiscIO: Remove C/I/S prefixes from class namesJosJuice
These prefixes were inconsistent with the rest of Dolphin. I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13.
2017-06-05DiscIO: Use std::optional in Volume and BlobJosJuice
2017-06-04Don't show FST size in game propertiesJosJuice
Normal users don't care about it. In fact, people care so little about it that the Wii implementation of it was broken starting from when it was implemented (eb65601) to 7 years later (e0a47c1), apparently without anyone reporting it.
2017-06-03Replace {{}} with {}JosJuice
IIRC we were only using {{}} because {} used to cause errors on the FreeBSD buildbot.
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-01Convert VolumeDirectory names back to SHIFT-JIS (issue #9988)spycrab
2017-04-15VolumeDirectory: Pass address shift to WriteEntryData as argumentDwayne Slater
2017-04-15VolumeDirectory: Correctly check name_offset alignment in assertDwayne Slater
2017-04-15VolumeDirectory: Align the name table size up properlyDwayne Slater
If the name table isn't rounded up, a Wii game can read an incorrect number of bytes when fetching the FST.
2017-04-15VolumeDirectory: Shift parent_entry_index by m_address_shiftDwayne Slater
Parent entrys were written correctly for GameCube (since the address shift is 0), but not for Wii (since the address shift is 2).
2017-04-15VolumeDirectory: Compare case-insensitive file names as uppercase, not lowercaseDwayne Slater
Fixes file ordering in games that use ASCII characters between lowercase 'z' and uppercase 'A' (underscores). MySims Kingdom has the files "terrainLightMapTinted.shader", "terrainLightMapTintedGrid.shader", and "terrainLightMapTinted_no_shadow.shader". In lowercase, "terrainLightMapTinted_no_shadow.shader" comes before "terrainLightMapTinted.shader" and "terrainLightMapTintedGrid.shader", which is invalid.
2017-04-15VolumeDirectory: Fix off-by-one in entry count calculationDwayne Slater
The size field in FSTEntry contains the total amount of children, not including the parent, but the parent needs to be included. VolumeDirectory: Fix off-by-one in entry count calculation The size field in FSTEntry contains the total amount of children, not including the parent, but the parent needs to be included.
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-01-25VolumeDirectory: Use case-insensitive comparison when sortingJosJuice
This fixes a regression from 5.0-1556, but I don't know why the regression occurred or why this fixes it. (Many games failed to fully boot - I tried Metroid Prime and Twilight Princess (both GC), and they never got to the title screen.)
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-12-26VolumeDirectory: Modernize variable namesJosJuice
2016-12-26VolumeDirectory: Don't use references inappropriatelyJosJuice
Integers should be passed as pointers when a function modifies them (to make it clear that they get modified).
2016-12-25Merge pull request #4558 from JosJuice/volumedirectory-fst-sortMat M
VolumeDirectory: Sort the FST
2016-12-25VolumeDirectory: Use a range-based for loop in ComputeNameSizeJosJuice
2016-12-25VolumeDirectory: Make m_totalNameSize a local variableJosJuice
After BuildFST finishes executing, it's never needed again.
2016-12-25VolumeDirectory: Sort the FSTJosJuice
We can't rely on the OS returning files and directories in a deterministic order, so we should sort them on our own if we want VolumeDirectory to work for movies and netplay.
2016-12-06Common: Add alignment headerLéo Lam
Gets rid of duplicated alignment code.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
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-25Undo some comment formatting changes from b5104a7JosJuice
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
2015-12-15Merge pull request #3309 from JosJuice/reload-banner-without-volumeMarkus Wick
Don't read from volume when reloading Wii banners
2015-12-15Merge pull request #3265 from JosJuice/volumedirectory-simplificationsMarkus Wick
DiscIO: Small VolumeDirectory simplifications
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-11-28DiscIO: Don't use PlainFileReader in VolumeDirectoryJosJuice
Blobs are not for regular file reading.
2015-11-17DiscIO: Small VolumeDirectory simplificationsJosJuice
2015-09-29Merge pull request #3097 from JosJuice/blob-typeflacs
Fix blob type detection for game right-click menu
2015-09-27DiscIO: Add a way to get blob typeJosJuice
2015-09-28Merge pull request #2271 from revel8n/fixesScott Mansell
Fix for alignment of zero-length files within directory based virtual disk
2015-09-27Merge pull request #3092 from JosJuice/compressed-blobsflacs
Display all compressed formats in blue in GUI
2015-09-26- Fix for alignment of 0-length files when volume directory is created from ↵revel8n
directory on disk Updating constant value representation Explicitly state data type in std:max usage
2015-09-26Common: Move asserts to their own headerLioncash
2015-09-26Display all compressed formats in blue in GUIJosJuice
In the past, only GCZ was shown as compressed, not CISO and WBFS.
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-28Use emplace() instead of insert() where applicable for maps.Lioncash
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-28Rewrite FileSearch and improve ScanDirectoryTree.comex
- FileSearch is now just one function, and it converts the original glob into a regex on all platforms rather than relying on native Windows pattern matching on there and a complete hack elsewhere. It now supports recursion out of the box rather than manually expanding into a full list of directories in multiple call sites. - This adds a GCC >= 4.9 dependency due to older versions having outright broken <regex>. MSVC is fine with it. - ScanDirectoryTree returns the parent entry rather than filling parts of it in via reference. The count is now stored in the entry like it was for subdirectories. - .glsl file search is now done with DoFileSearch. - IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the results after replacements for better determinism.