Homebrew code for Nintendo DS

This post contains several libraries and other pieces of code to be used in your own DS homebrew projects.

HTTP Library

I had the idea to make some small tools that interact with the web using HTTP. With the idea in my head I searched the net for usable open source code. I came across libhttp made by M. Miller aka skape (hick.org). The library contains routines to handles the HTTP protocol. It allows your to easily create a HTTP request and to parse the HTTP response. So basically libhttp contains functionality that every web client could use. Therefore I decided to port this library to the DS so it can be easily used in different open source projects. Below is a link to the library including source code and an example.

libhttp-0.2 (Updated to devkitPro r20)

URL parsing code

I have made (well uhm, copied and modified) a simple url parsing routine. It is taken from David Brady’s Nintendo DS Internet Radio Client called Dissonance. I improved it a bit to suit my needs. The routine will not be added to libhttp because it is not http specific. The download below also include an example.

parse_url-0.2 (Updated to devkitPro r20)

I hope to add actual handling of HTTP responses. Redirection, proxy authentication, etc. some time…

SPI Library

This is a simple library that enables you to use the spi interface of the Nintendo DS Slot-1.

Credits for the code go to Ben Jaques. With his permission I took the code from http://masscat.afraid.org/ninds/spiuart.php and modified it into a library that is usable with devkitPro for nds applications.

libspi-0.2 (Updated to devkitPro r20)

Leave a Reply

Your email address will not be published. Required fields are marked *