mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Fix of issue 408, the game still can't boot.
Implement DVDLowUnencryptedRead, Medal Of Honor Heroes 2 use it to get DVD PartitionsInfo (disk offset 0x40000). and the game try to use IOCtlV, code 0x8b, bushing point out, IOCtlV 0x8b is DVDLowOpenPartition too, so I just return 0 for success. need further work on this. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2367 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -38,6 +38,7 @@ class IVolume
|
||||
|
||||
|
||||
virtual bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0;
|
||||
virtual bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0;
|
||||
virtual std::string GetUniqueID() const = 0;
|
||||
virtual std::string GetMakerID() const = 0;
|
||||
virtual std::string GetName() const = 0;
|
||||
|
@ -69,6 +69,11 @@ bool CVolumeDirectory::IsValidDirectory(const std::string& _rDirectory)
|
||||
return File::IsDirectory(directoryName.c_str());
|
||||
}
|
||||
|
||||
bool CVolumeDirectory::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CVolumeDirectory::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
|
||||
{
|
||||
if(_Offset < FST_ADDRESS)
|
||||
|
@ -42,6 +42,7 @@ class CVolumeDirectory
|
||||
static bool IsValidDirectory(const std::string& _rDirectory);
|
||||
|
||||
bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const;
|
||||
bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const;
|
||||
|
||||
std::string GetUniqueID() const;
|
||||
void SetUniqueID(std::string _ID);
|
||||
|
@ -55,6 +55,11 @@ bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
|
||||
return m_pReader->Read(_Offset, _Length, _pBuffer);
|
||||
}
|
||||
|
||||
bool CVolumeGC::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string CVolumeGC::GetUniqueID() const
|
||||
{
|
||||
static const std::string NO_UID("NO_UID");
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
CVolumeGC(IBlobReader* _pReader);
|
||||
~CVolumeGC();
|
||||
bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const;
|
||||
bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const;
|
||||
std::string GetUniqueID() const;
|
||||
std::string GetMakerID() const;
|
||||
std::string GetName() const;
|
||||
|
@ -41,6 +41,17 @@ CVolumeWiiCrypted::~CVolumeWiiCrypted()
|
||||
m_pBuffer = NULL;
|
||||
}
|
||||
|
||||
bool CVolumeWiiCrypted::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
|
||||
{
|
||||
// HyperIris: hack for DVDLowUnencryptedRead
|
||||
// Medal Of Honor Heroes 2 read this DVD offset for PartitionsInfo
|
||||
// and, PartitionsInfo is not encrypted, let's read it directly.
|
||||
if (!m_pReader->Read(_Offset, _Length, _pBuffer))
|
||||
{
|
||||
return(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer) const
|
||||
@ -255,4 +266,6 @@ CVolumeWiiCrypted::GetSize() const
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
CVolumeWiiCrypted(IBlobReader* _pReader, u64 _VolumeOffset, const unsigned char* _pVolumeKey);
|
||||
~CVolumeWiiCrypted();
|
||||
bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const;
|
||||
bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const;
|
||||
std::string GetUniqueID() const;
|
||||
std::string GetMakerID() const;
|
||||
std::string GetName() const;
|
||||
|
Reference in New Issue
Block a user