Max OS 0.3
Loading...
Searching...
No Matches
vga.h
Go to the documentation of this file.
1
9#ifndef MaxOS_DRIVERS_VGA_H
10#define MaxOS_DRIVERS_VGA_H
11
12#include <stdint.h>
13#include <common/string.h>
16#include <drivers/video/video.h>
17
18namespace MaxOS{
19
20 namespace drivers{
21
22 namespace video{
23
29
30 private:
32 hardwarecommunication::Port8Bit m_crtc_index_port;
34 hardwarecommunication::Port8Bit m_sequence_index_port;
35 hardwarecommunication::Port8Bit m_sequence_data_port;
36 hardwarecommunication::Port8Bit m_graphics_controller_index_port;
37 hardwarecommunication::Port8Bit m_graphics_controller_data_port;
38 hardwarecommunication::Port8Bit m_attribute_controller_index_port;
39 hardwarecommunication::Port8Bit m_attribute_controller_read_port;
40 hardwarecommunication::Port8Bit m_attribute_controller_write_port;
41 hardwarecommunication::Port8Bit m_attribute_controller_reset_port;
42
43 void write_registers(uint8_t* registers);
44 uint8_t* get_frame_buffer_segment();
45
46 bool internal_set_mode(uint32_t width, uint32_t height, uint32_t colour_depth) final;
47 void render_pixel_8_bit(uint32_t x, uint32_t y, uint8_t colour) final;
48 uint8_t get_rendered_pixel_8_bit(uint32_t x, uint32_t y) final;
49
50 public:
53
54 string vendor_name() final;
55 string device_name() final;
56
57 bool supports_mode(uint32_t width, uint32_t height, uint32_t colour_depth) final;
58 };
59 }
60 }
61}
62
63#endif //MaxOS_DRIVERS_VGA_H
uint32_t width() const
Gets the width of the screen.
uint32_t height() const
Gets the height of the screen.
Driver for the video controller, handles the setting of the video mode.
Definition video.h:26
Driver for the VGA graphics controller, handles the rendering of pixels to the screen.
Definition vga.h:28
string vendor_name() final
Gets the name of the vendor.
Definition vga.cpp:197
bool supports_mode(uint32_t width, uint32_t height, uint32_t colour_depth) final
Checks if the specified resolution is supported.
Definition vga.cpp:98
string device_name() final
Gets the name of the device.
Definition vga.cpp:208
VideoGraphicsArray()
Constructs a new Video Graphics Array (VGA) driver object, initializing the necessary I/O ports for V...
Definition vga.cpp:22
Defines a InterruptManager and InterruptHandler for managing hardware and software interrupts.
Defines classes for handling hardware communication ports (8, 16, and 32 bit)
Defines a String class for dynamically sized strings with various operations.
Defines a generic VideoDriver class for handling video modes and graphics context operations.