commit
22b943d083
|
@ -72,7 +72,6 @@ private:
|
|||
int m_blocksize;
|
||||
u8* m_cache[CACHE_SIZE];
|
||||
u64 m_cache_tags[CACHE_SIZE];
|
||||
int m_cache_age[CACHE_SIZE];
|
||||
};
|
||||
|
||||
// Factory function - examines the path to choose the right type of IBlobReader, and returns one.
|
||||
|
|
|
@ -178,12 +178,6 @@ u32 CFileSystemGCWii::GetBootDOLSize(u64 dol_offset) const
|
|||
return dol_size;
|
||||
}
|
||||
|
||||
bool CFileSystemGCWii::GetBootDOL(u8* &buffer, u32 DolSize) const
|
||||
{
|
||||
u32 DolOffset = m_rVolume->Read32(0x420, m_Wii) << GetOffsetShift();
|
||||
return m_rVolume->Read(DolOffset, DolSize, buffer, m_Wii);
|
||||
}
|
||||
|
||||
bool CFileSystemGCWii::ExportDOL(const std::string& _rExportFolder) const
|
||||
{
|
||||
u32 DolOffset = m_rVolume->Read32(0x420, m_Wii) << GetOffsetShift();
|
||||
|
|
|
@ -30,7 +30,6 @@ public:
|
|||
bool ExportFile(const std::string& _rFullPath, const std::string&_rExportFilename) override;
|
||||
bool ExportApploader(const std::string& _rExportFolder) const override;
|
||||
bool ExportDOL(const std::string& _rExportFolder) const override;
|
||||
bool GetBootDOL(u8* &buffer, u32 DolSize) const override;
|
||||
u32 GetBootDOLSize() const override;
|
||||
u32 GetBootDOLSize(u64 dol_offset) const override;
|
||||
|
||||
|
|
|
@ -50,11 +50,9 @@ public:
|
|||
virtual bool ExportApploader(const std::string& _rExportFolder) const = 0;
|
||||
virtual bool ExportDOL(const std::string& _rExportFolder) const = 0;
|
||||
virtual const std::string GetFileName(u64 _Address) = 0;
|
||||
virtual bool GetBootDOL(u8* &buffer, u32 DolSize) const = 0;
|
||||
virtual u32 GetBootDOLSize() const = 0;
|
||||
virtual u32 GetBootDOLSize(u64 dol_offset) const = 0;
|
||||
|
||||
virtual const IVolume *GetVolume() const { return m_rVolume; }
|
||||
protected:
|
||||
const IVolume *m_rVolume;
|
||||
};
|
||||
|
|
|
@ -112,14 +112,6 @@ IVolume* CreateVolumeFromDirectory(const std::string& _rDirectory, bool _bIsWii,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool IsVolumeWadFile(const IVolume *_rVolume)
|
||||
{
|
||||
u32 MagicWord = 0;
|
||||
_rVolume->Read(0x02, 4, (u8*)&MagicWord, false);
|
||||
|
||||
return (Common::swap32(MagicWord) == 0x00204973 || Common::swap32(MagicWord) == 0x00206962);
|
||||
}
|
||||
|
||||
void VolumeKeyForPartition(IBlobReader& _rReader, u64 offset, u8* VolumeKey)
|
||||
{
|
||||
CBlobBigEndianReader Reader(_rReader);
|
||||
|
|
|
@ -16,7 +16,6 @@ class IBlobReader;
|
|||
|
||||
IVolume* CreateVolumeFromFilename(const std::string& _rFilename, u32 _PartitionGroup = 0, u32 _VolumeNum = -1);
|
||||
IVolume* CreateVolumeFromDirectory(const std::string& _rDirectory, bool _bIsWii, const std::string& _rApploader = "", const std::string& _rDOL = "");
|
||||
bool IsVolumeWadFile(const IVolume *_rVolume);
|
||||
void VolumeKeyForPartition(IBlobReader& _rReader, u64 offset, u8* VolumeKey);
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -115,31 +115,5 @@ bool WiiWAD::ParseWAD(DiscIO::IBlobReader& _rReader)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool WiiWAD::IsWiiWAD(const std::string& name)
|
||||
{
|
||||
std::unique_ptr<IBlobReader> blob_reader(DiscIO::CreateBlobReader(name));
|
||||
if (blob_reader == nullptr)
|
||||
return false;
|
||||
|
||||
CBlobBigEndianReader big_endian_reader(*blob_reader);
|
||||
bool result = false;
|
||||
|
||||
// check for Wii wad
|
||||
if (big_endian_reader.Read32(0x00) == 0x20)
|
||||
{
|
||||
u32 wad_type = big_endian_reader.Read32(0x04);
|
||||
switch (wad_type)
|
||||
{
|
||||
case 0x49730000:
|
||||
case 0x69620000:
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace end
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@ public:
|
|||
u8* GetDataApp() const { return m_pDataApp; }
|
||||
u8* GetFooter() const { return m_pFooter; }
|
||||
|
||||
static bool IsWiiWAD(const std::string& _rName);
|
||||
|
||||
private:
|
||||
|
||||
bool m_Valid;
|
||||
|
|
Loading…
Reference in New Issue