From 7bfe2b41dcd69a31ff4227f57b9a10d3642509b7 Mon Sep 17 00:00:00 2001 From: copy Date: Mon, 19 Jan 2015 21:58:58 +0100 Subject: [PATCH] minor --- docs/samples/save_restore.html | 3 ++- src/debug.macro.js | 10 +--------- src/main.js | 2 +- src/memory.js | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docs/samples/save_restore.html b/docs/samples/save_restore.html index c86a2b23..e0d469af 100644 --- a/docs/samples/save_restore.html +++ b/docs/samples/save_restore.html @@ -45,6 +45,7 @@ window.onload = function() throw error; } + console.log("Saved state of " + new_state.byteLength + " bytes"); button.value = "Restore state"; state = new_state; }); @@ -63,7 +64,7 @@ window.onload = function() } var a = document.createElement("a"); - a.download = "v86-state.bin"; + a.download = "v86state.bin"; a.href = window.URL.createObjectURL(new Blob([new_state])); a.dataset.downloadurl = "application/octet-stream:" + a.download + ":" + a.href; a.click(); diff --git a/src/debug.macro.js b/src/debug.macro.js index 31fca669..23e5e6f2 100644 --- a/src/debug.macro.js +++ b/src/debug.macro.js @@ -33,7 +33,7 @@ } } - console.log(el); + console.log(x); }; debug.init = function() @@ -594,14 +594,6 @@ start = 0; } - // textarea method: (slow) - //var result_string = ""; - //for(var i = start; i < start + end; i++) - //{ - // result_string += String.fromCharCode(int8array[i]); - //} - //dump_text(btoa(result_string)); - return cpu.memory.buffer.slice(start, start + count); } diff --git a/src/main.js b/src/main.js index d2226233..238f1f08 100644 --- a/src/main.js +++ b/src/main.js @@ -84,7 +84,7 @@ v86.prototype.init = function(settings) } this.cpu.init(settings, this.bus); - this.bus.send_async("emulator-ready"); + this.bus.send("emulator-ready"); }; // initialization that only needs to be once diff --git a/src/memory.js b/src/memory.js index d05524c4..e37ce4c4 100644 --- a/src/memory.js +++ b/src/memory.js @@ -23,7 +23,7 @@ function Memory(memory_size) dbg_assert((memory_size & MMAP_BLOCK_SIZE - 1) === 0); - this.buffer = new ArrayBuffer(memory_size);; + this.buffer = new ArrayBuffer(memory_size); this._state_restore(); };