feat: implement Obj Palette 0 and 1

This commit is contained in:
2021-03-16 02:36:09 -05:00
parent 8af434da07
commit 528b88eeb7
2 changed files with 71 additions and 23 deletions

View File

@@ -131,6 +131,8 @@ impl Bus {
0xFF43 => self.ppu.pos.scroll_x,
0xFF44 => self.ppu.pos.line_y,
0xFF47 => self.ppu.monochrome.bg_palette.into(),
0xFF48 => self.ppu.monochrome.obj_palette_0.into(),
0xFF49 => self.ppu.monochrome.obj_palette_1.into(),
_ => unimplemented!("Unable to read {:#06X} in I/O Registers", addr),
}
}
@@ -212,6 +214,8 @@ impl Bus {
0xFF43 => self.ppu.pos.scroll_x = byte,
0xFF44 => self.ppu.pos.line_y = byte,
0xFF47 => self.ppu.monochrome.bg_palette = byte.into(),
0xFF48 => self.ppu.monochrome.obj_palette_0 = byte.into(),
0xFF49 => self.ppu.monochrome.obj_palette_1 = byte.into(),
0xFF50 => {
// Disable Boot ROM
if byte != 0 {