chore(ppu): reimplement background/sprite fetcher state machine

This commit is contained in:
2021-04-27 04:57:00 -05:00
parent 9003617459
commit 7620633116
2 changed files with 98 additions and 100 deletions

View File

@@ -179,6 +179,17 @@ pub enum ObjectSize {
Sixteen = 1,
}
impl ObjectSize {
pub fn as_u8(&self) -> u8 {
use ObjectSize::*;
match self {
Eight => 8,
Sixteen => 16,
}
}
}
impl From<u8> for ObjectSize {
fn from(byte: u8) -> Self {
match byte {