X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=vgasrc%2Fvgabios.h;h=464100b2946a742ef0414c79e249caf714822e55;hb=3339c05f19468f87da84ab059cf4ee5375abfa55;hp=0371f8cf2b9eea0ad18731f9b6de63217a391d37;hpb=821d6b410e02897f84c4b732f3678f64e396c9cf;p=seabios.git diff --git a/vgasrc/vgabios.h b/vgasrc/vgabios.h index 0371f8c..464100b 100644 --- a/vgasrc/vgabios.h +++ b/vgasrc/vgabios.h @@ -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; @@ -33,9 +30,27 @@ struct saveBDAstate { #define MF_LINEARFB 0x4000 #define MF_NOCLEARMEM 0x8000 +// Memory model types +#define MM_TEXT 0x00 +#define MM_CGA 0x01 +#define MM_HERCULES 0x02 +#define MM_PLANAR 0x03 +#define MM_PACKED 0x04 +#define MM_NON_CHAIN_4_256 0x05 +#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[]; @@ -48,6 +63,7 @@ extern u8 vgafont14alt[]; extern u8 vgafont16alt[]; // vgabios.c +extern u16 VgaBDF; #define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val)) struct carattr { u8 car, attr, use_attr; @@ -55,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 @@ -65,26 +82,15 @@ struct carattr vgafb_read_char(struct cursorpos cp); void vgafb_write_pixel(u8 color, u16 x, u16 y); u8 vgafb_read_pixel(u16 x, u16 y); -// clext.c -int cirrus_set_video_mode(u8 mode, u8 noclearmem); -void cirrus_init(void); - // vbe.c +int VBE_enabled; +u32 VBE_total_memory; +u32 VBE_capabilities; +u32 VBE_framebuffer; #define VBE_OEM_STRING "SeaBIOS VBE(C) 2011" #define VBE_VENDOR_STRING "SeaBIOS Developers" #define VBE_PRODUCT_STRING "SeaBIOS VBE Adapter" #define VBE_REVISION_STRING "Rev. 1" - -struct vbe_modeinfo -{ - u16 width; - u16 height; - u8 depth; - u16 linesize; - u32 phys_base; - u32 vram_size; -}; - struct bregs; void handle_104f(struct bregs *regs);