Oh noes, hexidecimal!

Published March 28, 2005
Advertisement
int main(){        unsigned short* VideoBuffer = (unsigned short*)0x6000000;    *(unsigned long*)0x4000000 = (0x3 | 0x400);        VideoBuffer[80 * 240 + 120] = 0xFFFF;        while(1) {}    return 0;}


Who dosen't love GBA code?
Previous Entry Yay, menu!
Next Entry GB thoughts...
0 likes 4 comments

Comments

Mushu
Holy crap! That's all it takes to capture the front buffer of the GBA screen?! I'm impressed. That's pretty 1337.
March 28, 2005 09:23 PM
Stompy9999
Yeah, that's pretty much it. I still need to learn double buffering and Vsync for the gba, though.
March 29, 2005 09:01 AM
Daerax
Isnt there a typedef or something for GBA C++?

Edit: Yup there is. So you can go


typedef unsigned short WORD;
typedef unsigned long DWORD;
 
WORD* VideoBuffer = (WORD*)0x6000000;
*(DWORD*)0x4000000 = (0x3 | 0x400);


Reminds me of old DOS programming. Excellent stuff.
March 29, 2005 09:39 AM
Kylotan
Wow, it looks so... innocent. ;)
March 29, 2005 11:54 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement