diff options
author | Matthew Brennan Jones <mattjones@workhorsy.org> | 2012-11-06 02:33:52 -0800 |
---|---|---|
committer | Matthew Brennan Jones <mattjones@workhorsy.org> | 2012-11-06 02:33:52 -0800 |
commit | cd1d9f2ff64cfea88fcf173f82b19e64be764dd5 (patch) | |
tree | 6043cb21865442bc1b82294867d0c17cda107cf8 | |
parent | 9092b537d929c2a4da26ce623819b8dc176dfbb2 (diff) | |
download | jsnes-cd1d9f2ff64cfea88fcf173f82b19e64be764dd5.zip jsnes-cd1d9f2ff64cfea88fcf173f82b19e64be764dd5.tar.gz jsnes-cd1d9f2ff64cfea88fcf173f82b19e64be764dd5.tar.bz2 |
Fixed Mapper 4 graphical garbage. It was not triggering IRQ Normal from counter.
-rw-r--r-- | source/mappers.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/mappers.js b/source/mappers.js index f3d600d..fbe9aa2 100644 --- a/source/mappers.js +++ b/source/mappers.js @@ -1090,6 +1090,18 @@ JSNES.Mappers[4].prototype.loadROM = function(rom) { this.nes.cpu.requestIrq(this.nes.cpu.IRQ_RESET); }; +JSNES.Mappers[4].prototype.clockIrqCounter = function() { + if (this.irqEnable == 1) { + this.irqCounter--; + if (this.irqCounter < 0) { + // Trigger IRQ: + //nes.getCpu().doIrq(); + this.nes.cpu.requestIrq(this.nes.cpu.IRQ_NORMAL); + this.irqCounter = this.irqLatchValue; + } + } +}; + JSNES.Mappers[4].prototype.toJSON = function() { var s = JSNES.Mappers[0].prototype.toJSON.apply(this); s.command = this.command; |