blob: 203b06bfdea1e3b52ab2b839761db708036dfede (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#ifndef MELVIX_VESA_H
#define MELVIX_VESA_H
#include <stdint.h>
#include "../system.h"
struct vbe_info {
char signature[4];
uint32_t version;
uint32_t oem;
uint32_t capabilities;
struct far_ptr video_modes;
uint32_t video_memory;
uint32_t software_rev;
uint32_t vendor;
uint32_t product_name;
uint32_t product_rev;
char reserved[222];
char oem_data[256];
} __attribute__ ((packed));
struct vbe_mode_info {
uint16_t attributes;
uint8_t window_a;
uint8_t window_b;
uint16_t granularity;
uint16_t window_size;
uint16_t segment_a;
uint16_t segment_b;
uint32_t win_func_ptr;
uint16_t pitch;
uint16_t width;
uint16_t height;
uint8_t w_char;
uint8_t y_char;
uint8_t planes;
uint8_t bpp;
uint8_t banks;
uint8_t memory_model;
uint8_t bank_size;
uint8_t image_pages;
uint8_t reserved0;
uint8_t red_mask;
uint8_t red_position;
uint8_t green_mask;
uint8_t green_position;
uint8_t blue_mask;
uint8_t blue_position;
uint8_t reserved_mask;
uint8_t reserved_position;
uint8_t direct_color_attributes;
uint32_t framebuffer;
uint32_t off_screen_mem_off;
uint16_t off_screen_mem_size;
uint8_t reserved1[206];
} __attribute__ ((packed));
struct vbe_mode_info *vbe_set_mode(unsigned short mode);
void set_optimal_resolution();
int vbe_current_mode;
int vbe_width;
int vbe_height;
int vbe_bpp;
int vbe_pitch;
#endif
|