aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-19 15:26:38 +0200
committerArisotura <thetotalworm@gmail.com>2019-06-19 15:26:38 +0200
commit6e5879f8bbf6bf85791b03f36675aa7991ae4771 (patch)
tree210a0f5e196f408220343fc60621dbd5d57fe4ee
parent78b28f6a5cd40c77f63acc0fbd95135c45187e2a (diff)
fix more bugs, get further
-rw-r--r--src/DSi_AES.cpp1
-rw-r--r--src/DSi_SD.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/DSi_AES.cpp b/src/DSi_AES.cpp
index 8271e3e..1ba690f 100644
--- a/src/DSi_AES.cpp
+++ b/src/DSi_AES.cpp
@@ -243,6 +243,7 @@ void WriteInputFIFO(u32 val)
{
Cnt &= ~(1<<31);
if (Cnt & (1<<30)) NDS::SetIRQ2(NDS::IRQ2_DSi_AES);
+ DSi::StopNDMAs(1, 0x2B);
}
}
diff --git a/src/DSi_SD.cpp b/src/DSi_SD.cpp
index 9775ca8..4a7fd2e 100644
--- a/src/DSi_SD.cpp
+++ b/src/DSi_SD.cpp
@@ -477,7 +477,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
Host->SendResponse(*(u32*)&CID[8], false);
Host->SendResponse(*(u32*)&CID[4], false);
Host->SendResponse(*(u32*)&CID[0], true);
- //if (cmd == 2) SetState(0x02);
+ if (cmd == 2) SetState(0x02);
return;
case 3: // get/set RCA
@@ -509,7 +509,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
return;
case 12: // stop operation
- // TODO
+ SetState(0x04);
Host->SendResponse(CSR, true);
return;
@@ -525,6 +525,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
printf("!! SD/MMC: BAD BLOCK LEN %d\n", BlockSize);
BlockSize = 0x200;
}
+ SetState(0x04); // CHECKME
Host->SendResponse(CSR, true);
return;
@@ -535,6 +536,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
Host->SendResponse(CSR, true);
ReadBlock(RWAddress);
RWAddress += BlockSize;
+ SetState(0x05);
return;
case 55: // ??