summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Firshman <ben@firshman.co.uk>2009-04-07 02:31:09 +0100
committerBen Firshman <ben@firshman.co.uk>2009-04-07 02:31:09 +0100
commit06b68465873aae45b29a02524f737f362ea49b9e (patch)
tree2005843a9bc987d1cb4ab4bcd43156c7d82c7898
parent5e4850d2c9bab262358951094e46752f576c4506 (diff)
downloadjsnes-06b68465873aae45b29a02524f737f362ea49b9e.zip
jsnes-06b68465873aae45b29a02524f737f362ea49b9e.tar.gz
jsnes-06b68465873aae45b29a02524f737f362ea49b9e.tar.bz2
A few small bugs.
-rw-r--r--cpu.js4
-rw-r--r--globals.js2
-rw-r--r--nes.js3
3 files changed, 5 insertions, 4 deletions
diff --git a/cpu.js b/cpu.js
index fcee562..87aadc8 100644
--- a/cpu.js
+++ b/cpu.js
@@ -1061,8 +1061,8 @@ function CPU(nes) {
// * ??? *
// *******
- this.nes.isRunning = false;
- alert("Game crashed, invalid opcode at address $"+opaddr.toString(16));
+ this.nes.stop();
+ this.nes.crashMessage = "Game crashed, invalid opcode at address $"+opaddr.toString(16);
break;
}
diff --git a/globals.js b/globals.js
index a9796ae..72d3003 100644
--- a/globals.js
+++ b/globals.js
@@ -32,7 +32,7 @@ var Globals = {
filterBrightenDepth: 3,
filterDarkenDepth : 3,
- nes: null,
+ nes: null
/*public static void println(String s){
nes.getGui().println(s);
}*/
diff --git a/nes.js b/nes.js
index 2f102ef..74cc6d7 100644
--- a/nes.js
+++ b/nes.js
@@ -13,6 +13,7 @@ function NES() {
this.romFile = null;
this.isRunning = false;
+ this.crashMessage = null;
this.palTable.loadNTSCPalette();
//this.palTable.loadDefaultPalette();
@@ -89,7 +90,7 @@ function NES() {
}
this.stop = function() {
- $("#status").text("Stopped.");
+ //$("#status").text("Stopped.");
clearInterval(this.frameInterval)
this.isRunning = false;
}