#1900 - circaeng - Sat Jan 25, 2003 6:11 am
Hi,
I am trying to get my first GBA program working. It works fine on BoyCott but the screen is blank when It runs on the real thing. I use my own cable with xboo. The cable wotks cause I don;t have problem downloading sample apps. The header to my app seems ok since the Nintendo logo appears. Here is the output of gbahdr.exe tool when run with my app:
gbahdr v0.1.2 by anarko
Start offset : 0x080000C0
Logo code : Ok
Game title :
Game code : 0x00000000
Maker code : 0x3031 (Nintendo)
Fixed value : Ok
Main unit code : 0x00
Device type : 0x00
Unused data : Ok
Software version : 0x00
Complementary check: 0xF0 (Calculated F0, Ok)
Checksum : 0x0000
The app I try to run is:
#include "gba.h"
#include "screenmodes.h"
#define MULTIBOOT volatile const u8 __gba_multiboot=0;
MULTIBOOT
u16* theVideoBuffer = (u16*)VideoBuffer;
#define RGB(r,g,b) (r+(g<<5)+(b<<10)) //Macro to build a color from its parts
int main(void)
{
SetMode( SCREENMODE3 | BG2ENABLE ); //Set screen mode
int x = 10, y = 10; //Pixel location
theVideoBuffer[ x + y * 240 ] = RGB( 31, 31, 31 ); //Plot our pixel
return 0;
}
What am I doing wrong?
Thank You!
Patrick
I am trying to get my first GBA program working. It works fine on BoyCott but the screen is blank when It runs on the real thing. I use my own cable with xboo. The cable wotks cause I don;t have problem downloading sample apps. The header to my app seems ok since the Nintendo logo appears. Here is the output of gbahdr.exe tool when run with my app:
gbahdr v0.1.2 by anarko
Start offset : 0x080000C0
Logo code : Ok
Game title :
Game code : 0x00000000
Maker code : 0x3031 (Nintendo)
Fixed value : Ok
Main unit code : 0x00
Device type : 0x00
Unused data : Ok
Software version : 0x00
Complementary check: 0xF0 (Calculated F0, Ok)
Checksum : 0x0000
The app I try to run is:
#include "gba.h"
#include "screenmodes.h"
#define MULTIBOOT volatile const u8 __gba_multiboot=0;
MULTIBOOT
u16* theVideoBuffer = (u16*)VideoBuffer;
#define RGB(r,g,b) (r+(g<<5)+(b<<10)) //Macro to build a color from its parts
int main(void)
{
SetMode( SCREENMODE3 | BG2ENABLE ); //Set screen mode
int x = 10, y = 10; //Pixel location
theVideoBuffer[ x + y * 240 ] = RGB( 31, 31, 31 ); //Plot our pixel
return 0;
}
What am I doing wrong?
Thank You!
Patrick