diff options
Diffstat (limited to 'src/kernel/include/video.h')
-rw-r--r-- | src/kernel/include/video.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/kernel/include/video.h b/src/kernel/include/video.h new file mode 100644 index 0000000..6f702b1 --- /dev/null +++ b/src/kernel/include/video.h @@ -0,0 +1,49 @@ +#include <stdint.h> +void dump_video(); + +//this struct was stolen from wiki.osdev.org +struct mode_info { + uint16_t attributes; + uint8_t window_a; + uint8_t window_b; + uint16_t granularity; + uint16_t window_size; + uint16_t segment_a; + uint16_t segment_b; + uint32_t win_func_ptr; + uint16_t pitch; + uint16_t width; + uint16_t height; + uint8_t w_char; + uint8_t y_char; + uint8_t planes; + uint8_t bpp; + uint8_t banks; + uint8_t memory_model; + uint8_t bank_size; + uint8_t image_pages; + uint8_t reserved0; + uint8_t red_mask; + uint8_t red_position; + uint8_t green_mask; + uint8_t green_position; + uint8_t blue_mask; + uint8_t blue_position; + uint8_t reserved_mask; + uint8_t reserved_position; + uint8_t direct_color_attributes; + + uint32_t framebuffer; + uint32_t off_screen_mem_off; + uint16_t off_screen_mem_size; + uint8_t reserved1[206]; +} __attribute__((packed)); + +struct vbe_infoblock { + char vbe_signature[4]; + uint16_t vbe_version; + uint16_t oem_ptr[2]; + uint8_t capabilities[4]; + uint32_t videomodeptr; + uint16_t total_memory; +} __attribute__((packed)); |