Samathy from Stories by Samathy on Medium
I recently bought a gorgeous pink Nintendo DSLite with the sole purpose of running DSLinux on it.
When I posted about my success on MastodonÂ , someone helpfully asked â€œHas it have any use tho?â€.
Lets answer that right away: Running Linux on a Nintendo DSLite is at best a few hours entertainment for the masochistic technologist, and at worst a waste of yourÂ time.
Running Linux on a Nintendo DSLite is at best a few hours entertainment for the masochistic technologist, and at worst a waste of yourÂ time.
But, I do rather enjoy running Linux on things that should not be running Linux, or at least attempting to do so. So heres what IÂ did!
- Nintendo DSLite
- SuperCard SD (SlotÂ 2)
- M3DS Real (SlotÂ 1)
- R4 Card (Knockoff, says R4 SDHC Revolution for DS on theÂ card)
DSLinux runs on a bunch of devices, luckily we had some R4 cards and an M3DS Real around the place which are both supported by DSLinux.
I purchased a SuperCard SD from Ebay to provide some extra RAM, which apparently is quite useful, since the DSLite has only 2mB of it on itâ€™s own.The SuperCard SD I bought had 32mB extra RAM bringing the total up to some 34mB,Â wowee.
The first cards I tried were the R4 cards we had.
Theyâ€™re popular and supported by DSLinux. Unfortunately, it seems the ones weâ€™ve got are knockoffs and therefore proved challenging to find firmware for.
I spent a long while searching around the internet and trying various firmwares for R4 cardsâ€Šâ€”â€ŠNone of them I tried did anything except show the Menu? screen onÂ boot.
Finally, finding this post on GBATemp.net from a user with a card that looks exactly the same as mine lead me to give up on the R4 card and move on to the M3DS Real. Although the post did prove usefulÂ later.
It should be noted that the R4 card I had had never been tested anyway, so it might never haveÂ worked.
Another card listed as supported on the DSLinux site, so seemed a good one to try.
We had a Micro-SD Card in the M3Real anyway, with the M3 Sakura firmware on it so it seemed reasonable to just jump inÂ there.
I copied the firmware onto another SD Card (because we didnâ€™t want to loose the data on the original card). It was only 3 folders, SYSTEM, NDS and SKINS in the root of the card. The NDS file containing â€˜gamesâ€™.
In this case, I put the DSLinux files (dslinux.nds, dslinuxm.nds and â€˜linuxâ€™, a folder) into the NDS folder and stuck it in myÂ DSLITE.
After selecting DSLinux from the menu, I got the joy ofâ€¦.a blankÂ screen.
Some forum posts which are the first results when searching the issue on DuckDuckGo suggest that something called DLDI is theÂ issue.
The DSLinux â€˜Running DSLinuxâ€™ does mention patching the â€˜dslinux.ndsâ€™ file with DLDI if the device one is using doesnt support auto-dldi. At the time this was all meaningless jargon to me, since Iâ€™ve never done any Nintendo DS homebrewÂ before.
Turns out, DLDI is a library that allows programs to â€œread and write files on the memory card inserted into one of the systemâ€™s slotsâ€.
Homebrew games must be â€˜patchedâ€™ for whatever device youâ€™re using to allow them to read/write to the storage device.
Most of the links on the DSLinux page to DLDI were broken, but we descovered the new home of DLDI and itâ€™s associated tools to be www.chishm.com/DLDI/Â .
I patched the dslinux.nds file using the linux command line tool and saw no change to the behaviour of the DSLite, still whiteÂ screens.
Upon reading the DSLinux wiki page for devices a little closer, I noticed that the listing for the M3DS Real notes that one should â€˜Use loader V2.7d orÂ V2.8â€™.
What is a loader??
It means the cardâ€™s firmware/menu.
Where do I find it?
On the manufacturerâ€™s website, or, bringing back the post mentioned earlier with the R4 card user on GBATemp.net, one can find lots of firmwareâ€™s for lots of different cards here: http://www.linfoxdomain.com/nintendo/ds/
Under the listing on the above site for â€˜M3/G6 DS Real and M3i Zeroâ€™ one can find a link to firmware versions V2.7d and V2.8 listed as â€˜M3G6_DS_Real_v2.8_E15_EuropeUSAMulti.zipâ€™.
Upon installing this firmware to the SD Card (by copying â€˜SYSTEMâ€™ folder to the root of a FAT32 formatted card, I extracted the DSLinux files again (thus, without the DLDI patching Iâ€™d done earlier) and placed the files â€˜dslinux.nds, â€˜dslinuxm.ndsâ€™ and the folder â€˜linuxâ€™ to an â€˜NDSâ€™ folder, also in the root of the drive.
This is INCORRECT.
Upon loading the dslinux.nds file through the M3DS Real menu it did indeed boot Linux, but dropped me into a single-user mode, with essentially no binaries in the PATH.
This is conducive to the Linux kernel having booted successfully, but not being able to find any userland. Hence the single-user and lack of programs.
Progress atÂ least!
I re-read the DSLinux instructions and caught the clear mention to â€˜Both of these must be extracted to the root directory of the CF or SD card.â€™ when talking about the DSLinuxÂ files.
Upon moving the DSLinux files to the root of the directory and starting â€˜dslinux.ndsâ€™ from the M3DS Real menu I had a working LinuxÂ system!!
Notice the â€˜DLDI compatibleâ€™ that pops up when starting DSLinuxâ€Šâ€”â€ŠThat means that the M3DS Real auto-patches binaries when it runs them.Â Nice.
Probably trying to compile a newer kernel and userspace to start with.
Kernel 2.6, at time of writing, is 2 major versions out ofÂ date.
After that, Iâ€™d like to understand how DSLinux is handling the multiple screens and multiple processors.
The DS has an ARM7 and an ARM9 processor and two screens, which I think are not connected to the same processor, the buttons are split between the chipsÂ too.
Lastly, Iâ€™d like to write something for linux on the DS.
Probably something silly, but Iâ€™d like to give it aÂ try!
Donâ€™t ask me questions about DSLinux, I donâ€™t really know anything more than what Iâ€™ve mentioned here. I just read some Wikiâ€™s, solved some problems and did some searching.
Thanks to the developers of DSLinux and DLDI for making this silliness possible.