From ec042000cfa6b529569dccd5611efc5bfd73cd29 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Wed, 3 Jul 2019 00:07:51 +0200 Subject: [PATCH] lay base for DSi wifi --- melonDS.cbp | 2 ++ src/DSi_NWifi.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++ src/DSi_NWifi.h | 39 +++++++++++++++++++++++++++++++++++++ src/DSi_SD.cpp | 5 ++++- 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 src/DSi_NWifi.cpp create mode 100644 src/DSi_NWifi.h diff --git a/melonDS.cbp b/melonDS.cbp index 23460933..2fd6ed0e 100644 --- a/melonDS.cbp +++ b/melonDS.cbp @@ -110,6 +110,8 @@ + + diff --git a/src/DSi_NWifi.cpp b/src/DSi_NWifi.cpp new file mode 100644 index 00000000..4e5d26d8 --- /dev/null +++ b/src/DSi_NWifi.cpp @@ -0,0 +1,49 @@ +/* + Copyright 2016-2019 Arisotura + + This file is part of melonDS. + + melonDS is free software: you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + melonDS is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with melonDS. If not, see http://www.gnu.org/licenses/. +*/ + +#include +#include +#include "DSi.h" +#include "DSi_NWifi.h" + + +DSi_NWifi::DSi_NWifi(DSi_SDHost* host) : DSi_SDDevice(host) +{ + // +} + +DSi_NWifi::~DSi_NWifi() +{ + // +} + + +void DSi_NWifi::SendCMD(u8 cmd, u32 param) +{ + printf("NWIFI: unknown CMD %d %08X\n", cmd, param); +} + +void DSi_NWifi::SendACMD(u8 cmd, u32 param) +{ + printf("NWIFI: unknown ACMD %d %08X\n", cmd, param); +} + +void DSi_NWifi::ContinueTransfer() +{ + // +} diff --git a/src/DSi_NWifi.h b/src/DSi_NWifi.h new file mode 100644 index 00000000..34c3dd40 --- /dev/null +++ b/src/DSi_NWifi.h @@ -0,0 +1,39 @@ +/* + Copyright 2016-2019 Arisotura + + This file is part of melonDS. + + melonDS is free software: you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. + + melonDS is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with melonDS. If not, see http://www.gnu.org/licenses/. +*/ + +#ifndef DSI_NWIFI_H +#define DSI_NWIFI_H + +#include "DSi_SD.h" + +class DSi_NWifi : public DSi_SDDevice +{ +public: + DSi_NWifi(DSi_SDHost* host); + ~DSi_NWifi(); + + void SendCMD(u8 cmd, u32 param); + void SendACMD(u8 cmd, u32 param); + + void ContinueTransfer(); + +private: + // +}; + +#endif // DSI_NWIFI_H diff --git a/src/DSi_SD.cpp b/src/DSi_SD.cpp index 93431b51..6e73df5d 100644 --- a/src/DSi_SD.cpp +++ b/src/DSi_SD.cpp @@ -20,6 +20,7 @@ #include #include "DSi.h" #include "DSi_SD.h" +#include "DSi_NWifi.h" #include "Platform.h" @@ -94,7 +95,9 @@ void DSi_SDHost::Reset() } else { - // TODO: SDIO (wifi) + DSi_NWifi* nwifi = new DSi_NWifi(this); + + Ports[0] = nwifi; } }