pub struct Vga {
pub general_registers: GeneralRegisters,
pub sequencer_registers: SequencerRegisters,
pub graphics_controller_registers: GraphicsControllerRegisters,
pub attribute_controller_registers: AttributeControllerRegisters,
pub crtc_controller_registers: CrtcControllerRegisters,
pub color_palette_registers: ColorPaletteRegisters,
/* private fields */
}
Expand description
Represents a vga graphics card with it’s common registers, as well as the most recent video mode.
Fields§
§general_registers: GeneralRegisters
Represents the general registers on vga hardware.
sequencer_registers: SequencerRegisters
Represents the sequencer registers on vga hardware.
graphics_controller_registers: GraphicsControllerRegisters
Represents the graphics controller registers on vga hardware.
attribute_controller_registers: AttributeControllerRegisters
Represents the attribute controller registers on vga hardware.
crtc_controller_registers: CrtcControllerRegisters
Represents the crtc controller registers on vga hardware.
color_palette_registers: ColorPaletteRegisters
Represents the color palette registers on vga hardware.
Implementations§
source§impl Vga
impl Vga
sourcepub fn set_memory_start(&mut self, video_memory_start: usize)
pub fn set_memory_start(&mut self, video_memory_start: usize)
Set the start of video memory
The default is 0xA0000 for identity map to physical memory
Example
use vga;
vga::vga::VGA.lock().set_memory_start(0xa0000);
sourcepub fn set_video_mode(&mut self, video_mode: VideoMode)
pub fn set_video_mode(&mut self, video_mode: VideoMode)
Sets the vga graphics card to the given VideoMode
.
sourcepub fn get_frame_buffer(&mut self) -> FrameBuffer
pub fn get_frame_buffer(&mut self) -> FrameBuffer
Gets the FrameBuffer
address as specified by the
Miscellaneous Output Register
.
sourcepub fn get_most_recent_video_mode(&self) -> Option<VideoMode>
pub fn get_most_recent_video_mode(&self) -> Option<VideoMode>
Returns the most recent video mode, or None
if no
video mode has been set yet.
sourcepub fn get_emulation_mode(&mut self) -> EmulationMode
pub fn get_emulation_mode(&mut self) -> EmulationMode
Returns the current EmulationMode
as determined by the miscellaneous output register.