vgabios: Add support for vbe get/set line length function.
[seabios.git] / vgasrc / vgabios.h
index 464100b2946a742ef0414c79e249caf714822e55..aca95be168a5d7a24a3553df44c9abab863184b5 100644 (file)
@@ -4,6 +4,21 @@
 #include "types.h" // u8
 #include "farptr.h" // struct segoff_s
 
+// standard BIOS Video Parameter Table
+struct VideoParam_s {
+    u8 twidth;
+    u8 theightm1;
+    u8 cheight;
+    u16 slength;
+    u8 sequ_regs[4];
+    u8 miscreg;
+    u8 crtc_regs[25];
+    u8 actl_regs[20];
+    u8 grdc_regs[9];
+} PACKED;
+
+extern struct VideoParam_s video_param_table[29];
+
 struct saveBDAstate {
     u8 video_mode;
     u16 video_cols;
@@ -29,6 +44,7 @@ struct saveBDAstate {
 #define MF_CUSTOMCRTC 0x0800
 #define MF_LINEARFB   0x4000
 #define MF_NOCLEARMEM 0x8000
+#define MF_VBEFLAGS   0xfe00
 
 // Memory model types
 #define MM_TEXT            0x00
@@ -50,11 +66,6 @@ struct vgamode_s {
     u16 sstart;
 };
 
-// vgatables.c
-void build_video_param(void);
-extern struct VideoSavePointer_s video_save_pointer_table;
-extern u8 static_functionality[];
-
 // vgafonts.c
 extern u8 vgafont8[];
 extern u8 vgafont14[];
@@ -63,7 +74,7 @@ extern u8 vgafont14alt[];
 extern u8 vgafont16alt[];
 
 // vgabios.c
-extern u16 VgaBDF;
+extern int VgaBDF;
 #define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val))
 struct carattr {
     u8 car, attr, use_attr;
@@ -71,8 +82,10 @@ struct carattr {
 struct cursorpos {
     u8 x, y, page;
 };
+int vga_bpp(struct vgamode_s *vmode_g);
 u16 calc_page_size(u8 memmodel, u16 width, u16 height);
-void modeswitch_set_bda(int mode, int flags, struct vgamode_s *vmode_g);
+struct vgamode_s *get_current_mode(void);
+int vga_set_mode(int mode, int flags);
 
 // vgafb.c
 void vgafb_scroll(int nblines, int attr
@@ -83,10 +96,10 @@ void vgafb_write_pixel(u8 color, u16 x, u16 y);
 u8 vgafb_read_pixel(u16 x, u16 y);
 
 // vbe.c
-int VBE_enabled;
 u32 VBE_total_memory;
 u32 VBE_capabilities;
 u32 VBE_framebuffer;
+u16 VBE_win_granularity;
 #define VBE_OEM_STRING "SeaBIOS VBE(C) 2011"
 #define VBE_VENDOR_STRING "SeaBIOS Developers"
 #define VBE_PRODUCT_STRING "SeaBIOS VBE Adapter"