#define __VGATABLES_H
#include "types.h" // u8
+#include "farptr.h" // struct segoff_s
/*
*
#define LINEAR24 0x12
#define LINEAR32 0x13
-#define SCROLL_DOWN 0
-#define SCROLL_UP 1
-
-#define SCREEN_SIZE(x,y) (((x*y*2)|0x00ff)+1)
-#define SCREEN_MEM_START(x,y,p) ((((x*y*2)|0x00ff)+1)*p)
-#define SCREEN_IO_START(x,y,p) ((((x*y)|0x00ff)+1)*p)
+#define SCREEN_IO_START(x,y,p) (((((x)*(y)) | 0x00ff) + 1) * (p))
+#define SCREEN_MEM_START(x,y,p) SCREEN_IO_START(((x)*2),(y),(p))
/* standard BIOS Video Parameter Table */
struct VideoParam_s {
u16 video_pagestart;
u8 video_page;
/* current font */
- u16 font0_off;
- u16 font0_seg;
- u16 font1_off;
- u16 font1_seg;
+ struct segoff_s font0;
+ struct segoff_s font1;
};
struct saveDACcolors {
// vga.c
struct carattr {
- u8 car, attr;
- u16 use_attr;
+ u8 car, attr, use_attr;
};
struct cursorpos {
u8 x, y, page;
, struct cursorpos ul, struct cursorpos lr);
void vgafb_write_char(struct cursorpos cp, struct carattr ca);
struct carattr vgafb_read_char(struct cursorpos cp);
-void biosfn_write_pixel(u8 BH, u8 AL, u16 CX, u16 DX);
-void biosfn_read_pixel(u8 BH, u16 CX, u16 DX, u16 *AX);
+void vgafb_write_pixel(u8 color, u16 x, u16 y);
+u8 vgafb_read_pixel(u16 x, u16 y);
void vgafb_load_font(u16 seg, void *src_far, u16 count
, u16 start, u8 destflags, u8 fontsize);
u8 vgahw_get_pel_mask();
void vgahw_save_dac_state(u16 seg, struct saveDACcolors *info);
void vgahw_restore_dac_state(u16 seg, struct saveDACcolors *info);
+void vgahw_sequ_write(u8 index, u8 value);
+void vgahw_grdc_write(u8 index, u8 value);
void vgahw_set_text_block_specifier(u8 spec);
void get_font_access();
void release_font_access();