Chameleon

Chameleon Svn Source Tree

Root/branches/azimutz/Chazi/i386/libsaio/gma_resolution.h

1/*
2 * gma_resolution.h
3 *
4 *
5 * Created by Le Bidou on 19/03/10.
6 * Copyright 2010 ---. All rights reserved.
7 *
8 */
9
10#ifndef _GMA_RESOLUTION_H_
11#define _GMA_RESOLTUION_H_
12
13//#include "libsaio.h"
14#include "saio_internal.h"
15//---
16#include "autoresolution.h"
17
18#define MODE_TABLE_OFFSET_845G 617
19#define INTEL_SIGNATURE "Intel Corp"
20
21typedef struct {
22uint8_t mode;
23uint8_t bitsPerPixel;
24uint16_t resolution;
25uint8_t unknown;
26} __packed vbiosMode;
27
28typedef struct {
29uint8_t unknow1[2];
30uint8_t hActive1;
31uint8_t xTotal;
32uint8_t hActive2;
33uint8_t vActive1;
34uint8_t yTotal;
35uint8_t vActive2;
36} __packed vbiosResolutionType1;
37
38typedef struct {
39uint32_t clock;
40
41uint16_t hActive1;
42uint16_t hTotal;
43uint16_t hActive2;
44uint16_t hBlank;
45uint16_t hSyncStart;
46uint16_t hSyncEnd;
47uint16_t vActive1;
48 uint16_t vTotal;
49 uint16_t vActive2;
50uint16_t vBlank;
51uint16_t vSyncStart;
52uint16_t vSyncEnd;
53} __packed vbiosModelineType2;
54
55typedef struct {
56uint8_t xChars;
57uint8_t yChars;
58uint8_t unknown[4];
59
60vbiosModelineType2 modelines[];
61} __packed vbiosResolutionType2;
62
63typedef struct {
64uint32_t clock;
65
66uint16_t hActive1;
67uint16_t hTotal;
68uint16_t hActive2;
69uint16_t hBlank;
70uint16_t hSyncStart;
71uint16_t hSyncEnd;
72
73uint16_t vActive1;
74uint16_t vTotal;
75uint16_t vActive2;
76uint16_t vBlank;
77uint16_t vSyncStart;
78uint16_t vSyncEnd;
79
80uint16_t timingH;
81uint16_t timingV;
82
83uint8_t unknown[6];
84} __packed vbiosModelineType3;
85
86typedef struct {
87unsigned char unknown[6];
88
89 vbiosModelineType3 modelines[];
90} __packed vbiosResolutionType3;
91
92
93vbiosResolutionType1 * mapType1Resolution(vBiosMap * map, uint16_t res);
94vbiosResolutionType2 * mapType2Resolution(vBiosMap * map, uint16_t res);
95vbiosResolutionType3 * mapType3Resolution(vBiosMap * map, uint16_t res);
96
97char detectBiosType(vBiosMap * map, char modeline, int entrySize);
98
99vBiosMap * openIntelVbios(vBiosMap *);
100
101bool intelSetMode_1(sModeTable* table, uint8_t idx, uint32_t* x, uint32_t* y);
102bool intelSetMode_2(sModeTable* table, uint8_t idx, uint32_t* x, uint32_t* y);
103bool intelSetMode_3(sModeTable* table, uint8_t idx, uint32_t* x, uint32_t* y);
104
105#endif

Archive Download this file

Revision: 495