diff options
| author | Tom Boshoven <tomboshoven@gmail.com> | 2017-08-05 19:55:08 +0200 |
|---|---|---|
| committer | Tom Boshoven <tomboshoven@gmail.com> | 2017-08-05 19:55:08 +0200 |
| commit | 10c615d7db3dca26d0237a890dfc99f585e698fe (patch) | |
| tree | e65995017723ff2cd2c5e9bfa09279475057f1fd /Source | |
| parent | b29c8c1a63e8a26a8f59243f87aa6977cdb878d0 (diff) | |
Added proper SDHC initialization to protocol v2.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/Core/IOS/SDIO/SDIOSlot0.h | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp b/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp index d0634dce70..d75135d5b9 100644 --- a/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp +++ b/Source/Core/Core/IOS/SDIO/SDIOSlot0.cpp @@ -215,8 +215,7 @@ s32 SDIOSlot0::ExecuteCommand(const Request& request, u32 _BufferIn, u32 _Buffer // If the card can operate on the supplied voltage, the response echoes back the supply // voltage and the check pattern that were set in the command argument. // This command is used to differentiate between protocol v1 and v2. - m_protocol = SDProtocol::V2; - m_status |= CARD_INITIALIZED; + InitSDHC(); Memory::Write_U32(req.arg, _BufferOut); break; @@ -449,7 +448,8 @@ IPCCommandResult SDIOSlot0::GetStatus(const IOCtlRequest& request) // Others will work if they are manually initialized (SEND_IF_COND) if (m_sdhc_supported) { - m_status |= CARD_INITIALIZED; + // All of the initialization is done internally by IOS, so we get to skip some steps. + InitSDHC(); } m_status |= CARD_SDHC; } @@ -645,6 +645,12 @@ u64 SDIOSlot0::GetAddressFromRequest(u32 arg) const return address; } +void SDIOSlot0::InitSDHC() +{ + m_protocol = SDProtocol::V2; + m_status |= CARD_INITIALIZED; +} + } // namespace Device } // namespace HLE } // namespace IOS diff --git a/Source/Core/Core/IOS/SDIO/SDIOSlot0.h b/Source/Core/Core/IOS/SDIO/SDIOSlot0.h index a219c19673..6f0f0255c6 100644 --- a/Source/Core/Core/IOS/SDIO/SDIOSlot0.h +++ b/Source/Core/Core/IOS/SDIO/SDIOSlot0.h @@ -147,6 +147,7 @@ private: std::array<u32, 4> GetCSDv1(); std::array<u32, 4> GetCSDv2(); + void InitSDHC(); u64 GetAddressFromRequest(u32 arg) const; |
