1
0
mirror of https://github.com/pkimpel/retro-b5500.git synced 2026-05-02 22:33:52 +00:00

1. Commit emulator release 0.10.

2. Inhibit peripheral device windows from being closed while emulator is active.
3. Shut down peripheral devices and close their windows as part of cc.powerOff().
4. Add shut-down code to peripheral drivers.
5. Ensure SPO is ready in cc.load().
6. Enable emulator version display on B5500Console.
7. Clear DummyPrinter window when it is double-clicked (finally got this working).
8. Fix problem with "/" not accepted by SPO input in Google Chrome.
9. Commit ESPOL binary card loader image.
10. Fix problem with intensity levels in B5500Console NORMAL/CONTROL lights.
11. Attempt to enable emulator and utilities for Safari-style IndexedDB.
This commit is contained in:
paul.kimpel@digm.com
2013-07-15 03:31:34 +00:00
parent bd97a664eb
commit 27bd443f7c
14 changed files with 287 additions and 99 deletions

View File

@@ -61,7 +61,7 @@ function B5500CentralControl() {
/**************************************/
/* Global constants */
B5500CentralControl.version = "0.09";
B5500CentralControl.version = "0.10";
B5500CentralControl.memReadCycles = 2; // assume 2 µs memory read cycle time (the other option was 3 µs)
B5500CentralControl.memWriteCycles = 4; // assume 4 µs memory write cycle time (the other option was 6 µs)
@@ -788,11 +788,18 @@ B5500CentralControl.prototype.loadComplete = function loadComplete(dontStart) {
B5500CentralControl.prototype.load = function load(dontStart) {
/* Initiates a Load operation to start the system. If "dontStart" is truthy, then
only the MCP bootstrap is loaded into memory -- P1 is not started */
var result;
var boundLoadComplete = (function boundLoadComplete(that, dontStart) {
return function() {return that.loadComplete(dontStart)}
})(this, dontStart);
if (this.P1 && !this.P1.busy) {
if (!this.P1 || this.P1.busy) { // P1 is busy or not available
result = 1;
} else if (!this.testUnitReady(22)) { // SPO not ready
result = 2;
} else if (this.testUnitBusy(22)) { // SPO is busy
result = 3;
} else { // ready to rock 'n roll
this.clear();
this.nextTimeStamp = new Date().getTime();
this.tock();
@@ -820,7 +827,9 @@ B5500CentralControl.prototype.load = function load(dontStart) {
} else {
this.CCI04F = 1; // set I/O busy interrupt
}
result = 0; // all is copacetic
}
return result;
};
/**************************************/
@@ -1005,15 +1014,23 @@ B5500CentralControl.prototype.powerOn = function powerOn() {
B5500CentralControl.prototype.powerOff = function powerOff() {
/* Powers down the system and deallocates the hardware modules.
Redundant power-offs are ignored. */
var x;
var that = this;
function shutDown() {
var x;
if (this.poweredUp) {
this.halt();
if (this.timer) {
clearTimeout(this.timer);
this.timer = null;
}
// Shut down the peripheral devices
for (x=0; x<this.unit.length; x++) {
if (this.unit[x]) {
this.unit[x].shutDown();
}
}
// Deallocate the system modules
this.P1 = this.P2 = null;
this.PA = null;
@@ -1029,4 +1046,12 @@ B5500CentralControl.prototype.powerOff = function powerOff() {
this.poweredUp = 0;
}
if (this.poweredUp) {
this.halt();
// Wait a little while for I/Os, etc., to finish
setTimeout(function() {
shutDown.call(that);
}, 1000)
}
};