jsnes
jsnes copied to clipboard
Infinite loop when undefined opcode is read
trafficstars
When an undefined opcode is read, the .stop() method is called, which sets the running flag to false, but the FRAMELOOP in nes.js keeps running even when nes.running is false. I fixed this by changing the for loop to for (; this.running ;) and that seemed to work.
I tested this by running a blank ROM, which is just 0s for all of the PRG and CHR ROM. It locks up the browser and is very unpleasant.
In addition, the stop() method doesn’t even exist any longer. All the same problem.