fix more bugs, get further

This commit is contained in:
Arisotura 2019-06-19 15:26:38 +02:00
parent 78b28f6a5c
commit 6e5879f8bb
2 changed files with 5 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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: // ??