Welcome, Guest. Please Login or Register
Home Help Search Login Register
Pages: 1 2 
Send Topic Print
Step-by-step developer guide (Read 13665 times)
Steve Chapman
Ex Member


Step-by-step developer guide
02/07/11 at 23:54:36
 
Day 1:

Surf to Microsoft.com/express and install Visual C++ 2010 Express edition.

Express = free!

It took two attempts before "vc_web.exe" downloaded. (You do not need Silverlight or SQL, if you want to avoid the bloatware the installer throws at you.)

Familiarize yourself with the VC IDE. http://www.cplusplus.com/ is a good reference for C++ syntax.
Back to top
« Last Edit: 02/08/11 at 22:58:57 by N/A »  
 
IP Logged
 
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #1 - 02/08/11 at 21:32:03
 
Day 2:

Install Devkit pro from this link:
http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitProU...

It's best to install it in the default folder c:\devkitpro

Devkitpro is an ARM & PowerPC programming system. You can use it to program for a PSP, Wii, & other systems. Don't update to newer versions as it may break our next step.

Install PALIB:
http://palib-dev.com/PAlib100707.7z

It's a 7zip file for some reason, you'll need a 7-unzipper which can be found by googling, although programs like Winzip can also deal with this archive format. Be careful if you install Winzip for this, uncheck all of the bloatware it carries, and uncheck "shell extensions" as it will take over all zip file processing from Explorer if you check this. You'll also need to do a custom setup (not "express") and uncheck the .zip and .cab file associations even though it whines and complains!

Unzip the files to a folder called c:\devkitpro\palib

PALIB is a supplement to Devkitpro that adds support for screen setup, io, sprites, fonts, and a slew of goodies that make it easier to program for the DS.

Next we'll need to figure out how to get this all to work with VC 2010 express as an IDE.
Back to top
 
 
IP Logged
 
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #2 - 02/08/11 at 22:57:01
 
Thanks to demosthenes2k8 we have a template to begin coding.

Download http://PanoCamera.com/HDRLabs/PALib2010.zip

Keep a copy of this set aside as a master template for coding future apps.

Execute the PALibTemplate.vcproj file inside the PALibTemplate folder. VC2010 will want to upgrade the file with its conversion wizard, go ahead and allow it to do this.

Next we'll begin coding a useful (for me anyways) DS Camera app.
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #3 - 04/06/11 at 13:44:28
 
I followed your steps so far.

But to get the Template in step 3 get to work I needed to edit the following files and adjust the path directives to several lines in the files to suit to my projects location:

main.d
MyApp.d

Otherwise I would state where to put the template to help out newcomers like me so they would not trap into the pitfall.

Cheers
Yogie

P.S. While converting the template I got two warnings - please see my attachment - I'm not quite sure if the warnings need to be considered or can be neglected. Many thanks!

Back to top
 

screenshot.png (Attachment deleted)
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #4 - 04/06/11 at 14:40:40
 
P.P.S. I tried to get the source code of the OCCBracket recompiled but until now without success any idea or things I need to let you know what I did or hat the messages are?

Whilst updating and importing I got again some warnings, see at the screen shot.

And then I had to edit again some files to adjust the project path:

card_spi.d
dserial.d
main.d

then there were some files missing:

PA_IO.h - C:/devkitPro/palib/include/nds/arm9/
PA_GBFS.h - C:/devkitPro/palib/include/nds/arm9/
text0.h - C:/devkitPro/palib/include/nds/arm9/
text1.h - C:/devkitPro/palib/include/nds/arm9/
text2.h - C:/devkitPro/palib/include/nds/arm9/
text3.h - C:/devkitPro/palib/include/nds/arm9/
text4.h - C:/devkitPro/palib/include/nds/arm9/
PA_FS.h - C:/devkitPro/palib/include/nds/arm9/
PA_Video.h - C:/devkitPro/palib/include/nds/arm9/
PA_Splash.h - C:/devkitPro/palib/include/nds/arm9/
PA_Save.h - C:/devkitPro/palib/include/nds/arm9/
PA_FATLoad.h - C:/devkitPro/palib/include/nds/arm9/

gba-jpeg-decode.h - C:/devkitPro/palib/include/nds/
gba-jpeg.h - C:/devkitPro/palib/include/nds/
SoundCommon.h - C:/devkitPro/palib/include/nds/
Sound9.h - C:/devkitPro/palib/include/nds/

which I found on other PALib versions and put those file into the ZIP.

But then I got stuck. Because I'm getting a lot of warnings and errors when trying to build the project:

Code:
c:/Projects/OCCbracket/02_23_10/ver15/source/alldegrees.h: In function 'int MoveAngle(int, int)':
  c:/Projects/OCCbracket/02_23_10/ver15/source/alldegrees.h(5):42: warning: deprecated conversion from string constant to 'char*'

…


c:/Projects/OCCbracket/02_23_10/ver15/source/TakeAShot.h: In function 'void TakeAShot(int, bool, float, int)':
  c:/Projects/OCCbracket/02_23_10/ver15/source/TakeAShot.h(49):26: warning: comparison between signed and unsigned integer expressions

…

 c:/Projects/OCCbracket/02_23_10/ver15/source/main.cpp: In function 'int main(int, char**)':
  c:/Projects/OCCbracket/02_23_10/ver15/source/main.cpp(51):18: warning: large integer implicitly truncated to unsigned type
  c:/Projects/OCCbracket/02_23_10/ver15/source/main.cpp(54):2: warning: 'void _PA_DeprecationStub()' is deprecated (declared at c:/devkitPro/PAlib/include/nds/arm9/PA_General.h:34)

…

c:/Projects/OCCbracket/02_23_10/ver15/source/main.cpp(121):39: warning: suggest parentheses around comparison in operand of '&'

…

c:/Projects/OCCbracket/02_23_10/ver15/source/main.cpp(648):40: warning: deprecated conversion from string constant to 'char*'
  c:/Projects/OCCbracket/02_23_10/ver15/source/main.cpp(908):2: warning: 'void _PA_DeprecationStub()' is deprecated (declared at c:/devkitPro/PAlib/include/nds/arm9/PA_General.h:34)

…
c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiBusy':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(39):9: error: 'CARD_CR1' undeclared (first use in this function)
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(39):9: note: each undeclared identifier is reported only once for each function it appears in
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiStart':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(44):2: error: 'CARD_CR1' undeclared (first use in this function)
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiStop':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(49):2: error: 'CARD_CR1' undeclared (first use in this function)
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiTransfer':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(79):2: error: 'CARD_EEPDATA' undeclared (first use in this function)
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiTransferBuffer':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(109):3: error: 'CARD_EEPDATA' undeclared (first use in this function)
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiWriteBuffer':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(147):3: error: 'CARD_EEPDATA' undeclared (first use in this function)
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiTransfer':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(91):1: warning: control reaches end of non-void function
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c: In function 'cardSpiBusy':
  c:/Projects/OCCbracket/02_23_10/ver15/source/card_spi.c(40):1: warning: control reaches end of non-void function
  make[1]: *** [card_spi.o] Error 1
  make: *** [build] Error 2
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

 



I tried to catch any kind of warning and error in the code above, maybe you can help out?
I also tried to compile the code on a C++ 2008 installation but with the same outcome.

Any help or idea?

Many thanks in advance…

Yogie
Back to top
 

occ-screenshot.png (Attachment deleted)
PALib_include_nds.zip (Attachment deleted)
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #5 - 04/10/11 at 15:51:17
 
Today I was able to rebuild the source of the

Intervalometer
Sunrise

although they are throwing many warnings.

The SoundTrigger and Bracket sources keep throwing errors and warnings and will not be build.



Soundtrigger looks like this:

Code:
------ Build started: Project: SoundTrigger, Configuration: Release Win32 ------
  Build process start for project "SoundTrigger"...

  card_spi.c
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiBusy':
  c:/Projects/SoundTrigger/source/card_spi.c(39):9: error: 'CARD_CR1' undeclared (first use in this function)
  c:/Projects/SoundTrigger/source/card_spi.c(39):9: note: each undeclared identifier is reported only once for each function it appears in
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiStart':
  c:/Projects/SoundTrigger/source/card_spi.c(44):2: error: 'CARD_CR1' undeclared (first use in this function)
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiStop':
  c:/Projects/SoundTrigger/source/card_spi.c(49):2: error: 'CARD_CR1' undeclared (first use in this function)
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiTransfer':
  c:/Projects/SoundTrigger/source/card_spi.c(79):2: error: 'CARD_EEPDATA' undeclared (first use in this function)
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiTransferBuffer':
  c:/Projects/SoundTrigger/source/card_spi.c(109):3: error: 'CARD_EEPDATA' undeclared (first use in this function)
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiWriteBuffer':
  c:/Projects/SoundTrigger/source/card_spi.c(147):3: error: 'CARD_EEPDATA' undeclared (first use in this function)
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiTransfer':
  c:/Projects/SoundTrigger/source/card_spi.c(91):1: warning: control reaches end of non-void function
  c:/Projects/SoundTrigger/source/card_spi.c: In function 'cardSpiBusy':
  c:/Projects/SoundTrigger/source/card_spi.c(40):1: warning: control reaches end of non-void function
  make[1]: *** [card_spi.o] Error 1
  make: *** [build] Error 2
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== 



Is my installation buggy or why do I have such troubles?
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #6 - 04/10/11 at 16:57:40
 
Hi,

at first I was able to reduce the warnings and arrors.

In card_spi I changed

REG_EXEMEMSTAT to REG_EXMEMSTAT

but still no progress in building the .nds files.

It seems that there is something wrong with the DSSerial Version and or PAlib Version?

Any help would be appreachiated I'm just a beginner and player with C++ and coding in general...

Cheers
Yogie
Back to top
 
 
IP Logged
 
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #7 - 04/11/11 at 23:56:19
 
Good news everybody!
It seems you can still download VC++ express 2008 version from MS, which should allow one to compile our existing older code.
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #8 - 04/12/11 at 12:31:25
 
Well I tried the VC++ express 2008 version and ran into the same problems!

The benefit for the express 2008 version is that this one works with the PALib AppWizard that let you create a new app with the VC++ internal dialogs the only thing you need to update was the make file ... http://www.palib.info/wiki/doku.php?id=day1#installation

Back to top
 
 
IP Logged
 
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #9 - 04/12/11 at 19:19:05
 
I'm sorry to hear that. Are you trying to modify the existing code or planning a new app or new function?
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #10 - 04/12/11 at 19:49:25
 
First of all I would like to try to rebuild the app as is.

At the next step I would like to learn from the code and see if I can catch up and modify it.
First thing to modify could be to change the bitmaps with ones that have German language.

Then I would like to check if I can change the pause time between the shots. As by now the pause has the same shutter time and increases each time like the shutter time but I think the pause could be limited or set to be fix to a specific time to shorten the whole process.

Then I will see if there is more that can be done... Wink
Or write my own Remote control app for other topics like having an ND calculator etc. and set the shutter time from the calculation etc.

But I'm a beginner in programming so nothing that will come up very quickly out of my computer, so do not expect to much, I would be more than happy to get the first step done and get the source rebuild here.
   
Back to top
« Last Edit: 04/13/11 at 10:25:14 by N/A »  
 
IP Logged
 
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #11 - 04/16/11 at 00:49:53
 
It'd be great to have your involvement. There already is a adjustment for the delay between shots, btw, it's the (perhaps vaguely labeled) memory slider on the right.

My suggestion is to strip out everything and start learning to control in a simple matter the "Takeshot" function. All of the dserial code exists only to control the motor mount, so it is entirely optional and can be excised by removing all of the dserial include files.
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #12 - 04/16/11 at 09:11:00
 
Thanks Steve,

so I will go for that, I try to get it recompiled without the dserial code and then start to look around.

Thank you so much for your help and can't wait to follow you here with your first lesson :-D

Quote:
Next we'll begin coding a useful (for me anyways) DS Camera app.


Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #13 - 04/19/11 at 20:05:07
 
Quote:
My suggestion is to strip out everything and start learning to control in a simple matter the "Takeshot" function. All of the dserial code exists only to control the motor mount, so it is entirely optional and can be excised by removing all of the dserial include files.


Well I tried to do that but I think I was not able to catch all that needed to stripped out or even did too much, I don't know.

It is very hard for me to understand as I'm totally new to this…


Steve would it be possible for you to stripe out the DSSERIAL stuff and send me a clean version of the project please?
Back to top
« Last Edit: 04/21/11 at 09:45:03 by N/A »  
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #14 - 04/21/11 at 15:03:37
 
I still have over 70 warnings but I could at least build an NDS file, I had fewer warnings with the C++ 2008 Version so I skipped using 2010!

As I'm not quite sure if still all functionality is given, please find a beta of the German version.

Happy Easter Days!
Back to top
 

OCC15_1bGER.zip (Attachment deleted)
 
IP Logged
 
Pages: 1 2 
Send Topic Print