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

1.1       root        1: #ifndef __BOCHSVGA_H
                      2: #define __BOCHSVGA_H
                      3: 
                      4: #include "types.h" // u8
                      5: #include "ioport.h" // outw
                      6: 
                      7: #define VBE_DISPI_BANK_ADDRESS           0xA0000
                      8: #define VBE_DISPI_BANK_SIZE_KB           64
                      9: 
                     10: #define VBE_DISPI_MAX_XRES               2560
                     11: #define VBE_DISPI_MAX_YRES               1600
                     12: 
                     13: #define VBE_DISPI_IOPORT_INDEX           0x01CE
                     14: #define VBE_DISPI_IOPORT_DATA            0x01CF
                     15: 
                     16: #define VBE_DISPI_INDEX_ID               0x0
                     17: #define VBE_DISPI_INDEX_XRES             0x1
                     18: #define VBE_DISPI_INDEX_YRES             0x2
                     19: #define VBE_DISPI_INDEX_BPP              0x3
                     20: #define VBE_DISPI_INDEX_ENABLE           0x4
                     21: #define VBE_DISPI_INDEX_BANK             0x5
                     22: #define VBE_DISPI_INDEX_VIRT_WIDTH       0x6
                     23: #define VBE_DISPI_INDEX_VIRT_HEIGHT      0x7
                     24: #define VBE_DISPI_INDEX_X_OFFSET         0x8
                     25: #define VBE_DISPI_INDEX_Y_OFFSET         0x9
                     26: #define VBE_DISPI_INDEX_VIDEO_MEMORY_64K 0xa
                     27: 
                     28: #define VBE_DISPI_ID0                    0xB0C0
                     29: #define VBE_DISPI_ID1                    0xB0C1
                     30: #define VBE_DISPI_ID2                    0xB0C2
                     31: #define VBE_DISPI_ID3                    0xB0C3
                     32: #define VBE_DISPI_ID4                    0xB0C4
                     33: #define VBE_DISPI_ID5                    0xB0C5
                     34: 
                     35: #define VBE_DISPI_DISABLED               0x00
                     36: #define VBE_DISPI_ENABLED                0x01
                     37: #define VBE_DISPI_GETCAPS                0x02
                     38: #define VBE_DISPI_8BIT_DAC               0x20
                     39: #define VBE_DISPI_LFB_ENABLED            0x40
                     40: #define VBE_DISPI_NOCLEARMEM             0x80
                     41: 
                     42: #define VBE_DISPI_LFB_PHYSICAL_ADDRESS   0xE0000000
                     43: 
                     44: static inline u16 dispi_read(u16 reg)
                     45: {
                     46:     outw(reg, VBE_DISPI_IOPORT_INDEX);
                     47:     return inw(VBE_DISPI_IOPORT_DATA);
                     48: }
                     49: static inline void dispi_write(u16 reg, u16 val)
                     50: {
                     51:     outw(reg, VBE_DISPI_IOPORT_INDEX);
                     52:     outw(val, VBE_DISPI_IOPORT_DATA);
                     53: }
                     54: 
                     55: struct vgamode_s *bochsvga_find_mode(int mode);
                     56: void bochsvga_list_modes(u16 seg, u16 *dest, u16 *last);
                     57: int bochsvga_get_window(struct vgamode_s *vmode_g, int window);
                     58: int bochsvga_set_window(struct vgamode_s *vmode_g, int window, int val);
                     59: int bochsvga_get_linelength(struct vgamode_s *vmode_g);
                     60: int bochsvga_set_linelength(struct vgamode_s *vmode_g, int val);
                     61: int bochsvga_get_displaystart(struct vgamode_s *vmode_g);
                     62: int bochsvga_set_displaystart(struct vgamode_s *vmode_g, int val);
                     63: int bochsvga_get_dacformat(struct vgamode_s *vmode_g);
                     64: int bochsvga_set_dacformat(struct vgamode_s *vmode_g, int val);
                     65: int bochsvga_size_state(int states);
                     66: int bochsvga_save_state(u16 seg, void *data, int states);
                     67: int bochsvga_restore_state(u16 seg, void *data, int states);
                     68: int bochsvga_set_mode(struct vgamode_s *vmode_g, int flags);
                     69: int bochsvga_init(void);
                     70: 
                     71: #endif // bochsvga.h

unix.superglobalmegacorp.com

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