I created this video with the YouTube Video Editor (http://www.youtube.com/editor).
Contents. Setup Install. If it's already installed, update it using sudo (dkp-)pacman -Syu. On Windows, there's a. On Unix-like platforms such as Linux/macOS, there's.
Windows. If you already use msys2 then you can follow the instructions at to add the devkitPro repositories.
Otherwise. from github and run it, following the instructions as you go. An Internet connection is required.
![]()
Ensure at least '3DS Development' is ticked - you can also leave the other options ticked if you wish. Once the installer has finished, launch MSYS from:.
Windows 7 and earlier: Start - All Programs - devkitPro - MSYS. Windows 8 and 8.1: Right click on the Start screen and select 'All Apps'. You should find MSYS there. Windows 10 (pre-Anniversary Update): Start - All Apps - devkitPro - MSYS.
Windows 10 (post-Anniversary Update): Start - devkitPro - MSYS Alternatively starting with Windows 10 Anniversary Update (Version 1607), the may also be used to run the Linux version of devkitARM. Unless you have some particular need for WSL it's recommended that you stick to a more standard environment. Unix-like platforms Currently devkitPro provides precompiled versions of devkitARM for the following Unix-like platforms: Linux (x8664), macOS (x8664). Note that Linux x8664 binaries are usable under WSL.
Follow the instructions to install pacman found at. run sudo (dkp-)pacman -S 3ds-dev to install the tools and libraries for 3ds development.
logout and login again to get the environment settings needed. Building the examples 3DS examples are still being created; however, there are a growing number of examples available from the. These are downloaded by the installer and can be found in $DEVKITPRO/examples/3ds These can be built from the command line.
To start a new homebrew project from the bash shell, simply type the following (replacing /projects/my3dsproject with the place you would like your project to be stored, with meaning your HOME directory): cp -r $DEVKITPRO/examples/3ds/templates/application /projects/my3dsproject cd /projects/my3dsproject The standard Makefile will use the folder as the name of the 3dsx that will be built. You can keep that behaviour or simply change the TARGET:= $(notdir $(CURDIR)) line in the Makefile to explicitly name your project. To compile it, type make in the project directory. Running your code To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: $DEVKITARM/bin/3dslink my3dsproject.3dsx, replacing my3dsproject with the name of the 3dsx file you want to run.) If all goes well, you'll soon see your application running on your 3DS.
Troubleshooting I get the 'Please set DEVKITARM in your environment.' Ensure you have the devkit-env package installed - (dkp-)pacman -Sl grep devkit-env. Logout and login to get the enviroment settings.
For WSL users, you need to close the Bash shell, then reopen it for WSL to reload all of the variables from a clean state.
The first thing you need to do to get you started is download the latest versions of devkitARM and the libraries that come with it, provided. This is the core to all/most homebrew programs on the DS, as it provides the basic functions to access the various hardware functions of the DS. Luckily, the folks have supplied an easy-to-use program called devkitPro Updater, which allows you to install the whole package in just a few clicks. Upon downloading and opening, a basic setup dialogue should appear. There isn’t much you need to change here, though, if you want, you can choose to remove your downloaded files. Simply click through until you get to a screen looking like this: PAlib itself only requires 8 of these components, but you can install all of them if you wish.
The components that need to be installed are:. Filesystem It is also recommended that you also install ‘nds examples’ (examples for libnds) and ‘Programmer’s Notepad’ (a basic IDE), though they don’t necessarily affect the functionality of PAlib. Once you have chosen your options, proceed to the next page, which will allow you to choose where you want to install the toolchain and the libraries - basically your place for DS development. Put it wherever you like – it doesn’t affect the compilation, as long as you don’t put it in a directory that contains spaces (eg, ‘C:/ NintendoDS/devkitPro’ would be fine, but ‘C:/ Nintendo DS/devkitPro’ will cause compilation problems). The updater/installer will then start downloading and installing the required packages. A few dialogs may pop up, displaying ‘Extracting’ with a status bar, but you don’t need to worry about them – the installation requires no further actions. Stage 2: Installing PAlib.
With the installation of the toolchain and the supporting libraries complete, it’s now time to download and ‘install’ PAlib. Unfortunately, PAlib doesn’t come with an automatic installer, but it’s as easy to set up. First off, we’ll need to download the latest PAlib archive, which can be found at this thread: Since the forums are down the newest version can be found here: After the download is finished, you have to create a PAlib folder in the path of your devkitPro folder and unpack it there.
This should result in a folder structure similar/identical to this: /devkitPro/PAlib/lib/ /devkitPro/PAlib/template/ /devkitPro/PAlib/examples/ /devkitPro/PAlib/ Finished! We’ve successfully set up a DS homebrew development environment, and are almost ready to start developing. Now, all we need to do is optionally set up and IDE and try compiling an example. — 12:44 Edited by fincs for latest PAlib — fincs 16:38. Lol, just thought of something.
It has been asked before. What is a template? You could say that a template is a device to provide the form or structure for content. In other words, it’s an empty structure that you will eventually fill with all your development files for a given project like C/C (code) files, graphics images, sounds, etc. Then, because you used the template that was already set up with the correct structure, you’ll be able to compile your working NDS file easily. Here’s the structure of the PAlib template: Folders:.
Let’s alter the template to make a simple Hello World just to show how easy it can be. This will not enter into the real details of programming on the DS yet, just show you that it can be really simple and already possible on Day 1:p To make a Hello World example, we’ll use PAlib’s basic text system. The text system uses the backgrounds–well, one background (you have four of them per screen)–and you can choose which screen and which background to use. Some more functions are available, like setting the text font, or changing its color, and much much more, but for now we’ll keep it simple:p All you need to do is add the following lines to the template’s main.c file just after PAInitVBL; PAInitText ( 1, 2 ); // Tell it to put text on screen 1, background number 2 PAOutputSimpleText ( 1, 1, 1, 'Hello World!'
); // Print the desired text on screen 1, with coordinate 1, 1 The first line initializes the text system, by loading the text font into the DS’s video RAM. If this wasn’t done, then the text output would be blank as there would be no data in the video RAM. Not too good;) PAInitText takes 2 arguments:. This tutorial is now outdated, use the PAlib vctemplate install.bat in the latest version of PAlib (The next PAlib beta stable will include an updated VC wizard template for VC 2008/2005) 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:. 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”. 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” then click on “Environment Variables”. Now, click on the “New” button inside “System Variables” (the lower one) and add a variable with the name “DKPHOME”.
In the “Value” box, write the root folder of your devkitPro installation, “Windows Style” (i.e. “c.” instead of “/c/.”). (for the latest release of PALib, PAPATH environment variable is not necessary) Pay attention on the environment variable “PAPATH”. If you have installed the packages as administror your other users don’t have this variable automatically.
Without creating it manually for the user, the compilation will fail with an error message saying “PA9.h” couldn’t be found. Get the AppWizard (if it doesn’t work, try ) or alternatively you can download NightFox’s version which is installed the same way and include his libraries (eg: EFS) 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. Extract the contents.
Now,replace the MakeFile you just extracted with the MakeFile from. By replacing the Makefile, the most recent PAlib will work with VC too. Look in the folder you’ve just extracted.You will see two JavaScript files: “VC9ExpressSetup.js” and “VC9Setup.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: 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. Just in case you decide to tweak the Wizard files on your own, and decide to do some searching on the net, the word you are looking for is “Wizard” and “Custom Wizard”. An “AppWizard” is associated with MFC and managed code. We are creating a “Custom Wizard”, not an “AppWizard”.
Will help you get a good insider about the various files, structures and underlying working of a custom wizard. 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 The location above should be the full path and filename of the.js file you need to use. That should work. If you are running on Vista or Seven, type “cmd” in start→search field. Then right click on “cmd.exe” and select run as admin.
And finally, WScript.exe. 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:. 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.If you are have downloaded the PAlib beta and the program doesn’t compile then try version, just delete the PAlib you have and install this. 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 “asshole = (u32.)nonsense to confuse you;” 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 ([email protected]) 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 “ lib include nds” and “ libnds include nds” (without the quotes, anche replace 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. Rebuilding my project didn’t work for me. If you would like to rebuild you will have to change something in the General PAMakefile. The old makefile (older version of PAlib) included this line: rebuild: clean $(BUILD) So I tried adding it to the new general file (C: devkitPro PAlib lib – PAMakefile) because it wasn’t there.
You need to change it in this section: clean: @echo clean.$(TARGET) @rm -fr $(BUILD).elf.ds. rebuild: clean $(BUILD) export: @echo exporting.$(TARGET) @cp.nds $(EXPORTDIR)/$(TARGET).nds I tried it and rebuilding worked, however I don’t know if this is a valid way of doing this and I need this to get approved by someone who understands makefiles better than I do. Yet still works! 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. No cardridge found. If the emulator can’t find the.nds file, it might work if you change “$(TargetDir) $(TargetName).nds” to “$(TargetDir). $(TargetName).nds” to make it work.
If this doens’t work you can try “$(SolutionDir) $(TargetName).nds” 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.ExternalCommandx” 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. 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.
Original tutorial by KerneL, revised by ObsidianX tweaked by PTDStec:) THIS IS THE BEST WAY TO BUILD AND COMPILE ANY PROGRAM FOR THE DS OR ANY OTHER PLATFORM AS THE WINDOWS VISTA AND WINDOWS SEVEN IS A USELESS PILE OF JUNK FOR THE DEVELOPERS COMMUNITY AND IS BUILT TO ANNOY USERS AND PROVIDE ENDLESS HASSLES AND BLOCKING PROGRAMS WHICH MAKE IT HORRIBLE TO USE AND RUIN ALL ENJOYMENT OF BEING AN ADMIN USER AND KNOWING HOW TO CONTROL AND PROGRAM A PERSONAL COMPUTER,SO IF POSSIBLE GET COMPUTER LITERATE AND LEARN AND USE LINUX ITS THE BEST! 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. To have a quick install of PAlib on linux you can use Heather’s script (modified by Rapfnny): #!
/bin/bash # # PAlib Linux Installation Script by Rapfnny (www.bob-omb.net - irc.bob-omb.net) # # echo echo 'This script will download and install everything needed to use devkitPro and PAlib with linux as of.' Echo ' echo 'Press ENTER to continue.' Read # # devkitPro Directory # echo ' echo 'Changing to the home directory: ' $HOME '.' Cd $HOME echo ' echo 'Creating the directory for devkitPro:' $HOME '/devkitpro.' Mkdir devkitPro # # DevKitARM # cd $HOME/devkitPro echo ' echo 'Downloading devKitARM.' Wget 2026/devkitARMr26-i686-linux.tar.bz2 echo ' echo 'Decompressing devKitARM.' Bunzip2 devkitARMr26-i686-linux.tar.bz2 tar xvf devkitARMr26-i686-linux.tar rm devkitARMr26-i686-linux.tar # # LibNDS # cd $HOME/devkitPro mkdir libnds cd libnds echo ' echo 'Downloading LibNDS.'
8.tar.bz2 echo ' echo 'Decompressing LibNDS.' Bunzip2 libnds- 1. 8.tar.bz2 tar xvf libnds- 1.
8.tar rm libnds- 1. 8.tar # # dsWifi # cd $HOME/devkitPro/libnds echo ' echo 'Downloading dsWifi.' 10/dswifi- 0. 10.tar.bz2 echo ' echo 'Decompressing dsWifi.' Bunzip2 dswifi- 0.
10.tar.bz2 tar xvf dswifi- 0. 10.tar rm dswifi- 0. 10.tar # # libFAT # cd $HOME/devkitPro/libnds echo ' echo 'Downloading libFAT.'
4/libfat-nds- 1. 4.tar.bz2 echo ' echo 'Decompressing libFAT.' Bunzip2 libfat-nds- 1. 4.tar.bz2 tar xvf libfat-nds- 1. 4.tar rm libfat-nds- 1. 4.tar # # PAlib # cd $HOME/devkitPro echo ' echo 'Downloading PAlib.' Mkdir PAlib cd $HOME/devkitPro/PAlib wget echo ' echo 'Decompressing PAlib.'
7z x PAlib090801.7z rm PAlib090801.7z # # Paths # echo ' echo 'Finished setting up PAlib. You need to set up the paths permanently in /.bashrc' echo 'A text editor will open. Add the following lines of text to it and save and close the text editor.' Echo ' echo 'export DEVKITPRO=/devkitPro' echo 'export DEVKITARM=$DEVKITPRO/devkitARM' echo 'export PAPATH=$DEVKITPRO/PAlib/lib' echo ' echo 'Press ENTER to continue.' Read gedit /.bashrc source /.bashrc To use Heather’s script, copy and paste it into a file, say ‘install.sh’ and run ‘./install.sh’ in a terminal.
It will download all the necessary file, extract them, and place them into the proper folders and clean up after itself. It installs to the devkitPro folder in your home folder. It’s fine the terminal, but why not use the same file “ build.bat ” and “ clean.bat ” for compiling and cleaning files. It is quite possible and we will do it through as the last chapter in a shell script. So create a file build.sh to the root of your project, next to the makefile what;) #!
/bin/bash # Compilation of programs or projects NDS Automatic # Created By Matkilsa echo echo 'Compiling your project under PAlib Nintendo DS.' Echo echo 'Script by Matkilsa, created.' Echo ' echo 'Press Enter to continue.' Read # Make programs make echo ' echo 'End of compilation.' Echo ' echo 'Press Enter to continue.' Read Same procedure for the file clean.sh #! /bin/bash # Cleaning executables projects NDS # Created By Matkilsa echo echo 'Cleans executables projects PAlib Nintendo DS.'
Echo echo 'Script by Matkilsa, created.' Echo ' echo 'Press Enter to continue.' Read # clean make clean echo ' echo 'End of cleaning.' Echo ' echo 'Press Enter to continue.' Read You can make it executable, but if you’re a Linux user you know how:) This chapter is taken from French Wiki PAlib.
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 - -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//devkitpro $.
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! If you get any weird errors check the forums to see if it’s already been encountered and fixed. It’s rather simple.
You want to install Code::Blocks itself as well as the contributor plugins. In the ubuntu repository these files are called ‘codeblocks’ and ‘codeblocks-contrib’. The ‘codeblocks-contrib’ installs some Contribuited Packages, so without it you can’t Set the EnvironmentSettings. When you have those installed, open Code::Blocks and go to Settings and then EnvironmentSettings and scroll down to Environment Variables. Click on Add and input: Key: DEVKITPRO Value: Wherever devkitPro is installed Key: DEVKITARM Value: The folder devkitARM inside the devkitPro folder Key: PAPATH Value: The folder ‘lib’ inside the PAlib folder inside the devkitPro folder Press ‘Set Now’ and then ‘Yes’. You are now fully set up. DeSmuMe is an open source emulator and have a linux version which is included in the PAlib080823Archive.zip you downloaded already.
To compile it, let’s just the same like previous in the extracted folder: $./configure $ make $ sudo make install DeSmuMe can be also found in some repositories of Linux systems In RPM based ones try command: yum install desmume In DEB based ones it will be probably: apt-get install desmume 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.
$ mono PAGfx.exe The EFSLib 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! I have created an executable file for building the nds files on linux. You can find it. 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. 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 [email protected]”. 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.profile (or.bashprofile, depending of the OS version).
1) Ensure this file (/Users/yourName/.profile) exist (be aware: this is an hidden file!). Otherwise, you’ll have to create it: open a terminal window and type “test -n “`ls -a $HOME grep.profile`” echo -n$HOME/.profile” then hit enter. This will create an empty file if.profile does not exist. Otherwise it will do nothing. To do that, in your terminal window, just type “open $HOME/.profile” then hit enter.
3) copy and paste these next lines: (the lines beginning with a # are optionnals) export DEVKITARM=/opt/local/devkitPro/devkitARM export DEVKITPRO=/opt/local/devkitPro # export PAPATH=/opt/local/devkitPro/PAlib # with the last version of the devkitPro, it seems not necessary to specify the PAlib location 4) Save and close the file. 5) There is no step 5. 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!
(maybe fixed?) Download the current version of devkitARM (it was at 30 as of ) and libnds (it was at 1.4.3 as of ). This is no more processor specfic, just download the ‘osx’ version.
There are the links: devkitARM: libnds: There are also examples listed (nds examples). Download the latest version. Now we start getting to issues. There is a “bug” in those examples that makes ABSOLUTELY FORBIDDEN using spaces in the name of the project but 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 or 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 “libndsexamples20060817” 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: /libndsexamples20060817/Graphics/2D/256colorbmp/.
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”.There is a way to avoid doing this any time you compile you project: do the steps 1 to 3 (not the 4) and copy this code: echo -n 'cd '`echo $0 'Build.sh;echo -n 'sed 's/ /Build.sh//g'Build.sh;echo '`'Build.sh;echo 'make clean'Build.sh;echo 'make'Build.sh;chmod u+x Build.sh then hit enter. Dont try to understand all this code.
All you have to know is that a file (called Build.sh) that you may open (by double-clicking) that will do the steps 1 to 4 for you will be created. Bonus: you may move the file to other project folders, it will work there to. You should see something like this in your terminal window: The important part there is where it says “built. Yourproject.nds” near the bottom (not the last).
As opposed to “Error X”. You should also see that your folder filled up a bit so it looks like this (if you are using column mode): 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. 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. (this is useless if you have created the “Build.sh” file). Next up is PAlib.
Take the latest stable release, in Zip format (maybe the big “Download” button). 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 PAMakefile 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. 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=dsarm9.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:. That’s an easy download and install, but you do need to have X11 installed, which you can find here:. 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:. 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. If you get Darwine to run some of these utilities, please post your success.
Another piece of useful software is GraphicConverter from LemkeSoft. 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. HConvert will take your.h file and turn it into a.bin file. See the site for more info: 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’ , 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’. 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 quality 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’ 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. Contains almost full NDS emulation support including 3D and WIFI emulation. It’s the best DS emulator out there. 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. This is VERY outdated. Don’t follow me! 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). : 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.sc.nds – this is for supercard, G6 and M3 just pick the file you need and put on your flashcart!
— 20:00 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. 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.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |