Annotation of qemu/roms/seabios/vgasrc/vgabios.h, revision 1.1.1.1

1.1       root        1: #ifndef __VGABIOS_H
                      2: #define __VGABIOS_H
                      3: 
                      4: #include "types.h" // u8
                      5: #include "farptr.h" // struct segoff_s
                      6: 
                      7: // standard BIOS Video Parameter Table
                      8: struct VideoParam_s {
                      9:     u8 twidth;
                     10:     u8 theightm1;
                     11:     u8 cheight;
                     12:     u16 slength;
                     13:     u8 sequ_regs[4];
                     14:     u8 miscreg;
                     15:     u8 crtc_regs[25];
                     16:     u8 actl_regs[20];
                     17:     u8 grdc_regs[9];
                     18: } PACKED;
                     19: 
                     20: extern struct VideoParam_s video_param_table[29];
                     21: 
                     22: struct saveBDAstate {
                     23:     u16 video_mode;
                     24:     u16 video_cols;
                     25:     u16 video_pagesize;
                     26:     u16 crtc_address;
                     27:     u8 video_rows;
                     28:     u16 char_height;
                     29:     u8 video_ctl;
                     30:     u8 video_switches;
                     31:     u8 modeset_ctl;
                     32:     u16 cursor_type;
                     33:     u16 cursor_pos[8];
                     34:     u16 video_pagestart;
                     35:     u8 video_page;
                     36:     /* current font */
                     37:     struct segoff_s font0;
                     38:     struct segoff_s font1;
                     39: };
                     40: 
                     41: // Mode flags
                     42: #define MF_GRAYSUM    0x0002
                     43: #define MF_NOPALETTE  0x0008
                     44: #define MF_CUSTOMCRTC 0x0800
                     45: #define MF_LINEARFB   0x4000
                     46: #define MF_NOCLEARMEM 0x8000
                     47: #define MF_VBEFLAGS   0xfe00
                     48: 
                     49: // Memory model types
                     50: #define MM_TEXT            0x00
                     51: #define MM_CGA             0x01
                     52: #define MM_HERCULES        0x02
                     53: #define MM_PLANAR          0x03
                     54: #define MM_PACKED          0x04
                     55: #define MM_NON_CHAIN_4_256 0x05
                     56: #define MM_DIRECT          0x06
                     57: #define MM_YUV             0x07
                     58: 
                     59: struct vgamode_s {
                     60:     u8 memmodel;
                     61:     u16 width;
                     62:     u16 height;
                     63:     u8 depth;
                     64:     u8 cwidth;
                     65:     u8 cheight;
                     66:     u16 sstart;
                     67: };
                     68: 
                     69: // vgafonts.c
                     70: extern u8 vgafont8[];
                     71: extern u8 vgafont14[];
                     72: extern u8 vgafont16[];
                     73: extern u8 vgafont14alt[];
                     74: extern u8 vgafont16alt[];
                     75: 
                     76: // Debug settings
                     77: #define DEBUG_VGA_POST 1
                     78: #define DEBUG_VGA_10 3
                     79: 
                     80: // vgabios.c
                     81: extern int VgaBDF;
                     82: extern int HaveRunInit;
                     83: #define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val))
                     84: struct carattr {
                     85:     u8 car, attr, use_attr, pad;
                     86: };
                     87: struct cursorpos {
                     88:     u8 x, y, page, pad;
                     89: };
                     90: int vga_bpp(struct vgamode_s *vmode_g);
                     91: u16 calc_page_size(u8 memmodel, u16 width, u16 height);
                     92: void save_bda_state(u16 seg, struct saveBDAstate *info);
                     93: void restore_bda_state(u16 seg, struct saveBDAstate *info);
                     94: struct vgamode_s *get_current_mode(void);
                     95: int vga_set_mode(int mode, int flags);
                     96: 
                     97: // vgafb.c
                     98: void vgafb_scroll(int nblines, int attr
                     99:                   , struct cursorpos ul, struct cursorpos lr);
                    100: void vgafb_write_char(struct cursorpos cp, struct carattr ca);
                    101: struct carattr vgafb_read_char(struct cursorpos cp);
                    102: void vgafb_write_pixel(u8 color, u16 x, u16 y);
                    103: u8 vgafb_read_pixel(u16 x, u16 y);
                    104: 
                    105: // vbe.c
                    106: extern u32 VBE_total_memory;
                    107: extern u32 VBE_capabilities;
                    108: extern u32 VBE_framebuffer;
                    109: extern u16 VBE_win_granularity;
                    110: #define VBE_OEM_STRING "SeaBIOS VBE(C) 2011"
                    111: #define VBE_VENDOR_STRING "SeaBIOS Developers"
                    112: #define VBE_PRODUCT_STRING "SeaBIOS VBE Adapter"
                    113: #define VBE_REVISION_STRING "Rev. 1"
                    114: struct bregs;
                    115: void handle_104f(struct bregs *regs);
                    116: 
                    117: #endif // vgabios.h

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.