Software Development Kit for iQue NetCard (version 1.15)

$Revision: 1.63 $
$Date: 2007/04/26 20:55:47 $

Purpose

The iQue NetCard Software Development Kit provides all the tools and libraries necessary to develop applications that will run on the Nintendo DS family of platforms using the iQue NetCard.

Development System Requirements

Installation Instructions

The SDK includes the following items:

Cygwin

The SDK uses the CYGWIN unix compatibility environment on windows. If you do not have cygwin on your PC, please go to the CYGWIN site (www.cygwin.com) and install it. Other than the default packages, you should also select the following:
It is also a good idea to choose one of the available text editors to use for software development on CYGWIN (for example: VIM or EMACS). The SDK has been tested against the 2/20/06 CYGWIN release.

Installing the SDK Software

In order to install the SDK, please use the following procedures:

Installing the Compilers

For NetCard SDK release 1.1 and later, the compilation toolchain is packaged separately from the rest of the SDK. The toolchain image can be downloaded from the following URL:

http://172.16.10.99/nc_sdk1.15/arm-tools-cygwin-20060321.tar.bz2

Save the toolchain file to disk and download the corresponding installation script into the same directory:

http://172.16.10.99/nc_sdk1.15/install_tools.sh

Run the installation script from a CYGWIN shell window to install the toolchain. The binaries will be installed in the directory /opt/crosstool/bin.

Installing the USB Driver

The SDK provides a set of tools which allow you to download applications onto the NetCard over USB. Before using these tools you must install the USB driver onto the PC. For the early SDK releases, we have not included an install script for this driver, so some manual setup is necessary. Note that USB Vendor ID of the NetCard has changed in release 1.2 and later to use the official iQue USB Vendor ID. This means that a new USB driver is required even on a PC that already has been used with SDK release 1.0 or 1.1. If your system is currently running SDK 1.2 or later, then the reinstallation of USB drivers is not necessary. If your system is running an earlier release of the SDK or has not yet had the SDK installed, please install the new USB driver by following these steps before proceeding:

Setting your PATH

Tools necessary to use the SDK are installed in two places, which should be added to your PATH:

If you are using Bash, type:
export PATH=$PATH:$ROOT/usr/bin/x86:$ROOT/usr/bin/win32
To make development easy, it is best to add the following lines to your shell init file (.bash_profile if you are using bash):
export ROOT=~/SDK_ROOT (or wherever you put the SDK)
export PATH=$PATH:$ROOT/usr/bin/x86:$ROOT/usr/bin/win32

Upgrading the SDK Image on a NetCard from v1.14 to v1.15

Fetch the starting cert.sys file from the NC SDK website (you may have to click "Save page as" in your browser to save it as a file):


http://172.16.10.99/nc_sdk1.15/cert.sys

To upgrade your NetCard image you should start a cygwin shell and start ncproxy by typing:

  ncproxy -p

NOTE: you must have $ROOT/usr/bin/win32 in your $PATH.

Start an ncshell process with the -b option:
  cd $ROOT/usr/bin/sc
  ncshell -b
  wb 1 boot1.aes
  wb 2 devmon.bwf
  ls
  format
  quit

Do not interrupt this sequence of commands by powercycling the NetCard. Please note that after the "wb 2" command, you must wait for the "ls" command to finish to make sure that the write is complete. The prompt in ncshell comes back before the "wb 2" command is actually completed. Please do not proceed with the next step until the output of "ls" has appeared in the ncshell window or until you see the message "import boot2 successful" appear in the ncproxy window.

Powercycle the GBA after the successful completion of the previous step.

After the format, the /sys/cert.sys file must be initialized with the version downloaded previously.

  cd to location of downloaded cert.sys
  ncshell
  put cert.sys /sys/cert.sys
  mkdir /media
  mkdir /media/music
  quit

Now the viewer can be imported:

  cd $ROOT/usr/bin/gba
  ncshell
  import viewer.bwf
  quit

The installation should now be complete. Use ncshell to import any additional games and data files onto the NetCard. Note that if your NetCard has a personalized ID, you will need to publish games specifically for the device ID. The viewer is published with a non-personalized ticket, so one version of the bwf file will run on any NetCard. In order to publish games for a personalized card, retrieve the device certificate by booting the Netcard and doing the following commands:

  ncshell
  get /tmp/devcert.sys devcert.sys
  quit

Then specify the device certificate file using the -D option to the publishing script:

  publish.py -n dolphin -S -l dolphin.mrg -D devcert.sys

Building DS Applications

The SDK contains the source for two sample applications for the DS: the loader and the viewer. The loader is intended to be loaded on a DS game card. Its function is to boot the DS viewer from the NetCard. The user interface of the loader is pretty simple: if no errors occur, the user just sees the viewer boot up. There is some localization required for the error messages describing the various reasons that the booting of the viewer might fail.

To build the loader, you must have a Nitro SDK tree already installed and set the NITROSDK_ROOT environment variable before installing the NetCard SDK. After the previous installation steps, build the loader as follows:

  export NETCARD_SDK_ROOT=$ROOT  # Nitro Makefiles change $ROOT
  cd $NITROSDK_ROOT
  make  # to build libraries
  cd $NITROSDK_ROOT/build/tools/ncloader
  make

The file ncloader/bin/ARM9-TS/Release/main.srl is the DS ROM image of the loader program. You can use a Nitro Emulator to load the ncloader main.srl file and then program it on a DS Flash Card. This can then be used to boot a DS and load the DS viewer (see next step).

To build the DS sample viewer, use the following steps (the make at the top level of NITROSDK_ROOT can be skipped if that was done in the previous step):

  export NETCARD_SDK_ROOT=$ROOT  # Nitro Makefiles change $ROOT
  cd $NITROSDK_ROOT
  make  # to build libraries
  cd $NITRODWC_ROOT
  make  # to build DWC libraries
  cd $NITROSDK_ROOT/build/tools/ncviewer
  make
  ncshell
  import ncviewer.bwf
  quit

The ncshell import step loads DS Viewer on the NetCard. Both the DS and GBA viewers should be installed on the NetCard, so that the NetCard can respond correctly to a DS in either DS mode or GBA mode.

Building DS Games for NetCard

The procedure for building DS games for NetCard is very similar to the way GBA ROMs are published. The procedure uses the "srl" file, which is the raw binary image of the DS ROM. The arm-elf-merge and publish.py programs are used to package the DS ROM for importing onto the NetCard:

  export NETCARD_SDK_ROOT=$ROOT  # Nitro Makefiles change $ROOT
  cd $NITROSDK_ROOT/build/demos/gx/UnitTours/ClearImage
  make
  arm-elf-merge -D bin/ARM9-TS/Release/main.srl -o clear.mrg
  publish.py -n clear -l clear.mrg -W
  ncshell
  import clear.bwf
  quit

After importing the game, restart the DS and select DS mode. The DS viewer should show the "clear" demo and you can launch it by pressing the "A" button.

Launching GBA Games Using DS Viewer

Launching GBA games using the DS viewer requires a helper application called gba-switch. To import it, do the following:
  cd $NITROSDK_ROOT/build/tools/gba-switch-arm7
  make
  cd ../gba-switch
  make
  ncshell
  import gba-switch.bwf
  quit
You will now be able to launch GBA games from the DS viewer.

Documentation

Basic documentation on how to use the SDK and tools, with pointers to the main API documents is here.

Filing Bugs

Bugs can be filed using the existing iQue bug database http://172.16.10.99/bugzilla

A new product category "NetCard" has been created with 2 new components:
Please file bugs in English and provide a detailed explanation of the conditions which caused the bug and how it can be reproduced.

Changes and Bug Fixes in SDK version 1.1

Here is a list of the differences between SDK 1.0 and SDK 1.1:

Changes and Bug Fixes in SDK version 1.2

Here is a list of the differences between SDK 1.1 and SDK 1.2:

Changes and Bug Fixes in SDK version 1.3

Here is a list of the differences between SDK 1.2 and SDK 1.3:

Changes and Bug Fixes in SDK version 1.4

Here is a list of the differences between SDK 1.3 and SDK 1.4:

Changes and Bug Fixes in SDK version 1.5

Here is a list of the differences between SDK 1.4 and SDK 1.5:

Changes and Bug Fixes in SDK version 1.6

Here is a list of the differences between SDK 1.5 and SDK 1.6:

Changes and Bug Fixes in SDK version 1.7

Here is a list of the differences between SDK 1.6 and SDK 1.7:

Changes and Bug Fixes in SDK version 1.8

Here is a list of the differences between SDK 1.7 and SDK 1.8:

Changes and Bug Fixes in SDK version 1.9

Here is a list of the differences between SDK 1.8 and SDK 1.9:

Changes and Bug Fixes in SDK version 1.10

Here is a list of the differences between SDK 1.9 and SDK 1.10:

Changes and Bug Fixes in SDK version 1.11

Here is a list of the differences between SDK 1.10 and SDK 1.11:

Changes and Bug Fixes in SDK version 1.12

Here is a list of the differences between SDK 1.11 and SDK 1.12:

Changes and Bug Fixes in SDK version 1.13

Here is a list of the differences between SDK 1.12 and SDK 1.13:

Changes and Bug Fixes in SDK version 1.14

Most of the changes in SDK 1.14 are enhancements for support of DS games executed from the NetCard. Here is a list of the differences between SDK 1.13 and SDK 1.14:

Changes and Bug Fixes in SDK version 1.15

Most of the changes in SDK 1.15 are enhancements for support of DS games executed from the NetCard. Here is a list of the differences between SDK 1.14 and SDK 1.15: