Kevin O'Connor | 2f2ec11 | 2016-08-05 11:14:58 -0400 | [diff] [blame] | 1 | // Misc function and variable declarations. |
| 2 | #ifndef __VGAUTIL_H |
| 3 | #define __VGAUTIL_H |
| 4 | |
| 5 | #include "types.h" // u8 |
| 6 | |
Kevin O'Connor | 65bc0a7 | 2016-08-05 11:53:32 -0400 | [diff] [blame] | 7 | // cbvga.c |
| 8 | struct vgamode_s *cbvga_find_mode(int mode); |
| 9 | void cbvga_list_modes(u16 seg, u16 *dest, u16 *last); |
| 10 | int cbvga_get_window(struct vgamode_s *vmode_g, int window); |
| 11 | int cbvga_set_window(struct vgamode_s *vmode_g, int window, int val); |
| 12 | int cbvga_get_linelength(struct vgamode_s *vmode_g); |
| 13 | int cbvga_set_linelength(struct vgamode_s *vmode_g, int val); |
| 14 | int cbvga_get_displaystart(struct vgamode_s *vmode_g); |
| 15 | int cbvga_set_displaystart(struct vgamode_s *vmode_g, int val); |
| 16 | int cbvga_get_dacformat(struct vgamode_s *vmode_g); |
| 17 | int cbvga_set_dacformat(struct vgamode_s *vmode_g, int val); |
| 18 | int cbvga_save_restore(int cmd, u16 seg, void *data); |
| 19 | int cbvga_set_mode(struct vgamode_s *vmode_g, int flags); |
| 20 | int cbvga_setup(void); |
| 21 | |
| 22 | // clext.c |
| 23 | struct vgamode_s *clext_find_mode(int mode); |
| 24 | void clext_list_modes(u16 seg, u16 *dest, u16 *last); |
| 25 | int clext_get_window(struct vgamode_s *vmode_g, int window); |
| 26 | int clext_set_window(struct vgamode_s *vmode_g, int window, int val); |
| 27 | int clext_get_linelength(struct vgamode_s *vmode_g); |
| 28 | int clext_set_linelength(struct vgamode_s *vmode_g, int val); |
| 29 | int clext_get_displaystart(struct vgamode_s *vmode_g); |
| 30 | int clext_set_displaystart(struct vgamode_s *vmode_g, int val); |
| 31 | int clext_save_restore(int cmd, u16 seg, void *data); |
| 32 | int clext_set_mode(struct vgamode_s *vmode_g, int flags); |
| 33 | struct bregs; |
| 34 | void clext_1012(struct bregs *regs); |
| 35 | int clext_setup(void); |
| 36 | |
Kevin O'Connor | c682ffe | 2016-08-05 11:48:20 -0400 | [diff] [blame] | 37 | // stdvgaio.c |
| 38 | u8 stdvga_pelmask_read(void); |
| 39 | void stdvga_pelmask_write(u8 val); |
| 40 | u8 stdvga_misc_read(void); |
| 41 | void stdvga_misc_write(u8 value); |
| 42 | void stdvga_misc_mask(u8 off, u8 on); |
| 43 | u8 stdvga_sequ_read(u8 index); |
| 44 | void stdvga_sequ_write(u8 index, u8 value); |
| 45 | void stdvga_sequ_mask(u8 index, u8 off, u8 on); |
| 46 | u8 stdvga_grdc_read(u8 index); |
| 47 | void stdvga_grdc_write(u8 index, u8 value); |
| 48 | void stdvga_grdc_mask(u8 index, u8 off, u8 on); |
| 49 | u8 stdvga_crtc_read(u16 crtc_addr, u8 index); |
| 50 | void stdvga_crtc_write(u16 crtc_addr, u8 index, u8 value); |
| 51 | void stdvga_crtc_mask(u16 crtc_addr, u8 index, u8 off, u8 on); |
| 52 | u8 stdvga_attr_read(u8 index); |
| 53 | void stdvga_attr_write(u8 index, u8 value); |
| 54 | void stdvga_attr_mask(u8 index, u8 off, u8 on); |
| 55 | u8 stdvga_attrindex_read(void); |
| 56 | void stdvga_attrindex_write(u8 value); |
| 57 | void stdvga_dac_read(u16 seg, u8 *data_far, u8 start, int count); |
| 58 | void stdvga_dac_write(u16 seg, u8 *data_far, u8 start, int count); |
| 59 | |
| 60 | // stdvgamodes.c |
| 61 | struct vgamode_s *stdvga_find_mode(int mode); |
| 62 | void stdvga_list_modes(u16 seg, u16 *dest, u16 *last); |
| 63 | void stdvga_build_video_param(void); |
| 64 | void stdvga_override_crtc(int mode, u8 *crtc); |
| 65 | int stdvga_set_mode(struct vgamode_s *vmode_g, int flags); |
| 66 | void stdvga_set_packed_palette(void); |
| 67 | |
Kevin O'Connor | 2f2ec11 | 2016-08-05 11:14:58 -0400 | [diff] [blame] | 68 | // swcursor.c |
Kevin O'Connor | 2f2ec11 | 2016-08-05 11:14:58 -0400 | [diff] [blame] | 69 | void swcursor_pre_handle10(struct bregs *regs); |
| 70 | void swcursor_check_event(void); |
| 71 | |
| 72 | // vbe.c |
| 73 | extern u32 VBE_total_memory; |
| 74 | extern u32 VBE_capabilities; |
| 75 | extern u32 VBE_framebuffer; |
| 76 | extern u16 VBE_win_granularity; |
| 77 | void handle_104f(struct bregs *regs); |
| 78 | |
| 79 | // vgafonts.c |
| 80 | extern u8 vgafont8[]; |
| 81 | extern u8 vgafont14[]; |
| 82 | extern u8 vgafont16[]; |
| 83 | extern u8 vgafont14alt[]; |
| 84 | extern u8 vgafont16alt[]; |
| 85 | |
| 86 | // vgainit.c |
| 87 | extern int VgaBDF; |
| 88 | extern int HaveRunInit; |
| 89 | |
Kevin O'Connor | 8cdf0c5 | 2016-08-05 13:44:12 -0400 | [diff] [blame] | 90 | // vgaversion.c |
| 91 | extern const char VERSION[], BUILDINFO[]; |
| 92 | |
Kevin O'Connor | 2f2ec11 | 2016-08-05 11:14:58 -0400 | [diff] [blame] | 93 | #endif // vgautil.h |