diff --git a/index.html b/index.html index be121da..ea8b299 100644 --- a/index.html +++ b/index.html @@ -39,9 +39,42 @@
-
+ + +
+ +

+ + +
@@ -78,12 +111,28 @@

Registers

var display = new Display($("canvas")[0]) var vm = new VM(display) var vmDebugger = new Debugger(vm) + var e = document.getElementById("romSelect") + var romChoice = e.options[e.selectedIndex].value + + loadROM(romChoice, function(program) { + vm.loadProgram(program) + vmDebugger.debug() + }) - loadROM("MAZE", function(program) { + $("#load").click(function() { + //Creates a reset by updating these varaibles. I tried adding a vm.reset() function and updating the debugger and display but this seems to be a quicker fix. + display = new Display($("canvas")[0]) + vm= new VM(display) + vmDebugger = new Debugger(vm) + + e = document.getElementById("romSelect") + romChoice = e.options[e.selectedIndex].value + loadROM(romChoice, function(program) { vm.loadProgram(program) vmDebugger.debug() }) + }) $("#run").click(function() { vm.run() })