X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=vgasrc%2Fvgatables.h;h=e0d61c906da29eb66d9803914de485fd246e52be;hb=f1e217dc1885228cdb79586f1d3bde694758cbc1;hp=ef15b1d9c9b3d693b0f6d0434c8dc3ddda5f9214;hpb=815e447898aabd6394186dcf1fa1408dd5038cff;p=seabios.git diff --git a/vgasrc/vgatables.h b/vgasrc/vgatables.h index ef15b1d..e0d61c9 100644 --- a/vgasrc/vgatables.h +++ b/vgasrc/vgatables.h @@ -70,38 +70,24 @@ #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 Video Save Pointer Table -struct VideoSavePointer_s { - struct segoff_s videoparam; - struct segoff_s paramdynamicsave; - struct segoff_s textcharset; - struct segoff_s graphcharset; - struct segoff_s secsavepointer; - u8 reserved[8]; -} PACKED; - -/* 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; - struct vgamode_s { u8 svgamode; - struct VideoParam_s *vparam; u8 memmodel; /* CTEXT,MTEXT,CGA,PL1,PL2,PL4,P8,P15,P16,P24,P32 */ + u8 twidth; + u8 theight; + u8 cheight; u8 pixbits; u16 sstart; + u16 slength; + u8 pelmask; u8 *dac; u16 dacsize; + u8 *sequ_regs; + u8 miscreg; + u8 *crtc_regs; + u8 *actl_regs; + u8 *grdc_regs; }; struct saveVideoHardware { @@ -148,8 +134,8 @@ struct saveDACcolors { // vgatables.c struct vgamode_s *find_vga_entry(u8 mode); +void build_video_param(void); extern struct VideoSavePointer_s video_save_pointer_table; -extern struct VideoParam_s video_param_table[]; extern u8 static_functionality[]; // vgafonts.c @@ -160,6 +146,7 @@ extern u8 vgafont14alt[]; extern u8 vgafont16alt[]; // vga.c +#define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val)) struct carattr { u8 car, attr, use_attr; }; @@ -211,7 +198,7 @@ void vgahw_set_scan_lines(u8 lines); u16 vgahw_get_vde(void); void vgahw_save_state(u16 seg, struct saveVideoHardware *info); void vgahw_restore_state(u16 seg, struct saveVideoHardware *info); -void vgahw_set_mode(struct VideoParam_s *vparam_g); +void vgahw_set_mode(struct vgamode_s *vmode_g); void vgahw_enable_video_addressing(u8 disable); void vgahw_init(void); @@ -234,15 +221,5 @@ struct vbe_modeinfo u32 phys_base; u32 vram_size; }; -int vbe_init(u8 bus, u8 devfn); -int vbe_enabled(void); -u16 vbe_total_mem(void); -int vbe_list_modes(u16 seg, u16 ptr); -int vbe_mode_info(u16 mode, struct vbe_modeinfo *info); -void vbe_hires_enable(int enable); -void vbe_set_mode(u16 mode, struct vbe_modeinfo *info); -void vbe_clear_scr(void); -int vbe_hires_enabled(void); -u16 vbe_curr_mode(void); #endif // vgatables.h