aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-10-25 18:25:09 +0100
committerArisotura <thetotalworm@gmail.com>2020-10-25 18:25:09 +0100
commitaf0a9e92c414ccf48d7936b51942e1b9b1d127d2 (patch)
tree2f5fc0722d2403bf64bde5b0c89ae97f3b6e91a8
parent9fdc1de6feba27a30ab15cab0be74bac04b797ae (diff)
make unlaunch'd NANDs work
-rw-r--r--src/DSi_SD.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/DSi_SD.cpp b/src/DSi_SD.cpp
index 45a597b..de82edb 100644
--- a/src/DSi_SD.cpp
+++ b/src/DSi_SD.cpp
@@ -778,6 +778,23 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
Host->SendResponse(CSR, true);
return;
+ case 1: // SEND_OP_COND
+ // CHECKME!!
+ // also TODO: it's different for the SD card
+ if (Internal)
+ {
+ param &= ~(1<<30);
+ OCR &= 0xBF000000;
+ OCR |= (param & 0x40FFFFFF);
+ Host->SendResponse(OCR, true);
+ SetState(0x01);
+ }
+ else
+ {
+ printf("CMD1 on SD card!!\n");
+ }
+ return;
+
case 2:
case 10: // get CID
Host->SendResponse(*(u32*)&CID[12], false);
@@ -801,6 +818,11 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
}
return;
+ case 6: // MMC: 'SWITCH'
+ // TODO!
+ Host->SendResponse(CSR, true);
+ return;
+
case 7: // select card (by RCA)
Host->SendResponse(CSR, true);
return;