Arda
Member
I'm really a newbie. I cannot really figure those pointer stuff, but I'm working on them and I understand that C is a pointer language. Now,
I'm using above code, I guess it has to display the picture on screen, but all I got is blank white screen(Tested only on geepee). Image appears if I use for..next and gp_SetPixel16 to poke all bytes manually to framebuffer1.
What's wrong? what is the fastest way of displaying full sceen bitmap?
Code:
extern const unsigned short _ay[76800]; // 320x240x16bit bitmap
...
...
framebuffer1 = (u16*) FRAMEBUFFER; // 0x0C7B4000
background = (u16*) malloc (320*240); // Allocate memory for background
for (x=0;x<320*240;x++) background[x]=_ay[x]; // fill background with _ay image
gp_DMA0Memcopy(background,framebuffer1,320*240); // Copy image to buffer?
gp_SetScreen(framebuffer1,16); // set screen
gp_ButtonInit();
gp_SetCpuSpeed(66);
gp_SetView(framebuffer1); // set lcd memory location
I'm using above code, I guess it has to display the picture on screen, but all I got is blank white screen(Tested only on geepee). Image appears if I use for..next and gp_SetPixel16 to poke all bytes manually to framebuffer1.
What's wrong? what is the fastest way of displaying full sceen bitmap?