DSi_SD: implement command 17, 24 (#1877)
This commit is contained in:
parent
ad7b1a8c61
commit
c84cb17462
|
@ -951,6 +951,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
|
|||
Host->SendResponse(CSR, true);
|
||||
return;
|
||||
|
||||
case 17: // read single block
|
||||
case 18: // read multiple blocks
|
||||
//printf("READ_MULTIPLE_BLOCKS addr=%08X size=%08X\n", param, BlockSize);
|
||||
RWAddress = param;
|
||||
|
@ -959,12 +960,14 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
|
|||
RWAddress <<= 9;
|
||||
BlockSize = 512;
|
||||
}
|
||||
RWCommand = 18;
|
||||
if (cmd == 18)
|
||||
RWCommand = 18;
|
||||
Host->SendResponse(CSR, true);
|
||||
RWAddress += ReadBlock(RWAddress);
|
||||
SetState(0x05);
|
||||
return;
|
||||
|
||||
case 24: // write single block
|
||||
case 25: // write multiple blocks
|
||||
//printf("WRITE_MULTIPLE_BLOCKS addr=%08X size=%08X\n", param, BlockSize);
|
||||
RWAddress = param;
|
||||
|
@ -973,7 +976,8 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
|
|||
RWAddress <<= 9;
|
||||
BlockSize = 512;
|
||||
}
|
||||
RWCommand = 25;
|
||||
if (cmd == 25)
|
||||
RWCommand = 25;
|
||||
Host->SendResponse(CSR, true);
|
||||
RWAddress += WriteBlock(RWAddress);
|
||||
SetState(0x04);
|
||||
|
@ -1098,4 +1102,4 @@ u32 DSi_MMCStorage::WriteBlock(u64 addr)
|
|||
return len;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue