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 Let’s alter the template to make a simple Hello World just to show how easy it can be. Now that you know everything about the template, go on and see how to display text! Here is what you see when you first open main.c : //////////////////////////// // PAlib project template // //////////////////////////// // Lines starting with two slashes are ignored by the compiler // Basically you can use them to comment what are you doing // In fact, this kind of lines are called comments :P // Include PAlib so that you can use it #include int main ( ) Īll this is the closing code, always there, always like this, don’t bother about it, just leave it alone :p If you compiled and ran the rom in an emulator or on DS, it wouldn’t do anything, though, just display 2 white screens because you haven’t done anything yet but initialize the basics. The template’s main.c contains all the basic stuff needed to run PAlib. It contains the main() function and all the stuff that’ll be loaded by default when the rom starts. Like its name suggests, main.c is your main program file. If you didn't install devkit to /opt, be sure to adjust the DEVKITPRO path accordingly.Ĭlose any terminal windows you have open.Now you should open template.pnproj (Programmer’s Notepad) or just go into the “source” folder and open main.c in the editor of your choice. I like to use nano.īe sure to NOT run sudo with the above command. At the very end of the file add this. You can use any text editor you want for this. Sudo chown -R yourusername:yourusername /home/yourusername/projects/wii-templateīefore you can compile any project, you need to edit your export settings for your shell. Sudo cp -r /opt/devkitpro/examples/wii/template /home/yourusername/projects/wii-templateĪs this point, the wii-template folder in projects does not have full user permissions, let's give it back user permissions. Let's make a new directory in your user account home directory called projects It's a good idea to copy paste over the example wii template+project over to a personal folder, so we never lose the original example project. Chapter 6: Copying over certain files, setting environment variablesĭevkitPro (for wii-dev) comes with an example Wii HBC project for you to compile.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |