Skip to content

Commit

Permalink
Merge pull request #21 from workhorsy/master
Browse files Browse the repository at this point in the history
Fixed mapper 4
  • Loading branch information
bfirsh committed Nov 6, 2012
2 parents 9092b53 + cd1d9f2 commit 4e7a726
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/mappers.js
Expand Up @@ -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;
Expand Down

0 comments on commit 4e7a726

Please sign in to comment.