Chameleon

Chameleon Commit Details

Date:2012-12-28 05:56:57 (6 years 6 months ago)
Author:Evan Lojewski
Commit:2150
Parents: 2149
Message:Add getVBEVideoRam function for reading out video ram configured for GPI.
Changes:
M/trunk/i386/boot2/graphics.c
M/trunk/i386/boot2/graphics.h

File differences

trunk/i386/boot2/graphics.c
4444
4545
4646
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
4771
4872
4973
#define VIDEO(x) (bootArgs->Video.v_ ## x)
//==========================================================================
// getVBEVideoRam
uint32_t getVBEVideoRam()
{
VBEInfoBlock vbeInfo;
int err, small;
char *buff = malloc(sizeof(char)*256);
if(!buff) return 0;
bzero( &vbeInfo, sizeof(vbeInfo) );
strcpy( (char*)&vbeInfo, "VBE2" );
err = getVBEInfo( &vbeInfo );
if (err != errSuccess)
return 0;
if ( strncmp( (char *)vbeInfo.VESASignature, "VESA", 4 ) )
return 0;
small = (vbeInfo.TotalMemory < 16);
return vbeInfo.TotalMemory * 64 * 1024;
}
//==========================================================================
// getVBEInfoString
char *getVBEInfoString()
trunk/i386/boot2/graphics.h
3737
3838
3939
40
40
4141
4242
4343
int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData);
uint32_t getVBEVideoRam();
char *getVBEInfoString();
char *getVBEModeInfoString();
void getGraphicModeParams(unsigned long params[]);

Archive Download the corresponding diff file

Revision: 2150