blob: fae5fbaeefb91c90e1963d2ba17b6b0c769ce486 [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'Connor65bc0a72016-08-05 11:53:32 -04007// cbvga.c
8struct vgamode_s *cbvga_find_mode(int mode);
9void cbvga_list_modes(u16 seg, u16 *dest, u16 *last);
10int cbvga_get_window(struct vgamode_s *vmode_g, int window);
11int cbvga_set_window(struct vgamode_s *vmode_g, int window, int val);
12int cbvga_get_linelength(struct vgamode_s *vmode_g);
13int cbvga_set_linelength(struct vgamode_s *vmode_g, int val);
14int cbvga_get_displaystart(struct vgamode_s *vmode_g);
15int cbvga_set_displaystart(struct vgamode_s *vmode_g, int val);
16int cbvga_get_dacformat(struct vgamode_s *vmode_g);
17int cbvga_set_dacformat(struct vgamode_s *vmode_g, int val);
18int cbvga_save_restore(int cmd, u16 seg, void *data);
19int cbvga_set_mode(struct vgamode_s *vmode_g, int flags);
Patrick Rudolph4902b8a2017-05-29 19:25:12 +020020int cbvga_get_linesize(struct vgamode_s *vmode_g);
Kevin O'Connor65bc0a72016-08-05 11:53:32 -040021int cbvga_setup(void);
22
23// clext.c
24struct vgamode_s *clext_find_mode(int mode);
25void clext_list_modes(u16 seg, u16 *dest, u16 *last);
26int clext_get_window(struct vgamode_s *vmode_g, int window);
27int clext_set_window(struct vgamode_s *vmode_g, int window, int val);
28int clext_get_linelength(struct vgamode_s *vmode_g);
29int clext_set_linelength(struct vgamode_s *vmode_g, int val);
30int clext_get_displaystart(struct vgamode_s *vmode_g);
31int clext_set_displaystart(struct vgamode_s *vmode_g, int val);
32int clext_save_restore(int cmd, u16 seg, void *data);
33int clext_set_mode(struct vgamode_s *vmode_g, int flags);
34struct bregs;
35void clext_1012(struct bregs *regs);
36int clext_setup(void);
37
Kevin O'Connorc682ffe2016-08-05 11:48:20 -040038// stdvgaio.c
39u8 stdvga_pelmask_read(void);
40void stdvga_pelmask_write(u8 val);
41u8 stdvga_misc_read(void);
42void stdvga_misc_write(u8 value);
43void stdvga_misc_mask(u8 off, u8 on);
44u8 stdvga_sequ_read(u8 index);
45void stdvga_sequ_write(u8 index, u8 value);
46void stdvga_sequ_mask(u8 index, u8 off, u8 on);
47u8 stdvga_grdc_read(u8 index);
48void stdvga_grdc_write(u8 index, u8 value);
49void stdvga_grdc_mask(u8 index, u8 off, u8 on);
50u8 stdvga_crtc_read(u16 crtc_addr, u8 index);
51void stdvga_crtc_write(u16 crtc_addr, u8 index, u8 value);
52void stdvga_crtc_mask(u16 crtc_addr, u8 index, u8 off, u8 on);
53u8 stdvga_attr_read(u8 index);
54void stdvga_attr_write(u8 index, u8 value);
55void stdvga_attr_mask(u8 index, u8 off, u8 on);
56u8 stdvga_attrindex_read(void);
57void stdvga_attrindex_write(u8 value);
58void stdvga_dac_read(u16 seg, u8 *data_far, u8 start, int count);
59void stdvga_dac_write(u16 seg, u8 *data_far, u8 start, int count);
60
61// stdvgamodes.c
62struct vgamode_s *stdvga_find_mode(int mode);
63void stdvga_list_modes(u16 seg, u16 *dest, u16 *last);
64void stdvga_build_video_param(void);
65void stdvga_override_crtc(int mode, u8 *crtc);
66int stdvga_set_mode(struct vgamode_s *vmode_g, int flags);
Patrick Rudolph4902b8a2017-05-29 19:25:12 +020067int stdvga_get_linesize(struct vgamode_s *vmode_g);
Kevin O'Connorc682ffe2016-08-05 11:48:20 -040068void stdvga_set_packed_palette(void);
69
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040070// swcursor.c
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040071void swcursor_pre_handle10(struct bregs *regs);
72void swcursor_check_event(void);
73
74// vbe.c
75extern u32 VBE_total_memory;
76extern u32 VBE_capabilities;
77extern u32 VBE_framebuffer;
78extern u16 VBE_win_granularity;
79void handle_104f(struct bregs *regs);
80
81// vgafonts.c
82extern u8 vgafont8[];
83extern u8 vgafont14[];
84extern u8 vgafont16[];
85extern u8 vgafont14alt[];
86extern u8 vgafont16alt[];
87
88// vgainit.c
89extern int VgaBDF;
90extern int HaveRunInit;
91
Kevin O'Connor8cdf0c52016-08-05 13:44:12 -040092// vgaversion.c
93extern const char VERSION[], BUILDINFO[];
94
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040095#endif // vgautil.h