[][src]Struct dustbox::gpu::GPU

pub struct GPU {
    pub scanline: u32,
    pub crtc: CRTC,
    pub dac: DAC,
    pub font_14: MemoryAddress,
    pub font_16: MemoryAddress,
    pub card: GraphicCard,
    pub mode: VideoModeBlock,
    // some fields omitted
}

Fields

scanline: u32crtc: CRTCdac: DACfont_14: MemoryAddressfont_16: MemoryAddresscard: GraphicCardmode: VideoModeBlock

Methods

impl GPU[src]

pub fn default() -> Self[src]

pub fn render_frame(&self, mmu: &MMU) -> VideoFrame[src]

pub fn set_mode(&mut self, mmu: &mut MMU, mode: u8)[src]

int 10h, ah = 00h SET VIDEO MODE

pub fn set_active_page(&mut self, mmu: &mut MMU, page: u8)[src]

int 10h, ah = 05h SELECT ACTIVE DISPLAY PAGE

pub fn get_active_page(&self, mmu: &mut MMU) -> u8[src]

returns the active display page value

pub fn set_cursor_pos(&mut self, mmu: &mut MMU, row: u8, col: u8, page: u8)[src]

int 10h, ah = 02h SET CURSOR POSITION

pub fn write_char(
    &mut self,
    mmu: &mut MMU,
    chr: u16,
    attr: u8,
    page: u8,
    count: u16,
    showattr: bool
)
[src]

int 10h, ah = 0Ah WRITE CHARACTER ONLY AT CURSOR POSITION

pub fn teletype_output(&mut self, mmu: &mut MMU, chr: u8, page: u8, attr: u8)[src]

int 10h, ah = 0Eh TELETYPE OUTPUT Display a character on the screen, advancing the cursor and scrolling the screen as necessary

pub fn write_pixel(
    &mut self,
    mmu: &mut MMU,
    x: u16,
    y: u16,
    _page: u8,
    color: u8
)
[src]

int 10h, ah = 0Ch WRITE GRAPHICS PIXEL color: if bit 7 is set, value is XOR'ed onto screen except in 256-color modes

pub fn read_dac_block(
    &mut self,
    mmu: &mut MMU,
    index: u16,
    count: u16,
    seg: u16,
    off: u16
)
[src]

int 10h, ax = 1017h READ BLOCK OF DAC REGISTERS (VGA/MCGA)

pub fn load_graphics_chars(&mut self, mmu: &mut MMU, row: u8, dl: u8)[src]

int 10h, ax = 1124h GRAPH-MODE CHARGEN - LOAD 8x16 GRAPHICS CHARS (VGA,MCGA)

pub fn write_string(
    &mut self,
    mmu: &mut MMU,
    row: u8,
    col: u8,
    flag: u8,
    attr: u8,
    str_seg: u16,
    str_off: u16,
    count: u16,
    page: u8
)
[src]

int 10h, ah = 13h WRITE STRING (AT and later,EGA)

pub fn get_individual_palette_register(&self, _reg: u8) -> u8[src]

int 10h, ax = 1007h GET INDIVIDUAL PALETTE REGISTER (VGA,UltraVision v2+)

pub fn set_individual_dac_register(
    &mut self,
    mmu: &mut MMU,
    index: u8,
    r: u8,
    g: u8,
    b: u8
)
[src]

int 10h, ax = 1010h SET INDIVIDUAL DAC REGISTER (VGA/MCGA) color components in 6-bit values (0-63)

pub fn set_dac_block(
    &mut self,
    mmu: &mut MMU,
    index: u16,
    count: u16,
    seg: u16,
    off: u16
)
[src]

int 10, ax = 1012h SET BLOCK OF DAC REGISTERS (VGA/MCGA)

pub fn get_individual_dac_register(&mut self, reg: u8) -> (u8, u8, u8)[src]

int 10h, ax = 1015h READ INDIVIDUAL DAC REGISTER (VGA/MCGA)

pub fn progress_scanline(&mut self)[src]

HACK to have a source of info to toggle CGA status register

pub fn read_cga_status_register(&self) -> u8[src]

CGA status register (0x03DA) color EGA/VGA: input status 1 register

pub fn init(&mut self, mmu: &mut MMU)[src]

Trait Implementations

impl Component for GPU[src]

impl Clone for GPU[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for GPU

impl Sync for GPU

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.