Merge branch 'master' into gh-pages
This commit is contained in:
commit
2494f9266f
7 changed files with 274 additions and 255 deletions
|
|
@ -14,7 +14,8 @@ This machine is also available with our built-in [Debugger](debugger/).
|
|||
Front Panel Basics
|
||||
------------------
|
||||
|
||||
From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10, p. 325:
|
||||
From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10,
|
||||
p. 325:
|
||||
|
||||
> ### CONSOLE OPERATION
|
||||
|
||||
|
|
@ -24,13 +25,14 @@ and debugging. Lights and switches provide the facilities for monitoring operati
|
|||
Debugging and detailed tracing of operations can be accomplished by having the computer execute single instructions or
|
||||
single cycles. Contents of all locations can be examined, and data can be entered manually from the console switches.
|
||||
|
||||
The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Front Panel. The switches, which
|
||||
PDPjs displays as green to make them stand out from the rest of the pink-and-magenta controls, are summarized below.
|
||||
The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Console. The switches, which
|
||||
PDPjs displays as green to make them stand out from the rest of the traditional pink-and-magenta controls, are summarized
|
||||
below.
|
||||
|
||||
### 0-21
|
||||
### 0..21
|
||||
|
||||
These control bits 0 to 21 of the SWITCH register. The UP position represents a ONE, and the DOWN position
|
||||
represents a ZERO. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the
|
||||
Switches 0 to 21 control bits 0 to 21 of the SWITCH register. The UP position represents a 1, and the DOWN position
|
||||
represents a 0. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the
|
||||
ADDRESS register (as displayed by the top row of LEDs), or directly into the memory location referenced by the ADDRESS
|
||||
register (where it will become the DATA displayed by the second row of LEDs).
|
||||
|
||||
|
|
@ -46,7 +48,7 @@ and if you didn't realize that a particular light was "burned out", you could mi
|
|||
While the TEST switch is more "cute" than useful on a virtual Front Panel, we have added one "innovation" to the switch:
|
||||
pressing it also returns all the SWITCH register switches (0-21) to their DOWN position.
|
||||
|
||||
### LOAD
|
||||
### LOAD [ADRS]
|
||||
|
||||
This is a momentary switch that is normally in the UP position. When pressed DOWN, it copies the SWITCH register to the
|
||||
ADDRESS register.
|
||||
|
|
@ -58,8 +60,8 @@ by the ADDRESS register and displays it in the DATA register. If pressed repeat
|
|||
adds 2 to the ADDRESS register, making it easier to examine a series of words. Note that if the CPU registers are being
|
||||
examined (starting at address 177700), the ADDRESS register will advance by 1 instead of 2.
|
||||
|
||||
Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM operations
|
||||
will decrease the ADDRESS register instead of increasing it.
|
||||
Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM or DEP
|
||||
operations will decrease the ADDRESS register instead of increasing it.
|
||||
|
||||
### DEP
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Toggle-Ins
|
|||
|
||||
As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf),
|
||||
Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. If you're
|
||||
not sure how "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/machine/1170/panel/#front-panel-basics).
|
||||
not sure how to "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/machine/1170/panel/#front-panel-basics).
|
||||
|
||||
However, since the above machine also includes the PDPjs Debugger, you'll find that it's much easier to use the Debugger commands
|
||||
described below to load and execute these "toggle-ins".
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
|
||||
var device = this;
|
||||
this.kw11.timer = cpu.addTimer(function() {
|
||||
device.kw11_interrupt();
|
||||
device.interruptKW11();
|
||||
});
|
||||
|
||||
this.kw11.trigger = cpu.addTrigger(PDP11.KW11.VEC, PDP11.KW11.PRI);
|
||||
|
|
@ -141,21 +141,28 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
DevicePDP11.prototype.reset = function()
|
||||
{
|
||||
this.kw11.lks = 0;
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60, true);
|
||||
};
|
||||
|
||||
/**
|
||||
* kw11_interrupt()
|
||||
* interruptKW11()
|
||||
*
|
||||
* We used to call this function only when the the KW11's "Interrupt Enable" bit was set,
|
||||
* but now we call it at 60Hz regardless. In part, this was so we could piggy-back on
|
||||
* it to drive display updates, but more importantly, the KW11's "Monitor" bit is supposed
|
||||
* to be set at the "line frequency" independent of whether KW11 interrupts are enabled.
|
||||
* So we should actually be more compatible now.
|
||||
*
|
||||
* @this {DevicePDP11}
|
||||
*/
|
||||
DevicePDP11.prototype.kw11_interrupt = function()
|
||||
DevicePDP11.prototype.interruptKW11 = function()
|
||||
{
|
||||
this.kw11.lks |= PDP11.KW11.LKS.MON;
|
||||
if (this.kw11.lks & PDP11.KW11.LKS.IE) {
|
||||
this.cpu.setTrigger(this.kw11.trigger);
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||
}
|
||||
if (this.cmp) this.cmp.updateDisplays(1);
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -181,10 +188,6 @@ DevicePDP11.prototype.readLKS = function(addr)
|
|||
*/
|
||||
DevicePDP11.prototype.writeLKS = function(data, addr)
|
||||
{
|
||||
this.kw11.lks = data;
|
||||
if (data & PDP11.KW11.LKS.IE) {
|
||||
this.cpu.setTimer(this.kw11.timer, 1000/60);
|
||||
}
|
||||
this.kw11.lks = data & ~PDP11.KW11.LKS.MON;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -836,9 +836,7 @@ PanelPDP11.prototype.advanceAddr = function()
|
|||
var inc = fGenRegs? 1 : 2;
|
||||
var mask = fGenRegs? 0xf : this.bus.nBusMask;
|
||||
if (!this.getSwitch(PanelPDP11.SWITCH.STEP)) inc = -inc;
|
||||
this.regAddr = (this.regAddr & ~mask) | ((this.regAddr + inc) & mask);
|
||||
this.setLEDArray("A", this.regAddr, 22);
|
||||
return this.regAddr;
|
||||
return this.setAddr((this.regAddr & ~mask) | ((this.regAddr + inc) & mask));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -943,7 +941,9 @@ PanelPDP11.prototype.stop = function(ms, nCycles)
|
|||
PanelPDP11.prototype.updateDisplay = function(nUpdate)
|
||||
{
|
||||
if (this.cLiveRegs) {
|
||||
if (nUpdate < 0 || !this.cpu.isRunning() || this.fDisplayLiveRegs) {
|
||||
var fRunning = this.cpu.isRunning();
|
||||
if (nUpdate < 0 || !fRunning || this.fDisplayLiveRegs) {
|
||||
|
||||
/*
|
||||
* We arbitrarily separate the display elements into two categories: cheap and expensive.
|
||||
*
|
||||
|
|
@ -963,8 +963,12 @@ PanelPDP11.prototype.updateDisplay = function(nUpdate)
|
|||
this.nPeriodicCount = 0;
|
||||
}
|
||||
|
||||
this.setLEDArray("D", this.regData, 16);
|
||||
this.setLEDArray("A", this.regAddr, 22);
|
||||
/*
|
||||
* Update the ADDRESS and DATA LEDs by setting their values, which may or may not have changed....
|
||||
*/
|
||||
this.setAddr(nUpdate > 0 && fRunning? this.cpu.getPC() : this.regAddr);
|
||||
this.setData(this.regData);
|
||||
|
||||
/*
|
||||
* Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1007,6 +1007,11 @@ RL11.prototype.readData = function(drive, iCylinder, iHead, iSector, nWords, add
|
|||
var disk = drive.disk;
|
||||
var sector = null, ibSector;
|
||||
|
||||
if (!disk) {
|
||||
err = PDP11.RL11.ERRC.HNF; // TODO: Review
|
||||
nWords = 0;
|
||||
}
|
||||
|
||||
while (nWords--) {
|
||||
if (!sector) {
|
||||
sector = drive.disk.seek(iCylinder, iHead, iSector + 1);
|
||||
|
|
@ -1063,6 +1068,11 @@ RL11.prototype.writeData = function(drive, iCylinder, iHead, iSector, nWords, ad
|
|||
var disk = drive.disk;
|
||||
var sector = null, ibSector;
|
||||
|
||||
if (!disk) {
|
||||
err = PDP11.RL11.ERRC.HNF; // TODO: Review
|
||||
nWords = 0;
|
||||
}
|
||||
|
||||
while (nWords--) {
|
||||
var data = this.bus.getWord(addr);
|
||||
if (this.bus.checkFault()) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue