diff --git a/CHANGELOG.md b/CHANGELOG.md index 28b1e7bbf306c4b77b25cecddea4c24f9e9fb705..2c4f32428224998434f0a6d17930d88ad3d9e920 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * Issue with background color and change of palette colors +* Issue related with STAT interrupt not being triggered for all conditions ## [0.5.5] - 2022-11-17 diff --git a/src/ppu.rs b/src/ppu.rs index d6604967cbff40daaa403b662de515c6fe2bf871..3d53c85ca2c8b9391b4fef6f0f8a16e298edf947 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -407,6 +407,7 @@ impl Ppu { self.mode = PpuMode::HBlank; self.mode_clock -= 172; + self.update_stat() } } PpuMode::HBlank => { @@ -456,6 +457,7 @@ impl Ppu { self.window_counter = 0; self.first_frame = false; self.frame_index = self.frame_index.wrapping_add(1); + self.update_stat() } self.mode_clock -= 456;