Skip to content

Commit 0d48178

Browse files
committed
NWifi: add compatibility fixes for blocksds dswifi
1 parent 3038481 commit 0d48178

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/DSi_NWifi.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,14 @@ void DSi_NWifi::SendCMD(MMCCommand cmd, u32 param)
686686
}
687687
}
688688
return;
689+
690+
case MMCCommand::SDIO_OpCond:
691+
Host->SendResponse(0x80ffff00, true);
692+
return;
693+
case MMCCommand::GetRCA:
694+
case MMCCommand::Select:
695+
Host->SendResponse(0, true);
696+
return;
689697
}
690698

691699
Log(LogLevel::Warn, "NWIFI: unknown CMD %d %08X\n", cmd, param);
@@ -813,6 +821,9 @@ void DSi_NWifi::BMI_Command()
813821
u32 arg = MB_Read32(0);
814822

815823
Log(LogLevel::Debug, "BMI_EXECUTE %08X %08X\n", entry, arg);
824+
825+
// needs a response value. not checked in firmware, actual value depends on xtensa code...
826+
MB_Write32(4, 0);
816827
}
817828
return;
818829

src/DSi_SD.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ u16 DSi_SDHost::Read(u32 addr)
538538

539539
case 0x01C:
540540
{
541-
u16 ret = (IRQStatus & 0x031D);
541+
u16 ret = (IRQStatus & (0x031D | (Num ? 2 : 0)));
542542

543543
if (!Num)
544544
{
@@ -564,6 +564,7 @@ u16 DSi_SDHost::Read(u32 addr)
564564
case 0x028: return SDOption;
565565

566566
case 0x02C: return 0; // TODO
567+
case 0x02E: return 0; // TODO
567568

568569
case 0x034: return CardIRQCtl;
569570
case 0x036: return CardIRQStatus;

src/DSi_SD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ enum class MMCCommand : u32
4343
GetOCR = 1,
4444
AllGetCID = 2,
4545
GetRCA = 3,
46+
SDIO_OpCond = 5,
4647
Switch = 6,
4748
Select = 7,
4849
SetVoltage = 8,

0 commit comments

Comments
 (0)