dolphin/Source/Core/DiscIO
JosJuice 75d032161f DiscIO: Rework the implementation of TGC reading
Fixes https://bugs.dolphin-emu.org/issues/10654.

To quote the documenation file included with the program tgctogcm:

"TGC's are miniaturized .gcm images with a 32kB header.
The embedded gcm contains some bogus data, namely:
-FST Location (0x424 in gcm)
-DOL Location (0x420 in gcm)
-FST File offsets (all files are offset/spoofed by a certain amount)"

Dolphin has been handling the values at 0x420 and 0x424 by simply
overwriting them with a working value (just like tgctogcm does),
but it has used a different approach for the file offsets in the FST.
Instead of changing the offsets that are stored in the FST, Dolphin
changed where the files actually are placed on the virtual disc.
My hope was that this would make the loading times more accurate to
how they are when running a TGC file as part of a larger disc.
However, there are TGC files where we would need to move files
backwards on the disc in order to do this (this is what issue
10654 is about), so the approach we have been using is flawed.

This change makes Dolphin overwrite offsets in the FST instead, like
tgctogcm does. Other than making Dolphin handle the affected TGC files
correctly, this change also makes it so that unnecessary padding data
isn't written if you use Dolphin to convert a TGC file to an ISO file.
This feature is not actually implemented in Dolphin as of now, but I'm
planning to add it in the near future as part of a larger feature.
2020-06-17 12:32:39 +02:00
..
Blob.cpp DiscIO: Add out of bounds checks for blob reading 2020-01-14 18:59:31 +01:00
Blob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
CISOBlob.cpp DiscIO: Fix CISOFileReader::GetDataSize() 2020-01-22 18:57:50 +01:00
CISOBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
CMakeLists.txt DiscIO: Implement multithreaded compression 2020-05-06 14:18:51 +02:00
CompressedBlob.cpp DiscIO: Implement multithreaded compression 2020-05-06 14:18:51 +02:00
CompressedBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
DirectoryBlob.cpp DiscIO: Implement re-encryption of Wii partition data 2020-04-24 14:24:12 +02:00
DirectoryBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
DiscExtractor.cpp DiscIO: cleanup warnings of -Wmaybe-uninitialized 2020-03-23 14:14:00 +08:00
DiscExtractor.h DiscIO: Use std::string_view in FileSystem::FindFileInfo 2019-05-29 08:29:56 +02:00
DiscIO.vcxproj DiscIO: Implement multithreaded compression 2020-05-06 14:18:51 +02:00
DiscIO.vcxproj.filters DiscIO: Implement multithreaded compression 2020-05-06 14:18:51 +02:00
DiscScrubber.cpp DiscIO: Move scrubbing code out of ConvertToGCZ 2020-04-24 15:11:20 +02:00
DiscScrubber.h DiscIO: Move scrubbing code out of ConvertToGCZ 2020-04-24 15:11:20 +02:00
DriveBlob.cpp Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
DriveBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
Enums.cpp GetSysMenuVersionString(): Use a char instead of std::string for the region letter. 2019-12-29 23:45:02 -05:00
Enums.h Also override the SYSCONF country setting 2019-08-09 17:33:05 +02:00
FileBlob.cpp DiscIO: Move scrubbing code out of ConvertToGCZ 2020-04-24 15:11:20 +02:00
FileBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
Filesystem.cpp Qt/FilesystemWidget: Add size column 2018-06-02 18:59:56 +02:00
Filesystem.h DiscIO: Avoid copies when comparing FileSystemGCWii file names 2019-05-29 14:53:39 +02:00
FileSystemGCWii.cpp DiscIO: Add functions CreateDisc and CreateWAD 2019-07-18 22:29:04 +02:00
FileSystemGCWii.h DiscIO: Add functions CreateDisc and CreateWAD 2019-07-18 22:29:04 +02:00
MultithreadedCompressor.h DiscIO: Implement multithreaded compression 2020-05-06 14:18:51 +02:00
NANDImporter.cpp Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
NANDImporter.h Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
ScrubbedBlob.cpp DiscIO: Move scrubbing code out of ConvertToGCZ 2020-04-24 15:11:20 +02:00
ScrubbedBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
TGCBlob.cpp DiscIO: Rework the implementation of TGC reading 2020-06-17 12:32:39 +02:00
TGCBlob.h DiscIO: Rework the implementation of TGC reading 2020-06-17 12:32:39 +02:00
Volume.cpp DiscIO: Add functions CreateDisc and CreateWAD 2019-07-18 22:29:04 +02:00
Volume.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeFileBlobReader.cpp Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeFileBlobReader.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeGC.cpp Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeGC.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeVerifier.cpp Externals: Update minizip search path. 2020-04-29 12:41:36 +02:00
VolumeVerifier.h VolumeVerifier: Ignore invalid partitions in GetBiggestReferencedOffset 2020-02-09 19:05:44 +01:00
VolumeWad.cpp Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeWad.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeWii.cpp Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
VolumeWii.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
WbfsBlob.cpp DiscIO: Add out of bounds checks for blob reading 2020-01-14 18:59:31 +01:00
WbfsBlob.h Show an OSD message when running a disc image with a large block size 2020-06-07 14:11:00 +02:00
WiiEncryptionCache.cpp DiscIO: Implement re-encryption of Wii partition data 2020-04-24 14:24:12 +02:00
WiiEncryptionCache.h DiscIO: Implement re-encryption of Wii partition data 2020-04-24 14:24:12 +02:00
WiiSaveBanner.cpp Common/CommonFuncs: Remove now-unneccessary ArraySize function 2019-06-01 10:07:57 -04:00
WiiSaveBanner.h Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00