Introduction to Nintendo DS Programming (patater.com)

by medbar 57 comments 243 points
Read article View on HN

57 comments

[−] msk-lywenn 36d ago
Great resource! But a lot of it is very old. I recently discovered this open source ds cart[1] and an alternative SDK[2] to devkitPro. Both were used in the development of a demo[3] released at Revision this year.

[1]: https://www.lnh-team.org/

[2]: https://blocksds.skylyrac.net/

[3]: https://www.pouet.net/prod.php?which=105928

[−] spicyjpeg 36d ago
In case anybody here is interested, a few years ago I put together a similar (albeit far less comprehensive) resource on original PlayStation programming [1], exploring the GPU, geometry coprocessor and serial I/O hardware step-by-step with plain C examples. I'm planning to extend it with more examples covering audio and CD-ROM access next, but haven't yet had the chance to do so.

[1]: https://github.com/spicyjpeg/ps1-bare-metal

[−] corysama 36d ago
I’d bet the DS is the most advanced game console where it is still possible for a person to productively program it entirely via the bare metal memory map. As in: using an “SDK” that’s just a C header full of struct and array definitions at magic fixed addresses and no functions at all. Set values and the hardware does stuff.
[−] 5- 36d ago
all of game boy advance and nintendo ds hardware is exhaustively documented in a single text file:

https://problemkaputt.de/gbatek.txt

(but you can replace txt with htm for a fancier version)

this ranges from physical description to compact arm instruction set reference -- you really only need this document (and a way to get your console to run your code!) to program completely from scratch.

i've picked up a dsi because it can load code from an sd card, so only the console, an sd card and a computer is required for programming it, but see https://news.ycombinator.com/item?id=47706877 further down this thread for the case for preferring the gba.

[−] cunidev 36d ago
The Nintendo DS is the platform that taught me programming around 2010, via devkitPro, and it really let me understand a lot about how computers work. It was a rough ecosystem back in the day, but a very exciting one. We had no internet connection at home but I had the docs downloaded and it was surprisingly satisfying to compile on.
[−] kerochord 36d ago
I will always be grateful that my CS Operative Systems course 'lab classes' introduced assembly and computer architecture with assignments around writing programs for the NDS. It was fun to see our childhood consoles run low-level programs written by us.

were about writing a program for the NDS

[−] shmolyneaux 36d ago
If you want an architectural overview of the DS, this is a fantastic overview: https://www.copetti.org/writings/consoles/nintendo-ds/
[−] Jiro 36d ago
This should have a (2008) on it.

There is no reason to use a slot 2 cart nowadays and the state of the art for a slot 1 cart is the DSPico at https://gbatemp.net/threads/dspico-an-open-source-flashcart-... .

[−] stratts 36d ago
Making homebrew for the Nintendo DS was how I got into programming in the first place. Devkitpro was too confusing for me back then, so I used something called PALib, essentially a pretty hacky library built on top to make it "easy".

Nice community at the time though, I made a pong clone where the main selling point was that you could switch between different "themes", and a bunch of people contributed some really nice custom ones to be included.

[−] poffdeluxe 36d ago
Howdy to all the people from #dsdev back in the day!
[−] bashmelek 36d ago
I have an old 3DS. Does anyone know if would these techniques, including the Slot-1 devices, also apply? I would like to try this out.

My only hesitation is the firmware update—-I simply prefer to keep my devices without changes like that.

[−] Gigachad 36d ago
I had a go at setting up the devkitpro stuff and building a demo that I run on my DS. It’s surprisingly easy to do and kinda neat.
[−] voidUpdate 36d ago
This is exactly what I've been looking for recently. Me and my partner have gotten into reshelling and jailbreaking old handhelds, and we both have DSis that we enjoy, and I've been thinking of homebrewing some stuff for us
[−] Razengan 36d ago
It'd be cool to have a new modern retro system that embraces the spirit of the early "computer consoles" like the Commodore 64 while adding all modern conveniences:

• Everybody has the same system (devs need to target only 1 environment)

• Boot straight into a programming environment

• Limited OUTPUT that enhances creativity without the internal limitations that hinder creativity: Like a limited numbers of colors, but no bitplane crap or having to do sprite multiplexing etc

• Online, ungated app store where anybody can publish, like itch.io

• Reasonable upgradability (not so much as to defeat point #1)

[−] dragontamer 36d ago
Note: arm32 / ARMv7 embedded boards produced in the 2020+ era still exist (see SAM9x60).

In case anyone wants to keep the ARM9 assembly/core but also wants modern Linux 6.12 support.

The Nintendo DS was a complete package though: screen, buttons, sound, etc. etc. But I'm still amused at the long term life of embedded programming and how ARM9 cores with ARMv7 assembly still is in production today.

[−] SilentM68 35d ago
Great Info. :)

Learning resources for Nintendo Systems are not, generally, easy to find at least for me.

[−] crims0n 36d ago
Man this brings back memories. The homebrew scene around the DS and PSP was so lively circa 2005/2006, and it solidified my burgeoning interest in programming.
[−] ex-aws-dude 36d ago
Anyone know is there a way to automatically copy over and launch the game on the DS without having to swap cards back and forth?
[−] nimish 36d ago
I remember writing a little screensaver for the NDS. Got me into programming in a way
[−] HelloUsername 36d ago
(2008)
[−] supliminal 36d ago
Next up: getting cheetah running. DS X. Lets go
[−] JohnHaugeland 36d ago
holy shit, how am i the first person in the thanks list? half that list deserves it more than i do, especially dave, liran, and jason

i miss jaeden. i hope he's well

[−] SilentEditor 36d ago
[flagged]