aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Siekierka <kontakt@asie.pl>2023-11-26 20:07:31 +0100
committerGitHub <noreply@github.com>2023-11-26 20:07:31 +0100
commitc84cb174628c5a2e8e6cc0179e16de3eab47864a (patch)
treeee1edc6c2ee6b1ba23d35649a8e7e7816052b3dd /src
parentad7b1a8c614cf82bbe5129c6ef5d740fb9dd1e5d (diff)
DSi_SD: implement command 17, 24 (#1877)
Diffstat (limited to 'src')
-rw-r--r--src/DSi_SD.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DSi_SD.cpp b/src/DSi_SD.cpp
index 5174af3..54f03ce 100644
--- a/src/DSi_SD.cpp
+++ b/src/DSi_SD.cpp
@@ -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;
}
-} \ No newline at end of file
+}