display PPU registers and VRAM debug info

This commit is contained in:
2023-07-07 21:58:15 -05:00
parent e6d97f7203
commit 3e32e9d606
4 changed files with 206 additions and 7 deletions
+8 -2
View File
@@ -36,8 +36,6 @@ pub const M7B: u16 = 0x211C; // Rotation/Scaling Parameter B (and Math
pub const M7C: u16 = 0x211D; // Rotation/Scaling Parameter C (W)
pub const M7D: u16 = 0x211E; // Rotation/Scaling Parameter D (W)
pub const M7HOFS: u16 = 0x210D; // BG1 Horizontal Scroll (X) (W)
pub const M7VOFS: u16 = 0x210E; // BG1 Vertical Scroll (Y) (W)
pub const M7X: u16 = 0x211F; // Rotation/Scaling Center Coordinate X (W)
pub const M7Y: u16 = 0x2120; // Rotation/Scaling Center Coordinate Y (W)
@@ -156,6 +154,14 @@ impl PPURegisters {
}
}
pub fn registers(&self) -> &[u8] {
&self.data
}
pub fn vram(&self) -> &[u8] {
&self.vram
}
fn _read(&self, address: u16) -> u8 {
self.data[(address as usize) - 0x2100]
}