Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Get started with the GBA  (Read 5373 times)

0 Members and 1 Guest are viewing this topic.
Get started with the GBA
« on: April 09, 2006, 04:37:56 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 150
First, you're going to need a compiler. I prefer DevKitAdvance, and while I was programming, I built up a nice compiler kit using DevKitAdvance which is a little more lenient when it comes to optimizations than the default distro. You can download mine here.

Grab the 'devkitadv' folder out of that zip file and drop it directly into your C:\ drive; the base directory of the compiler should be 'C:\devkitadv\bin'.

Next, you're going to need an emulator. I reccomend VBA, which you can get off of zophar.net here.

Finally, you're going to need some test code to make sure that your compiler works! This is a simple program that I whipped up over the course of a day to see if programming for the GBA was feasible for me: click here. Double-click 'make.bat' to compile it. Note that this was my first ever GBA program, so it's more than a little unoptimized; still, it will give you a decent idea of how to draw sprites to the GBA.

You can look to http://gbadev.org/ for all sorts of great tutorials and examples. Good luck! =)
« Last Edit: April 09, 2006, 07:03:09 pm by FarFromHomeFish »
Logged

Piers

Re: So you want to program for the GBA...
« Reply #1 on: April 09, 2006, 04:59:25 pm »
Thanks, I guess.
Logged
Re: Get started with the GBA
« Reply #2 on: April 09, 2006, 07:34:37 pm »
  • The Broken King
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1259
Sweetness, I'm gonna give this a try maybe ~_~
Logged
  • Broken Kings [Temp Site]

Ben

Re: Get started with the GBA
« Reply #3 on: April 09, 2006, 08:54:37 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
This is also very useful:
http://www.loirak.com/gameboy/gbatutor.php

I was looking at it earlier today.
It tells you how to draw in mode 3, and mode 4 I think.
It looks pretty good.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion
Re: Get started with the GBA
« Reply #4 on: April 09, 2006, 09:43:49 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 150
This is also very useful:
http://www.loirak.com/gameboy/gbatutor.php

I was looking at it earlier today.
It tells you how to draw in mode 3, and mode 4 I think.
It looks pretty good.
I checked out this site; it has a raycaster tutorial with source, which is really awesome. Unfortunately, the raycaster this guy has programmed is really, terribly slow, but I have no doubt that with some knowhow, someone could spruce it up and make an awesome little demo. =) Unfortunately, the only 3D transformations I ever bothered with were related to isometric transformations, so I'm not the guy to do this... but take a look, see what you can do. =)
Logged
Re: Get started with the GBA
« Reply #5 on: April 10, 2006, 01:01:32 am »
  • Credits to BaB
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Posts: 807
I'd rather use HAM, since it's a complete IDE for the GBA. It even comes with its own libraries, it's very easy to learn, and you can program in C and in another built-in language. Much like GML for GM. you can find a good tutorial on Aaron Roger's website, it's really complete and there's anything you need to make a game for the GBA.

I'm gonna give this a try though, but I still have to find a decent tutorial. Thanks for the tip! Also, have you ever made a complete game for GBA or atleast a decent demo? I'd like to see your work!
Logged
Re: Get started with the GBA
« Reply #6 on: April 10, 2006, 02:16:41 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 150
I never made anything too terribly awesome; however, I did code up the beginnings of a battle engine, which you can download here. What's really cool about the actions in that battle engine is that every sprite and every action isn't hardcoded, but rather is scripted in my own little lightweight scripting language that I created for the GBA. If you have any questions, feel free to PM me here at ZFGC. =)

*

By the way, I've taken a look at that raycasting engine; the problem is that the creator programmed his engine to use floating point numbers. The GBA doesn't have a FPU, so all the transformations he's doing are eating up a ton of clock cycles - power that the GBA doesn't have. A great first step in fixing it would be to change all of the math to fixed point.
« Last Edit: April 10, 2006, 02:23:32 am by FarFromHomeFish »
Logged

Ben

Re: Get started with the GBA
« Reply #7 on: April 10, 2006, 09:18:25 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Even though I only started this yesterday it's not too hard to actually keep your memory usage down (i think the GBA only has 96k of RAM) but for any position on the screen you can simply convert it to an unsigned short, which is half the size of an int.
Many it's overdoing it? XD, but still I thought if your gonna optimize, then optimize :-p.

And I really don't like HAM, because it requries you to use objects, and they are weird objects.
What's more it has a "made in HAM" screen.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion
Re: Get started with the GBA
« Reply #8 on: April 10, 2006, 02:40:37 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 150
In my day, we called 32bit numbers longs. You kids and your 64bit processors. Spoiled, the lot of you. =D

IIRC, the GBA has 32kb of fast IWRAM which you can access at 32bits per read, and 256kb of slower EWRAM, which you can access 16bits at a time.
Logged
Re: Get started with the GBA
« Reply #9 on: April 11, 2006, 01:19:50 am »
  • Credits to BaB
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Posts: 807
Even though I only started this yesterday it's not too hard to actually keep your memory usage down (i think the GBA only has 96k of RAM) but for any position on the screen you can simply convert it to an unsigned short, which is half the size of an int.
Many it's overdoing it? XD, but still I thought if your gonna optimize, then optimize :-p.

And I really don't like HAM, because it requries you to use objects, and they are weird objects.
What's more it has a "made in HAM" screen.

You're probably right about HAM, but it's the tool I started with, and you can get rid of that screen easily :P! I for sure will try DevKitAdvance!
Logged

gm112

Re: Get started with the GBA
« Reply #10 on: April 14, 2006, 05:29:42 pm »
but if you code your own stuff you will get a better game. HAM is good only if you are "new" to computers and the gba, just like gm and programming languages.
Logged
Re: Get started with the GBA
« Reply #11 on: April 14, 2006, 07:45:52 pm »
  • Credits to BaB
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Posts: 807
but if you code your own stuff you will get a better game. HAM is good only if you are "new" to computers and the gba, just like gm and programming languages.

That's not completely true, ham is a library that you can use with C or C++. What you said is like telling me to create a complete 2D library (such as DirectX or SDL) to produce my game for PC, only the most stubborn programmers do that, there's a reason why most of the libraries are distributed for free.
Logged

aab

^ Evolved from a Hobbit
Re: Get started with the GBA
« Reply #12 on: April 14, 2006, 10:07:06 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
HAM is kindof constrictive though, something inbetween would be better...
It wouldnt quite be nearly as difficult as producing a 2d library for a PC lol.
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace

Ben

Re: Get started with the GBA
« Reply #13 on: April 15, 2006, 10:53:09 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
The difference though aab is the OAM, a computer (I don't think) has that, and so you're gonna have to split up your sprite code from your background code.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion

aab

^ Evolved from a Hobbit
Re: Get started with the GBA
« Reply #14 on: April 16, 2006, 01:53:23 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
Not on my overloaded virtual watch i wont ?
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace

Gilgamesh

Re: Get started with the GBA
« Reply #15 on: April 16, 2006, 04:56:10 pm »
It's Nintendo DS programming I want ;X
Logged

Ben

Re: Get started with the GBA
« Reply #16 on: April 16, 2006, 04:56:50 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion

Gilgamesh

Re: Get started with the GBA
« Reply #17 on: April 16, 2006, 04:58:24 pm »
Hmm, thanks for the link.
Logged
Re: Get started with the GBA
« Reply #18 on: April 16, 2006, 07:22:35 pm »
  • The Broken King
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1259
Just a question regarding the legality of this program...not in the sense that I really care, but I want to know if I make a game with it, if I should bother putting it in my portfolio or not.
Logged
  • Broken Kings [Temp Site]

gm112

Re: Get started with the GBA
« Reply #19 on: April 18, 2006, 08:03:43 am »
well we arent selling it...we;re doing this for learning purposes
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.38 seconds with 74 queries.