Skip to content

Commit 7ecdec0

Browse files
Fix SD multiblock writes
1 parent f8b4871 commit 7ecdec0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/DSi_SD.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ u32 DSi_SDHost::DataTX(u8* data, u32 len)
389389
{
390390
if (DataFIFO32.IsEmpty())
391391
{
392-
SetIRQ(25);
392+
SetIRQ(25); // SD_STATUS_TX_REQ
393393
DSi.CheckNDMAs(1, Num ? 0x29 : 0x28);
394394
}
395395
return 0;
@@ -722,6 +722,7 @@ void DSi_SDHost::Write(u32 addr, u16 val)
722722
// dunno
723723
case 0x106: return;
724724
case 0x10A: return;
725+
case 0x10C: WriteFIFO32(val); return;
725726
}
726727

727728
Log(LogLevel::Warn, "unknown %s write %08X %04X\n", SD_DESC, addr, val);
@@ -987,8 +988,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
987988
RWAddress <<= 9;
988989
BlockSize = 512;
989990
}
990-
if (cmd == 25)
991-
RWCommand = 25;
991+
RWCommand = cmd;
992992
Host->SendResponse(CSR, true);
993993
RWAddress += WriteBlock(RWAddress);
994994
SetState(0x04);
@@ -1054,6 +1054,7 @@ void DSi_MMCStorage::ContinueTransfer()
10541054
len = ReadBlock(RWAddress);
10551055
break;
10561056

1057+
case 24:
10571058
case 25:
10581059
len = WriteBlock(RWAddress);
10591060
break;

0 commit comments

Comments
 (0)