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.
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.
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.
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.
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.
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.
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).
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.
I think Wikipedia deletionists would love to open up a circle of hell just for video games and related topics because it seems quite hard for a book to be considered notable on Wikipedia but hard for a game not to be. For instance only half of this author's books
are considered notable enough to have Wikipedia pages (and notably not the excellent https://www.amazon.com/If-Then-Simulmatics-Corporation-Inven... but maybe that is just my opinion as a computer nerd who works in the public opinion field... If you notice I try not to say things like "most people think that" because I don't want to be caught with my facts wrong.) but truly obscure games like
seem to not have to fight for notability at all. (Personally I kinda like that one, but I'm a serious weeb and even I'll admit that it is terribly balanced and too grindy)
Given the price of bits these days a single bit flag with 'non notable' would suffice and then they could keep these and allow people to see 'full' or 'just notable'. That should satisfy all parties. Of course there is then also the cost of the bits of the articles themselves but that too would be manageable.
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.
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.
> It's as close to an officially supported Linux distro for Nintendo hardware as we've ever gotten.
To be fair, Linux on the Wii was also quite good: I remember running Debian 5 Lenny on my Wii many years ago, and it seemed to be "just" a different kernel with drivers for the Wii hardware but with the normal userspace / repos. With an USB mouse and keyboard this was even somewhat usable, even with X11 and some lightweight window manager. Of course RAM was quite limited with only 80MB in total, but still. It definitely wasn't as hacky or limited as DSLinux.
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.
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.
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)
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
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.
I'm interested! I'd like to read more about that.
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.
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.
http://www.mrdictionary.net/lemmings/
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
https://problemkaputt.de/gbatek.htm
Which is the equivalent project (also on μCLinux) on an iPod.
https://riscvnews.com/posts/j-core-interview/
https://en.wikipedia.org/wiki/Jill_Lepore
are considered notable enough to have Wikipedia pages (and notably not the excellent https://www.amazon.com/If-Then-Simulmatics-Corporation-Inven... but maybe that is just my opinion as a computer nerd who works in the public opinion field... If you notice I try not to say things like "most people think that" because I don't want to be caught with my facts wrong.) but truly obscure games like
https://en.wikipedia.org/wiki/Code_of_Princess
seem to not have to fight for notability at all. (Personally I kinda like that one, but I'm a serious weeb and even I'll admit that it is terribly balanced and too grindy)
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
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.
It's as close to an officially supported Linux distro for Nintendo hardware as we've ever gotten.
To be fair, Linux on the Wii was also quite good: I remember running Debian 5 Lenny on my Wii many years ago, and it seemed to be "just" a different kernel with drivers for the Wii hardware but with the normal userspace / repos. With an USB mouse and keyboard this was even somewhat usable, even with X11 and some lightweight window manager. Of course RAM was quite limited with only 80MB in total, but still. It definitely wasn't as hacky or limited as DSLinux.
789 KB Linux Without MMU on RISC-V
https://news.ycombinator.com/item?id=37822082
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.
Deleted Comment