Homebrew Adding Local Multiplyer to NDS Game

W3SLAV

Member
OP
Newcomer
Joined
May 18, 2020
Messages
22
Trophies
0
Age
34
XP
160
Country
United States
Hi, I was wondering what the best way to implement local multiplayer into a homebrew ds game would be, thanks.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,282
Country
United Kingdom
Your options are mainly

1) Use a local network and have it do it for you as far as managing IP addresses and whatnot. There is limited ad hoc options using conventional network.
2) Try some kind of DS hosted affair with a lead/host DS also playing.
3) Take a leaf out of the book of DS demo stations and have one DS act as a server while others do what they need. Most power for network calculations in this one if you don't have to do a game at the same time.
4) DS local play uses a kind of custom protocol (usually dubbed nifi) that is basically normal wifi but without headers. Not sure there are any homebrew programs/libraries/documentation for this.

3) and 4) might be combined with some kind of twisted wifime setup or one of the old network adapters (assuming you care to find one and get it installed).

Most homebrew devs I ever saw opted for 1), or skipped local in favour of being a real server somewhere out there in the world (sometimes giving the would be homebrew user the option to make their own). For 1) you can flash up IP address on screen to have others tap it in, though others did broadcast and network scanners.
Ad hoc or indeed local play might be an option to consider today though -- the DS hardware is limited to WEP or no encryption, and was always somewhat fussy about what routers it connected to. I have a mountain of legacy network gear to play with but others have a real problem these days.
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,564
Country
Chile
Wait a minute, but I take it the DS's local wireless comm still hasn't fully been cracked ?*

*As in, still requiring /two/ Flashme'd devices ?
DS, unlike 3DS, has no services exposed to run wireless communications. Everything runs off the (EW)RAM payload and the wireless (NTR) processor. Because of that, the wireless code had to be reverse engineered from the NTR firmware (then used in the SDK for developing games). The NTR firmware has the wifi code, as opposed to NTR ARM7/ARM9 bios which has not. Thus, the open source wifi code used by sgstair is used by default. Even if it's a bit slow, it works through interrupts.

Official NiFi is documented in problemkaputt site, but Homebrew NiFi is different.

So basically:

Wireless from the Firmware: Requires a signed DLP payload. I think somebody created a tool allowing to send unsigned NTR binaries over wireless.

Wireless from NTR mode: Anything works, official or homebrew NiFi
 
Last edited by Coto,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,282
Country
United Kingdom
Wait a minute, but I take it the DS's local wireless comm still hasn't fully been cracked ?*

*As in, still requiring /two/ Flashme'd devices ?
You might be mixing two things up.
Download play is the stuff that flashme (or equivalent) tends to be looked for to handle. This is what allows people to download RSA signed things from the download stations and multiplayer games that send a client out for others* to play (usually cut down but sometimes interesting and unique) versions for. There were some attacks on this for the download station at least ( https://gbatemp.net/threads/haxxstation-ds-download-station-exploit.473648/ ), and technically wifime was a bypass for earlier hardware revisions.

*If you are poking around inside a DS game this part of it is usually another DS file (as in open up in whatever you used to poke around the base game). Typically a file called utility.bin and located in a folder called dwc, or a file with the extension .srl (srl being the internal compiler extension of choice -- http://problemkaputt.de/gbatek-symbolic-debug-info.htm ). Sometimes quite nice to look at, especially if it is a cut down version of the main game and you only want a few art assets, font or an idea of how the main game works. Naturally anything that can be compressed will then be compressed, but such things are known and easily dealt with by the many tools to handle DS compression formats.

nifi is the term most use to describe the custom (in reality a headerless standard 802.11b packet/comms) local communications which things like commercial games, pictochat and whatnot use to allow people to play multiplayer without having to join wifi networks to have them host. Have been able to run hacked ROM, cheats and have custom packets if you could convince it to send one from the point where custom ROMs could be run without restriction beyond whatever the games themselves had for sanity check/anti cheat (and I am not sure I ever saw any for local multiplayer, mostly just pokemon doing wifi and whatever games had for anti cheat/cheat frustration in single player that carried over there).
I am not aware of any nice libraries that people can use for homebrew to do much the same, hence people mostly going for local LAN options where the would be players connect to a router. I have not been following things for a while so someone might have made something in the time since, though I do follow homebrew in general so would like to believe I would have seen more people use it if it was a thing.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    straferz @ straferz: Anybody know why this is happening to my ACWW town...