Nintendo DS homebrew
Encyclopedia
Nintendo DS homebrew
Homebrew (video games)
Homebrew is a term frequently applied to video games or other software produced by consumers to target proprietary hardware platforms not typically user-programmable or that use proprietary storage methods...

 software
is unofficial software written for the Nintendo DS
Nintendo DS
The is a portable game console produced by Nintendo, first released on November 21, 2004. A distinctive feature of the system is the presence of two separate LCD screens, the lower of which is a touchscreen, encompassed within a clamshell design, similar to the Game Boy Advance SP...

 by hobbyist programmers, as opposed to software written by a game production company or corporation (using the official development tools from Nintendo
Nintendo
is a multinational corporation located in Kyoto, Japan. Founded on September 23, 1889 by Fusajiro Yamauchi, it produced handmade hanafuda cards. By 1963, the company had tried several small niche businesses, such as a cab company and a love hotel....

). The DS homebrew software is typically used on the DS via third-party rewritable game cartridges, or SD cards.
It is made using libnds
Libnds
libnds, formerly NDSLIB, is a library created by Michael Noland and Jason Rogers and is maintained and updated by Dave Murphy . It is meant to be an open source alternative to Nintendo's commercial SDK for the Nintendo DS handheld game console. It allows programmers that do not have access to the...

 and often using the libfat
Libfat
libfat is a FAT library made by Michael "Chishm" Chisholm for the Nintendo DS to code Nintendo DS Homebrew applications. It is the successor of the dual GBA NDS FAT library, which was also used, like libfat, to code Nintendo DS Homebrew applications...

 FAT library.

The Nintendo DSi
Nintendo DSi
The is a handheld game system created by Nintendo and launched in 2008 and 2009 in Japan, North America, PAL territories, and other regions. It is the third iteration of the Nintendo DS, and its primary market rival is Sony's PlayStation Portable...

 also has homebrew allowed on it. However such homebrew is rare, as Nintendo has put significant effort into blocking 3rd party devices and content from the DSi.

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
Game Boy Advance
The is a 32-bit handheld video game console developed, manufactured, and marketed by Nintendo. It is the successor to the Game Boy Color. It was released in Japan on March 21, 2001; in North America on June 11, 2001; in Australia and Europe on June 22, 2001; and in the People's Republic of China...

 cartridge slot (referred to as "SLOT-2") and a booting tool in the DS
Nintendo DS
The is a portable game console produced by Nintendo, first released on November 21, 2004. A distinctive feature of the system is the presence of two separate LCD screens, the lower of which is a touchscreen, encompassed within a clamshell design, similar to the Game Boy Advance SP...

 cartridge slot (referred to as "SLOT-1"). This two-tool combination is commonly referred to as "SLOT-2" or "1st Generation". Later on, cards that only utilized the DS slot (SLOT-1) to store and run homebrew software were developed. These devices are referred to as "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
    Game Boy Advance flash cartridge
    A Game Boy Advance flash cartridge is one of several cartridges containing flash memory that have been developed for use in the Nintendo Game Boy Advance. These cartridges enable homebrew applications and games to be used on a GBA. The capacity of the cartridges ranges from 64 Mbit up to 8 Gbit...

     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
    Ram
    -Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

     (similar to the SLOT-2 RAM expansion cartridge that comes with the Nintendo DS Browser
    Nintendo DS Browser
    The Nintendo DS Browser is a version of the Opera web browser for use on the Nintendo DS, developed by Opera Software and Nintendo. The Nintendo DS Browser comes in separate versions for the Nintendo DS and the Nintendo DS Lite; this is due to differing physical size requirements for the memory...

    ) 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.) However, somehow a few manufacturer have managed to pack processors in SLOT-1 devices.


SLOT-2 devices include basic GBA flash cartridges
Game Boy Advance flash cartridge
A Game Boy Advance flash cartridge is one of several cartridges containing flash memory that have been developed for use in the Nintendo Game Boy Advance. These cartridges enable homebrew applications and games to be used on a GBA. The capacity of the cartridges ranges from 64 Mbit up to 8 Gbit...

, the GBA Movie Player
GBA Movie Player
The GBA Movie Player, abbreviated GBAMP, is a device that reads CompactFlash or Secure Digital cards to upload data onto the Game Boy Advance. It is compatible with the Game Boy Micro, Game Boy Advance SP, Game Boy Advance, and Nintendo DS as well...

 and the related M3 Perfect, the Max Media Dock, and the SuperCard.

SLOT-1 devices include the DSTT, DS iPlayer, R4DS (Gold), M3 DS Simply, and their clones, R4i, N-Card, MK5, iTouch DS, SuperCard DS One, SuperCard DS One i, SuperCard DS Two, CycloDS Evolution, EDGE DS, iEDGE, the AceKard, Acekard 2, Acekard 2i, the DS Link, the DS-Xtreme, the NinjaPass X9, EZ-Flash V, the Datel Games n' Music, M3 Real, M3i Zero, G6 Real, and DSTTi.

The available solutions for Game Boy Advance or Nintendo DS homebrew differ in size, compatibility with commercial ROM image
ROM image
A ROM image, or ROM file, is a computer file which contains a copy of the data from a read-only memory chip, often from a video game cartridge, a computer's firmware, or from an arcade game's main board...

s, bundled special features (such as included media players), availability, and cost. To store homebrew, all flash cards use either built-in flash memory
Flash memory
Flash memory is a non-volatile computer storage chip that can be electrically erased and reprogrammed. It was developed from EEPROM and must be erased in fairly large blocks before these can be rewritten with new data...

 or external flash memory cards, like microSD or CompactFlash
CompactFlash
CompactFlash is a mass storage device format used in portable electronic devices. Most CompactFlash devices contain flash memory in a standardized enclosure. The format was first specified and produced by SanDisk in 1994...

. Nintendo states the internal memory capacity of their game cartridges in bits, while external cards state capacity in 8-bit bytes.

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' instruction pointer
Program counter
The program counter , commonly called the instruction pointer in Intel x86 microprocessors, and sometimes called the instruction address register, or just part of the instruction sequencer in some computers, is a processor register that indicates where the computer is in its instruction sequence...

 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 popular booting tools is the program FlashMe. This is a modified firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...

 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 the 1 known DS Bricker program 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 and the DSTT, 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
Serial port
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time...

 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 .

Checking the firmware version

In the third quarter of 2005, after SLOT-2 cards first became popular, Nintendo changed the firmware of new DS units to lock out the "PassMe" booting tool, starting with the iQue
IQue
iQue, Limited is a Chinese joint venture with its founder, Wei Yen, and Nintendo. iQue also makes the iQue Player, which was the company's first product...

 DS.
A different, more difficult exploit for the new firmware was discovered a bit later.
In January 2006, the homebrew community found a way to determine the version of firmware installed on a DS, so that the user could determine which exploit to buy.
It involved the behavior of PictoChat if a DS Game Card or Game Boy Advance cartridge is ejected or the lid is closed.
In the first version, PictoChat would freeze; later versions would change both screens to a solid color, with a different color for each firmware version. It is commonly called "The Pink Screen of Death" (not to be confused with The Blue Screen of Death
Blue Screen of Death
To forse a BSOD Open regedit.exe,Then search: HKLM\SYSTEM\CurrentControlSet\services\i8042prt\ParametersThen make a new DWORD called "CrashOnCtrlScroll" And set the value to 1....

 or The Black Screen of Death
Black Screen of Death
The Black Screen of Death is generally a colloquialism used for the black error screen displayed by some operating systems after encountering a critical system error which can cause the system to shut down to prevent damage.-Windows 3.x:...

).

The version results are as follows:
  • v1: Pictochat hangs/no colour appears
  • v2: two greyish blue screens
  • v3/iQue: 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
  • v7: DS system does not crash (Only for the limited edition golden DS Lite in Japan)


Note: the DSi does not crash when ejecting a Slot-1 Card in Pictochat. It uses a completely different firmware that can be updated at will. The version is shown in the Settings applet.

Homebrew utilizing expanded RAM

Many homebrew programmers have encountered difficult to navigate obstacles while developing their projects as a result of the DS's relatively weak CPU and little RAM compared to PCs of the time. The introduction of the Nintendo DS Memory Expansion Pak (included with Nintendo DS Browser
Nintendo DS Browser
The Nintendo DS Browser is a version of the Opera web browser for use on the Nintendo DS, developed by Opera Software and Nintendo. The Nintendo DS Browser comes in separate versions for the Nintendo DS and the Nintendo DS Lite; this is due to differing physical size requirements for the memory...

) and the recent inclusion of extra RAM in some Slot-2 devices (SuperCard SD/CF/Lite, EZ3-in-1), as well as the 1GB of NAND memory in the Acekard RPG, and a GBA slot expansion pack with the M3 Real has allowed programmers to overcome some of these obstacles.

Programming

Homebrew DS applications are generally programmed using C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

/C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

. A popular toolchain
Toolchain
In software, a toolchain is the set of programming tools that are used to create a product...

 is devkitARM. A few libraries
Library (computer science)
In computer science, a library is a collection of resources used to develop software. These may include pre-written code and subroutines, classes, values or type specifications....

 that make programming easier include libnds
Libnds
libnds, formerly NDSLIB, is a library created by Michael Noland and Jason Rogers and is maintained and updated by Dave Murphy . It is meant to be an open source alternative to Nintendo's commercial SDK for the Nintendo DS handheld game console. It allows programmers that do not have access to the...

, libfat
Libfat
libfat is a FAT library made by Michael "Chishm" Chisholm for the Nintendo DS to code Nintendo DS Homebrew applications. It is the successor of the dual GBA NDS FAT library, which was also used, like libfat, to code Nintendo DS Homebrew applications...

, dswifi , NFlib
NFlib
NFlib or NightFox’s lib is a library written in the C programming language, developed to facilitate programming for the Nintendo DS. It is based upon and libnds...

and PAlib. libfat helps developers write to a FAT
File Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...

 file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 on the homebrew storage device while dswifi allows developers to access the console's Wifi capabilities. Several tutorials have been written about the various aspects of the system.
fpc4nds is a port of FreePascal for cross compile for DS. DS Game Maker is a software made by James Garner which allows users to easily design homebrew games and applications.

DLDI

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
Libfat
libfat is a FAT library made by Michael "Chishm" Chisholm for the Nintendo DS to code Nintendo DS Homebrew applications. It is the successor of the dual GBA NDS FAT library, which was also used, like libfat, to code Nintendo DS Homebrew applications...

, is provided with the ability to use these drivers. Its predecessor, GBA NDS FAT, can be modified to use these drivers too.

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.

Modern Slot-1 flash cards (usually starting from 2007 or newer, like R4 DS or M3 DS Real
Nintendo DS storage devices
Nintendo DS storage devices are some of the devices used to store a licensed developer's work-in-progress images, homebrew video games, or downloaded commercial games, since the Nintendo DS is not sold with a rewritable storage medium....

) automatically patch compatible homebrew with the designated DLDI driver on startup to eliminate the need of manual patching on the PC.

Sites and projects

Homebrew applications for the DS add many features to the console. There are internet related tools like web browsers, instant messengers, and email clients. Multimedia programs allow users to enjoy movies, music, ebooks and comics. Emulators let people play games designed for another system.
  • Colors!
    Colors!
    Colors! is a digital painting application for the Nintendo DS, iPhone and iPod Touch. It was voted the most popular homebrew application on the Nintendo DS by readers of the R4 for DS blog. -History:...

    , no longer supported on the DS, was a digital painting application for Nintendo DS. Voted top homebrew for Nintendo DS in an online poll.
  • DSLinux
    DSLinux
    DSLinux is a port of the Linux operating system to the Nintendo DS. DSLinux was maintained until sometime in 2010.-Software:DSLinux runs a modified μClinux kernel. It is based on uCLinux 2.6.14 . It only runs in textmode and which is displayed using a custom framebuffer console driver...

     is a port of Linux
    Linux
    Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

     to the DS.

  • Mini Vmac DS is a port of an old Mac OS X.
  • DS2Win is a remote control for DS
  • DSx86 is an x86 PC emulator
  • GeosDS (look on FileTrip.net) is GEOS for NDS (Supports only M3DS)

  • DSOrganize includes a file browser, launcher, web browser, organizer, media player, and other features.
  • DSwiki is an offline Wikipedia reader.
  • Eigenmath DS is a computer algebra system for the Nintendo DS.
  • GEOS
    GEOS (8-bit operating system)
    GEOS is an operating system from Berkeley Softworks . Originally designed for the Commodore 64 and released in 1986, it provided a graphical user interface for this popular 8-bit computer.GEOS closely resembled early versions of Mac OS and included a graphical word processor and paint program...

     is a GUI initially developed for the Commodore 64
    Commodore 64
    The Commodore 64 is an 8-bit home computer introduced by Commodore International in January 1982.Volume production started in the spring of 1982, with machines being released on to the market in August at a price of US$595...

    .
  • Inferno DS is a port of the distributed operating system Inferno
    Inferno (operating system)
    Inferno is a distributed operating system started at Bell Labs, but is now developed and maintained by Vita Nuova Holdings as free software. Inferno was based on the experience gained with Plan 9 from Bell Labs, and the further research of Bell Labs into operating systems, languages, on-the-fly...

     to the Nintendo DS.
  • MoonShell
    MoonShell
    MoonShell is a homebrew multimedia player for the Nintendo DS, Nintendo DS lite, Nintendo DSi, and Nintendo 3DS. It is a well known, popular piece of Nintendo DS homebrew software,...

     is a media player that plays DPG movies and several music formats. It also allows the viewing of images and text files.
  • Dubquake is an online multiplayer game.

Internet applications

  • SvSIP is a VoIP/SIP client for Nintendo DS.
  • GameUP is a repository that allows the user to download and rate over 400 homebrew applications.
  • Beup Live is a Windows Live Messenger
    Windows Live Messenger
    Windows Live Messenger is an instant messaging client created by Microsoft that is currently designed to work with Windows XP , Windows Vista, Windows 7, Windows Mobile, Windows CE, Xbox 360, Blackberry OS, iOS, Java ME, S60 on Symbian OS 9.x and Zune HD...

    (MSN) client for the Nintendo DS created by HtheB.
  • EOSTools can preview/install skins, update Shell and data (ndsinfo.dat, ds1patch.dat) of the supercards' Evolution OS
  • fb4nds is a program that allows access to Facebook
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK