views:

3657

answers:

8

I was reading this answer previously and it got me interested in purchasing a Nintendo DS Lite for learning to program embedded devices. Before I go out and splurge on a DS I had a few questions:

  1. Are there any restrictions on what you can program? The post I indicated earlier seemed to say there weren't, but clarification would be nice.

  2. Would I be better off buying an arduino (or similar) and going that route? I like the DS because it already has a lot of hardware built in.

  3. I'm thinking of getting a CycloDS Evo card, is there a better option for homebrew?

  4. What are the best resources to learn about DS development?

Thanks for your time, If you have a DS and program on it, I'd love you hear your opinion, or alternatively if you have a better idea, I'd like to hear it too.

Thanks =]

+3  A: 

Can't say anything about 1,2, or 3. but the resource I use for GBA programming also has DS info:

http://nocash.emubase.de/gbatek.htm (and this is a deep down technical spec document, but I like it for that)

Also: http://www.devkitpro.org/ for the compilers and stuff.

Dre
+4  A: 

I haven't done any programming on the DS, but I have done some development on the GBA (Game Boy Advanced). If what you're looking to do is learn how to program embedded devices, that might be a good option for you (and certainly a cheaper one). There's even a free book you can get online: Programming the Nintendo Gameboy Advanced. I suggest the GBA because, as I've seen, there are a lot more resources online for learning how to program for it. One drawback is that it doesn't have wifi, which means you won't be able to do as many cool things as you would for the DS, but it's certainly a start!

wbowers
+3  A: 
  1. The restrictions are hardware restrictions - there's 4Mb of RAM, the 3D hardware can handle X polys per frame and so on. Aside from that, it's just a bunch of hardware that you can do what you want with. The toolchain supports C/C++ and assembler (ARM).

  2. The variety of hardware is why I like it too. Getting to grips with each piece of the puzzle is what makes the DS a fun - each bit of hardware has it's own set of tricks for getting the most out of it.

  3. Don't have one myself, so I guess just check here. Looks nice though.
    Edit: The only nit I would pick with it is that you'll be swapping the SD card between PC and NDS a lot, whereas a cart with an onboard USB socket would give you slightly faster turnaround.

  4. The best resources are the libnds examples, and then the gbadev forums.

+7  A: 

I've done a little programming on the DS Lite about 1 year ago. The major hardware limitation that I had was working with the WiFi hardware. I found that DS-DS communication was not possible with the homebrew libraries at the time. I am not sure if that has changed. I also found that you could not form an Ad-Hoc connection to another device. I had to connect to an 802.11b network in infrastructure mode and the SSID had to be broadcast.

For developing I used

I don't recommend the Supercard Lite as it required use of the GBA and DS slot of the DS. At the time this was the only option. There are now DS slot only solutions such as the R4. I have a friend who is using the R4 and has pretty good success with it, though I have not used it myself.

Ryan Taylor
Yep, dswifi is still infrastructure-mode only, no ad-hoc. But you *can* just throw raw 802.11 packets around, if you only need to talk to other NDSes.
+2  A: 

I just got a CycloDS Evolution the other day, and I am loving it! DSOrganize is like a mini-OS which adds a bunch of stuff I was wishing the DS came with, like an actual calendar app!

To address Mike F's #3, there is actually an FTP server for DS, which you can use to transfer files to your DS wirelessly. I haven't tried it myself though, since my network uses WPA and the DS only seems to support WEP.

Ryan Fox
+16  A: 
  1. No, there really isn't much of a limitation beyond that of the hardware, and even that can be overcome with enough effort. Quake has been ported to DS, for example, and particle games that utilize both processors have been made. There has also been discussion on how to make higher quality 3D scenes using a double pass renderer. There are multiple resources on the Nintendo DS section of the GBADev forums.

  2. I would say that the DS is an excellent route to embedded systems development; there is a large and active community that is willing to answer questions and give support, and there is so much hardware built straight into the thing. It saves you the time of building a system to test on.

  3. The CycloDS Evolution is a good card and is fairly common, so it shouldn't be difficult - if necessary at all - to make your homebrew compatable with other cards. However, be aware that other popular choices are the M3 line and the R4 line, which are pretty much the same thing. I have a TTDS, and it works well, but not out of the box. I would reccommend the other three mentioned.

  4. As for beginning DS devving, I would reccommend looking at the basic examples found in the examples folder of devkitPro and reading the GBA tutorial TONC, which covers many of the concepts that are used in both GBA and DS development. A more DS oriented tutorial, Patatersoft's Introduction to Nintendo DS Programming, will help beginners get on their way in the DS world. There is also a very comprehensive documentation spec for the GBA and DS known as GBATek.

Cristián Romo
+1  A: 

Honestly, I found the Nintendo DS and the homebrew community while I was attending an Embedded Systems course in college, and I realized the similarities between the ATmega32-based kit I was programming for the class and the hardware-level development of the Nintendo DS via libnds, and I was hooked.

Personally, I've come from a strong C++ background, but being able to walk around with something in my pocket that I've programmed has been a goal of mine since I first got my hands on a TI-83 Plus calculator... I'm now able to realize that goal due to the Nintendo DS.

Anyway, I hope you have as much fun getting into DS development as I have over the past months, and I wish you luck on your endeavors.

Shotgun Ninja
A: 

I have done both, more GBA than DS. I would recommend GBA first then moving up to DS because it doubles the complication. The ezflash V gba sized 3 in 1 is a good card. I have a bootloader for the gba that I wrote to the card using an NDS and a program that I downloaded that I cant remember the name of off hand. Once the bootloader was working a serial cable and lets me debug programs as well as load them into ram. that card also allows you to load into ram on the card and run from there taking advantage of the prefetch buffer and a bigger program. For the NDS I have tried many of the cards. The cyclods is good for day to day use, but for development not so much. I think I liked the Acekard 2 better, or the R4. think about the number of times you pull the card out and pull the sd card out and load it into a computer. Very painful you want a card with an sd card slot you can get at without having to pull the slot0 card out. the cyclods is not it. A very good card though for the NDS. I dont think it works on the NDSi where the acekard 2 does. For both nds and gba you can get your feet wet with simulators like visualboyadvance, they are not completely accurate and very common that programs that work on the simulator will not work on real hardware, programs that work on real hardware will usually work on the simulator though. removing the development card, reprogramming, and replacing is very painful, bootloaders, wifi, or any other way you can avoid that is well worth it.

Arduinos are fun and interesting, the lilypad and the usb to serial thing is the one I recommend, no soldering required and you can start using for not a big investment. I like the armmite pro better, arduino like footprint but arm based (the only lpc I would buy, not an lpc fan right now). And you dont need to buy the serial thing, just a normal usb cable and a jumper (well maybe a paper clip until you solder on a jumper). I just ordered two more and so far my code that erased the as-shipped flash and allowed me to load whatever I want isnt working, gotta go figure that out. I continue to be very pleased with the olimex sam7-h64 and h256 (header board at91sam7s256), as with the avr atmel is very developer friendly with good docs. Sparkfun is a good place to find all of the above in the USA. Sam-ba now has a linux version if you use linux as I do, the windows version had been there for a while, fairly easy to erase and reprogram, much easier than a ds or gba, on par with the arduino or armmite pro or similar.

Formerly luminary micro now ti stellaris has some good boards. like the gba/nds but unlike the other boards I mentioned there are displays and other peripherals to play with, usb is all you need to program. thumb mode only though. GBA prefers thumb mode for performance but can go either way. nds, I dont remember, never got so far as to understand the width of the busses and their timing. Knowing Nintendo and their cheapness thumb is probably better/faster. the lm3s811 eval board was too easy to brick, the 1968 is not a bad one. I dont like that they were pushing developers away from the source and into pre-built libraries tailored to the rtos and specific compiler suite.

dwelch
sorry, wrong the armmite pro does require the little ftdi board for power and serial to usb. even with that still an attractive price.
dwelch