gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > tutorial links down in the reference doc

#153012 - Mazdaplz - Mon Mar 24, 2008 5:41 am

hello, i am new to the forums and programming for the GBA

the very first language i learned was pascal, eleven years ago!

about nine years ago or close to that, i managed to make a pacman clone and small platform demo on the original monochrome gameboy, i wrote them both in C.

then i stopped programming altogether! i decided to go to the opposite end of the gamedeveloper scene and after many many years i mastered 3dstudiomax (at least on modelling, not animation) and photoshop.

about last year i saw my nephew learning programming with what i can only assume is some sort of visual basic called "game maker 6" which i learned as in sort of goofing around; and actually tought me some interesting programming concepts. for example i wrote a simple finite state machine.

so back to the point. i've read the beginner's doc off this site and i decided im going to use C, because my brain can't handle another change of languages; i am not aware of the shortcomings of C as opposed to C++ but i don't really care; to me it's not broke and no need to fix it.
also i decided im going to use wordpad for a while, at least while my program is still small.

reading through the beginners guide there were a bunch of tutorial or examples, with readable source with links that are broken; namely:

Hello World! (by Flavor) - This is a simple little Hello World/Splash Screen demo with step
------------------------ by step instructions on how to code it.
http://www.agbdev.net/gbadev/files/GBA_Splash01.zip


Basic Tests (by Mic) - These draw some triangles to the screen. Very simple, but then
-------------------- again, it's always good to start out easy.
http://www.agbdev.net/gbadev/files/gbal1.zip


Key Demo (by Nokturn) - A nice simple demo that shows how to take input.
--------------------- http://www.agbdev.net/gbadev/demos/Nok_Keysupd.zip


Sprite Demo (by Warder1) - Draw a sprite to the screen...
------------------------ http://www.agbdev.net/gbadev/files/sprite.zip


Chrono Trigger Demo (by Warder1) - Draw a background and a sprite which can be moved around
-------------------------------- the screen. Magus is cool. :)
http://www.agbdev.net/gbadev/files/chrono_source.zip.

//////////////////////////////////////////////////////////////////

i could certainly use a hello world example with source written in C
and something in the likes of that chrono trigger demo (you know, background + sprite that moves) what i am aiming for is an exploration (metroidvania type) game and to relearn C.

EDIT: also a platform example would be IDEAL, or something that shows the most common way to make 'gravity'

#153014 - wintermute - Mon Mar 24, 2008 5:50 am

Most of the old GBA tutorials you'll find are heavily biased towards the obsolete devkitAdvance so you should probably avoid anything that tells you how to set up the toolchain.

Most people have shifted towards DS development now but there are still a few old hands that can answer GBA related questions.

First stop should be http://wiki.devkitpro.org/index.php/Getting_Started

devkitARM r21 has a bit of a problem with the gba linkscripts though so also stop off here -> http://forum.gbadev.org/viewtopic.php?t=14493

The ultimate set of docs for GBA programming can be found at http://www.coranac.com/tonc/text/toc.htm
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#153115 - Mazdaplz - Tue Mar 25, 2008 4:19 am

thank you very much :D that was just what i was looking for

the reason i chose GBA is because now you can play gba games on mobile phones; and i thought i could benefit from the exposure :)

now i am running into a brick wall though; it seems really a noobish mistake but i can't figure it out.
whenever i try to compile the devkitPro's template makefile; template.c

i get this error:

> "make"
> Failed to create process: system can't find specified file.
> Process Exit Code: 0
> Time Taken: 00:00

according to the tonc guide this is because:

Quote:
`make not found'
Also known as `Failed to create process: The system cannot find the file specified.'
This means that it can't find the make command. This should be in $(DEVKITPRO)/msys/bin, and this path should have been added to the system path by the installation. Look in the right directory if make.exe is there. If it is there, check the system path in `My Computer/Advanced/Environment Variables/System Variables'. As you can probably tell, this should mostly be a Windows issue.


so i checked if MAKE.exe was in c:\devkitpro\msys\bin; it was.
i right clicked the 'my pc' icon and i clicked properties, checked advanced setting and enviroment variables; there was a value in system variables called PATH, but it seems to be correct.
i am sure this question has been answered already (i am POSITIVE) but i searched this forum and couldn't find any info on that, and the websites that had all the keywords i looked for were in german.

btw: i uninstalled and reinstalled devkitpro without any luck

i appreciate your help/time

thanks again,
-mazdaplz

#153116 - Dwedit - Tue Mar 25, 2008 4:41 am

Make sure you run make from the msys shell, not the windows command prompt
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#153165 - wintermute - Tue Mar 25, 2008 11:20 pm

There is no requirement to run make from the msys shell, it works perfectly well from a cmd shell.

Mazdaplz, can you tell us in detail how you ran make?

From a cmd shell type "set > env.txt" then show us the contents of env.txt. You can paste that here inside code tags. Mine looks like this.

Code:

ALLUSERSPROFILE=D:\Documents and Settings\All Users
APPDATA=D:\Documents and Settings\davem\Application Data
CLIENTNAME=Console
CommonProgramFiles=D:\Program Files\Common Files
COMPUTERNAME=NEUROMANCER
ComSpec=D:\WINDOWS\system32\cmd.exe
DEVKITARM=/D/devkitPro/devkitARM
DEVKITPPC=/D/devkitPro/devkitPPC
DEVKITPRO=/D/devkitPro
DEVKITPSP=/D/devkitPro/devkitPSP
FP_NO_HOST_CHECK=NO
HOMEDRIVE=D:
HOMEPATH=\Documents and Settings\davem
include=C:\Microsoft Visual Studio\VC98\atl\include;C:\Microsoft Visual Studio\VC98\mfc\include;C:\Microsoft Visual Studio\VC98\include
lib=C:\Microsoft Visual Studio\VC98\mfc\lib;C:\Microsoft Visual Studio\VC98\lib
LOGONSERVER=\\NEUROMANCER
MSDevDir=C:\devstudio6\MSDev98
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=D:\devkitPro\msys\bin;d:\tools\bin;D:\MinGW\bin;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;C:\devstudio6\Tools\WinNT;C:\devstudio6\MSDev98\Bin;C:\devstudio6\Tools;C:\Microsoft Visual Studio\VC98\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 28 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=1c00
ProgramFiles=D:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=D:
SystemRoot=D:\WINDOWS
TEMP=D:\DOCUME~1\davem\LOCALS~1\Temp
TMP=D:\DOCUME~1\davem\LOCALS~1\Temp
USERDOMAIN=NEUROMANCER
USERNAME=davem
USERPROFILE=D:\Documents and Settings\davem
VS90COMNTOOLS=D:\devstudio9.0\Common7\Tools\
windir=D:\WINDOWS


make -d may also give you a clue what's failing.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#153200 - Mazdaplz - Wed Mar 26, 2008 7:43 am

actually, it took 24 hours of intense pondering but i am finally ready to write my first lines of code.

my first problem was that programmers notepad 2 didnt' find MAKE when i pressed alt+1.

i checked enviroment variables again and i discovered after reading MANY guides (the devkitpro site is not easy for navigation), that i needed to specify user variables as well, namely

/c/devkitpro
(and) /c/devkitarm

(noobies: these have to be /c/ like in unix [or is it linux?] and not c:\ as in windows)

i think.

then the compile miraculously worked :D but my rom was a white screen hehe.
i didnt want to be such a helpless noob so i didnt post but it took me about 12 hours to figure out that removing '_mb' *(<- that) on the makefile made my rom work perfectly.

and now i am off! i just wanted to stop here to clarify things so that the next noob has it easier than i did ;)

thanks for all the help, the intention is what counts :D

#153202 - wintermute - Wed Mar 26, 2008 9:28 am

Um, the devkitPro installer should have set everything up for you, ready to go. You shouldn't have needed to touch the environment variables at all.

WinterMute wrote:

devkitARM r21 has a bit of a problem with the gba linkscripts though so also stop off here -> http://forum.gbadev.org/viewtopic.php?t=14493


contained the solution to the whitescreen problem with multiboot binaries.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#153233 - Mazdaplz - Wed Mar 26, 2008 8:29 pm

yes, it is somewhat odd;
i imagine the variables didn't set up correctly because i have some dodgy spyware i wasn't able to remove completely.
i am running windows with explorer process shut down, i navigate files through the task manager.. im going to have to fix this soon or else im going to have to give UBUNTU a try (my programmer friend gave me an UBUNTU cd)

but for the time being it works.

also, i checked the page you mentioned again, the fix for the multiboot and i did it; and i can finally compile multiboot without the blank screen; thanks, i am sure that would have brought problems later on.

i am going through the first days of development now; it doesnt seem like a totally unfriendly platform to work on once you have set up, but i am guessing i will run into limitations sooner or later

-maz