#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))
#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))
u8 memmodel; /* CTEXT,MTEXT,CGA,PL1,PL2,PL4,P8,P15,P16,P24,P32 */
u8 memmodel; /* CTEXT,MTEXT,CGA,PL1,PL2,PL4,P8,P15,P16,P24,P32 */
, u16 start, u8 destflags, u8 fontsize);
// vgaio.c
, u16 start, u8 destflags, u8 fontsize);
// vgaio.c
void vgahw_set_palette(u8 palid);
void vgahw_set_single_palette_reg(u8 reg, u8 val);
u8 vgahw_get_single_palette_reg(u8 reg);
void vgahw_set_palette(u8 palid);
void vgahw_set_single_palette_reg(u8 reg, u8 val);
u8 vgahw_get_single_palette_reg(u8 reg);
void vgahw_set_dac_regs(u16 seg, u8 *data_far, u8 start, int count);
void vgahw_get_dac_regs(u16 seg, u8 *data_far, u8 start, int count);
void vgahw_set_pel_mask(u8 val);
void vgahw_set_dac_regs(u16 seg, u8 *data_far, u8 start, int count);
void vgahw_get_dac_regs(u16 seg, u8 *data_far, u8 start, int count);
void vgahw_set_pel_mask(u8 val);
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 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 vgahw_set_cursor_shape(u8 start, u8 end);
void vgahw_set_active_page(u16 address);
void vgahw_set_cursor_pos(u16 address);
void vgahw_set_scan_lines(u8 lines);
void vgahw_set_cursor_shape(u8 start, u8 end);
void vgahw_set_active_page(u16 address);
void vgahw_set_cursor_pos(u16 address);
void vgahw_set_scan_lines(u8 lines);
void vgahw_save_state(u16 seg, struct saveVideoHardware *info);
void vgahw_restore_state(u16 seg, struct saveVideoHardware *info);
void vgahw_save_state(u16 seg, struct saveVideoHardware *info);
void vgahw_restore_state(u16 seg, struct saveVideoHardware *info);
-void cirrus_set_video_mode(u8 mode);
-void cirrus_init();
-
-// vbe.c -- not implemented yet.
-#define VBE_DISPI_DISABLED 0x00
-void dispi_set_enable(int enable);
-void vbe_init();
-int vbe_has_vbe_display();
+int cirrus_set_video_mode(u8 mode, u8 noclearmem);
+void cirrus_init(void);
+
+// vbe.c
+#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;
+};