In May of this year (2010) I wanted to create a USB HDR camera controller allowing me to shoot more then three bracketed shots quickly and in one set (most DSLRs only allow you to bracket up to three photos in one set). There is a open source project already out there to do this, the Open Camera Controller (OCC), this project uses a Nintendo DS or Nintendo DS Lite and a simple arduino interface cartridge to fire the remote shutter release on your camera. This project has a really nice software interface, the only limitation is that most camera do not allow faster then 1/20 sec remote shutter release exposure times in bulb mode. You also have to account for the frames per second rating of the camera and memory card speed. So I wanted to switch to PTP/MTP USB control of the camera which can use the camera to the full extent of it’s capabilities but is much more complicated to implement. I figured the best way to do this would be to try and add USB host capabilities to the Nintendo DS through an expansion card which would allow the possibly of adding USB control to the OCC project.
The first step was to figure out how the Nintendo DS (NDS) talks to the Slot-2 Game Boy Advanced (GBA) cartridge slot. In the OCC project the NDS talks to the arduino by toggling one data line (pin-3 WR#) on the GBA SLOT-2 that is used to fire off the rumble motor in a rumble cartridge. This allows the NDS to tell the OCC arduino to start and stop capture but will not work for the more complex data communication needed for USB control. I started by learning how to compile code to run on the DS, then figuring out the code needed to talk to the GBA slot, reversed engineered the DMA the NDS uses to talk to the GBA slot, and finally wrote logic for a CPLD to convert the GBA SLOT-2 DMA interface into FTDI PFIFO interface used on the FTDI vinculum USB host controller.