diff --git a/emulator/B5500-Logo.jpg b/emulator/B5500-Logo.jpg new file mode 100644 index 0000000..3f69ac3 Binary files /dev/null and b/emulator/B5500-Logo.jpg differ diff --git a/emulator/B5500CentralControl.js b/emulator/B5500CentralControl.js index edaef2e..7b924b3 100644 --- a/emulator/B5500CentralControl.js +++ b/emulator/B5500CentralControl.js @@ -43,7 +43,8 @@ function B5500CentralControl() { this.clear(); // Create and initialize the Central Control state - this.tock.that = this; // Establish context for when tock() is called from setTimeout(). + this.tock.that = this; // Establish contexts for when called from setTimeout(). + this.loadComplete.that = this; } /**************************************/ @@ -524,23 +525,24 @@ B5500CentralControl.prototype.load = function() { } /**************************************/ -B5500CentralControl.prototype.loadComplete = function() { +B5500CentralControl.prototype.loadComplete = function loadComplete() { /* Monitors an initial load I/O operation for complete status. When complete, initiates P1 */ + var that = loadComplete.that; // capture the current closure context - if (!this.CCI08F) { - this.loadTimer = setTimeout(this.loadComplete, 10); + if (!that.CCI08F) { + that.loadTimer = setTimeout(that.loadComplete, 10); } else { - this.loadTimer = null - this.LOFF = 0; - this.P1.C = 0x10; // execute from address @20 - this.P1.L = 0; - this.P1.access(0x30); // P = [C] - this.P1.T = Math.floor(this.P / 0x1000000000) % 0x1000; - this.P1.TROF = 1; + that.loadTimer = null + that.LOFF = 0; + that.P1.C = 0x10; // execute from address @20 + that.P1.L = 0; + that.P1.access(0x30); // P = [C] + that.P1.T = Math.floor(that.P / 0x1000000000) % 0x1000; + that.P1.TROF = 1; // Now start scheduling P1 on the Javascript thread - this.P1.procTime = new Date().getTime()*1000; - this.P1.scheduler = setTimeout(this.P1.schedule, 0); + that.P1.procTime = new Date().getTime()*1000; + that.P1.scheduler = setTimeout(that.P1.schedule, 0); } } \ No newline at end of file diff --git a/emulator/B5500Console.html b/emulator/B5500Console.html new file mode 100644 index 0000000..2862498 --- /dev/null +++ b/emulator/B5500Console.html @@ -0,0 +1,52 @@ + + +B5500 Emulator Operator Console + + + + + + + + +
+ HALT +
+
+ NOT READY +
+
+ LOAD SELECT +
+
+ LOAD +
+
+ MEMORY CHECK +
+
+ A NORMAL +
+
+ A CONTROL +
+
+ B NORMAL +
+
+ B CONTROL +
+
+ POWER ON +
+
+ POWER OFF +
+ + + + + + \ No newline at end of file diff --git a/emulator/B5500DistributionAndDisplay.css b/emulator/B5500DistributionAndDisplay.css new file mode 100644 index 0000000..05a8ad1 --- /dev/null +++ b/emulator/B5500DistributionAndDisplay.css @@ -0,0 +1,89 @@ +/*********************************************************************** +* retro-b5500/emulator B5500DistributionAndDisplay.css +************************************************************************ +* Copyright (c) 2012, Nigel Williams and Paul Kimpel. +* Licensed under the MIT License, see http://www.opensource.org/licenses/mit-license.php +************************************************************************ +* B5500 emulator web interface style sheet. +************************************************************************ +* 2012-06-13 P.Kimpel +* Original version, from thin air. +***********************************************************************/ + +BODY.consoleBody { + background-color: #666666; + margin: 4px} + +DIV#BurroughsLogo { + background-color: black; + position: absolute; + top: 32px; + right: 32px; + border-top: 3px solid #EEEEEE; + border-bottom: 3px solid #EEEEEE} + +DIV#B5500Logo { + background-color: #EEEEEE; + font-family: Arial Narrow, Arial, Helvetica, sans-serif; + font-size: 24px; + color: #333333; + letter-spacing: 1px; + padding-left: 4px; + padding-right: 4px; + position: absolute; + top: 72px; + right: 32px} + +DIV.blackButton { + background-color: black; + color: white; + font-size: 10px; + position: absolute; + top: 32px; + width: 48px; + height: 32px; + text-align: center; + padding: 2px; + border: 1px solid #DDDDDD; + border-radius: 4px} + +DIV.whiteButton { + background-color: #CCCCCC; + color: black; + font-size: 10px; + position: absolute; + top: 32px; + width: 48px; + height: 32px; + text-align: center; + padding: 2px; + border: 1px solid #DDDDDD; + border-radius: 4px} + +DIV.yellowButton { + background-color: #999900; + color: black; + font-size: 10px; + position: absolute; + top: 32px; + width: 48px; + height: 32px; + text-align: center; + padding: 2px; + border: 1px solid #DDDDDD; + border-radius: 4px} + +IMG#BurroughsLogoImage { + width: 150px; + text-align: center; + vertical-align: middle; + padding-top: 3px; + padding-bottom: 3px; + padding-left: 8px; + padding-right: 8px} + +SPAN.buttonCaption { + font-family: Arial Rounded, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; + vertical-align: middle} \ No newline at end of file diff --git a/emulator/B5500Processor.js b/emulator/B5500Processor.js index e91b3c0..9c47e94 100644 --- a/emulator/B5500Processor.js +++ b/emulator/B5500Processor.js @@ -25,6 +25,8 @@ function B5500Processor() { MAED: 0}; // Truthy if memory address/inhibit error this.clear(); // Create and initialize the processor state + + this.schedule.that = this; // Establish context for when called from setTimeout() } /**************************************/ @@ -333,7 +335,7 @@ B5500Processor.storeForInterrupt = function(forTest) { cc.HP2F = 1; cc.P2BF = 0; if (cc.P2.scheduler) { - cancelTimeout(cc.P2.scheduler); + cancelTimeout(cc.P2.scheduler); cc.P2.scheduler = null; } } @@ -1154,7 +1156,7 @@ B5500Processor.prototype.run = function() { } /**************************************/ -B5500Processor.prototype.schedule = function() { +B5500Processor.prototype.schedule = function schedule() { /* Schedules the processor run time and attempts to throttle performance to approximate that of a real B5500. Well, at least we hope this will run fast enough that the performance will need to be throttled. It establishes @@ -1166,18 +1168,19 @@ B5500Processor.prototype.schedule = function() { throttling the performance and allowing other modules a chance at the Javascript execution thread. */ var delayTime; + var that = schedule.that; - this.scheduler = null; - this.cycleLimit = this.timeSlice; - this.cycleCount = 0; + that.scheduler = null; + that.cycleLimit = that.timeSlice; + that.cycleCount = 0; - this.run(); + that.run(); - this.totalCycles += this.cycleCount - this.procTime += this.cycleCount; - if (this.busy) { - delayTime = this.procTime/1000 - new Date().getTime(); - this.scheduleSlack += delayTime; - this.scheduler = setTimeout(this.schedule, (delayTime < 0 ? 0 : delayTime)); + that.totalCycles += that.cycleCount + that.procTime += that.cycleCount; + if (that.busy) { + delayTime = that.procTime/1000 - new Date().getTime(); + that.scheduleSlack += delayTime; + that.scheduler = setTimeout(that.schedule, (delayTime < 0 ? 0 : delayTime)); } } \ No newline at end of file diff --git a/emulator/Burroughs-Logo-Neg.jpg b/emulator/Burroughs-Logo-Neg.jpg new file mode 100644 index 0000000..66085fa Binary files /dev/null and b/emulator/Burroughs-Logo-Neg.jpg differ diff --git a/emulator/Burroughs-Logo.jpg b/emulator/Burroughs-Logo.jpg new file mode 100644 index 0000000..4af4f8f Binary files /dev/null and b/emulator/Burroughs-Logo.jpg differ diff --git a/emulator/Burroughs-Logo.png b/emulator/Burroughs-Logo.png new file mode 100644 index 0000000..314733a Binary files /dev/null and b/emulator/Burroughs-Logo.png differ