Anonymous user
VESA Video Modes: Difference between revisions
Jump to navigation
Jump to search
no edit summary
[unchecked revision] | [unchecked revision] |
No edit summary |
|||
Line 21:
</source>
;INT 0x10, AX=0x4F01, CX=mode, ES:DI=256 byte buffer
: Get Mode Info. Call this for each member of the mode array to find out the details of that mode. The 256 byte buffer will be filled by the mode info block.
<source lang="c">
struct
uint16 attributes; // deprecated, only bit 7 should be of interest to you, and it indicates the mode supports a linear frame buffer.
uint8 window_a; // deprecated
uint8 window_b; // deprecated
uint16 granularity; // deprecated; used while calculating bank numbers
uint16 window_size;
uint16 segment_a;
uint16 segment_b;
uint32 win_func_ptr; // deprecated; used to switch banks from protected mode without returning to real mode
uint16 pitch; // number of bytes per horizontal line
uint16 width; // width in pixels
uint16 height; // height in pixels
uint8 w_char; // unused...
uint8_t reserved0;▼
uint8 y_char; // ...
uint8 planes;
uint8_t red_mask, red_position;▼
uint8 bpp; // bits per pixel in this mode
uint8_t green_mask, green_position;▼
uint8 banks; // deprecated; total number of banks in this mode
uint8_t blue_mask, blue_position;▼
uint8 memory_model;
uint8 bank_size; // deprecated; size of a bank, almost always 64 KB but may be 16 KB...
uint8 image_pages;
uint32_t reserved1;▼
uint8 red_mask;
} __attribute__((packed));▼
uint8 green_mask;
uint8 blue_mask;
uint8 reserved_mask;
uint8 reserved_position;
uint8 direct_color_attributes;
uint32 framebuffer; // physical address of the linear frame buffer; write here to draw to the screen
uint32 off_screen_mem_off;
uint16 off_screen_mem_size; // size of memory in the framebuffer but not being displayed on the screen
▲} __attribute__ ((packed));
</source>
|