Skip to content

Instantly share code, notes, and snippets.

@khalladay
Created March 29, 2017 11:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save khalladay/7c86f092a48342adf6d35aa2861b3ed3 to your computer and use it in GitHub Desktop.
Save khalladay/7c86f092a48342adf6d35aa2861b3ed3 to your computer and use it in GitHub Desktop.
DevKitPro Test
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
#define REG_DISPLAYCONTROL *((volatile uint32*)(0x04000000))
#define VIDEOMODE_3 0x0003
#define BGMODE_2 0x0400
#define SCREENBUFFER ((volatile uint16*)0x06000000)
#define SCREEN_W 240
#define SCREEN_H 160
int main()
{
REG_DISPLAYCONTROL = VIDEOMODE_3 | BGMODE_2;
for (int i = 0; i < SCREEN_W * SCREEN_H; ++i)
{
SCREENBUFFER[i] = 0x001F;
}
while(1){}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment