トップページ

1日目 - インストールとコンパイル

Windows - Linux - Mac OS X

このチュートリアルは3つのパートに分かれています :

開発環境をインストールする

ここでは PAlib のインストール方法について詳細に解説します。Visual Studio C++ の設定についても触れます。 さらに Linux 環境へのインストールMac OS X 環境へのインストール (要更新) についても紹介しています。PAlib テンプレートと makefile を理解するOS にかかわらず、 PAlib ユーザ必読です。

Windows 環境へのインストール(せっかちな人向け)

このガイドは手っ取り早く devkitPro と Palib のインストール方法を知りたい人向けです。より詳細なインストール手順はこちらへどうぞ。

必要なファイル
インストール
  • devkitPro アップデータを実行して “C:\devkitPro” にインストールする
  • “C:\devkitPro” にある “devkitARM” を削除または名前を変更 (削除を推奨)
  • devkitARM r21 のインストーラを実行して “C:\devkitPro” にインストール
  • “C:\devkitPro” にある “libnds” を削除
  • libnds ライブラリのインストーラを実行して “C:\devkitPro” にインストール
  • Palib インストーラを実行して “C:\devkitPro” にインストール
  • コンピュータを再起動 (環境変数の確実な反映のため)
開発環境のテスト
  • エクスプローラで “C:\devkitPro\palib\examples\Text\Normal\HelloWorld” を開く
  • その中にある “build” (または “build.bat“) をダブルクリックして実行
  • “HelloWorld.ds.gba” と “HelloWorld.nds” というファイルが生成される
  • もしコンパイル中にエラーが発生したら、フォーラムで解決策を探してみてください。質問をする前にまず検索してみてください。

Windows 環境へのインストール

まず主要な DS 開発環境を整えるために、 the devkitPro Updater を使って devkitARM (とその他いろいろ) をダウンロードしてインストールしなければなりません。

気を付けてください! devkitPor Updater はデフォルトで DS 以外の PSP, GBA, GP2X などに必要な環境やライブラリもインストールしてしまいます。これらが不要な場合はチェックをはずしてください。DS 開発に最低限必要なものは msys, devkitARM, libnds だけです。

訳注: devkitPro Updater は devkitPro Updater プログラムが置かれているフォルダに一時ファイルをばらまきます。デスクトップに置いた状態で実行すると悲惨なことになるので、何かフォルダを作ってその中で実行すると良いでしょう。

アップデータを実行すると C:\devkitPro は次のようなフォルダ構成になっているはずです:

C:\DevKitPro\
+ devkitARM
+ devkitPPC (オプション)
+ devkitPSP (オプション)
+ examples
+ insight (オプション)
+ libgba (オプション)
+ libmirko (オプション)
+ libnds
+ libogc (オプション)
+ msys
+ Programmers Notepad (オプション)

PAlib は devkitARM リリース22またはそれ以降のバージョンに完全対応しているわけでばありません。そのため devkitARM のバージョンを リリース21に落とす必要があるかもしれません。devkitPro Updater によってインストールされた “devkitARM” フォルダを “devkitARM_r23” に名前を変更するか削除するかしたあと、devkitARM リリース21 をダウンロードして C:\devkitPro に解凍してください (フォルダ名を “devkitARM” にして置き換える )。

次に PAlib を the PAlib Installer からダウンロードしてインストールしてください。PAlib のインストールは devkitARMと同じ階層に中身を解凍するだけです。別のフォルダにインストールすることも可能ですが、そうする必要のある場合はインストーラに含まれる readme を参照してください。

[訳注] 実際に試したところ、zipを解凍しただけでは当然のことながら環境変数 PAPATH が追加されないため、ビルドに失敗しました。そのため PAPATH という名前で PAlibのパスを環境変数として追加してください。もしくはMakefileに記述してもかまいません。インストーラを使っても環境変数の追加は確認できませんでした。

注意してください! devkitPro や PAlib を空白文字を含むフォルダ (例えば “c:\DS Development\PA Lib\” のような) にインストールすることはできません。よってデスクトップにインストールしても動かないでしょう。デスクトップのフルパスは “c:\Documents and Settings\...” のようになるためです。

PAlib は部分的に .NET Framework を必要とするためインストールしておく必要があります。.NET Framework を必要とするのは PAGfx (グラフィックコンバータ), PAFS (ファイルシステム), VHam (統合開発環境)です。ここからインストールしてください。

これでインストールが終わりました! PCを再起動して次のテストコンパイルにすすみましょう!

[訳注] PAlibはバージョンによって関数名が違うことがあるため、バージョンを変更する際には注意が必要です。

開発環境のテスト(テストコンパイル)

開発環境が正しくインストールされているかどうか確かめる方法はたくさんありますが・・・難しくないので、うまく動作することを願ってやってみましょう!

サンプルプログラムをコンパイルしてみましょう。palib\examples\Text\Normal\Helloworld\ を開いて build.bat をダブルクリックします。そうするとビルド処理が始まり(コマンドプロンプトに進捗が表示される)、全てうまくいけば helloworld.ds.gba と helloworld.nds が生成されます。

GetIPCとスタティック宣言について大量の警告 (warning) が表示された場合は devkitARM リリース21をインストールする必要があります。インストール手順に詳細な記述があります。

この Hello World プログラムがエラーなしでコンパイルできたなら次のセクションに進んでもかまいません。しかしインストールしたライブラリや DS 開発に慣れ親しむためにもこれ以降の部分も読むことを勧めます。

PAlib テンプレートと makefile を理解する

正しく動作する開発環境と PAlib を手に入れたあなたは、今すぐにでもコーディングを始めたいことでしょう。でもその前に \PAlib\template\ フォルダにある PAlib テンプレートについて少し知っておいた方がよいでしょう。ここでは PAlib テンプレートがどのように動くのかについて少し解説したいと思います。

テンプレート記述

えーっと、以前にも聞かれたことがある・・・テンプレートって何? うん、テンプレートはプログラムのための基盤となる部分やその構造を提供する仕組みです。つまりあなたはその空っぽの構造に C/C++ のコードや画像ファイル、音楽ファイルなどを追加するわけです。正しく構成されたテンプレートを使っているので、あなたは簡単に NDS ファイルをコンパイルできるでしょう。

これが PAlib テンプレートの構造です:

フォルダ :

  • source → 一番重要な部分であるソースコード (*.c や *.cpp ファイル) を含みます
  • include → ヘッダファイル (*.h ファイル) が含まれます
  • data → 画像や音楽などのリソースファイルが含まれます

ファイル :

  • Makefile → どのようにしてプログラムをコンパイルするかについて記述されている重要なファイルです。プロジェクトの構造を変更した場合は開いて変更を加える必要があるでしょう。
  • logo.bmp → NDS ファイルを表示するときに使用されるアイコンです。プロジェクトに合わせて変更してください
  • build.bat → NDS ファイルをビルドするために使う重要なファイル
  • clean.bat → ソースコードを公開したいときやコーディング作業を終わるとき、clean.bat を使えばプロジェクトフォルダのサイズが小さくなります。clean.bat は build.bat によって生成されたファイルを全て削除します。
  • project.vhw → VisualHam のプロジェクトファイル

テンプレートの主要プログラム

それでは project.vhw (VisualHam) または template.pnproj (Programmer’s Notepad), もしくはあなたの好きなエディタで “source” フォルダの中の main.c を開いてください。名前からもわかるように、main.c はプログラムの起点となるファイルです。それは main() 関数と ROM 起動時に必要な全てのものを含んでいます。テンプレートの main.c は PAlib を動かすために必要最低限のものを含みます。これをそのままコンパイルして実機の DS やエミュレータで動かしてみても、ディスプレイには真っ白な画面になるだけで何も起きないでしょう。それは基本的な初期化以外はなにもしていないからです。

これが main.c の最初の状態です:

// ヘッダインクルード
#include <PA9.h>       // PA_Lib のインクルード
 
// 関数: main()
int main(int argc, char ** argv)
{
	PA_Init();    // PA_Lib の初期化
	PA_InitVBL(); // 標準 VBL の初期化
	
	// プログラムを走らせるための無限ループ
	while (1)
	{
		PA_WaitForVBL();
	}
	
	return 0;
} // main() の終了

プログラム解説

もしあなたがすでに C プログラミングに親しんでいるのであればこれらはあたり前のことでしょう。しかしそうでない人のために1行ずつ十分なコメントとともに解説したいと思います。

// ヘッダインクルード 
 

// はその行のそれ以降の文字列をコメントとして見なし、コンパイル時に無視してもらうように指示します。ここでは「この部分でヘッダ読み込みをしていますよ」ということを読む人に伝えるために書いています。

#include <PA9.h> 
 

これは「PAlib をこのプログラムに読み込んで(インクルードして)ください」という意味があります。これがないと PAlib は認識されず、コンパイル時にエラーが出るはずです。インクルードは画像ファイルやその他のプログラムを追加する際にとても重要なことになります。

int main(int argc, char ** argv)

このよくわからないものはどのプロジェクトにも必ず1つあります: これはプログラムの開始点で、全てはここから始まります。(int argc, char argv) が一体なんなのかについて頭を悩ませないでください。実行されるコードは ‘{’ 以降にあります :)

PA_Init();    // PA_Lib の初期化
PA_InitVBL(); // 標準 VBL の初期化

PAlib を使用する多くのプロジェクトでこの2行を見付けることができます。1行目は一般的な初期化です。それはスプライト、背景、テキスト表示など全ての準備を行います。これがないと PAlib はまともに動きません。’VBL’ という文字列の付いた2行目は、より高度な使い方をするユーザに限って必須ではありません。簡単に言うと VBL はプログラムを画面描画の毎秒60フレームに同期させます。VBL 初期化をしない場合、プログラムは高速 (実際には描画不可能な毎秒100000フレームなど) で動作するか、まったく動作しないことになります(最初のフレームで止まる)。通常はこれらの2つの関数呼び出しはそのまま残しておいてください。

// プログラムを走らせるための無限ループ
while (1)

while ステートメントは結果(ここでは1となってる部分)が0以外である限りそれに続くコードブロック(中括弧で囲まれた部分)を繰り返し実行します。ここでは常に1になっているため、永久に繰り返すことになります。何のために? それはもしこのようなループを持たない場合、プログラムは全ての行を1度だけ実行して、それ以上何も表示せず終了してしまいます。つまりユーザが電源ボタンを押すなどして終了させるまでプログラムを動作させつづける意味があります。考え方としてはこのループの中でプログラムは画面に表示するために必要な全ての計算をしそれを描画します。

PA_WaitForVBL();

最後のコードは FPS (1秒間あたりの描画回数) をちょうど60に同期するための関数です。これを実行しないと前述のように超高速で描画されるかまったく動かないでしょう。

	}
	
	return 0;
} // main() の終了

ここでコードを終了します。常にここにあって、常にこんな風に書いてあります。あまり深く悩まずそっとしておいてください :P

以上でテンプレートの全てを理解できました。それでは次に進んでディスプレイに文字列を表示する方法について学びましょう!

Hello World を作る

それではテンプレートに手を加えて単純な Hello World プログラムを作ってみましょう。ここではまだ DS プログラミングの詳細には立ち入らず、これまでの内容だけでもこんなに簡単にできるということを示すためのものです :P

Hello World プログラムを作るために PAlib の基本的なテキスト描画システムを使います。テキスト描画システムは1枚の背景 (ちなみに1画面あたり4つの背景を持っています) を使い、どの背景を使うか選ぶことができます。テキストのフォント設定、フォント色設定、といった具合に非常に多くの関数が用意されていますが、ここではあまり凝らずに簡単にいきます :P

何かしたいときはテンプレートの main.c ファイルの PA_InitVBL() 行の後に追加してください。

	PA_InitText(1, 2); // 画面1に背景2を設定
	PA_OutputSimpleText(1, 1, 1, "Hello World !");  // 画面1の座標(1, 1)に指定されたテキストを描画

最初の1行でテキスト描画システムを初期化(フォントをVRAMに読み込む)します。これをしないとテキストはノイズのようなゴミみたいに描画されるでしょう・・・。PA_InitText は2つの引数を取ります:

  • 描画する画面 (0を指定すると下の画面、1だと上の画面)
  • 使用する背景 (0だと最前面レイヤ, 1はその下のレイヤ, 2、3となるにつれてより下のレイヤになる)

PA_OutputSimpleText は名前からもわかる通り、(事前に PA_InitText で初期化してあれば)テキストを画面に出力します。(ここで PAlib の関数は全て “PA_” で始まるのではないかと気付いた方もいるでしょう・・・) OutputSimpleTextは4つの引数を取ります:

  • 描画する画面 (0または1)
  • 水平タイル位置 (X), 0から31。タイルは画面を8×8ピクセルの正方形で区切ったもので、タイル0は左から0ピクセル、タイル1は左から8ピクセル、といった感じです
  • 垂直タイル位置 (Y), 0から23。
  • 文字列 (二重引用符(ダブルクオーテーション)(”)で囲まれた文字列)

[訳注] つまり標準フォントを使った場合1行の高さが8ピクセルなので、32文字を24行表示できるわけです。

VisualHamを使っているのなら F6 でコンパルして DualiS エミュレータで起動、F7 はコンパイルして DeSmuME エミュレータで起動、F5 はコンパイルのみになります。便利なので覚えておいてください! もちろん build.bat をダブルクリックしても OK です。

Visual C++ 2008 Express で PAlib を使う

Original tutorial by Rodrigo Sieiro revised for VC++ 2008 by Christian Crawford

As a developer, I work with Visual Studio every day. So, when I decided to start programming for NDS, I found myself trying a lot of different IDEs, hoping to find the features I had in Visual Studio. I tried Programmers Notepad, VisualHAM, EditPlus, PSPad, and so on. No one seemed to satisfy me.

So I started researching how could I use the (free) Visual C++ 2008 Express with PALib. And I learned a few things from different places: a little in PALib’s French Wiki (I don’t read French, just followed the figures), a little in devkitPro’s FAQ, until I could manually make a PALib project inside Visual C++. Then I found OGRE’s (a 3D Engine) AppWizard for VCExpress, so I tweaked my base project a bit and made it an AppWizard.

In this guide I’ll explain how you can set up a fully working development environment with Visual C++ 2005 Express and PALib. As you can see in the image above, here are some features you can expect by using this method:

  • Fully integrated IDE with Project Management
  • Start working with a basic project in a few clicks
  • Code Completion / IntelliSense
  • Compilation errors reported in the IDE
  • Build your whole app by pressing a key
  • Test you app by pressing another key

必要環境

Before you begin, make sure you already installed the following stuff:

Follow the installation guide above to be sure you can at least compile and run a basic project (using any editor and “make” command line), so you can be certain that your basic environment is configured correctly before configuring Visual C++ Express.

Important: I suggest you to install PALib inside devkitPro folder, because the AppWizard (code completion, mainly) probably won’t work if you install it in a different place.

環境設定

When you install devkitPro and PALib, they already add some environment variables for you. But these variables are for the make tool, so the path names are written in “UNIX Style”. So, in order to compile PALib and devkitPro inside Visual Studio, first we need to set a new Environment Variable.

Open “Start → Settings → Control Panel → System”. Select “Advanced” then click on “Environment Variables”. Click on the “New” button inside “System Variables” (the lower one) and add a variable with the name “DKP_HOME”. In the “Value” box, write the root folder of your devkitPro installation, “Windows Style” (i.e. “c:\...” instead of “/c/...”).

If running Windows Vista you will need Admin rights and you go “Start → control panel → system” then click on the “change settings” it will open the window above and click “Advanced”

インストール

Get the AppWizard here or alternatively you can download NightFox’s version which is installed the same way and include his libraries (eg: EFS) here Now let’s install the PALib AppWizard. Extract the contents of the ZIP file inside a PERMANENT folder. The template files will stay there and can’t be removed, otherwise you will break your AppWizzard. I recommend using a folder called “PALibAppWizard” inside devkitPro root folder, so it sits together with “PALibExamples” and “PALibTemplate”. That’s what I use.

After you extract the contents, you will see two JavaScript files: “VC9_Express_Setup.js” and “VC9_Setup.js”. As you probably figured, the first is for Visual C++ 2008 Express and the second is for other versions of Visual C++ 2008. Double-click the one corresponding to your version and it will install the wizard automatically. I only have Visual C++ 2008 Express, so don’t blame me if the wizard doesn’t work with VC++ 2008 Pro. I can’t test it. From DtD Software: I have tested the script with Microsoft Visual Studio 2008 Pro and it works like a charm.

If everything went well, you will see the following message:

If running Windows Vista you will see the message above but it wont install properly. manually copy the files explained below.

インストール代替手段 その1 : [スタート] → [ファイル名を指定して実行]

If your .js files are registered to another program, such as Dreamweaver, the previous method won’t work (the script will open inside the editor, and won’t run). If that’s your case, you can run the .js script manually, via the Run box. Click on Start then Run and type:

WScript.exe <location of setup js>

The location above should be the full path and filename of the .js file you need to use. That should work.

インストール代替手段 その2 : ファイルを手動コピー

If you are afraid that I put inside the .js some ultra-power virus that will explode your monitor and erase all DVDs up to 1 mile far from your computer, you can manually copy the AppWizard files to their location. Follow this steps:

  1. Open PALibAppWizard.vsz in your text editor.
  2. Change “ABSOLUTE_PATH” to the folder “Files” you extracted the AppWizard ZIP.
  3. Copy “PALibAppWizard.ico” and “PALibAppWizard.vsz” to:
    • [Visual Studio]/VC/Express/VCProjects
  4. Copy “PALibAppWizard.vsdir” to:
    • [Visual Studio]/VC/Express/VCProjects/NintendoDS
    • (You can create the “NintendoDS” folder manually)

That’s it, your AppWizard is installed. Now follow the rest of the guide to setup some more things in your Visual Studio.

最初のプロジェクトをビルドする

Open Visual C++. Before you rush on clicking “New Project” to see PALib there, let’s do one more thing that will be very helpful. Since the “make” tool we use to compile PALib project doesn’t like long filename and directories with spaces, I suggest you to change your default “Projects” folder inside Visual C++ so you won’t have to change it everytime you create a new project.

Go to “Tools”, then “Options”, then “Projects and Solutions”, then “General”. Change the field “Visual Studio Projects Location” to a folder with no spaces. I suggest something short, like I used in the picture below.

Now you can click on “File” → “New” and select “New Project”. If you installed the AppWizard correctly, you will see a new “NintendoDS” category, and inside it, you have the “PALib Application” wizard. This is a pre-configured project, with all the things you need to do in order to compile PALib project inside Visual C++ already configured for you. Type a Project Name, check the “Location” to be sure you don’t have a directory with spaces, and click “OK” to start the wizard.

There’s not much stuff you can change in the wizard. I tried to think about some options I could put there but my creativity wasn’t cooperating with me when I wrote the wizard. The first screen is an overview of the project you are creating. Click on “Next” when you are ready to proceed.

In the second page, you can choose between “Standard application” and “Minimal application”. “What’s the difference?”, you may ask. Simple: the last one is the very minimal you need in order to build a PALib project. You can compile and run its generated application, but it won’t do anything. The first is a fully functional “Hello World” application, with two more lines of code that actually do something. Now that’s a huge difference! Click on “Finish” to generate your project.

Now let’s check out the files that were generated by the wizard:

  • logo.bmp → this is the image your app will show in DS Loaders.
  • logo_wifi.bmp → the logo to use with WiFi.
  • main.cpp → the main program file, with some code already written for you.
  • Makefile → a PALib makefile optimized for Visual Studio.
  • ReadMe.txt → some info.

Notice how Visual Studio can organize your project by content type... That’s even better when you have a lot of files inside your project!

I’ve tweaked the default PALib Makefile (found in the PALibTemplate) so it can work better with Visual Studio. This way, you can use all the build options Visual Studio offers: “Build”, “Rebuild” and “Clean”. Rebuild is actually the same as selecting “Clean” then “Build”.

Okay, we’re set, let’s try building our project for the first time. Click on “Build” then “Build Solution”, or press F7. Visual C++ will start compiling your project using the Makefile. You can see what’s it doing in the “Output” window. It will compile all your source files, link them in a binary file, and then call the tools that generate three files for you: a “.nds”, a “ds.gba”, and a “.sc.nds”. These files will be generated in the “Release” subfolder of you Project. If the last line in the Output window says “Build: 1 succeeded”, then everything went well. If you didn’t touch the code and get an error, you’re screwed. So you should delete DevKitPro and PaLib and then install it again and following the stpe from the start making sure to not miss out anything.

NOTE: For Windows Vista users, go to Project → [projname] Properties. Expand the “Configuration Properties” tree on the left bar and go to NMake. Click on the “Build Command Line” field and a little box with ... in it should appear on the right. Click that to bring up a text area to type out the commands. Insert a new line before what’s already there and add “set PATH=C:\devkitPro\devkitARM\bin;C:\devkitPro\devkitARM\arm-eabi\bin;C:\devkitPro\devkitARM\libexec\gcc\arm-eabi\4.1.1;%PATH%” to it (without the quotes). Save it and you should be able to compile correctly. I got some errors in a couple sound headers from PALib about incorrect conversions from void pointers to u32 pointers. If you double click on the error, it will take you to the line. Add a (u32*) to the line so it’s like “blahblah = (u32*)blaghblagangjklaglk;” on both lines that have the error. After that, the compile worked like a charm for me and NO$GBA read the file just fine. – Ari Velazquez (arivelz@gmail.com)

Lastly, don’t forget to set up Visual C++ directory variabiles in order to get IntelliSense to work with the PALib! Go to Tools → Options → Project & Solutions → VC++ Directories, then select “Include files” from the top-right scroll menu, and add “<path to PALib>\include\nds” and “<path to PALib>\libnds\include” (without the quotes, anche replace <path to PALib> with the folder where you installed the PALib). Now by pressing Ctrl+Space VC++ will auto-complete for you PALib functions and classnames!

If you are having problems with compiling after following these steps, try reseting your computer.

Visual C++ の外部ツールにエミュレータを設定する

This step is optional, but I highly recommend it. We are going to setup a NDS emulator as an External Tool, so you can test your project quickly. Click on “Tools”, “External Tools”. Then click on “Add” to create a new External Tool. You can create an External Tool for each emulator you use, but here I show you how to create one for NDeSmuME, the one I use.

Type the emulator name in the “Title” field, then the full path to the emulator EXE file in the “Command” field. In the “Arguments” field you can type “$(TargetDir)\$(TargetName).nds” (without the quotes), and in “Initial Directory” type “$(TargetDir)”. This way you’re passing the .nds file you just built as an argument to the emulator, so it will start automatically. If you use an emulator such as No$GBA, you must change the “.nds” to “.ds.gba” without the quotes in the Arguments field.

You can even configure a keyboard shortcut (inside “Tools”, “Options”, “Environment”, “Keyboard”), so you can test you app quickly. To map a key to your emulator, select the command “Tools.ExternalCommand[x]” from the list, where [x] is the order of your tool in the list. For example, my emulator is the third tool in the list, so its command is “Tools.ExternalCommand3”. My shortcut is “Shift+F10”, so when I change something in my code I just press “F7” to build and “Shift+F10” to test. Easy, huh?

You can configure a script to copy the file to your card as an External Tool, so it’s easier to test you application in your NDS. To set up that script you follow the above to make a new external tool. Then put “C:\WINDOWS\system32\xcopy.exe” in the command box (this is for xp might be diffrent in vista ) then put “$(ProjectDir)\Release\$(TargetName).nds X:\ /y” ( were x is the letter of the drive ) in the Arguments box and finally “$(TargetDir)” in the initial directory box.

まとめ

That’s it. Now you have a fully working IDE to develop your NDS games and applications. Obviously you can’t debug your project using Visual C++ debugging environment (altough it would be great) but everything else should work flawlessly.

Update: I was getting a bug with the latest PALib in VCExpress, here is the fix: http://forum.palib.info/index.php?topic=4200.0

Linux 環境へのインストール

Original tutorial by KerneL, revised by ObsidianX :)

Alright, this is a nice step-by-step method for getting PAlib setup and compiling under Linux. I’ve got Ubuntu Linux running, but its pretty generic for the most part so just fix the distro-specific stuff yourself ;)

For Apple MacOSX users, the majority of this howto will work for you too. The only difference being your ‘make’ tool installation. For that you’ll want XCode.

インストール手順

Script By Loumam, posted here by LynkW. Go here: http://ubuntuforums.org/showthread.php?t=750050

必要なもの

フォルダ構成

First of all, we must organize this mess. Create a new directory named “devkitpro” and make sure you have read/write/execution rights on it. This guide will assume that this folder is in your home directory, but it doesn’t have to be. Extract everything in the PAlib, devkitARM, and libnds archives to the devkitpro directory. Then extract dswifi and libfat-nds into the libnds folder.

Now, you should have something close to the following tree view:

/
|--home
       |--<login>	
	     |--devkitPro
		|-devkitARM
		|--libnds
		     |-dswifi
		     |-libfat-nds
		|-PAlib		

環境変数

The installation of PAlib requires three environment variables. The best way to do this is to open the “~/.bashrc” file (if you use something other than bash then use the appropriate rc file). Open your favorite text editor and add these three lines:

export DEVKITPRO=/home/yourUsername/devkitPro  #this will need to change if your devkitPro folder is elsewhere. Also, replace "yourUsername" with your actual username.
export DEVKITARM=$DEVKITPRO/devkitARM
export PAPATH=$DEVKITPRO/PAlib/lib

Feel free to adapt these lines according to your own tree view. Apply the changes with this command (only gotta do this once):

$ source ~/.bashrc

Check if everything went fine with the ‘env’ command (it lists every system variable). The following commands will help you to find the new variables:

$ env | grep DEVKITPRO
$ env | grep DEVKITARM
$ env | grep PAPATH

Note that if you run any of these and just get another $ prompt then the variable wasn’t created. If this is the case go back and check your .bashrc file to check spelling. Also know that you won’t see $HOME in the print out of ‘env’ but your actual home directory path. Example:

$ env | grep DEVKITPRO
DEVKITPRO=/home/<login>/devkitpro
$

make コマンド

Right, you need to know if you can actually use PAlib. In order to do so, open up a new terminal. (get away from that mouse!) You will need to compile in peace so check this: type in “make”, here, right away. If it returns you something like:

bash: make : unknown command

Then you’ve got a problem. However, if it returns anything else, congratulations, you are good to go! If you get this error, just open your favorite package manager (synaptic, aptitude or use apt-get...) and search for the package named “make”. (If you’re not on Ubuntu find the package that relates to your distro) Install it, the manager will take care of any dependencies. Now your terminal must return:

$ make
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.

Or for an English OS:

$ make
make: *** No targets specified and no makefile found.  Stop.

開発環境のテスト

We will now test our brand new installation. Go in the /PAlib/examples/Text/HelloWorld directory, for a good example to test first. Once you are there, just type:

$ make

If the compilation ends on:

Nintendo DS rom tool 1.30 - Jul 24 2006 06:34:31 by Rafael Vuijk (aka DarkFader)built ... Keyboard.ds.gba
dsbuild 1.21 - Jul 24 2006
using default loader

then the job is done successfully. You have a fully functional PAlib! Congratulations!

If you get any weird errors check the forums to see if it’s already been encountered and fixed. Otherwise if you get something like the following:

$ make
main.c
In file included from /home/ryan/devkitPro/PAlib/include/nds/arm9/PA_Sound.h:15,
                 from /home/ryan/devkitPro/PAlib/include/nds/PA9.h:37,
                 from /home/ryan/devkitPro/PAlibExamples/Input/Keyboard/KeyboardCustom/source/main.c:2:
/home/ryan/devkitPro/PAlib/include/nds/arm9/PA_FS.h: In function 'PA_FSInit':
/home/ryan/devkitPro/PAlib/include/nds/arm9/PA_FS.h:66: error: 'REG_EXMEMCNT' undeclared (first use in this function)
/home/ryan/devkitPro/PAlib/include/nds/arm9/PA_FS.h:66: error: (Each undeclared identifier is reported only once
/home/ryan/devkitPro/PAlib/include/nds/arm9/PA_FS.h:66: error: for each function it appears in.)
In file included from /home/ryan/devkitPro/PAlib/include/nds/PA9.h:42,
                 from /home/ryan/devkitPro/PAlibExamples/Input/Keyboard/KeyboardCustom/source/main.c:2:
/home/ryan/devkitPro/PAlib/include/nds/arm9/PA_Motion.h: In function 'PA_MotionInit':
/home/ryan/devkitPro/PAlib/include/nds/arm9/PA_Motion.h:23: warning: implicit declaration of function 'motion_init'
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

...then you somehow managed to screw up your libnds package and should start over from the unpacking process, taking extra care not to mess up anything.

Linux ツール

DeSmuMe is an open source emulator and have a linux version which is included in the PAlib_080823_Archive.zip you downloaded already.

To compile it, let’s just the same like previous in the extracted folder :

$ ./configure
$ make
$ sudo make install

You can also use the Dualis or NO$GBA windows executables with Wine. Install Wine using your package manager and then run the desired emulator through Wine.

$ wine Dualis.exe
etc...

You can use PAGfx in Linux (yes, yes, it IS an .exe that you can run in Linux) provided you have Mono installed. Mono is a .NET runtime and is most likely in your package manager. Go on take a look.... You will also need to compile the Linux version of the tool since the binary PAGfx provided with PAlib is coded for the Microsoft.NET and includes code that won’t run on Mono. You can find some binaries on the PAlib forums if you don’t want to go through the trouble of compiling it yourself but I think you’ll find it’s quite easy to do ;) This is an easy process, so don’t worry. All you need to do is install the Mono-GMCS compiler which, in Ubuntu, is as easy as typing:

$ sudo apt-get install mono-gmcs

After this navigate your way to the /tools/pagfx-linux/ directory in your PAPATH and type the following commands:

$ ./configure
$ make

Now, if you’d like to be able to run PAGfx.exe anywhere you can also run:

$ make install

but that’s a matter of preference. If you don’t want it globally accessible you can just copy the EXE out of the archive in /PAGfx/PAGfx/bin/Release. You’ll find that it’s already set to executable and you can run it right then and there. If this doesn’t work you can always prefix it with ‘mono ‘:

$ ./PAGfx.exe
or...
$ mono PAGfx.exe

The EFS_Lib archive in “Other Libs” of the PAlib archive you downloaded comes with a Linux version of the EFS builder.

Alright we did all the work of setting it up for you, now go make us some games, damnit!

FAQ - インストールとコンパイル

Mac OS X 環境へのインストール

Mac section added 12/19/2006 by http://v8media.com, using Mac OS X 10.4.8

Apple 開発者向けツールのインストール (Xcode)

Any recent machine will come with the Developer Tools on the installer discs, or sometimes as a separate disc. If you just bought your machine, install off the disc.

If you didn’t just buy your computer, it’s best to look to Apple’s web site to get the most recent developer tools. The place to go for this is: http://developer.apple.com/tools/. It involves registration, but no money. Look around while you are in there, as there are some useful tools for all sorts of things you might do when scripting, programming, or even creating video on the Mac.

Once you have this installed you should have a folder at the root of your hard drive called “Developer”. You will also have many command line tools added. Most importantly, “make”.

パスを通す (環境変数)

There seem to be many ways to do this, and it seems to depend partly on which “shell” you have installed or selected I use the Mac OS X default for 10.4, which is bash. To find out which shell you use, open the Terminal program (from Applications/Utilities) and then select the “Terminal” menu item and select “Window Settings”. Make sure the top drop-down item “Shell” is selected. In that screen, you should see the 2nd line saying Shell: . If it’s bash, here’s how to set your “environment paths”.

If you are using something other than bash, you either know what you are doing, or will need to find a tutorial to set up your environent paths for your shell.

Environment Paths are just paths in your operating system that you or a program define to let yourself or a program do something more easily. For example, say that everyday you have to log in to another machine using the terminal using ssh to check a university email. The first step would be to log in to the server, probably using a program called ssh. Here’s what a command for that might look like: “ssh -i firstname.lastname@server.university.com”. If you are doing this from your own machine, you can simplify this by making what is called an alias. your alias for this example might simply be “unimail” or something of the sort. Far easier to remember. We do this in a hidden file in your home directory called .bash_profile.

1) To create the file, or open the file if it already exists, open a new terminal window. 2) type in (without the quotes) “pico ~/.bash_profile”. Now you should see a blank screen and some text a the bottom starting with: Get Help, Exit, WriteOut . . . You are in a program called Pico. All control is via the keyboard, your mouse won’t help you here. 3) copy and paste these next two lines:

export DEVKITARM=/opt/local/devkitPro/devkitARM
export DEVKITPRO=/opt/local/devkitPro
export PAPATH=/opt/local/devkitPro/PAlib

4) Hold the “control” key, and then press the “x” key, this sends the Exit command to the program. It asks if you want to save, so press the “y” button. It then comes up with a screen asking what the name of the document should be, we gave it a name when we made the command to open Pico, so just hit the “return” key.

5) Either close this terminal window or type source ~/.bash_profile so that your changes will take effect in it.

6) There is no step 6.

DevKitARM, libnds, dswifi をインストールする

FIXME

Disclaimer: I have not gotten a dswifi app to compile yet, I’m filling in what I know how to do so that someone who knows this part well will have an easy time of updating this with the correct information. Thanks ahead of time to whoever fills this information in!

Download the current version of devkitARM (It was at 21 as of 11/25/2007). This includes devkitARM and libnds. Here’s the link: http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=124207&release_id=549080. This is processor specfic. If you have an Apple PPC machine, download the osx version, if you have an Intel machine, download the Intel version. Both contain double-clickable package files. Go ahead and install these.

There are also examples listed “nds examples 20060817”. Download those, or a newer version if one exists. Now we start getting to issues. It seems like the libs we just installed aren’t fully aware of the capabilities of the OS, and don’t seem to be able to deal with spaces in the names of files. As long as you put the example files and any others that you are working on directly into the “Users/MyUserName/Documents” or in a folder with no spaces and with project names with no spaces, you will have no issues. I found it easier to put the stuff in a folder in the root of my hard drive. So I have “ianDS”, and “libnds_examples_20060817” as two folders in the root of my main drive.

After you place these files, we can test out some compiling. Here’s a step-by-step easy way to do this.

1) Have one Terminal window open, and one Finder window where you can see the example file you want to try compiling. I’m using this file: /libnds_examples_20060817/Graphics/2D/256_color_bmp/. What you want to be able to see is the draggable folder name of the project.

2) Type “cd " into the terminal. That’s a space after c, and d. 3) Drag the folder of the project you want to work on to the Terminal and let it go. It copied the whole path in there so you don’t have to do it your self or find your way there using shell commands. 4) type “make”

You should see something like this in your terminal window:

v8media.com_permanent_palib.info_wiki_compile_terminal_make.jpg

The important part there is where it says “built” near the bottom. As opposed to “Error”.

You should also see that your folder filled up a bit so it looks like this (if you are using column mode):

v8media.com_permanent_palib.info_wiki_compile_after.jpg

Woohoo! If you see this, you’ve just compiled multiple copies of a program. These can run on your flashed Nintendo DS or in emulators. For instructions on specific cards, look here, which is back up the page in the Windows section Putting the homebrew on the DS. If you are going to be doing much coding, I suggest using an emulator most of the time as this will be far faster than swapping cards, moving files, and unplugging and plugging cables every time you compile. Maybe just toss it onto actual hardware when you get something that you wonder how it looks for real or is complex enough that it may work differently than on an emulator.

One other thing you can do here while you still have the Terminal window open: type “make clean” and hit return. This should get rid of the files that were created during your “make” expedition. This can help you make sure that any errors you might get were not from extra files in your project.

PAlib

Next up is PAlib. http://palib.info/forum/modules/PDdownloads/. Take the latest stable release, in Zip format. Unzip it, and move the PAlib folder into /opt/local/devkitPRO alongside the other folders there. You may also need to replace /opt/local/devkitPRO/libnds with the version included with PAlib, but I would reccommend not doing this unless you get errors building PAlib examples ever. The rest of the folders and files in PAlib are examples and documentation, so they can go wherever you please.

Note: If you are having problems with testing, check that PA_Makefile is in the PALib directory (it may be in the PALib/lib directory). If it isn’t, move all the files from PALib/lib to PALib.

PAlib をテストする

To test that everything has been installed properly, fire up Terminal.app and cd to the location where you installed PAlibExamples. Next type the following commands:

cd Demos/Bunny
make clean
make

With luck, you should see something like this after the last command:

arm-eabi-g++ -g -mthumb-interwork -mno-fpu -L/usr/local/devkitPRO/PAlib/lib 
-specs=ds_arm9.specs main.o -L/usr/local/devkitPRO/PAlib/lib -lpa9 
-L/usr/local/devkitPRO/libnds/lib -lfat -lnds9 -ldswifi9 -o build.elf
Nintendo DS rom tool 1.33 - Jan 31 2007 19:37:59
by Rafael Vuijk, Dave Murphy,  Alexei Karpenko
built ... Bunny.ds.gba
dsbuild 1.21 - Jan 31 2007
using default loader

その他のソフトウェア

A piece of software that can be quite helpful on newer Apple Intel machines is WINE. WINE stands for WINE Is Not an Emulator. Since the newer Apple machines already have Intel chips, you don’t need an emulator to be able to run Windows programs, what you need is an environment to run those programs. Download from here: http://darwine.opendarwin.org/download.php. That’s an easy download and install, but you do need to have X11 installed, which you can find here: http://www.apple.com/downloads/macosx/apple/x11formacosx.html.

Some programs will need a Windows DLL file in order to run. If this is the case, you’ve got to find the DLL, maybe copy it from a Windows machine you have access to. Once you have it, just put it in the same folder with the program that you are trying to run. Start off simple and try with the sample programs that come with Darwine before you try something else.

Since the only programs you really need to run on the Windows side of things will most likely be the graphics conversion programs, being able to open them in a window instead of in a whole operating system is ideal. The program that comes with PAlib seems to work ok. You should find it here on your computer after installing PAlib: “/opt/local/devkitPro/PAlib/Tools/PAGfx/PAGC Frontend.exe”.

If you are running a less recent Apple machine with some sort of PPC chip (G3-G5) what you will want is a copy of QEMU. The Mac OS X version is called just “Q”. You can find this here: http://www.kju-app.org/kju/. If you are familiar with Virtual PC, you will find this to be pretty similar. Including that you will need a copy of Windows 98, 2000, or XP in order to use it.

Unfortunately, I have yet to get Darwine to run PAGfx, so I am currently using Parallels, which is a paid product. But worth not having to boot into Windows if all you are using is some tiny utility program. http://www.parallels.com/en/products/workstation/mac/. If you get Darwine to run some of these utilities, please post your success.

Another piece of useful software is GraphicConverter from LemkeSoft http://www.lemkesoft.com/. You can apparently use this to convert images to the format for the GBA and DS.

Here is how to do the preliminary steps: Make sure you have the most recent version of GraphicConverter. If you don’t it might not work. After you check (or download it), open your file in GraphicConverter. Simply save the file as a “Byte-Array-Header” file.

After you do this, you can take your “.h” file and put it into a piece of software called hConvert http://www.patatersoft.info/hconvert.html. hConvert will take your .h file and turn it into a .bin file.

See the site for more info: http://www.patatersoft.info/manual.html

With the release of PAGfx-Linux, MacOSX users now have the oportunity to use the PAGfx command line version without a problem. All you have to do is to install ‘mono’ (http://www.mono-project.com/Main_Page), automake 1.10 and autoconf. Autoconf can be installed using apt-get tool (very useful, install it if you haven’t yet), but automake has to be installed manually (apt-get only finds up to 1.9 version), however the instructions can be found easily googleing a bit. Then follow the instructions on the README file in PAGfx-Linux folder to install PAGfx. Once everything is installed you only have to put all your graphics on one folder, create the PAGfx.ini file (see sprites tutorial) and go to that folder on the terminal and type ‘pagfx’.

ワイヤレス設定

You will be glad to see that Apple’s Airport cards can be used to talk directly with the DS. Superb instructions here: http://www.macosxhints.com/article.php?story=20051119155606277.

DS プログラミング入門

This introduction will cover the basic homebrew development toolchain as well as some of the most commonly used add-on libraries. It also includes a short discussion of available emulators and hardware (flash cards) for testing your projects.

DS ソフトウェア開発

Thanks to the excellent work of many coders in the DS development community, the Nintendo DS is certainly one of the easiest video game systems for homebrew developers to jump into. With the free development tools these coders have made available, even beginning coders can produce high quality games in a surprisingly short period of time. But remember, even with the best tools available (and I consider devkitARM and PAlib to be among the best for any system), producing a high qulaity game requires a lot of persistence and attention to detail.

The foundation that makes makes C/C++ development possible on the DS is the free devkitARM toolchain from devkitPro, including the libnds library. DevkitARM provides basic C libraries and a compiler targetted to the DS’s ARM architecture while libnds includes many functions and macros for accessing the DS’s specific hardware features.

PAlib adds to the devkitARM toolchain by giving DS developers a higher level entry point to the hardware, allowing them to focus on producing code rather than deciphering the complexities of the DS’s hardware layout. PAlib is primarily intended to aide the development of original games on the DS. The bulk of its features are designed to make the end user interface better and easier to program. Graphics, sound (thanks to ASlib, which is incuded as part of PAlib) and user input are PAlib’s strong points.

In addition to devkitARM, libnds and PAlib, many other libraries are available to make various aspects of homebrew DS development easier.

DS エミュレータ

There are currently only 5 emulators. I highly recommend using exclusively No$GBA, it’s the most accurate one.

  • No$GBA contains almost full NDS emulation support including 3D and WIFI emulation. Runs a lot of commercial games. It may look as if this emulator corrupts the colors of your game, but it only simulates the display of the DS. Sadly, this isn’t mentioned at the official homepage and often asked in the forums, so here’s how to turn this off if you don’t want it: Select Options→Emulation Setup and set GBA mode to “VGA (poppy bright)”. Then select OK and Options→Save Options.
  • Dualis, it works pretty well for homebrew, but isn’t as accurate as No$GBA. Some code will run well on it, while it won’t on DS !
  • iDeaS is the other great emulator to watch ! It was the first to support 3d and sound, and... well, still remains the only one to really do it. The last version, 1.0.0.8c is out there, and we’ve seen screen shots of the WIP versions which led us to believe the next version will really rock, but still nothing comes...
  • DeSmuMe is maybe the fastest emulator for DS. Even if it still doesn’t support sound and zooming/rotation, it’s worth a try. The original author of DeSmuME, YopYop156, has stopped working on it on the beginning of april 2006 and passed the torch to a new team of developers on SourceForge.
  • The last emulator is DSemu, and will probably do a great comeback with its new plug in features, but I don’t use it yet. Maybe later :-)

Ensata is another emulator out there. It’s a crack/leak of an internal Nintendo emulator included with the official SDK. Due to the lack of legality, we don’t use this. ;-)

DS ソフトウェアを実機にインストールする

What you’ll need first is something to actually hold all the homebrew programs that you have created on the DS, this is done by purchasing and using a “flash cart”, most flash carts out there are for the GBA but now have been made to work for the DS. You can purchase many types and brands of flash carts, some with internal memory, some without. I’ll review the most popular ones, although remember that you may not want to purchase these mentioned, or even from the store which I’ll link to, but you will have to buy one if you ever intend to run your homebrew on an actual Nintendo DS. You’ll also need a PassMe of some sort (if you get a slot 2 card), which I’ll get to later. (Reader sidenote: Slot 1 cards are much cheaper and much easier to use then slot 2 cards, and don’t require the use of a PassMe with the downfall that they can’t directly use GBA games, but can with a relatively cheap expansion slot 2 card like the EZ-Flash 3in1)

  • EFA Linker: In store description: “The EFA has become known as one of the markets most reliable GBA Flash Linkers to this day. Across the world, EFA Flash Cartridges are being chosen over the competition for their reliability, performance, and ease of use.” These little bad boys have been around for quite some time and indeed do have some reliability attached to their name. They come in 256 megabit, 512 megabit, and 1 gigabit.
  • EZ Flash: Mollusk’s flash cart of choice. Careful, when flashing the rom, flash the .ds.gba (NOT the .nds), and WITHOUT the loader, or else it won’t work... The in-store description goes a bit like this: “The EZ-Flash III is one of the latest flash kits with many advanced features that are not only for gamers. It has a built-in, PDA-like, icon based OS (operating system), and EZ-Disk function (works as a USB flash disk). The EZ-Flash III is also NDS, GBA(SP), and GBM compatible!”. These EZ Flash IIIs come in 1 gigabit and 2 gigabit sizes respectively. There is also the EZ Flash and the EZ Flash II out for sale, please check around for stores that sell that product if you are interested.
  • SuperCard: The Supercard isn’t much like the EFA Linker or the EZ Flash. The key difference here is that the medium for storing DS games is actually your own CF or SD memory cards. This could save you quite a bit of money if you have a few of them laying around from your digital camera. The SuperCard is made to work with the SuperPass, which I’ll explain later.
  • M3 Perfect: While being the new kid on the block, the M3 Perfect would seem to work quite well in its infancy. Made out of China, the M3 is being marketed as a movie player but may do wonders for running homebrew. Many updates are released often out of their site M3adapter.com. The M3 Perfect available now works with CF cards and SD one.
  • G6: From the makers of the M3 is the G6. These makers must love their product numbering. Unlike the SuperCard or the M3, the G6 has three variations, each having its own internal memory for storing homebrew files. The sizes come in 1 gigabit, 2 gigabit, and 4 gigabit.

Now, no matter what you do, you will always need to use one of these next methods to run your DS homebrew programs. It comes in just five variations, although the first three seem to be the most widely accepted.

  • PassMe : That’s what I currently use, and love it ! It’s basically a big DS cart that goes in the DS slot. You put a real DS cart in it, which allows the passme to go around the DS’s protections, and it uses the cart’s save state too. You need a gba flash cart (I have an EZ Flash, for example) on which will be stored the rom. With newer versions of the DS however, a different PassMe is needed and thats where PassMe2/Passkey2/SuperPass is invented.
  • FlashMe : Never tried it, but here’s what it seems to be... Using a PassMe or WiFiMe, just once, you flash your DS (hacks its firmware), and then it works like the passme, with a gba flash cart, except that you don’t need the PassMe anymore ! That cool, because if some friends have gba flash carts, you just flash their DS and they’ll be able to have DS homebrew with nothing more. It also has the benefit of containing recovery code to protect your DS from malicious code.
  • NoPass : After the DS cart encryption was cracked, commercial companies began producing a product that didn’t require an original DS game inserted like the PassMe. This device works on every DS currently on the market and does not have any special requirements. Most work with any GBA (slot-2) media but some only work with the product they ship with, so make sure before purchasing one that it will work with your media.
  • WiFiMe : If I got things right (thanks Aquarius :p), WiFiMe is an application you send through wifi, that boots the code from the gba cart... So basically, it’s a virtual PassMe, using wifi. Can be used to boot FlashMe from flash cart or a GbaMoviePlayer. This method is obsolete as it only worked on early versions (through October of 2005) of the DS.
  • Wireless Multi Boos (WMB) : Last method, this one works only for roms smaller than 4MB. It just sends the demo through wifi directly on the DS, but your ds should be able to run unsigned code ( I used the FlashMe replacement firmware ). But it has this size limit...
  • DS-X : The DS Extreme is a DS 1 slot cartridge.You just connect the DS-X to your PC/MAC via USB (it has a tiny Mini-Usb slot on the cart) and just drag n drop your compiled NDS files. The easiest option so far. Currently supports a 512MB (4Gb) or 2048MB (16Gb) storage capacity. This device is one of the most expensive slot 1 devices compared to the M3 DS Simply/R4.
  • M3 DS Simply/R4 : The M3 DS Simply and R4 are pretty much the same thing, aside from firmware differences. A quick flash can convert one to the other, as of June 2007. It is similar to the DS-X in that it is a slot 1 cartridge. Instead of using built-in storage, though, it accepts microSD cards. This drastically reduces the price to ~$40USD. The M3 DS Simply/R4 also include a PassMe2, in case you want to boot any slot 2 devices. These two devices have the largest fanbase by far.
  • Cyclods : The Cyclods is a cart very similar to the M3 Simply and R4 with the exception that it is newer and at the moment (October/07) it is the flashcart with the most up to date flashcart.
  • EZ-Flash V : The EZ-Flash V is the Slot-1 version of the EZ-Flash afore mentioned.
  • Acekard RPG : An open source slot one solution with both a MicroSD slot and 1 Gigabite of internal memory.

It would be best to keep your flash cart and passme-device from the same maker to ensure compatibility so combine as follows: EFA Linker and EZ Flash with PassMe2, SuperCard with SuperPass/SuperKey, and M3 or G6 with PassKey2/PassCard 3.

Put the correct file into your flashcart

as soon as you compile your program/PAlibExample/homebrew, “magically” three files appears in your program root directory:

  • <program_name>.ds.gba –> use this on GBA Flash Carts, and EZ (Some may require you rename it to .ds.nds)
  • <program_name>.nds –> this is for Slot1 carts and most emulators, Chishm’d GBA Movie Player V2 and G6 and M3 (you must push START instead of A to load it).
  • <program_name>.sc.nds –> this is for supercard, G6 and M3

just pick the file you need and put on your flashcart! well done!

Using the SuperCard with SuperPass
If you are using the SuperCard with a SuperPass (as shown in the picture below), the homebrew application you’ve created should be easy enough to be selected from the menu, as soon as you switch your DS on, a menu should appear on the top screen.
www.palib.info_screens_supercard_ds_superpass.jpg www.palib.info_screens_supercard_supercard_menu.jpg

Using the SuperCard with a flashed DS
If you have flashed the DS Bios with the FlashMe method, after you have inserted the SuperCard into the slot, as soon as the DS is switched on, keep pressed the buttons A + B + X + Y, the SuperCard menu should now show up, select the file named “mygame.sc.nds” (remeber?) and launch it pressing A, if everything went well, your program should come up on the DS. Well Done. ;-)

www.palib.info_screens_supercard_nds_with_flashme.jpg www.palib.info_screens_supercard_boot_nds_sc.jpg www.palib.info_screens_supercard_moonshell.jpg

次 → 2日目 - C言語入門

— Translated by kuy 04/11/2008 03:11

 
day1ja.txt · Last modified: 05/03/2009 08:55 by kuy
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki