some fixes
This commit is contained in:
parent
27e0374181
commit
9ada49a6d8
|
@ -319,9 +319,10 @@ where
|
||||||
Address::Io(address) => {
|
Address::Io(address) => {
|
||||||
if address.inner() == 0xFF50 {
|
if address.inner() == 0xFF50 {
|
||||||
self.bootrom = None
|
self.bootrom = None
|
||||||
}
|
} else {
|
||||||
self.set_io(address, data)
|
self.set_io(address, data)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Address::Hram(address) => self.cpu_ram[address.get_local() as usize] = data,
|
Address::Hram(address) => self.cpu_ram[address.get_local() as usize] = data,
|
||||||
Address::InterruptEnable(_) => self.interrupts.set_enable_register(data),
|
Address::InterruptEnable(_) => self.interrupts.set_enable_register(data),
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,7 +420,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_object(&mut self, scanline: u8, object: Object) {
|
fn render_object(&mut self, scanline: u8, object: Object) {
|
||||||
let mut object_row = scanline - (object.y.wrapping_sub(16));
|
let mut object_row = scanline.wrapping_sub(object.y.wrapping_sub(16));
|
||||||
if object.flags.y_flip {
|
if object.flags.y_flip {
|
||||||
object_row = self.lcdc.obj_size.get_height() - (object_row + 1);
|
object_row = self.lcdc.obj_size.get_height() - (object_row + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue