Skip to content
Snippets Groups Projects
Verified Commit 60426b00 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: more issues related to bad PPU handling

parent e0167129
No related branches found
No related tags found
No related merge requests found
Pipeline #1684 canceled
......@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
*
* More issues related with bad PPU handling
## [0.5.6] - 2022-11-17
......
......@@ -417,7 +417,7 @@ impl Ppu {
// registers make sense (are within range), the window
// switch is on and the line in drawing is above WY
if self.switch_window
&& self.wx - 7 < DISPLAY_WIDTH as u8
&& self.wx as i16 - 7 < DISPLAY_WIDTH as i16
&& self.wy < DISPLAY_HEIGHT as u8
&& self.ly >= self.wy
{
......@@ -468,7 +468,7 @@ impl Ppu {
pub fn read(&mut self, addr: u16) -> u8 {
match addr {
0x8000..=0x97ff => self.vram[(addr & 0x1fff) as usize],
0x8000..=0x9fff => self.vram[(addr & 0x1fff) as usize],
0xfe00..=0xfe9f => self.oam[(addr & 0x009f) as usize],
0xff80..=0xfffe => self.hram[(addr & 0x007f) as usize],
0xff40 => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment