From dee79c719ed92c7b3b98e07d3d4ae4627340db04 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 19 Apr 2009 19:26:45 +0000 Subject: [PATCH] defined the rest of the wii sd commands which libogc actually uses git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3012 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp | 10 ++++----- .../IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.h | 22 ++++++++++++++++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp index cb45a8bbf7..4e212cadbe 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp @@ -141,7 +141,7 @@ bool CWII_IPC_HLE_Device_sdio_slot0::IOCtlV(u32 _CommandAddress) u32 Cmd = Memory::Read_U32(_CommandAddress + 0xC); switch (Cmd) { - case IOCTL_SENDCMD: + case IOCTLV_SENDCMD: ERROR_LOG(WII_IPC_SD, "IOCTLV_SENDCMD"); break; @@ -179,9 +179,6 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS switch (req.command) { - case APP_CMD1: - break; - case SELECT_CARD: //return R1b break; @@ -191,7 +188,10 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS break; case APP_CMD_NEXT: - //indicates that next cmd doesn't adhere to standards + // Next cmd is going to be ACMD_* + break; + + case ACMD_SETBUSWIDTH: break; default: diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.h index 5ab5160871..b045ef179d 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.h @@ -42,6 +42,7 @@ private: SDIO_BASE = 0x8d070000, }; + // IOCtl enum { IOCTL_WRITEHCREG = 0x01, @@ -60,18 +61,37 @@ private: IOCTL_WRITEDATA = 0x0E, }; + // IOCtlV + enum + { + IOCTLV_SENDCMD = 0x07, + }; + + // Status enum { CARD_INSERTED = 1, CARD_INITIALIZED = 0x10000, }; + // Commands enum { - APP_CMD1 = 0x06, + GO_IDLE_STATE = 0x00, + ALL_SEND_CID = 0x02, + SEND_RELATIVE_ADDR = 0x03, SELECT_CARD = 0x07, + SEND_IF_COND = 0x08, + SEND_CSD = 0x09, + SEND_STATUS = 0x0D, SET_BLOCKLEN = 0x10, + READ_MULTIPLE_BLOCK = 0x12, + WRITE_MULTIPLE_BLOCK= 0x19, APP_CMD_NEXT = 0x37, + + ACMD_SETBUSWIDTH = 0x06, + ACMD_SENDOPCOND = 0x29, + ACMD_SENDSCR = 0x33, }; u32 m_status;