chore: move vram buffer to PPU struct

This commit is contained in:
2020-12-24 00:27:06 -06:00
parent 677a584ba7
commit 26df683cff
2 changed files with 22 additions and 8 deletions

View File

@@ -1,7 +1,19 @@
struct PPU {
#[derive(Debug, Clone)]
pub struct PPU {
lcdc: LCDControl,
pub vram: [u8; 8192],
}
impl Default for PPU {
fn default() -> Self {
Self {
lcdc: Default::default(),
vram: [0; 8192],
}
}
}
#[derive(Debug,Default, Clone, Copy)]
struct LCDControl {
lcd_enable: bool, // Bit 7
window_tile_map_select: bool,