User:Omarrx024/VESA Tutorial: Difference between revisions

m
changed the ints to be standred
(Sorry to edit your user page, but 100h is 640x400x256c. There would be no need for VESA to define a 640x480x16c mode, since that was already Mode 12h.)
m (changed the ints to be standred)
Line 91:
Here's the structure returned by this function in ES:DI:
<source lang="c">struct vbe_mode_info_structure {
uint16uint16_t attributes; // deprecated, only bit 7 should be of interest to you, and it indicates the mode supports a linear frame buffer.
uint8uint8_t window_a; // deprecated
uint8uint8_t window_b; // deprecated
uint16uint16_t granularity; // deprecated; used while calculating bank numbers
uint16uint16_t window_size;
uint16uint16_t segment_a;
uint16uint16_t segment_b;
uint32uint32_t win_func_ptr; // deprecated; used to switch banks from protected mode without returning to real mode
uint16uint16_t pitch; // number of bytes per horizontal line
uint16uint16_t width; // width in pixels
uint16uint16_t height; // height in pixels
uint8uint8_t w_char; // unused...
uint8uint8_t y_char; // ...
uint8uint8_t planes;
uint8uint8_t bpp; // bits per pixel in this mode
uint8uint8_t banks; // deprecated; total number of banks in this mode
uint8uint8_t memory_model;
uint8uint8_t bank_size; // deprecated; size of a bank, almost always 64 KB but may be 16 KB...
uint8uint8_t image_pages;
uint8uint8_t reserved0;
 
uint8uint8_t red_mask;
uint8uint8_t red_position;
uint8uint8_t green_mask;
uint8uint8_t green_position;
uint8uint8_t blue_mask;
uint8uint8_t blue_position;
uint8uint8_t reserved_mask;
uint8uint8_t reserved_position;
uint8uint8_t direct_color_attributes;
 
uint32uint32_t framebuffer; // physical address of the linear frame buffer; write here to draw to the screen
uint32uint32_t off_screen_mem_off;
uint16uint16_t off_screen_mem_size; // size of memory in the framebuffer but not being displayed on the screen
uint8uint8_t reserved1[206];
} __attribute__ ((packed));</source>
 
20

edits