www.xbdev.net
xbdev - software development
Tuesday January 7, 2025
Home | Contact | Support | OpenXDK The Free, Legal, Open Source XBox Development Kit...
     
 

OpenXDK

The Free, Legal, Open Source XBox Development Kit...

 

Graphic Modes - 640x480..240x100?..

 

Depending on your output you might want lower resolution output...but most likely, you'll want 640x480 32bit colour!  Yup...our games deserve it :)

 

Download Project Code - 640x480x32

 

// 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

 

 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.