Multiplayer/Wifi

Discuss anything about DraStic here.
NTRGamerGames
Posts: 1
Joined: Tue Dec 30, 2014 7:06 am

Multiplayer/Wifi

Post by NTRGamerGames » Tue Dec 30, 2014 7:14 am

Hi I've been playing on this emulator since it came out and I went into settings ages and ages ago and saw a multiplayer button. now when I tap it it says sorry but the emulator does not support multiplayer. and I've always wantedto know why this could not be implemented due to it being a huge and loved feature in pokemon due to mystery gifts and trading pokemon like a graveler or kadabra and such and such. without this it kind of limits your abilities especially if you don't want to cheat them in. please add this and I think more people will get the best out of Drastic.

Howdareme
Posts: 276
Joined: Thu Aug 08, 2013 8:16 am
Location: London, England

Re: Multiplayer/Wifi

Post by Howdareme » Fri Jan 02, 2015 5:53 am

You don't realise how difficult WiFi emulation is, do you.. And the devs have more inportant things to fix/do.

User avatar
kaikun97
Posts: 546
Joined: Thu Dec 26, 2013 11:41 am
Location: England

Re: Multiplayer/Wifi

Post by kaikun97 » Fri Jan 02, 2015 11:31 am

Howdareme wrote:You don't realise how difficult WiFi emulation is, do you.. And the devs have more inportant things to fix/do.
The devs have not even been able to it with a real nintendo ds wifi chipset (emulating it), its very hard

User avatar
huckleberrypie
Posts: 429
Joined: Sat May 31, 2014 4:21 am
Contact:

Re: Multiplayer/Wifi

Post by huckleberrypie » Sat Jan 03, 2015 1:14 am

In other words, it's a long shot. Emulating the rather unusual 3D hardware is one thing, and not even the Desmume devs have perfected wifi emulation either.

User avatar
kaikun97
Posts: 546
Joined: Thu Dec 26, 2013 11:41 am
Location: England

Re: Multiplayer/Wifi

Post by kaikun97 » Sat Jan 03, 2015 4:49 am

huckleberrypie wrote:In other words, it's a long shot. Emulating the rather unusual 3D hardware is one thing, and not even the Desmume devs have perfected wifi emulation either.
Nintendo Hardware is unusual in general, either bad design or they dont want people emulating/modifiying it.

User avatar
beansta
Posts: 374
Joined: Wed Aug 07, 2013 9:39 pm

Re: Multiplayer/Wifi

Post by beansta » Sat Jan 03, 2015 2:34 pm

huckleberrypie wrote:In other words, it's a long shot. Emulating the rather unusual 3D hardware is one thing, and not even the Desmume devs have perfected wifi emulation either.
Thats where u are mistaken. There was an SVN revision in the 3000s od desmume that had working wifi. They soon removed it because of repeated attempts of nintendo to block them. Now that the nintendo wifi servers are closed we could take advantage of the wiimmfi ustom server.
Devices running Android:

- Samsung Galaxy Note 4 (CM12.1, overclocked, undervolted)
- Asus Nexus 7 2013 (Stock Marshmallow...to play Pokemon GO on...)
- Tenfifteen QW09 SmartWatch (Kitkat)
- Fujitsu Lifebook T4410 Touchscreen Laptop (Remix OS 3.0)

Exophase
Posts: 1709
Joined: Mon Aug 05, 2013 9:08 pm

Re: Multiplayer/Wifi

Post by Exophase » Sat Jan 03, 2015 5:03 pm

beansta wrote:Thats where u are mistaken. There was an SVN revision in the 3000s od desmume that had working wifi. They soon removed it because of repeated attempts of nintendo to block them. Now that the nintendo wifi servers are closed we could take advantage of the wiimmfi ustom server.
He probably knows, he just said that emulation wasn't perfected, which I think is probably pretty accurate (I'd say it's still nowhere close).

Nintendo DS's wifi hardware has two use cases and a bunch of different modes to support both. One we'll call "infrastructure", where it's used to connect to some Nintendo server. This is supported by something like a few dozen games. DeSmuME supported this way back when although it was pretty buggy, but I hear it plays a lot better with the custom servers (makes sense since they can willingly optimize both sides for it)

The other mode is where multiple DS's talk to each other in close range, which I've called "NiFi." This mode requires an extremely low latency connection, and uses a lot of hardware features that aren't completely understood. And I don't think DeSmuME's support for this works yet. It was our focus to try to get it to work somehow because of the Nintendo servers closing (but this was before the custom servers), but we haven't been able to get it to do much in emulation, and we couldn't even get a tunnel working with DSes in the same room going over a wired ethernet and shielded DS compatible wifi dongles. I think even if we could get that working we wouldn't be able to emulate it well with a direct connection because the latency requirements are so ridiculously high.

What I think is the best potential path for NiFi emulation is the same that I think is the best method for Gameboy and GBA link emulation: emulate two instances of the DS on one machine and synchronize button presses across the network instead of the NiFi connection (with the NiFi connection emulated locally). This would allow it to be used over the internet to some extent, especially if the use is things like trading Pokemon. But there'd be a large performance overhead emulating two DSes, even where you could get away without emulating video and such on the other one. And it'd require a big rewrite to support this. That, and we still don't really understand the hardware enough to get emulation working.

Getting infrastructure to work so it matches up with DeSmuME's support and can work decently with custom servers is probably a better thing to focus on. That does however mean that patched ROMs need to be used, because they're normally hardcoded to only work with the WFC server (they need the right SSL keys that can't be faked) I think we would need an autopatcher at the very least, and one that requires as little user setup as possible, or we'd be inundated with people asking us how to use it..

But at least the custom servers have some support for Pokemon (presumably for trading?), which is mostly what anyone wants wifi for. At least according to the list here: https://github.com/polaris-/dwc_network ... patibility So that's promising.

User avatar
huckleberrypie
Posts: 429
Joined: Sat May 31, 2014 4:21 am
Contact:

Re: Multiplayer/Wifi

Post by huckleberrypie » Sat Jan 03, 2015 9:36 pm

kaikun97 wrote:
huckleberrypie wrote:In other words, it's a long shot. Emulating the rather unusual 3D hardware is one thing, and not even the Desmume devs have perfected wifi emulation either.
Nintendo Hardware is unusual in general, either bad design or they don't want people emulating/modifiying it.
Tell me about it. Among the eighth-gen consoles, the Wii U is the only PowerPC device in the bunch. There is however some speculation that they are planning to use an AMD-sourced x86 design on a future console.

xperia64
Posts: 174
Joined: Fri Feb 28, 2014 7:41 pm

Re: Multiplayer/Wifi

Post by xperia64 » Sat Jan 03, 2015 9:46 pm

I contributed a bit to AltWFC.
In terms of patching, all that needs to be done is set the DNS to AltWFC and removing the letter 's' from https

There are manual xdelta3 patches here: http://save-nintendo-wifi.com/
and these auto patchers: https://github.com/AdmiralCurtiss/WfcPatcher https://github.com/Prof9/wfcreplay
The former modifies the ROM itself, while the latter generates an action replay code with has the same effect.

I could attempt to add WfcPatcher to my ROM Patcher app, if you think that would be useful.

AltWFC has pretty good compatibility with NDS games, and doesn't restrict itself to approved games like WiimmFi. Games that depend on the SAKI file server like WarioWare D.I.Y. and Jam with the Band also work well.

Side note: we are working on a ban system to protect against cheaters. Once it is implemented, we will likely ban DeSmuME users at least for certain DS games due to compatibility issues and/or non-unique, easily changeable identifiers. The mac addresses and the bssids of the emulated consoles should be made unique and not easily modifiable to prevent abuse of AltWFC if WiFi is ever added to DraStic.

Exophase
Posts: 1709
Joined: Mon Aug 05, 2013 9:08 pm

Re: Multiplayer/Wifi

Post by Exophase » Sun Jan 04, 2015 1:15 am

That's good information to have, thanks xperia64. The ROM patching is a pretty minor issue that I'd only start worrying about much further down the road. I didn't know it was so simple as changing the URL to http, I thought that requiring the https and SSL keys was hardcoded. Maybe this was a testing feature that survived? In this case, it should be possible to patch ROMs by a heuristic.

I have no problem using a uniquely identifiable MAC address for DraStic that can't be changed, although I'm sure that'll make some users angry if it does get banned.

Post Reply