blob: 08c4e8dca0794196e249e300581a221a0f8152a5 [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);
20int cbvga_setup(void);
21
22// clext.c
23struct vgamode_s *clext_find_mode(int mode);
24void clext_list_modes(u16 seg, u16 *dest, u16 *last);
25int clext_get_window(struct vgamode_s *vmode_g, int window);
26int clext_set_window(struct vgamode_s *vmode_g, int window, int val);
27int clext_get_linelength(struct vgamode_s *vmode_g);
28int clext_set_linelength(struct vgamode_s *vmode_g, int val);
29int clext_get_displaystart(struct vgamode_s *vmode_g);
30int clext_set_displaystart(struct vgamode_s *vmode_g, int val);
31int clext_save_restore(int cmd, u16 seg, void *data);
32int clext_set_mode(struct vgamode_s *vmode_g, int flags);
33struct bregs;
34void clext_1012(struct bregs *regs);
35int clext_setup(void);
36
Kevin O'Connorc682ffe2016-08-05 11:48:20 -040037// stdvgaio.c
38u8 stdvga_pelmask_read(void);
39void stdvga_pelmask_write(u8 val);
40u8 stdvga_misc_read(void);
41void stdvga_misc_write(u8 value);
42void stdvga_misc_mask(u8 off, u8 on);
43u8 stdvga_sequ_read(u8 index);
44void stdvga_sequ_write(u8 index, u8 value);
45void stdvga_sequ_mask(u8 index, u8 off, u8 on);
46u8 stdvga_grdc_read(u8 index);
47void stdvga_grdc_write(u8 index, u8 value);
48void stdvga_grdc_mask(u8 index, u8 off, u8 on);
49u8 stdvga_crtc_read(u16 crtc_addr, u8 index);
50void stdvga_crtc_write(u16 crtc_addr, u8 index, u8 value);
51void stdvga_crtc_mask(u16 crtc_addr, u8 index, u8 off, u8 on);
52u8 stdvga_attr_read(u8 index);
53void stdvga_attr_write(u8 index, u8 value);
54void stdvga_attr_mask(u8 index, u8 off, u8 on);
55u8 stdvga_attrindex_read(void);
56void stdvga_attrindex_write(u8 value);
57void stdvga_dac_read(u16 seg, u8 *data_far, u8 start, int count);
58void stdvga_dac_write(u16 seg, u8 *data_far, u8 start, int count);
59
60// stdvgamodes.c
61struct vgamode_s *stdvga_find_mode(int mode);
62void stdvga_list_modes(u16 seg, u16 *dest, u16 *last);
63void stdvga_build_video_param(void);
64void stdvga_override_crtc(int mode, u8 *crtc);
65int stdvga_set_mode(struct vgamode_s *vmode_g, int flags);
66void stdvga_set_packed_palette(void);
67
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040068// swcursor.c
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040069void swcursor_pre_handle10(struct bregs *regs);
70void swcursor_check_event(void);
71
72// vbe.c
73extern u32 VBE_total_memory;
74extern u32 VBE_capabilities;
75extern u32 VBE_framebuffer;
76extern u16 VBE_win_granularity;
77void handle_104f(struct bregs *regs);
78
79// vgafonts.c
80extern u8 vgafont8[];
81extern u8 vgafont14[];
82extern u8 vgafont16[];
83extern u8 vgafont14alt[];
84extern u8 vgafont16alt[];
85
86// vgainit.c
87extern int VgaBDF;
88extern int HaveRunInit;
89
Kevin O'Connor8cdf0c52016-08-05 13:44:12 -040090// vgaversion.c
91extern const char VERSION[], BUILDINFO[];
92
Kevin O'Connor2f2ec112016-08-05 11:14:58 -040093#endif // vgautil.h