Nintendo DS homebrew: Difference between revisions
Line 123: | Line 123: | ||
*[http://moonbooks.net/ The Moon Books Project] Website dedicated to making classic literature and films available on the Nintendo DS |
*[http://moonbooks.net/ The Moon Books Project] Website dedicated to making classic literature and films available on the Nintendo DS |
||
*[http://www.dsfanboy.com/2008/05/20/ds-fanboys-semi-ultimate-homebrew-guide/ How-to guide: setting up some of the most popular Slot-1 carts] |
*[http://www.dsfanboy.com/2008/05/20/ds-fanboys-semi-ultimate-homebrew-guide/ How-to guide: setting up some of the most popular Slot-1 carts] |
||
* [http://www.depot4u.com M3DS Real Wholesale] |
|||
[[Category:Nintendo DS homebrew| ]] |
[[Category:Nintendo DS homebrew| ]] |
||
[[Category:Video game development]] |
[[Category:Video game development]] |
Revision as of 08:22, 29 July 2008
Nintendo DS homebrew is software written for the Nintendo DS handheld games console by hobbyist programmers, as opposed to a software/game production company. Software is typically written using unofficial development kits and is used on the DS via third-party rewritable game cartridges. However, homebrewing retains a dubious status since the rewritable cartridges required to run homebrew software could potentially also be used for software piracy .
Storage devices
Since the Nintendo DS is not sold with a storage medium, a third-party storage solution is required to store homebrew.
SLOT-1 and SLOT-2 devices
The earliest solutions for homebrew employed a storage device in the GBA cartridge slot (referred to as "SLOT-2") and a booting tool in the DS cartridge slot (referred to as "SLOT-1"). These two-tool combinations are commonly referred to as "SLOT-2" or "1st Generation" devices. Later on, cards that only utilized the DS slot to store and run homebrew software were developed. These devices are referred to as "SLOT-1" or "2nd Generation" cards.
There are a few main differences between the two technologies used:
- SLOT-1 devices do not require the user to purchase and use a separate booting tool in addition to a storage device.
- Only SLOT-2 devices are capable of running GBA homebrew directly. (Although programs such as "gbaldr" can be used to copy a GBA program from a SLOT-1 card to a Game Boy Advance flash cartridge in SLOT-2.)
- Homebrew compatibility has typically been better on SLOT-2 cards because they have been around longer, and thus supported more. And so, many early programs were written for them specifically. This has changed with increasing adoption of SLOT-1 devices by developers and the introduction of Dynamically Linked Device Interface (DLDI) drivers, which allow a piece of homebrew to be written to work with any DLDI-supporting device. Previously, a FAT library had to be recompiled for each new device, which was time-consuming. However, not all developers have adopted this technology yet, and many programs from before 2007 have since been abandoned and may never be updated.
- SLOT-2 devices sometimes contain extra RAM (similar to the SLOT-2 RAM expansion cartridge that comes with the Nintendo DS Browser) or rumble capabilities that can be utilized by homebrew or, for the rumble, Nintendo games. However, the serial design of SLOT-1 does not lend itself to being used for RAM or rumble expansion, and therefore SLOT-1 devices do not offer extra RAM or rumble capability. (Separate RAM/rumble expansion packs for SLOT-2 can still be purchased.)
SLOT-2 devices include basic GBA flash cartridges, the GBA Movie Player and the related M3 Perfect, the Max Media Dock, and the SuperCard.
SLOT-1 devices include the related DSTT, YushenDS Card, R4DS, M3 DS Simply, and their clones, MK5, SuperCard DS One, CycloDS Evolution, the AceKard, the DS Link, the DS-Xtreme, the NinjaPass X9, EZ-Flash V, the Datel Games n' Music, the TTDS (TopToyDS), M3DS and G6 Real.
Each one of the available solutions for Game Boy Advance or Nintendo DS emulation differ mainly in size, compatibility with commercial ROM images, bundled special features (such as included media players), availability, and cost. To store homebrew, all flash cards will utilize either built-in flash memory or will use external flash memory cards, like microSD or CompactFlash. Due to the way Nintendo states the capacity of their official game carts, internal memory capacity is measured in bits, while external cards will use bytes. To know how much internal memory a bit card has in bytes, one has to divide the capacity by eight. For example, the "256 Mbit" cards popular during the GBA era held 32 mebibytes.
Booting tools
Running DS homebrew using a SLOT-2 storage device requires a booting tool. A booting tool is a device that sends the DS' program counter to an address in the GBA slot, allowing programs to be run from storage there. A booting tool is not required for SLOT-1 devices, nor is a booting tool required to use GBA homebrew on the DS.
FlashMe
One of the most prevalent booting tools is the program FlashMe. This is a modified firmware for the DS. Once it is installed over the existing firmware on the DS, homebrew applications can be booted directly from SLOT-2. In addition to being a booting tool, it also protects the DS from trojan horse programs and removes the RSA check on DS Download Play, allowing the user to use WifiME (Wireless Multi Boot) to download homebrew applications. Optionally, it can disable the health and safety warning shown when the device is powered on. Many users of SLOT-1 devices still install FlashMe because of these extra features.
Since the FlashMe installation program is itself a homebrew program, another homebrew booting tool is required for its installation. The other homebrew booting tool is only needed once, at install time, and therefore can either be borrowed for this occasion or sold after use. Upgrades to FlashMe can be booted from the existing FlashMe installation.
NoPass
The other method commonly seen is a device called a NoPass. This is a physical card, sold under brand names such as SuperKey and MAX Media Launcher, that resembles a DS Game Card. The program inside contains instructions that immediately send the program counter to the GBA slot. Some SLOT-1 cards, such as the M3 DS Simply, have this built into their firmware so they can act as a slot 2 booting device; other SLOT-1 cards can run a program stored on the card to jump to SLOT-2 in the same way.
Older methods
Before the encryption on SLOT-1 was reverse-engineered, which allowed the creation of SLOT-1 storage and NoPass devices, booting tools had to exploit flaws in early versions of the Nintendo DS' firmware or in specific games. Booting tools under this category include PassMe, which exploited a flaw in the DS firmware's header check for Game Cards; WiFiMe, which exploited a flaw in the DS firmware's header check for DS Download Play; and PassMe2, which exploited a flaw in the DS BIOS. Some PassMe and PassMe2 devices came with a serial port for some homebrew apps to use. PassMe and WiFiMe worked only with early versions of the DS firmware, causing mild confusion until a method of checking a DS's firmware version involving crashing PictoChat was discovered. But because these methods require a DS with older firmware, must be programmed to work with a specific game, or leave chunky dongles hanging off the back of the DS, these booting tools have seen decreasing popularity as of 2006.
Checking the firmware version[1]
Different firmware versions have different behaviors if a DS Game Card or Game Boy Advance cartridge is ejected during Pictochat. To determine your DS firmware version, follow these steps:
First method:
- Insert an authentic Nintendo DS Game Card into SLOT-1, or a Game Boy Advance cart into SLOT-2, of your Nintendo DS.
- Turn on DS (hold Start if you have autostart enabled in the settings).
- Enter Pictochat.
- Enter any chat room.
- Eject the Game Card or GBA Cart from the DS.
Second method (doesn't work if firmware is v.1):
- Turn on DS (hold Start if you have autostart enabled in the settings).
- Enter Pictochat.
- Enter any chat room.
- Close Nintendo DS and observe color of the screen.
Result:
- v1: Pictochat hangs/no color appears (for the second method)
- v2: two greyish blue screens
- v3: two dark green screens
- v4: two golden yellow screens
- v5: two magenta screens (DS lite units have this, along with a few pink original DSs)
- v6: two dark blue screens
- iQue: two dark green screens

Resulting screen color is bright and obvious. There is no negative effect from the Pictochat crash. As FlashMe is based on the v3 firmware, FlashMe will behave like v3 (two dark green screens). To distinguish, hold ABXY whilst starting up. If both screens turn white, the DS has FlashMe. In later versions of flashme, (V8 onwards) it is based on the V5 firmware and both screens will turn magenta. To distinguish, hold down Start and Select whilst starting up. Some times it's hard to get it to work, there are some applications like dslinux that can actually tell what firmware you are running by the first keys in firmware.
Homebrew utilising expanded RAM
The DS has less RAM and a slower CPU than competing contemporary portable game systems from Sony and GamePark Holdings. This has provided many obstacles that homebrew programmers have found difficult to navigate when developing their projects. The introduction of the Nintendo DS Memory Expansion Pak (included with Nintendo DS Browser) and the recent inclusion of extra RAM in some Slot-2 devices (SuperCard SD/CF/Lite, EZ3-in-1) has allowed programmers to overcome some of these obstacles.
Programming
Homebrew DS applications are generally programmed using C/C++. A popular toolchain is devkitARM. A few libraries that make programming easier include libnds and PAlib. libfat/efslib helps developers write to a FAT file system on the homebrew storage device while DSWiFi allows developers use WiFi on the DS. Several tutorials have been written about the various aspects of the system. fpc4nds is port of FreePascal for cross compile for DS.
One of the biggest issues of programming homebrew on the DS is accessing a card's file system. This is due to each homebrew device using a different interface to access an inserted media card. This has been solved by the introduction of DLDI (Dynamically Linked Disc Interface) drivers, which superseded the use of drivers statically linked into the homebrew application during compilation. The current FAT library, libfat/efslib, is provided with the ability to use these drivers. Its predecessor, GBA NDS FAT, can be modified to use these drivers too.
Popular development packages:
Tools and libraries:
- GBA NDS FAT Library for using the Filesystem (outdated)
- libfat Library for using the Filesystem (successor of GBA NDS FAT)
DLDI
A problem with early DS homebrew was that many programs were not compatible with certain flash cards. Each card requires its own routine to access the storage device (CF/SD/etc). A program compiled before the release of a certain card would not have the required routines to support that card. Additionally, including all of these routines would bloat the program. DLDI (Dynamically Linked Device Interface) solves this issue by removing the access routines from the programs. Instead, a module containing the routines for a given card is patched into the executable by the user using a simple graphical or command-line utility. This ensures forward-compatibility, as the driver for a card can be inserted into any DLDI-compatible program, and prevents bloat by removing support code for other cards from the program.
DLDI patches and patching tools can be found at [DLDI Wiki].
Notable homebrew
Homebrew applications for GBA or DS add many features to the DS. There are many internet related tools like web browsers, instant messengers and email clients. Multimedia programs allow users to enjoy movies, music, ebooks, comics and pictures on the DS. Emulators let people play games designed for another system.
- DSLinux is a port of Linux to the DS. [2]
- GEOS is a GUI initially developed for the Commodore 64.
- MoonShell plays movies and several music formats, views images and text files, and launches other homebrew. [3]
- DSOrganize includes file browser, launcher, web browser, organizer, media player, and other features. [4]
- Eigenmath DS free computer algebra system ported to Nintendo DS
- Woopsi Nintendo DS GUI library
- Colors! is a simplistic digital painting application for Nintendo DS. [5]
References
See also
External links
- DCEmu - NDS DS Homebrew & Emulation News
- History of booting homebrew
- Current and future homebrew booting methods
- Drunken Coders Homebrew blog
- NDS Homebrew Central place for homebrew downloads and reviews
- QJ.NET - Nintendo DS Site devoted to Nintendo DS and homebrew news
- Gbadev Site and forums for GBA and DS homebrew developers
- DS Linux Project site for Linux on the NDS
- The Moon Books Project Website dedicated to making classic literature and films available on the Nintendo DS
- How-to guide: setting up some of the most popular Slot-1 carts