Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    388056

Oh noes, hexidecimal!

Sign in to follow this  
Stompy9999

161 views



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?
Sign in to follow this  


4 Comments


Recommended Comments

Holy crap! That's all it takes to capture the front buffer of the GBA screen?! I'm impressed. That's pretty 1337.

Share this comment


Link to comment
Yeah, that's pretty much it. I still need to learn double buffering and Vsync for the gba, though.

Share this comment


Link to comment
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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!