feat: implement BG Scrolling Registers

This commit is contained in:
2022-02-13 04:04:10 -04:00
parent b238a3e8f3
commit ec25a9aae4
2 changed files with 38 additions and 1 deletions

View File

@@ -47,6 +47,10 @@ pub const Ppu = struct {
const scanline = io.vcount.scanline.read();
switch (bg_mode) {
0x0 => {
// Mode 0
},
0x3 => {
const start = framebuf_pitch * @as(usize, scanline);
const end = start + framebuf_pitch;
@@ -70,7 +74,7 @@ pub const Ppu = struct {
self.framebuf[buf_start + j] = self.palette.buf[id];
}
},
else => {}, // std.debug.panic("[PPU] TODO: Implement BG Mode {}", .{bg_mode}),
else => std.debug.panic("[PPU] TODO: Implement BG Mode {}", .{bg_mode}),
}
}
};