aboutsummaryrefslogtreecommitdiff
path: root/src/ppu.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ppu.rs')
-rw-r--r--src/ppu.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ppu.rs b/src/ppu.rs
index 945100a..87ac6de 100644
--- a/src/ppu.rs
+++ b/src/ppu.rs
@@ -6,6 +6,7 @@ use core::intrinsics::transmute;
pub trait Screen {
fn put(&mut self, x: u8, y: u8, color: u8);
fn render(&mut self);
+ fn frame(&mut self);
}
#[repr(C, packed)]
@@ -52,7 +53,7 @@ pub struct PPU<'a> {
early_read: bool,
/* IO */
mem: PPUMemory<'a>,
- scr: &'a mut Screen,
+ pub scr: &'a mut Screen,
}
impl<'a> PPU<'a> {
@@ -199,7 +200,6 @@ impl<'a> PPU<'a> {
const FLAG_OVERFLOW: u8 = 1 << 5;
const FLAG_SPRITE_ZERO: u8 = 1 << 6;
const FLAG_VBLANK: u8 = 1 << 7;
-
#[inline(always)]
fn fetch_nametable_byte(&mut self) {
self.bg_nt = self.mem.read_nametable(self.v & 0x0fff);