Merge pull request #5890 from leoetlino/sd-fixes

IOS/SDIO: Small fixes
This commit is contained in:
JosJuice 2017-08-07 17:03:18 +02:00 committed by GitHub
commit cbe43e58a7
3 changed files with 11 additions and 9 deletions

View File

@ -61,6 +61,8 @@ void SDIOSlot0::DoState(PointerWrap& p)
p.Do(m_block_length);
p.Do(m_bus_width);
p.Do(m_registers);
p.Do(m_protocol);
p.Do(m_sdhc_supported);
}
void SDIOSlot0::EventNotify()
@ -501,7 +503,7 @@ u32 SDIOSlot0::GetOCRegister() const
return ocr;
}
std::array<u32, 4> SDIOSlot0::GetCSDv1()
std::array<u32, 4> SDIOSlot0::GetCSDv1() const
{
u64 size = m_card.GetSize();
@ -577,13 +579,13 @@ std::array<u32, 4> SDIOSlot0::GetCSDv1()
constexpr u32 crc = 0;
// Form the csd using the description above
return {
return {{
0x007f003, 0x5b5f8000 | (c_size >> 2), 0x3ffc7f80 | (c_size << 30) | (c_size_mult << 15),
0x07c04001 | (crc << 1),
};
}};
}
std::array<u32, 4> SDIOSlot0::GetCSDv2()
std::array<u32, 4> SDIOSlot0::GetCSDv2() const
{
const u64 size = m_card.GetSize();
@ -632,9 +634,9 @@ std::array<u32, 4> SDIOSlot0::GetCSDv2()
constexpr u32 crc = 0;
// Form the csd using the description above
return {
return {{
0x400e005a, 0x5f590000 | (c_size >> 16), 0x00007f80 | (c_size << 16), 0x0a400001 | (crc << 1),
};
}};
}
u64 SDIOSlot0::GetAddressFromRequest(u32 arg) const

View File

@ -145,8 +145,8 @@ private:
u32 GetOCRegister() const;
std::array<u32, 4> GetCSDv1();
std::array<u32, 4> GetCSDv2();
std::array<u32, 4> GetCSDv1() const;
std::array<u32, 4> GetCSDv2() const;
void InitSDHC();
u64 GetAddressFromRequest(u32 arg) const;

View File

@ -73,7 +73,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
static const u32 STATE_VERSION = 88; // Last changed in PR 5733
static const u32 STATE_VERSION = 89; // Last changed in PR 5890
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,