Bafio's Nintendo DS projects

This  page contains information about my NDS development.
This site is now hosted on Thanks, dovoto!

NEW! WiFi chat 0.99 beta (2006.05.04)
and source code


- UPDATED to the new wifi lib, WEP and DHCP are now in!

The source code of both the server and client is now available here. The code is actually quite ugly, it has been a testbed for me to learn and some things are not done properly.
Among the others there are 2 things that would need fixing right now:
1) Make the receiving of messages independent from the draw loop, I was thinking using a timer, so that messages can be received also when into the menues
2) Fix concurent send and receive of messages, one possibility would be using two different ports. Also, a better method for ACK would be nice. Relative changes would be needed in the server as well.
TCP could me much easyer to use for this, but this would require a complete redesign of the protocol.

I really appriciate contributions to the project (if well tested first).

NOTICE: All communications are public and are even published to a web page when it works ;).

Don't share any personal information using this program, as anybody will be able to see the messages!

First you will need either:
Online (Firmware) settings from an online game. Now DHCP and WEP are supported, so nothing more should be needed.
Try also to read the "connection settings" part down here.
The program is based on the wifi lib by Sgstair, uses UDP to send the massages you draw on your DS to the other connected users.
I will write more documentation later on.

For more info see changes down here.

Some random info:
Press X to change from 1 message to 4 messages view, changable font for the drawings (from the settings); Changable skins (simple JPG images, located in the /skins folder).


  • wifichat.nds - Version 0.99 Beta .NDS
  • wifichat.nds.gba - Version 0.99 Beta .NDS.GBA
  • - Version 0.91 Beta - The source is not really refined :) but I hope it can be useful. I appriciate contributions and improvements.
  • - Vesion 0.64 - The java program that handles all.

  • You don't really need a server, since you can connect to the default one (kindly hosted by Sgstair :). This server is still pre beta so use it at your own risk.
    I will not offer much support on it right now, as I know it has some bugs.
    If you really want to run it, you will need: Java 1.5 and port 9999 forwarded and open in the machine running the server, plus some options that are briefly explained in the commandline. To execute open a command prompt (shell) and run java -jar chatserver.jar
  • If you really want the server:chatserver.jar - Version 0.64
Connection setting:

Here is a little bit of troubleshooting for the connection. The next version of the wifi library should make things much easyer...  and it did :)
So, the program uses the conection settings from any ds online game (Mario Kart for example). Once set up in the official game, it should be ready to go.


Version 0.99
* Updated to the latest wifi lib (0.3) from Sgstair: than means:
   - WEP and DHCP are available! (WIFI settings from the firmware  and DNS are now Sgstair's

Version 0.9
* New default skin, designed by Rat (Ben) of Drunken Coders
* New keyboard with support for all the keys, shift and caps.
* Multiple messages view (press X to change from 1 message to 4 messages view)
* Menus (back to bootloader, turn off the ds...)
* Settings (change nickname)
* Changable font for the drawings
* Changable skins (simple JPG images, located in the /skins folder)
** fix some bugs still present in the server
** Update to the new Wifi library (when out). That will add support for WEP, etc.
* Saving and loading messages from the CF
* Save settings on server and/or on the CF
* Possibly colors and TCP version... not in the near future though

Version 0.836 beta
Fixed connection settings from disk.
Version 0.835 beta
Updated the fat libraries to the last version of Moonshell's version. Small changes hoping to make it more compatible with M3,
Version 0.83 beta
Updated to the latest version of libfb. Better font display, some small changes here and there, code cleanups.  Clock added.
The server now creates a paginated archive of the messages, so I suggest to update the server too. Some other small changes I can't remember.
Added a simpe ip filter to abn (temporary) abusive users.
Light blinks when wifi is enabled. Also, when the screens are not lit, a sound announces new messages (if you press X on the top right corner) (this was undocumented).

Version 0.81 beta
Improvements to the touch screen code. You can now select sensibility to the touch using the "rainbow" bar. The sensitivity is displayed in the status info (top screen). Also, "jumps" are ignored.
Fixed issue with more than 6 users :)
Up to 80 messages in the log. You can also use left and right to scroll messages.

Version 0.8 beta
Too many changes to remember, but among the others:
* DNS client working.
* It's now possible to connect using both wifi settings from wifitransfer and the firmware settings
* The server has option to upload a message log to an FTP server, locally serve them or save them to a local directory. HTML files are automatically generated (still in devel.)
* Touch screen code takes into account the pressure of the pen
* Keyboard (yes, I know it's not so good)
* Status
* User list (limited to 18 users now)

* too much :) but probably:
user list, receiving messages in menu, more menu, user settings, webcam (not on DS I'm afraid)...
* The chat uses your user name from the personal settings. Only latin characters are supported now, so you will have problems publishing your messages, and possibly connecting, if your name uses foreign characters or symbols.
* The servers have some problems updating the message list
* Very rarely the applications seems to freeze. I still have to figure out why this happens, but I'll invastigate. You can just restart the app it this happens.


* Uses Sgstair wifi library: - 0.3
* Uses the GBA MP Compact Flash Driver by chrism
* Fat library modifications from Moonshell:
* Uses Libfb by DragonMinded:
* Uses zlib
* Uses Jpeg lib by Burton Radons ported by Headspin
* Created with DEVKITPRO
* Logo from  and skin design by Rat (Ben) of Drunken Coders
* Thanks to all the homebrew community for the support

Updated! WiFi file transfer program 1.0 RC (28/2/2006)

This is my first NDS app. It allows you to transfer a file from a computer server (the server application is written in java) to the DS and execute the application straight away. New, now with source code!!!
This has been tested only on the GBAMP, but it should work on some flashcards and M3 too (it's using Chrism's CF driver).

  • 1.0RC New FAT library from moonshell; new connection method, new Wifi library with fixes (the same used for dschat). Includes source code (for the server the source code is in the JAR file).
  • Older releases: v 0.1 | v 0.2 |v 0.3|v 0.4|v 0.5|v 0.6|
  • v 0.8 |v 0.9 |
Version 1.0 RC

there are some notable changes here:

* a new connection method, which uses both the wifi settings from the
firmware and from the file. This version has been fixed so also the
disk configuration works fine. It should solve problems on connection
seen in previous version.
* the latest FAT library from Moonshell is used, this should make it
compatible with more hardware.
* The updated source code of the server and of wific2 is included.
This includes a set of generic utilities that could be useful to
other projects as well.

Version 0.98b

This version has no real changes to the application itself, but is now
using the Fat library from Sata, that should provide access to scsd and
m3sd users as well.

A WARNING: I have tried it myself on GBAMP nad seems to work fine there,
but I can't say anything about the results on the other cards, so I
suggest making a backup copy (at least) of the contents before using it.
Wific2 has not been updated jet...

Version 0.98 RC
This version includes java 1.4 support (not tested, but it should work).
Run TransferServerJ14.jar if you can't get java 1.5 (which is the
preferred way though). Some more modifications to the protocol, this
should still improve the transfer. Probably next version will be the
last for some time (TCP will probably make this program obsolete anyway)
so I will include compiled versions for SCSD and whatever else I find
for file system support.
Use this version of the server with the new chat program to see some
hidden features :)
Version 0.96 RC
Small changes in the server and client:
* When there is packet loss, the server increments the delay in
(number of lost packets)/10. This should fix the situation faster.
* Bug fix: The client asks for the lost packets also at the end of the transfer
instead of returning ack. This should solve many transfer errors.
+ Other small changes.
Version 0.95 RC
More big news!
This time it should work MUCH better for real.
* The server has been rewritten completely, there
were some serious flows and a stupid bug that made
the recovery from errors useless.
Plus the server now can handle multiple clients...
* Basic DNS. You can type a normal address as destination IP, so
you can (not tested) connect to a remote server.
Type the address and press list.
* Many many bug fixes, and added recovery code for bad situations
like timeouts, to avoid that the application freeze.Still can happen at times,
but should be rare.
* Some more bug fixes I can't remember...
Version 0.9 RC
Big news:
* The *source code* is distributed
- The paths are all relative to the directory and Sgstair's lib
is included so it should be easy to compile. All you need is
the latest DevKitPro
NOTE: No spaces in the path to the source...
* New app, wific2, (execute for GBAMP only) downloads and executes the file named test.nds
from the server, without all the setting screen (using the ones saved
from wific), for fast testing during development
* Some important bug fixes:
- The discovery code was wrong, this time server discovery sould work
- The settings sometimes were not put in the wifi, so you could not
(at times) interact with the server. So the 'I can't get the list of
file' bug (at least in some occasions)
* Poversaving
- close the DS goes in standby
- you can turn off the upper screen by pressing select at the main menu
* The java server now has commandline:
java -jar server.jar [directory] [-port portNumber] [-delay sendDelay]
Version 0.8
In this version,I changed the protocol again :D and it works a bit more
like the old one so you can slow the transfer down by using the delay bar
if you run into transfer errors.
* FAST! File transfer is now almost as fast as it gets, 84KBs here on my machine!.
* Direct connection,so you don't have to pass all the connection setting screens
* Some other minor changes
Version 0.7
Uses the new 0.2b release of the library. This fixes the send problem there
was before, so:
* modified transmission protocol. Now it should be ok for file transfer even when
there is packet loss! Remember to run also the new version of the server
* Removed some debug info
* hopefuly fixed some issues that could generate file loss on the CF in certain
NB. You need to use the new version of the server with the new NDS!
Version 0.6
This update is using the new new 0.2a version of Sgstair library fixing
some issues with ARP requests.
new features:
* modified the transmission protocol, it's a little more resitant to errors
* transmissin seems to break less often
* the destionation IP is saved in the config file, with the AP MAC address
* You can set the transmission delay on the server.
Lower mean faster transfers,more errors.
Use a higher delay if you get transfer errors.
* many small changes here and there, like better moving in the list of files,
* (discovered different problems with atutomatic server detection, don't relay
on that)
Version 0.5
This update is using the new 0.2a(bis) version of Sgstair library, so
should create less white screens.
new features:
* list up to 128 files, and scroll the list
Version 0.4a
This update is using the new 0.2a version of Sgstair library, so
it should be more compatible with different AP.
Citing the release notes of the lib:
* Fixed Crash bug in ARP timeout code
* Changed Associacion code to associate faster and more reliably, and codebase
now includes rate spoofing to connect to a wider range of APs "
* On the server, I fixed a stupid bug that would show only 1/2 of the files.
* Again on the server, uses system look and feel.
Also, I cite from the library notes:
** It is important to note that this lib version is a PRERELEASE version. **
** Not all features exist or work correctly necessarily. **
** I will not be providing much in the way of support for this release. **
And please rebemer the "use it at your own risk"...
Version 0.3a
* ! File selection !
* Auto discovery of the server address
* fixed (hopefully) the issues with the flash
cards not supported by the GBAMP driver
(no writing though, so I don't know how useful)
* Some other small bug fixes and cosmetic changes I can't recall
Version 0.2a
new rel. info:
* Fixed file listing (we are getting there)
* New run method in the NDS file
* Reads and saves the config file! no need to
enter all the time the settings, if you have
a different config. Goes to a simple text file

One last suggestion: use Firefox!

You can contact me : [buzurro] [a] gmail com