back
70 comments
I made a few small contributions to this a long time ago. Nice to see that the website is still up!

Probably the most interesting feature of this project was how it handled memory. The DS only has 4mb of ram. And there is no MMU, so swap isn't an option. But the gameboy cartridge port has 32mb of address space mapped to the bus. And there are homebrew/piracy cartridges that fill that space with 32mb of ram. Which is great, except that the DS can only write to the cartridge port on 16-bit aligned addresses. And almost all software will assume that 8-bit aligned writes will work. To make use of the expansion memory the developers ended up creating a patched GCC that would convert any writes to unaligned locations to an appropriate read, 16-bit write, and set of shift operations.

> And there are homebrew/piracy cartridges that fill that space with 32mb of ram.

There's even an official one, the Opera Web Browser came with a second cartridge for the "GBA" slot to add 8 MB of RAM and a MMU: https://en.wikipedia.org/wiki/Nintendo_DS_Browser#Memory_Exp...

(I've long lost the Opera DS cartridge, but the memory expansion is still in my DS Lite as a slot cover)

Huh, does it really have an MMU? I don't remember that when I coded for it back in the day, and wiki seems to be the only one saying that (uncited). It also doesn't make a lot of sense to be at that point in the system as it's so far away from the main bus matrix.

But perhaps my memory is going bad and my Google Fu is worse.

Edit: gbatek doesn't document an MMU in those cards either. https://problemkaputt.de/gbatek.htm#dscartexpansionram

We were pretty proud that we had a graphical browser running under DSLinux a good 6 months before Nintendo released the Opera cart.
Haha! I always wondered as a kid why that was a requirement. The number of times I had to use the Opera browser to get around my restrictive mother, sigh.
Another quirk: It was pretty common to load your homebrew software from a cartridge in the gameboy port. The cartridges would have some combination of ram and flash based storage or CF Card, and you could tell the cartridge to expose the storage or the ram as they were behind some sort of banking scheme. This meant that the storage system was mapped directly to the bus. So to save on ram, programs were run "in place", executing directly from the storage rather than being copied to ram first.
I very fondly remember this project when I was growing up too, and I credit it with sparking my interest in kernel development.

When trying to port some industrial control software to DSLinux, I ran into some bugs around how the SLOB allocator behaved under memory pressure. One of my patches landed upstream, even though SLOB is deprecated now. Still, as a kid starting out in the embedded space, it opened my eyes to the joys of hacking around with homebrew.

Fun fact: a modded DS still powers a large part of my local observatory's equipment.

> Fun fact: a modded DS still powers a large part of my local observatory's equipment.

I'm interested! I'd like to read more about that.

I recently did a deep dive into DS homebrew. Some cool stuff - a Yugioh calculator, mp3 player, port of Doom. In particular, I just love the hardware of the DS Lite or the DsI - it feels great in 2023, and the symmetrical screens are amazing when holding in vertical mode reading an ebook or playing Hotel Dusk. It also has one of the best pieces of software ever for learning Chinese, ‘My Chinese Coach’ - there are additionally two more (at least) homebrew software packages that focus on Chinese, such as DS Zhongwhen.

DS is very underrated - so many great games, and it’s an emulation dream. All without being too powerful, and having ‘realistic’ graphics that just drain battery life.

I was the one who ported DOOM to DS back in high school; we were all in the same DS homebrew IRC channel together. A lot of my now-closest friends worked on the other projects (including the author of DS Linux) -- incidentally we all ended up working for various tech companies in Silicon Valley and ended up reuniting in real life decades later.
That's an awesome anecdote, thank you for your amazing contributions!
Great story, thanks for sharing!
DS Zhongwen, that's a name I didn't heard in a long time! I am its author :-). I also made other stuff, like Knytt Stories DS. Making homebrew for the Nintendo DS was a great experience, as the limitations (and possibilities) of the hardware gave enough space for both creativity and engineering challenges.
Thank you for your work! :)
The most surprising thing to me about DS and Switch homebrew was how approachable they are. For some reason I always imagined building things on them would be wizardry, but it's really not.
I had a dive in to it. The docs and info is pretty accessible, the problem comes from the fact that the hardware itself is inherently pretty confusing. Having to understand all these memory banks and graphics modes, etc.

Was a lot of fun though. It's super cool how easy it is to just download libnds, compile the demos and get them running with a $9 flash cart.

For the record, there are dozens of pieces of homebrew software worth mentioning.
Lemminds DS is my favorite.

http://www.mrdictionary.net/lemmings/

There's also an entire visual novel engine called VNDS[0], with quite a few ports made for it. Afaict most "classic" VNs have ports available for it.

Also if you have a 3DS, check out the TwilightMenu project. It's a DSiMenu clone that can load homebrew titles and the like from the SD card (as well as flashcards).

[0]: https://github.com/BASLQC/vnds

Is there a good source to find DS homebrew/docs on developing for the system?
The Wikipedia article listed on the website was deleted as "non-notable". Here's an archive of it though: https://web.archive.org/web/20170708075915/https://en.wikipe...
Interestingly this one is still up: https://en.wikipedia.org/wiki/IPodLinux

Which is the equivalent project (also on μCLinux) on an iPod.

I remember ...taking my sister's iPod something to install this and then to connect it to my PS3 in order to jailbreak it. My sister was not happy of course, I am not sure whether I was able to reset the iPod to its original state or not.
I don't believe in Hell, but if I did I would suspect it would have a special place for Wikipedia deletionists, somewhere near the people who never return their shopping carts.
What a nice surprise to see this on the HN front page! I was involved with DSLinux for several years. I maintained nightly-ish builds that I hosted on my website. I don't think I ever contributed any code, as my C and system programming skills were still rudimentary at the time, but I did a fair amount of testing and helping people in the community.

I sold my Nintendo DS since then, but I still have somewhere the Supercard that I would use to store and boot Linux, which looks like this: https://wiki.gbatemp.net/wiki/File:SuperCard_CF_V2.jpg

Most of credit for the amazing work that made this possible goes to a few individuals, in particular Malcolm Parsons (pepsiman), Stefan Sperling (who later became an OpenBSD developer), and Amadeus: http://dslinux.org/wiki/ContactingDevelopers.html

It's not exactly the modern equivalent, but owners of a modded Nintendo Switch can dual-boot with a few different Linux images: https://wiki.switchroot.org/

Since it's based on the official (albeit outdated) Tegra drivers, you can run a surprising amount of stuff on it. I got SkiFree working in Box86 and called it a day.

Additionally, the switch is a hop, skip, and a jump away from being the same hardware as a Tegra Shield that the L4T images initially targeted. Like even down to the same exact model of DRAM chips which should have been more of a commodity and a reflection of the manufacturer's vendor relationships.

It's as close to an officially supported Linux distro for Nintendo hardware as we've ever gotten.

Interestingly, based on some of the same uCLinux work as another story on the HN home page right now:

789 KB Linux Without MMU on RISC-V

https://news.ycombinator.com/item?id=37822082

Back in high school, I used to go “war driving” on my bike around my neighborhood with DS Linux running on an M3 cart. Almost forgot this existed; thanks for sharing, this was a fun memory to dig up. I still have my DS and my M3 cart but the SD card with my old build on it is long gone.
I remember being 11 or so and installing this homebrew onto my DS...

I had NO IDEA what Linux was at the time, but DSLinux helped me deepen my interest in computer science.

So, thanks to the creators, and everyone who contributed code.

This was my gateway into Linux! I'm grateful to whoever decided to bundle the BSDgames [0] and Frotz [1] packages, for sparking a lifelong love of text adventure games and interactive fiction. Imagine my surprise as a little kid poking around the bin directory, typing "advent" into the prompt expecting a simple advent calendar application, and instead getting dropped into a whole other world [2]...

[0] https://wiki.linuxquestions.org/wiki/BSD_games

[1] https://davidgriffith.gitlab.io/frotz/

[2] https://en.wikipedia.org/wiki/Colossal_Cave_Adventure

Same as you, but first I played IF games under Winfrotz/ZX Spectrum. Later, I ran Linux with advent/battlestar and such under Frotz for Unix (among trek) and I was hooked.
You played text adventures by typing on a DS touch screen keyboard with a stylus?!
I remember looking into this a couple months back because I wanted to SSH into my server from my DSi, just for the lolz.

I wasn't too invested in it, so when the wifi didn't "just work" I gave up, but I'd still love to get SSH working on that some day.

>DSi

Did DSLinux team ever manage to get it to work on the DSi?

I still have my DSi and it still works, but I remember DSLinux didn't work with it.

I believe most wifi routers have 802.11b support turned off by default these days. Otherwise, ssh should be doable!
also of note is a port of the inferno operating system to the ds, which makes for a rather nice platform.

https://www.gamebrew.org/wiki/Inferno_DS

For some reason Vodaphone wants me to confirm I’m over 18 to view this site
As a heavy Linux user myself, I was wondering what kind of functionality you would gain from running Linux on a DS (aside from the obvious learning experience and “because you can”). I found the FAQ[0] answers this nicely.

Basically, it boils down to anything you can do on the command line within the resource constraints of the DS.

Would love to hear any DSLinux users who would be willing to share stories about cool functionality they were able to achieve.

[0] https://www.dslinux.org/wiki/DSLinuxFAQ.html

I could never run DSLinux, I was in eighth grade and couldn't afford the RAM pack (just used a pirate card for games). But I printed out all of the documentation at the school library and read it until I pretty much new it by heart, and that became my introduction to Linux.

I can't remember if this was before or after I managed to inadvertently install (!?) Knoppix on my sister's school laptop, but my passion for Linux was there well before I had the means to run it myself.

I did a stream about this on twitch. Someone uploaded it to YouTube. Trying to find it

Aha: https://youtu.be/mTo8yb6q4Lw?si=LAchs9gVSHRONxn2

I love the idea of Linux on a Nintendo DS, but the name will cause confusion with this: http://www.damnsmalllinux.org/
In fact, I read it as if SDLinux (the original and only one) was ported to Nintendo DS :-)
Tried it on my New 3DS XL. There is a single .NDS build so starts perfectly with TwilightMenu++ http://dslinux.org/builds/dslinux.nds

The problem is the touch keyboard is unusuable. Most likely because of the NDS v 3DS screen resolution difference, it's impossible to type on it. Took me a couple of minutes to type "root" but never managed to hit Enter :D

Every once and a while I get the urge to run this again and host a webpage from it.. sucks this device lacked a lot of IO and the wifi stack is so weird
I've a few DSi in a drawer somewhere... My first question was whether I can turn them into a k8s cluster