From 871b22c7797283302c64579bc808b571e6d2b1ab Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 22 Nov 2016 11:14:57 -0800 Subject: [PATCH] Fixed autoMount processing when multiple disk controllers are loaded --- .../1170/panel/debugger/rt11/README.md | 31 ++++++++++++ .../1170/panel/debugger/xxdp/README.md | 1 + .../1170/panel/debugger/xxdp/machine.xml | 16 ------ devices/pdp11/rk11/default.xml | 3 +- disks/dec/rl02k/xxdp/ekbbf0/README.md | 20 ++++++++ modules/diskdump/lib/diskdump.js | 4 +- modules/pdp11/lib/rk11.js | 50 +++++++++++-------- modules/pdp11/lib/rl11.js | 50 +++++++++++-------- 8 files changed, 114 insertions(+), 61 deletions(-) create mode 100644 devices/pdp11/machine/1170/panel/debugger/rt11/README.md delete mode 100644 devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml diff --git a/devices/pdp11/machine/1170/panel/debugger/rt11/README.md b/devices/pdp11/machine/1170/panel/debugger/rt11/README.md new file mode 100644 index 000000000..7762c4f64 --- /dev/null +++ b/devices/pdp11/machine/1170/panel/debugger/rt11/README.md @@ -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). diff --git a/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md b/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md index bb24cc15d..513b240f9 100644 --- a/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/xxdp/README.md @@ -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: diff --git a/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml b/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml deleted file mode 100644 index 99d6016c4..000000000 --- a/devices/pdp11/machine/1170/panel/debugger/xxdp/machine.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - PDP-11/70 with 256Kb, Front Panel and Debugger - - - - - - - - - - - - diff --git a/devices/pdp11/rk11/default.xml b/devices/pdp11/rk11/default.xml index 36aec9d66..488971a94 100644 --- a/devices/pdp11/rk11/default.xml +++ b/devices/pdp11/rk11/default.xml @@ -4,7 +4,8 @@ - + + Load diff --git a/disks/dec/rl02k/xxdp/ekbbf0/README.md b/disks/dec/rl02k/xxdp/ekbbf0/README.md index 847b737a6..330185148 100644 --- a/disks/dec/rl02k/xxdp/ekbbf0/README.md +++ b/disks/dec/rl02k/xxdp/ekbbf0/README.md @@ -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 + diff --git a/modules/diskdump/lib/diskdump.js b/modules/diskdump/lib/diskdump.js index e7f5ada2d..744ce32b6 100644 --- a/modules/diskdump/lib/diskdump.js +++ b/modules/diskdump/lib/diskdump.js @@ -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"); diff --git a/modules/pdp11/lib/rk11.js b/modules/pdp11/lib/rk11.js index c856b6b44..097835138 100644 --- a/modules/pdp11/lib/rk11.js +++ b/modules/pdp11/lib/rk11.js @@ -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; }; diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js index ef89740b5..57498f5e0 100644 --- a/modules/pdp11/lib/rl11.js +++ b/modules/pdp11/lib/rl11.js @@ -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; };