vgabios: Unify code to generate the vbe mode list.
[seabios.git] / vgasrc / vgabios.h
index 7c5e8d352288f8bb0a8a4d670fa9dc390b1c419f..3416b98f9ebccb27ce832ef549b8623d95ed982b 100644 (file)
@@ -4,9 +4,6 @@
 #include "types.h" // u8
 #include "farptr.h" // struct segoff_s
 
-#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))
-
 struct saveBDAstate {
     u8 video_mode;
     u16 video_cols;
@@ -43,9 +40,17 @@ struct saveBDAstate {
 #define MM_DIRECT          0x06
 #define MM_YUV             0x07
 
+struct vgamode_s {
+    u8 memmodel;
+    u16 width;
+    u16 height;
+    u8 depth;
+    u8 cwidth;
+    u8 cheight;
+    u16 sstart;
+};
+
 // vgatables.c
-struct vgamode_s;
-struct vgamode_s *find_vga_entry(u8 mode);
 void build_video_param(void);
 extern struct VideoSavePointer_s video_save_pointer_table;
 extern u8 static_functionality[];
@@ -66,6 +71,7 @@ struct carattr {
 struct cursorpos {
     u8 x, y, page;
 };
+u16 calc_page_size(u8 memmodel, u16 width, u16 height);
 void modeswitch_set_bda(int mode, int flags, struct vgamode_s *vmode_g);
 
 // vgafb.c