Skip to content

Commit

Permalink
Merge pull request #5890 from leoetlino/sd-fixes
Browse files Browse the repository at this point in the history
IOS/SDIO: Small fixes
  • Loading branch information
JosJuice committed Aug 7, 2017
2 parents f64b189 + 9f36499 commit cbe43e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp
Expand Up @@ -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()
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/IOS/SDIO/SDIOSlot0.h
Expand Up @@ -145,8 +145,8 @@ class SDIOSlot0 : public Device

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;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/State.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit cbe43e5

Please sign in to comment.