DSi_SD: implement command 17, 24 (#1877)

This commit is contained in:
Adrian Siekierka 2023-11-26 20:07:31 +01:00 committed by GitHub
parent ad7b1a8c61
commit c84cb17462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -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;
}
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,6 +976,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
RWAddress <<= 9;
BlockSize = 512;
}
if (cmd == 25)
RWCommand = 25;
Host->SendResponse(CSR, true);
RWAddress += WriteBlock(RWAddress);