mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-02 00:30:47 +00:00
fixed NES infinite loop
This commit is contained in:
parent
d16f87b990
commit
0cc5f0fb7b
@ -131,8 +131,7 @@ class JSNESPlatform extends Base6502Platform implements Platform, Probeable {
|
|||||||
//this.nes.ppu.showSpr0Hit = true;
|
//this.nes.ppu.showSpr0Hit = true;
|
||||||
//this.nes.ppu.clipToTvSize = false;
|
//this.nes.ppu.clipToTvSize = false;
|
||||||
this.nes.stop = () => {
|
this.nes.stop = () => {
|
||||||
// TODO: trigger breakpoint
|
this.breakpointHit(this.debugClock);
|
||||||
console.log(this.nes.cpu.toJSON());
|
|
||||||
throw new EmuHalt("CPU STOPPED");
|
throw new EmuHalt("CPU STOPPED");
|
||||||
};
|
};
|
||||||
// insert debug hook
|
// insert debug hook
|
||||||
@ -142,7 +141,7 @@ class JSNESPlatform extends Base6502Platform implements Platform, Probeable {
|
|||||||
var cycles = this.nes.cpu._emulate();
|
var cycles = this.nes.cpu._emulate();
|
||||||
this.evalDebugCondition();
|
this.evalDebugCondition();
|
||||||
this.probe.logClocks(cycles);
|
this.probe.logClocks(cycles);
|
||||||
return cycles;
|
return cycles > 0 ? cycles : 1;
|
||||||
}
|
}
|
||||||
this.timer = new AnimationTimer(60, this.nextFrame.bind(this));
|
this.timer = new AnimationTimer(60, this.nextFrame.bind(this));
|
||||||
// set keyboard map
|
// set keyboard map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user