Sunday, April 10, 2011

Hello and welcome to the nightmare. (Sortof)

Hello and welcome to at random blog about game deving (developing btw).  Its blog where I'll post random Ideas and concepts that isn't really base on any particular game project just ideas on how the develop these monster-as apps know as games.  I'm not going to candy coat any thing so if you are a beginner you might want to look else where for now.  I'm thinking of adding a simple set of tutorials on SDL and opengl later on but just random thought on projects I'm working on for my self which right now I'm working on game boy advance programming which is based off tonc tutorials which is a good place to start doing gba game development.  If you are a beginner than you might want to start with some a little more realistic like sdl or allegro. Or Microsoft XNA which uses C# while sdl and allegro use c or c++ ( they also have wrappers for these libraries too like python, ruby, lua, java or what not ).  Game Boy Advance programming or any sort of console development is quite low level.  Its just as low level as Operating System development (not as hard though ).  So do some thing like this...

int main() {
    *(unsigned int*)0x04000000 = 0x403;
    ((unsigned short*)0x06000000)[120+80*240] = 0x001F;
    while(1);
    return 0;
}

Is perfectly legal.  If you don't understand this source code its fine. 0x04000000 is the IO MEM location.  Its used to set info to the gba. 0x403 means display mode 3 which is bitmap mode 1 using background 2. 0x06000000 is the location of the video ram (VRAM) which alows you to display stuff the gba's display. This example display a red dot at [120x80] pixels.  The code is quite unreadable if I say my self, usually you would write a library to make this more manageable (I'm working on my own right now).  I"m just demonstrating how low-level console development is.  There are libraries out there to hide this like devkitpro's libgba or tonc's (This example is a simplified version of toncs hello world program).
Kind of boring but hell this is my first blog post after all.
Also note to compile this you need a compiler that compiles to arm and thumb code.  I'm using devkit pro's arm compile stack which is the default stack now a days here the link.

http://sourceforge.net/projects/devkitpro/files/devkitARM/

Here's the demo link if it disappears let me know I'll re-up it.

http://www.filehosting.org/file/details/218450/demo.zip

Oh well this was kind of long for a hello world post. Well later.

No comments:

Post a Comment