blob: de9ec750600ac09ae89ac1ae4e2fdc90f7b7bb4c [file] [log] [blame]
Kevin O'Connor63977902014-10-23 16:24:36 -04001#ifndef __VGA_H
2#define __VGA_H
3// Standard structure definitions for vgabios video tables
4
5#include "types.h" // u8
6
7// standard BIOS Video Parameter Table
8struct video_param_s {
9 u8 twidth;
10 u8 theightm1;
11 u8 cheight;
12 u16 slength;
13 u8 sequ_regs[4];
14 u8 miscreg;
15 u8 crtc_regs[25];
16 u8 actl_regs[20];
17 u8 grdc_regs[9];
18} PACKED;
19
20// Standard Video Save Pointer Table
21struct video_save_pointer_s {
22 struct segoff_s videoparam;
23 struct segoff_s paramdynamicsave;
24 struct segoff_s textcharset;
25 struct segoff_s graphcharset;
26 struct segoff_s secsavepointer;
27 u8 reserved[8];
28} PACKED;
29
30// Data returned by int101B
31struct video_func_static {
32 u32 modes;
33 u8 reserved_0x04[3];
34 u8 scanlines;
35 u8 cblocks;
36 u8 active_cblocks;
37 u16 misc_flags;
38 u8 reserved_0x0c[2];
39 u8 save_flags;
40 u8 reserved_0x0f;
41} PACKED;
42
43struct video_func_info {
44 struct segoff_s static_functionality;
45 u8 bda_0x49[30];
46 u8 bda_0x84[3];
47 u8 dcc_index;
48 u8 dcc_alt;
49 u16 colors;
50 u8 pages;
51 u8 scan_lines;
52 u8 primary_char;
53 u8 secondar_char;
54 u8 misc;
55 u8 non_vga_mode;
56 u8 reserved_2f[2];
57 u8 video_mem;
58 u8 save_flags;
59 u8 disp_info;
60 u8 reserved_34[12];
61} PACKED;
62
63#endif // vga.h