bugfix: Properly handle VCOUNT interrupt edge case for line 227.

fixes #97


Former-commit-id: 6e1cd347e82edfd6eca2b89e6e2a86e68e39d580
Former-commit-id: e9aeb8cc4dd503cfb3da4552e5618de5e982039b
This commit is contained in:
Michel Heily 2020-05-20 19:54:27 +03:00
parent 948bac03a2
commit 564f1dcb39

View file

@ -496,9 +496,8 @@ impl Gpu {
};
}
VBlankHBlank => {
self.update_vcount(self.vcount + 1, irqs);
if self.vcount < DISPLAY_HEIGHT + VBLANK_LINES - 1 {
self.update_vcount(self.vcount + 1, irqs);
self.dispstat.set_hblank_flag(false);
self.cycles_left_for_current_state = CYCLES_HDRAW;
self.state = VBlankHDraw;