#define SEG_CTEXT 0xB800
#define SEG_MTEXT 0xB000
-/*
- * Tables of default values for each mode
- */
-#define TEXT 0x80
-
-#define CTEXT (0x00 | TEXT)
-#define MTEXT (0x01 | TEXT)
-#define CGA 0x02
-#define PLANAR1 0x03
-#define PLANAR4 0x04
-#define LINEAR8 0x05
-
-// for SVGA
-#define LINEAR15 0x10
-#define LINEAR16 0x11
-#define LINEAR24 0x12
-#define LINEAR32 0x13
-
struct vgamode_s {
- u8 svgamode;
- u8 memmodel; /* CTEXT,MTEXT,CGA,PL1,PL2,PL4,P8,P15,P16,P24,P32 */
- u8 twidth;
- u8 theight;
+ u16 mode;
+ u8 memmodel;
+ u16 width;
+ u16 height;
+ u8 depth;
+ u8 cwidth;
u8 cheight;
- u8 pixbits;
u16 sstart;
u16 slength;
u16 stdvga_get_vde(void);
void stdvga_save_state(u16 seg, struct saveVideoHardware *info);
void stdvga_restore_state(u16 seg, struct saveVideoHardware *info);
-void stdvga_set_mode(int mode, int flags);
+int stdvga_set_mode(int mode, int flags);
void stdvga_enable_video_addressing(u8 disable);
-void stdvga_init(void);
+int stdvga_init(void);
#endif // stdvga.h