Fix access violation for DebugRead in Gpu
Former-commit-id: 25d2da276a50f662dafb4634c7b3fb4ebcf239f4 Former-commit-id: 4134896128ef3c7ddd8bbd2804d8d1edc46c7a6c
This commit is contained in:
parent
91c3b5321a
commit
1ab22f2b52
|
@ -601,9 +601,9 @@ impl DebugRead for Gpu {
|
|||
fn debug_read_8(&self, addr: Addr) -> u8 {
|
||||
let page = (addr >> 24) as usize;
|
||||
match page {
|
||||
PAGE_PALRAM => self.palette_ram.read_8(addr),
|
||||
PAGE_VRAM => self.vram.read_8(addr),
|
||||
PAGE_OAM => self.vram.read_8(addr),
|
||||
PAGE_PALRAM => self.palette_ram.read_8(addr & 0x3ff),
|
||||
PAGE_VRAM => self.vram.read_8(addr & ((VIDEO_RAM_SIZE as u32) - 1)),
|
||||
PAGE_OAM => self.vram.read_8(addr & 0x3ff),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue