blob: 90fa54da620387eac0ec4c8f57c4ce260e12b50e [file] [log] [blame]
Kevin O'Connor2f2ec112016-08-05 11:14:58 -04001// Misc function and variable declarations.
2#ifndef __VGAUTIL_H
3#define __VGAUTIL_H
4
5#include "types.h" // u8
6
Kevin O'Connorc682ffe2016-08-05 11:48:20 -04007// stdvgaio.c
8u8 stdvga_pelmask_read(void);
9void stdvga_pelmask_write(u8 val);
10u8 stdvga_misc_read(void);
11void stdvga_misc_write(u8 value);
12void stdvga_misc_mask(u8 off, u8 on);
13u8 stdvga_sequ_read(u8 index);
14void stdvga_sequ_write(u8 index, u8 value);
15void stdvga_sequ_mask(u8 index, u8 off, u8 on);
16u8 stdvga_grdc_read(u8 index);
17void stdvga_grdc_write(u8 index, u8 value);
18void stdvga_grdc_mask(u8 index, u8 off, u8 on);
19u8 stdvga_crtc_read(u16 crtc_addr, u8 index);
20void stdvga_crtc_write(u16 crtc_addr, u8 index, u8 value);
21void stdvga_crtc_mask(u16 crtc_addr, u8 index, u8 off, u8 on);
22u8 stdvga_attr_read(u8 index);
23void stdvga_attr_write(u8 index, u8 value);
24void stdvga_attr_mask(u8 index, u8 off, u8 on);
25u8 stdvga_attrindex_read(void);
26void stdvga_attrindex_write(u8 value);
27void stdvga_dac_read(u16 seg, u8 *data_far, u8 start, int count);
28void stdvga_dac_write(u16 seg, u8 *data_far, u8 start, int count);
29
30// stdvgamodes.c
31struct vgamode_s *stdvga_find_mode(int mode);
32void stdvga_list_modes(u16 seg, u16 *dest, u16 *last);
33void stdvga_build_video_param(void);
34void stdvga_override_crtc(int mode, u8 *crtc);
35int stdvga_set_mode(struct vgamode_s *vmode_g, int flags);
36void stdvga_set_packed_palette(void);
37
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040038// swcursor.c
39struct bregs;
40void swcursor_pre_handle10(struct bregs *regs);
41void swcursor_check_event(void);
42
43// vbe.c
44extern u32 VBE_total_memory;
45extern u32 VBE_capabilities;
46extern u32 VBE_framebuffer;
47extern u16 VBE_win_granularity;
48void handle_104f(struct bregs *regs);
49
50// vgafonts.c
51extern u8 vgafont8[];
52extern u8 vgafont14[];
53extern u8 vgafont16[];
54extern u8 vgafont14alt[];
55extern u8 vgafont16alt[];
56
57// vgainit.c
58extern int VgaBDF;
59extern int HaveRunInit;
60
61#endif // vgautil.h