Skip to content

Instantly share code, notes, and snippets.

@pat36
Forked from khalladay/Test.c
Created January 8, 2018 14:59
Show Gist options
  • Save pat36/5d1868691c4a020a780c7701762adc7f to your computer and use it in GitHub Desktop.
Save pat36/5d1868691c4a020a780c7701762adc7f 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