Skip to content

Commit

Permalink
Merge pull request #61 from takahirox/AllowPPUCtrlWrite
Browse files Browse the repository at this point in the history
Allow write to ppuctrl even in the first 30k cycles since poweron/reset
  • Loading branch information
takahirox committed Dec 5, 2019
2 parents 1aa9c02 + a528677 commit c89d85b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ppu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,12 @@ impl Ppu {
0x2000 => {
// Ignore the write to this register
// for about 30k cycles after power/reset.
if self.frame == 0 && self.scanline <= 88 {
return;
}
// But I found some test roms writes to 0x2000
// right after power on so commenting out so far.

//if self.frame == 0 && self.scanline <= 88 {
// return;
//}

let previousNmiEnabled = self.ppuctrl.is_nmi_enabled();
self.ppuctrl.store(value);
Expand Down

0 comments on commit c89d85b

Please sign in to comment.