IOS/WD: Implement more parts of the interface

This commit implements the following commands:

* open
* close
* GetMode
* SetLinkState (used to actually trigger scanning)
* GetLinkState (used to check if the driver is in the expected state)
* GetInfo
* RecvFrame and RecvNotification (stubbed)
* Disassociate (stubbed)

GetInfo was already implemented, but the structure wasn't initialized
correctly so the info was being rejected by official titles.
That has also been fixed in this commit.

Some of the checks may seem unimportant but official titles actually
require WD to return error codes... Failing to do so can cause hangs
and softlocks when DS communications are shut down.

This minimal implementation is enough to satisfy the Mii channel
and all other DS games, except Tales of Graces (https://dolp.in/i11977)
which still softlocks because it probably requires us to actually
feed it frame data.
This commit is contained in:
Léo Lam
2020-11-29 17:44:17 +01:00
parent dcbe81b880
commit 9a87d27612
5 changed files with 403 additions and 35 deletions

View File

@ -74,7 +74,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
constexpr u32 STATE_VERSION = 127; // Last changed in PR 9300 (temp)
constexpr u32 STATE_VERSION = 127; // Last changed in PR 9300
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,