mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
DiscIO: Add GameCube disc scrubbing support
The code was actually already rather well adapted for this. We more or less just have to skip ParseDisc and run ParsePartitionData directly. This required the PartitionHeader struct to be removed (which wasn't that useful anyway).
This commit is contained in:
@ -2,11 +2,7 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
// DiscScrubber removes the garbage data from discs (currently Wii only) which
|
||||
// is on the disc due to encryption
|
||||
|
||||
// It could be adapted to GameCube discs, but the gain is most likely negligible,
|
||||
// and having 1:1 backups of discs is always nice when they are reasonably sized
|
||||
// DiscScrubber removes the pseudorandom padding data from discs
|
||||
|
||||
// Note: the technique is inspired by Wiiscrubber, but much simpler - intentionally :)
|
||||
|
||||
@ -40,33 +36,13 @@ public:
|
||||
bool CanBlockBeScrubbed(u64 offset) const;
|
||||
|
||||
private:
|
||||
struct PartitionHeader final
|
||||
{
|
||||
u8* ticket[0x2a4];
|
||||
u32 tmd_size;
|
||||
u64 tmd_offset;
|
||||
u32 cert_chain_size;
|
||||
u64 cert_chain_offset;
|
||||
// H3Size is always 0x18000
|
||||
u64 h3_offset;
|
||||
u64 data_offset;
|
||||
u64 data_size;
|
||||
// TMD would be here
|
||||
u64 dol_offset;
|
||||
u64 dol_size;
|
||||
u64 fst_offset;
|
||||
u64 fst_size;
|
||||
u32 apploader_size;
|
||||
u32 apploader_trailer_size;
|
||||
};
|
||||
|
||||
void MarkAsUsed(u64 offset, u64 size);
|
||||
void MarkAsUsedE(u64 partition_data_offset, u64 offset, u64 size);
|
||||
u64 ToClusterOffset(u64 offset) const;
|
||||
bool ReadFromVolume(u64 offset, u32& buffer, const Partition& partition);
|
||||
bool ReadFromVolume(u64 offset, u64& buffer, const Partition& partition);
|
||||
bool ParseDisc();
|
||||
bool ParsePartitionData(const Partition& partition, PartitionHeader* header);
|
||||
bool ParsePartitionData(const Partition& partition);
|
||||
void ParseFileSystemData(u64 partition_data_offset, const FileInfo& directory);
|
||||
|
||||
const Volume* m_disc;
|
||||
|
Reference in New Issue
Block a user