//
Basic 640x480x32 output
#include <openxdk.h>
void
XBoxStartup()
{
//let's init the screen
vga_init_mode(MODE_640x480x32); // Some
possible modes all defined in
// xvga.h
//
MODE_320x240x32
//
MODE_640x240x32
//
MODE_640x480x32 etc...plus many more
while(1)
{
// A list of all these functions can be found at
the top of xvga.h
vga_vsync();
// Wait for Vertical Blank
vga_flip();
// Flip
vga_clear();
// Clear screen
ScreenInfo s = vga_get_screen_info();
unsigned int*
pix = (unsigned
int*)s.ScreenAddress;
// VGA Text Pattern
for(uint32 y=0;y<480;y++)
for(uint32 x=0;x<640;x++)
pix[640*y+x] = x;
}//
End while loop
}//End
|