* All rights reserved.␊ |
*/␊ |
␊ |
#include "boot.h"␊ |
#include "vbe.h"␊ |
//Azi:include␊ |
//#include "boot.h" - included on graphics.h, which is included on gui.h␊ |
//#include "vbe.h" - same as above (needed if autoresolution is removed!)␊ |
#include "appleClut8.h"␊ |
#include "gui.h"␊ |
#include "IOHibernatePrivate.h"␊ |
|
␊ |
#define VIDEO(x) (bootArgs->Video.v_ ## x)␊ |
␊ |
#define MIN(x, y) ((x) < (y) ? (x) : (y))␊ |
#define MIN(x, y) ((x) < (y) ? (x) : (y)) //Azi: take care of this in the process***␊ |
␊ |
//==========================================================================␊ |
// getVBEInfoString␊ |
|
// Return the VESA mode that matches the properties specified.␊ |
// If a mode is not found, then return the "best" available mode.␊ |
␊ |
static unsigned short␊ |
unsigned short␊ |
getVESAModeWithProperties( unsigned short width,␊ |
unsigned short height,␊ |
unsigned char bitsPerPixel,␊ |
|
break;␊ |
}␊ |
␊ |
␉␉if (refreshRate != 60) refreshRate = 60;␊ |
␊ |
//␊ |
// FIXME : generateCRTCTiming() causes crash.␊ |
//␊ |
|
// err = setVBEMode( mode | kLinearFrameBufferBit, NULL );␊ |
// }␊ |
␊ |
#ifdef AUTORES_DEBUG␊ |
␉␉printf("Is about to set mode #%d with resolution %dx%d\n", mode, minfo.XResolution, minfo.YResolution);␊ |
␉␉//getc(); //Azi: i get the hangs, like "old" Wait=y issue.␊ |
#endif␊ |
// Set the mode with default refresh rate.␊ |
␊ |
err = setVBEMode( mode | kLinearFrameBufferBit, NULL );␊ |
␊ |
if ( err != errSuccess )␊ |
{␊ |
break;␊ |
#ifdef AUTORES_DEBUG␊ |
␉␉␉printf("setVBEMode failed to set mode %d (%dx%d) with error #%d\n",␊ |
␉␉␉␉ mode, minfo.XResolution, minfo.YResolution, err);␊ |
␉␉␉getc();␊ |
#endif␊ |
}␊ |
␊ |
// Set 8-bit color palette.␊ |
|
//==========================================================================␊ |
// getNumberArrayFromProperty␊ |
␊ |
static int␊ |
int␊ |
getNumberArrayFromProperty( const char * propKey,␊ |
unsigned long numbers[],␊ |
unsigned long maxArrayCount )␊ |