You are not logged in.
Pages: 1
My problem is, i can do a homebrew for ds in devkit, but i dont can create the makefile. How i made this ?
Offline
In this program http://www.aaronrogers.com/nintendods/P … Input_Pad/ it used
#include <PA9.h> // Include for PA_Lib
#include <String> // Used for C++ style strings
how to produce a makefile for this code ???
I made this,
// Includes
#include <PA9.h> // Include for PA_Lib
// Function: main()
int main(int argc, char ** argv)
{
PA_Init(); // Initializes PA_Lib
PA_InitVBL(); // Initializes a standard VBL
// PA_LoadSplash(); // PA_Lib splash screen
PA_InitText(1, 0); // Text system for top screen
PA_InitText(0, 0); // Text system for on botton screen
PA_SetTextCol(1, 31, 31, 31);
// 1 = botton screen, 0,0,0 = R,G,B
PA_SetTextCol(0, 0, 31, 0);
// 0 = top screen, 0,0,0 = R,G,B
PA_OutputSimpleText(1, 0, 0, "Aperte algum bot^~ao.....");
// 1 = top screen, 0 = Tile X, 0 = Tile Y
// Infinite loop to keep the program running
while (1)
{
PA_OutputText(0, 0, 12, " ");
// Determine which button was pressed
if (Pad.Held.Start) {
PA_OutputText(0, 0, 12, "start");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.Select) {
PA_OutputText(0, 0, 12, "select");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.A) {
PA_OutputText(0, 0, 12, "a");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.B) {
PA_OutputText(0, 0, 12, "b");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.X) {
PA_OutputText(0, 0, 12, "x");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.Y) {
PA_OutputText(0, 0, 12, "y");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.L) {
PA_OutputText(0, 0, 12, "l");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.R) {
PA_OutputText(0, 0, 12, "r");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.Up) {
PA_OutputText(0, 0, 12, "up");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.Down) {
PA_OutputText(0, 0, 12, "down");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.Left) {
PA_OutputText(0, 0, 12, "left");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else if (Pad.Held.Right) {
PA_OutputText(0, 0, 12, "right");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
} else {
PA_OutputText(0, 0, 12, "nenhum");
// 0 = Bottom Screen, 0 = Tile X, 12 = Tile Y
}
PA_WaitForVBL(); // Wait for VBL to complete
}
return 0;
} // End of main()
without the string, and my makefile used a generic for palib...
My great problem is create the makefile.
Last edited by phillip666 (2008-02-15 2:35:45 pm)
Offline
You've downloaded PALib already. PALib includes a bunch of directories including PAlibTemplate and PAlibExamples. Look inside those directories for example projects which are ready to build. You can take one of the makefiles out of there, then modify it.
Personally, I don't use PAlib, so I'm sorry I can't be of more help.
"We are merely sprites that dance at the beck and call of our button pressing overlord."
Offline
Pages: 1