Fixed autoMount processing when multiple disk controllers are loaded

This commit is contained in:
Jeff Parsons 2016-11-22 11:14:57 -08:00 committed by Jeff Parsons
commit 871b22c779
8 changed files with 114 additions and 61 deletions

View file

@ -0,0 +1,31 @@
---
layout: page
title: PDP-11/70 with Front Panel and Debugger
permalink: /devices/pdp11/machine/1170/panel/debugger/xxdp/
machines:
- id: test1170
type: pdp11
config: /devices/pdp11/machine/1170/panel/debugger/machine.xml
debugger: true
autoStart: true
autoMount:
RK0:
path: http://archive.pcjs.org/disks/dec/rk03/RK03-RT11-V40.json
RL0:
path: http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json
---
This machine is ready to boot [XXDP+ Diagnostics](/disks/dec/rl02k/xxdp/) ("BOOT RL0") and run
diagnostics (e.g., "R EKBEE1"):
- [EKBAD0: 11/70 CPU DIAGNOSTIC (PART 1)](/disks/dec/rl02k/xxdp/ekbad0/)
- [EKBBF0: 11/70 CPU DIAGNOSTIC (PART 2)](/disks/dec/rl02k/xxdp/ekbbf0/)
- [EKBEE1: 11/70 MEMORY MANAGEMENT DIAGNOSTIC](/disks/dec/rl02k/xxdp/ekbee1/)
For more information about booting and running these diagnostics, see [XXDP+ Diagnostics](/disks/dec/rl02k/xxdp/).
{% include machine.html id="test1170" %}
Other interesting things to know about this machine:
* It includes an [M9312 ROM](/devices/pdp11/rom/M9312/) at address 165000. The exact ROM is [23-616F1](/devices/pdp11/rom/M9312/23-616F1.txt).

View file

@ -5,6 +5,7 @@ permalink: /devices/pdp11/machine/1170/panel/debugger/xxdp/
machines:
- id: test1170
type: pdp11
config: /devices/pdp11/machine/1170/panel/debugger/machine.xml
debugger: true
autoStart: true
autoMount:

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.4/machine.xsl"?>
<machine id="test1170" class="pdp11" border="1" pos="center" background="#FAEBD7">
<name pos="center">PDP-11/70 with 256Kb, Front Panel and Debugger</name>
<computer id="computer" busWidth="22"/>
<cpu id="cpu" model="1170" cycles="6666667"/>
<ram id="ram" addr="0x00000" size="0x40000" file="/apps/pdp11/boot/monitor/BOOTMON.json"/>
<rom id="m9312" addr="0xEA00" size="0x200" file="/devices/pdp11/rom/M9312/23-616F1.json"/>
<device id="default" type="default"/>
<serial id="dl11" adapter="0" binding="print" upperCase="true"/>
<panel ref="/devices/pdp11/panel/1170/debugger/front.xml"/>
<debugger id="debugger" base="8" messages="" commands=""/>
<device ref="/devices/pdp11/pc11/default.xml"/>
<device ref="/devices/pdp11/rk11/default.xml"/>
<device ref="/devices/pdp11/rl11/default.xml"/>
</machine>

View file

@ -4,7 +4,8 @@
<control type="container">
<control type="list" binding="listDrives"/>
<control type="list" binding="listDisks">
<disk id="disk01" name="XXDP+ Diagnostics" path="http://archive.pcjs.org/disks/dec/rk03/RK03-XXDP.json"/>
<disk id="disk01" name="RT-11 v4.0" path="http://archive.pcjs.org/disks/dec/rk03/RK03-RT11-V40.json"/>
<disk id="disk02" name="XXDP+ Diagnostics" path="http://archive.pcjs.org/disks/dec/rk03/RK03-XXDP.json"/>
</control>
<control type="button" binding="loadDrive">Load</control>
<control type="description" binding="descDisk" padRight="8px"/>

View file

@ -43,3 +43,23 @@ p. 1-7:
SW02 = 1 test selector (with switch 8)
SW01 = 1 test selector (with switch 8)
SW00 = 1 skip operator intervention testing
At the moment, PDPjs is failing a couple of tests within this diagnostic:
.R EKBBF0
EKBBF0.BIC
CEKBBF0 11/70 CPU #2
A
SCCE STACK OVERFLOW NOT GOING HIGH OR
NOT GETTING TO TMCD E31 OR E31 BAD
ERRORPC TEST NUMBER
020646 000040
CPU UNDER TEST FOUND TO BE A KB11-B/C OR KB11-CM
TMCA E67(8) NOT GETTING TO E76(13) OR E76 IS BAD
ERRORPC TEST NUMBER
026030 000063

View file

@ -716,7 +716,7 @@ DiskDump.API = function(aParms)
{
var sDisk = aParms[DumpAPI.QUERY.DISK];
var sFormat = aParms[DumpAPI.QUERY.FORMAT] || DumpAPI.FORMAT.JSON;
var fComments = (aParms[DumpAPI.QUERY.COMMENTS]? true : false);
var fComments = (!!aParms[DumpAPI.QUERY.COMMENTS]);
if (sDisk) {
var disk = new DiskDump(sDisk, null, sFormat, fComments);
@ -823,7 +823,7 @@ DiskDump.outputDisk = function(err, disk, sDiskPath, sOutputFile, fOverwrite, sM
* We'll dump JSON to the console, but not a raw disk buffer; we could add an option to
* "stringify" buffers, but if that's what the caller wants, they should use "--format=json".
*/
if (typeof data == "string") {
if (typeof data === "string") {
DiskDump.logConsole(data);
} else {
DiskDump.logConsole("specify --output={file} to save " + cbDisk + "-byte disk image");

View file

@ -58,7 +58,7 @@ function RK11(parms)
* We record any 'autoMount' object now, but we no longer parse it until initBus(),
* because the Computer's getMachineParm() service may have an override for us.
*/
this.configMount = parms['autoMount'] || null;
this.configMount = parms['autoMount'] || {};
this.cAutoMount = 0;
/*
@ -256,23 +256,33 @@ RK11.prototype.initBus = function(cmp, bus, cpu, dbg)
this.cpu = cpu;
this.dbg = dbg;
this.configMount = this.cmp.getMachineParm('autoMount') || this.configMount;
if (this.configMount) {
if (typeof this.configMount == "string") {
var configMount = this.cmp.getMachineParm('autoMount');
if (configMount) {
if (typeof configMount == "string") {
try {
/*
* The most likely source of any exception will be right here, where we're parsing
* this JSON-encoded data.
*/
this.configMount = eval("(" + this.configMount + ")");
configMount = eval("(" + configMount + ")");
} catch (e) {
Component.error("RK11 auto-mount error: " + e.message + " (" + this.configMount + ")");
this.configMount = null;
Component.error(this.type + " auto-mount error: " + e.message + " (" + configMount + ")");
configMount = null;
}
}
}
/*
* Add only drives from the machine-wide autoMount configuration that match drives managed by this component.
*
*/
if (configMount) {
for (var sDrive in configMount) {
if (sDrive.substr(0, 2) != this.type.substr(0, 2)) continue;
this.configMount[sDrive] = configMount[sDrive];
}
}
/*
* If we didn't need auto-mount support, we could defer controller initialization until we received
* a powerUp() notification, at which point reset() would call initController(), or restore() would restore
@ -442,22 +452,20 @@ RK11.prototype.saveController = function()
RK11.prototype.autoMount = function(fRemount)
{
if (!fRemount) this.cAutoMount = 0;
if (this.configMount) {
for (var sDrive in this.configMount) {
var configDrive = this.configMount[sDrive];
var sDiskPath = configDrive['path'] || "";
var sDiskName = configDrive['name'] || this.findDisk(sDiskPath);
if (sDiskPath && sDiskName) {
var iDrive = this.getDriveNumber(sDrive);
if (iDrive >= 0 && iDrive < this.aDrives.length) {
if (!this.loadDrive(iDrive, sDiskName, sDiskPath, true) && fRemount) {
this.setReady(false);
}
continue;
for (var sDrive in this.configMount) {
var configDrive = this.configMount[sDrive];
var sDiskPath = configDrive['path'] || "";
var sDiskName = configDrive['name'] || this.findDisk(sDiskPath);
if (sDiskPath && sDiskName) {
var iDrive = this.getDriveNumber(sDrive);
if (iDrive >= 0 && iDrive < this.aDrives.length) {
if (!this.loadDrive(iDrive, sDiskName, sDiskPath, true) && fRemount) {
this.setReady(false);
}
continue;
}
this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")");
}
this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")");
}
return !!this.cAutoMount;
};

View file

@ -58,7 +58,7 @@ function RL11(parms)
* We record any 'autoMount' object now, but we no longer parse it until initBus(),
* because the Computer's getMachineParm() service may have an override for us.
*/
this.configMount = parms['autoMount'] || null;
this.configMount = parms['autoMount'] || {};
this.cAutoMount = 0;
/*
@ -256,23 +256,33 @@ RL11.prototype.initBus = function(cmp, bus, cpu, dbg)
this.cpu = cpu;
this.dbg = dbg;
this.configMount = this.cmp.getMachineParm('autoMount') || this.configMount;
if (this.configMount) {
if (typeof this.configMount == "string") {
var configMount = this.cmp.getMachineParm('autoMount');
if (configMount) {
if (typeof configMount == "string") {
try {
/*
* The most likely source of any exception will be right here, where we're parsing
* this JSON-encoded data.
*/
this.configMount = eval("(" + this.configMount + ")");
configMount = eval("(" + configMount + ")");
} catch (e) {
Component.error("RL11 auto-mount error: " + e.message + " (" + this.configMount + ")");
this.configMount = null;
Component.error(this.type + " auto-mount error: " + e.message + " (" + configMount + ")");
configMount = null;
}
}
}
/*
* Add only drives from the machine-wide autoMount configuration that match drives managed by this component.
*
*/
if (configMount) {
for (var sDrive in configMount) {
if (sDrive.substr(0, 2) != this.type.substr(0, 2)) continue;
this.configMount[sDrive] = configMount[sDrive];
}
}
/*
* If we didn't need auto-mount support, we could defer controller initialization until we received
* a powerUp() notification, at which point reset() would call initController(), or restore() would restore
@ -442,22 +452,20 @@ RL11.prototype.saveController = function()
RL11.prototype.autoMount = function(fRemount)
{
if (!fRemount) this.cAutoMount = 0;
if (this.configMount) {
for (var sDrive in this.configMount) {
var configDrive = this.configMount[sDrive];
var sDiskPath = configDrive['path'] || "";
var sDiskName = configDrive['name'] || this.findDisk(sDiskPath);
if (sDiskPath && sDiskName) {
var iDrive = this.getDriveNumber(sDrive);
if (iDrive >= 0 && iDrive < this.aDrives.length) {
if (!this.loadDrive(iDrive, sDiskName, sDiskPath, true) && fRemount) {
this.setReady(false);
}
continue;
for (var sDrive in this.configMount) {
var configDrive = this.configMount[sDrive];
var sDiskPath = configDrive['path'] || "";
var sDiskName = configDrive['name'] || this.findDisk(sDiskPath);
if (sDiskPath && sDiskName) {
var iDrive = this.getDriveNumber(sDrive);
if (iDrive >= 0 && iDrive < this.aDrives.length) {
if (!this.loadDrive(iDrive, sDiskName, sDiskPath, true) && fRemount) {
this.setReady(false);
}
continue;
}
this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")");
}
this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")");
}
return !!this.cAutoMount;
};