6 ms·
Introduction to Nintendo DS Programming
- Gigachad 6mo agoI 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.
- msk-lywenn 6mo agoGreat 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/ https://www.lnh-team.org/ [2]: https://blocksds.skylyrac.net/ https://blocksds.skylyrac.net/ [3]: https://www.pouet.net/prod.php?which=105928 https://www.pouet.net/prod.php?which=105928
- extraduder_ire 6mo agoEven the version linked to is out of date. The homepage links to a version of this guide[0] updated as recently as 2024. Still likely not the best place to get started. 0: https://www.patater.com/manual-git/ https://www.patater.com/manual-git/
- NewsaHackO 6mo agoYea, the link really should be switched to this. Has a much more modern feel, hell as I was reading the OP the reason why I opened the comments was to see if someone commented on how dated the UI was.
- medbar 6mo agoI don't have an issue with the style personally. I actually like being able to navigate the whole page without clicking through pages. Looks like the content is the same too? Although that's just a glance comparing random snippets.
- HelloUsername 6mo ago(2008)
- stratts 6mo agoMaking 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.
- voidUpdate 6mo agoThis 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
- SilentEditor 6mo ago[flagged]
- shmolyneaux 6mo agoIf you want an architectural overview of the DS, this is a fantastic overview: https://www.copetti.org/writings/consoles/nintendo-ds/ https://www.copetti.org/writings/consoles/nintendo-ds/
- medbar 6mo agoBookmarked! Awesome, thanks.
- supliminal 6mo agoNext up: getting cheetah running. DS X. Lets go
- spicyjpeg 6mo agoIn 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 https://github.com/spicyjpeg/ps1-bare-metal
- dmitrygr 6mo agoThis is going to be user useful for me in a few weeks as I bring up PalmOS 5 on Playstation One. Thanks.
- corysama 6mo agoI’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.
- gjsman-1000 6mo agoProbably? Everything else onward relies on libraries... Though there were some fits and starts there. The N64 for example is, from what I've heard, heavily library dependent and absolutely brutal to program bare metal (GPU "microcode" that was almost like programmable shaders v0.1); even the GameCube is a significant improvement for that kind of thing.
- mid-kid 6mo agoI'd say the GBA is the sweet spot for this. The DS has you dealing with two cores you need to write a firmware for that have to communicate to do anything useful, a cartridge protocol to fetch any extra code or assets that wouldn't all fit into RAM at runtime, instruction and data caches, an MMU, ... And that's without mentioning some of the more complex peripherals like the touch screen and wifi. All official games used the same firmware for one of the cores, a copy of which is embedded into every single cartridge ROM. There's some homebrew firmwares included in the respective SDKs, but they aren't well documented for standalone use. Granted, all of the above isn't completely impossible, but if you think of how much code you'd need to get a simple demo (button input, sprite moving across the screen), especially for a beginner, the DS requires a nontrivial amount of code and knowledge to get started without an SDK. Meanwhile, you can do something similar in less than 100 lines of ASM/C for GBA.
- wk_end 6mo agoI agree, the GBA is a pleasure to work with. It's just a shame that the poor quality of the (stock) screens, low resolution, and lousy sound hardware make it feel like such a downgrade from the otherwise gnarlier and technically inferior SNES.
- crims0n 6mo agoMan 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.
- kerochord 6mo agoI 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
- jdwithit 6mo agoThat sounds really cool! My CS curriculum had one class where we had to read and write assembly (targeting an emulator for some Motorola chip I don't recall). It was fine but writing something that ran on an actual game console would have REALLY hooked me I'm sure. Instead we got that one little taste of low level development and then went back to writing sort algorithms in Java. This was in the early 2000s fwiw.
- Jiro 6mo agoThis 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-for-the-ds-i.677498/ https://gbatemp.net/threads/dspico-an-open-source-flashcart-... .
- medbar 6mo agoDespite the timestamp, I originally uploaded this a day ago and can no longer edit the title. My bad! I didn’t notice how dated the page was until it was too late. Thanks for the link, I’ve been mulling over getting a DSPico to tinker on my old DS.
- cunidev 6mo agoThe 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.
- medbar 6mo agoJust getting into homebrewing / jailbreaking old handhelds and consoles, and I really do feel like I missed a golden age of hacking that I would have loved. That said, I don't know if the tenacity I had back then would be enough to endure the steeper learning curve. Still, I would have loved to see my own work running on my DS.
- poffdeluxe 6mo agoHowdy to all the people from #dsdev back in the day!
- bashmelek 6mo agoI 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.
- HoppyHaus 6mo ago3DS programming is even easier! * Run through https://3ds.hacks.guide/ https://3ds.hacks.guide/ * Set up devkitpro: https://devkitpro.org/wiki/Getting_Started https://devkitpro.org/wiki/Getting_Started * Probably start from an example here: https://github.com/devkitpro/3ds-examples https://github.com/devkitpro/3ds-examples * Then you don't even need to transfer your built file, 3dslink can boot it over the network: https://github.com/devkitPro/3ds-hbmenu?tab=readme-ov-file#netloader https://github.com/devkitPro/3ds-hbmenu?tab=readme-ov-file#n...
- TuxSH 6mo agoYou can of course run DS (and GBA) software on 3DS. > My only hesitation is the firmware update If you "hack" your 3DS you will not have to worry about sysupdates anymore. It is slightly more straightforward to do so if your system version is <= 11.14, and quite trivial if <= 11.3. As for homebrew dev on 3DS, you have a lot more RAM and a "proper" CPU with somewhat modern CPU concepts (an actual OS, virtual memory, caches, multicore). Unlike the DS and GBA, the 3DS has an actual GPU (well, kinda, it doesn't have programmable fragment shaders), which was designed around a custom flavor of OpenGL ES and it shows; citro3d is a shim, other than stateful state tracking and mem allocation, it mostly exposes the GPU hw as-is. Overall, I think it is easier for people to get started with 3DS homebrew development and that it provides more transferable skills (w/r/t OpenGL-like APIs). Disclaimer: I'm the lead maintainer of Luma3DS, am a core maintainer of libctru, and wrote significant parts of the exploit chains the guide uses. Feel free to ask around.
- seabass-labrax 6mo agoLuma3DS and the community around it is excellent; thank you TuxSH! Your community provides better software and better support than Nintendo does with all their trillion-Yen revenue available to them; you deserve to be proud of that achievement.
- ex-aws-dude 6mo agoAnyone know is there a way to automatically copy over and launch the game on the DS without having to swap cards back and forth?
- msk-lywenn 6mo agoOver wifi. But you have to setup your app to get back to the launcher. And also when it crashes. Or just restart it
- Razengan 6mo agoIt'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)
- Uncorrelated 6mo agoSeems like you’re describing something like Pico-8: https://www.lexaloffle.com/pico-8.php https://www.lexaloffle.com/pico-8.php There are also open-source versions of the concept, like TIC-80. The only thing missing is upgradability.
- deleted 6mo ago[deleted]
- snvzz 6mo agoSoftware-only fantasy consoles are an interesting concept, covered by a sister comment. There are also hardware-based efforts, like BoxLambda[0], Agon[1], MEGA65[2], Uzebox[3], F256[4]. 0. https://epsilon537.github.io/boxlambda/ https://epsilon537.github.io/boxlambda/ 1. https://www.thebyteattic.com/p/agon.html https://www.thebyteattic.com/p/agon.html 2. https://mega65.org/ https://mega65.org/ 3. https://uzebox.org/ https://uzebox.org/ 4. https://wildbitscomputing.com/ https://wildbitscomputing.com/
- dragontamer 6mo agoNote: 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.
- ConfuSomu 6mo agoIndeed, and for more clarification, as Arm's naming scheme easily causes confusion : ARMv7 and ARMv4, used by the ARM7TDMI processor core in the GBA, NDS and 3DS, are not the same instruction sets. You can indeed find processor cores in recent microcontrollers/SoCs implementing Armv7 or Armv7-M. The SAM9x60 has an ARM926 core, which implements the Armv5TEJ instruction set, similar to the DS' ARMv5TE instruction set implemented by its ARM946 core. The former has Jazelle while the latter doesn't. See https://en.wikipedia.org/wiki/ARM7#ARM7TDMI https://en.wikipedia.org/wiki/ARM7#ARM7TDMI and https://onlinedocs.microchip.com/oxy/GUID-B822915F-C375-4172-91BD-AB6F326EB783-en-US-1/GUID-18DFE37F-F488-4BE7-9CEF-E083646FB79F.html https://onlinedocs.microchip.com/oxy/GUID-B822915F-C375-4172...
- Dwedit 6mo agoARMv7 and ARM7 look very similar, but ARM7 is ARMv3, and ARM9 is ARMv4. Similar names are very misleading here.
- nimish 6mo agoI remember writing a little screensaver for the NDS. Got me into programming in a way
- 5- 6mo agoall of game boy advance and nintendo ds hardware is exhaustively documented in a single text file: https://problemkaputt.de/gbatek.txt 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 https://news.ycombinator.com/item?id=47706877 further down this thread for the case for preferring the gba.
- medbar 6mo agoWhoah, this is great! Thanks for sharing
- JohnHaugeland 6mo agoholy 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
- SilentM68 6mo agoGreat Info. :) Learning resources for Nintendo Systems are not, generally, easy to find at least for me.