feat(apu): impelement all apu i/o reads

This commit is contained in:
2022-10-29 04:10:19 -03:00
parent 647bd83224
commit 36832ba1fb
5 changed files with 96 additions and 28 deletions

View File

@@ -76,7 +76,7 @@ pub fn read(comptime T: type, ppu: *const Ppu, addr: u32) ?T {
0x50, 0x51 => @truncate(T, ppu.bldcnt.raw >> shift(byte)),
0x52, 0x53 => @truncate(T, ppu.bldalpha.raw >> shift(byte)),
0x54...0x55 => null, // BLDY
else => util.io.read.err(T, log, "unaligned {} read from 0x{X:0>8}", .{ T, addr }),
else => util.io.read.err(T, log, "unexpected {} read from 0x{X:0>8}", .{ T, addr }),
},
else => @compileError("PPU: Unsupported read width"),
};