Fixed the LKS Monitor bit

This commit is contained in:
Jeff 2016-11-08 09:24:01 -08:00 committed by Jeff Parsons
commit 010ba29b20
11 changed files with 42 additions and 18 deletions

View file

@ -10,8 +10,9 @@ PDP-11 Device Configurations
[PDP-11 Machines](/devices/pdp11/machine/) rely on a variety of machine configuration files and resources, including:
* [Control Panels](panel/)
* [Serial Interface for Display Terminals (DL11)](dl11/)
* [High-Speed Paper Tape Reader/Punch (PC11)](pc11/)
* Serial Interface for Display Terminals [(DL11)](dl11/)
* High-Speed Paper Tape Reader/Punch [(PC11)](pc11/)
* Disk Controllers ([RL11](rl11/))
* [ROM Images](rom/)
Sample machines include a

View file

@ -13,5 +13,5 @@ PDPjs is currently being tested with the following PDP-11/20 machine configurati
* [PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/) (with [Debugger](/devices/pdp11/machine/1120/bootstrap/debugger/))
* [PDP-11/20 BASIC Demo](/devices/pdp11/machine/1120/basic/) (with [Debugger](/devices/pdp11/machine/1120/basic/debugger/))
The "Demo" machines come with 16Kb of RAM and a [PC11 Paper Tape Reader](/devices/pdp11/pc11/). The "Boot Test" machine
The "Demo" machines come with 16Kb of RAM and a [PC11 Paper Tape Reader](/devices/pdp11/pc11/). The "Boot Monitor" machine
has 56Kb of RAM.

View file

@ -7,7 +7,7 @@ permalink: /devices/pdp11/machine/
PDP-11 Machine Configurations
-----------------------------
[PDPjs](/modules/pdp11/), our PDP-11 emulation module, supports the following PDP-11 machines:
[PDP-11 Devices](/devices/pdp11/) are used to build a variety of PDP-11 machines:
* [PDP-11/20](/devices/pdp11/machine/1120/)
* PDP-11/45

View file

@ -7,6 +7,9 @@ permalink: /devices/pdp11/rl11/
RL11 Disk Controller
--------------------
The RL11 Disk Controller controls up to four RL01 or RL02 disk drives, which in turn read/write RL01K or
[RL02K](/disks/dec/rl02k/) disk cartridges.
Machines containing the [RL11 Component](/modules/pdp11/lib/pc11.js) include:
- [PDP-11/70 Boot Monitor](/devices/pdp11/machine/1170/monitor/) (with [Debugger](/devices/pdp11/machine/1170/monitor/debugger/))
@ -30,7 +33,7 @@ used to control the device, such as choosing which disks should be "auto-mounted
<control type="container">
<control type="list" binding="listDrives"/>
<control type="list" binding="listDisks">
<disk id="rl3" name="XXDP Diagnostics" path="http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json"/>
<disk id="rl3" name="XXDP+ Diagnostics" path="http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json"/>
</control>
<control type="button" binding="loadDrive">Load</control>
<control type="description" binding="descDisk" padRight="8px"/>

View file

@ -4,7 +4,7 @@
<control type="container">
<control type="list" binding="listDrives"/>
<control type="list" binding="listDisks">
<disk id="rl3" name="XXDP Diagnostics" path="http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json"/>
<disk id="rl3" name="XXDP+ Diagnostics" path="http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json"/>
</control>
<control type="button" binding="loadDrive">Load</control>
<control type="description" binding="descDisk" padRight="8px"/>

View file

@ -7,4 +7,10 @@ permalink: /disks/dec/
DEC Disk Images
---------------
The DEC disk images we have archived are organized by type:
* RL01K
* [RL02K](rl02k/)
RL01K and RL02K disks are both single-platter cartridges with capacities of 5Mb and 10Mb, respectively,
and are designed to be used with an [RL11 Disk Controller](/devices/pdp11/rl11/).

View file

@ -7,4 +7,7 @@ permalink: /disks/dec/rl02k/
DEC RL02K Disk Images
---------------------
* [XXDP Diagnostics](http://archive.pcjs.org/disks/dec/rl02k/RL02K-XXDP.json)
RL02K disks are single-platter cartridges with 512 tracks per side, 40 sectors per track, and a sector size of 256 bytes,
for a total capacity of 10Mb. They are used with an [RL11 Disk Controller](/devices/pdp11/rl11/).
* XXDP+ Diagnostics [[source](http://skn.noip.me/pdp11/)]

View file

@ -10,7 +10,7 @@ PDP-11 Machine Emulation Module (PDPjs)
Overview
---
PDPjs, our PDP-11 machine emulation module, is adapted from
the JavaScript [PDP 11/70 Emulator (v1.4)](http://skn.noip.me/pdp11/pdp11.html) written by
the [PDP 11/70 Emulator (v1.4)](http://skn.noip.me/pdp11/pdp11.html) written by
[Paul Nankervis](mailto:paulnank@hotmail.com).
See the list of available [PDP-11 Machines](/devices/pdp11/machine/), which includes a
@ -33,5 +33,7 @@ PDPjs is currently comprised of the following non-shared components, as listed i
* [keyboard.js](/modules/pdp11/lib/keyboard.js)
* [serialport.js](/modules/pdp11/lib/serialport.js)
* [pc11.js](/modules/pdp11/lib/pc11.js)
* [disk.js](/modules/pdp11/lib/disk.js)
* [rl11.js](/modules/pdp11/lib/rl11.js)
* [debugger.js](/modules/pdp11/lib/debugger.js)
* [computer.js](/modules/pdp11/lib/computer.js)

View file

@ -579,7 +579,8 @@ var PDP11 = {
DELAY: 0,
LKS: {
IE: 0x0040, // Interrupt Enable
MON: 0x0080 // Monitor
MON: 0x0080, // Monitor
MASK: 0x00C0 // these are the only bits that can read or written
}
},
PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit)

View file

@ -140,7 +140,7 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
*/
DevicePDP11.prototype.reset = function()
{
this.kw11.lks = 0;
this.kw11.lks = PDP11.KW11.LKS.MON;
this.cpu.setTimer(this.kw11.timer, 1000/60, true);
};
@ -148,10 +148,9 @@ DevicePDP11.prototype.reset = function()
* 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.
* 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 or not.
*
* @this {DevicePDP11}
*/
@ -174,9 +173,12 @@ DevicePDP11.prototype.interruptKW11 = function()
*/
DevicePDP11.prototype.readLKS = function(addr)
{
var result = this.kw11.lks;
this.kw11.lks &= ~PDP11.KW11.LKS.MON;
return result;
/*
* NOTE: The original code always cleared LKS.MON (bit 7) after snapping the value for the read,
* but based on DEC's "Non-Interrupt Mode" programming examples, it's clear that's not how LKS.MON
* operates; if the caller wants to clear it, they must explicitly clear it with a write.
*/
return this.kw11.lks;
};
/**
@ -188,7 +190,12 @@ DevicePDP11.prototype.readLKS = function(addr)
*/
DevicePDP11.prototype.writeLKS = function(data, addr)
{
this.kw11.lks = data & ~PDP11.KW11.LKS.MON;
/*
* NOTE: The original code always cleared LKS.MON (bit 7) as part of any write, but based on DEC's
* "Non-Interrupt Mode" programming examples, which explicitly CLRB after TSTB reveals LKS.MON is set,
* I think that was wrong, and that all a write should do is mask off all the other (non-writable) bits.
*/
this.kw11.lks = data & PDP11.KW11.LKS.MASK;
};
/**

View file

@ -7,4 +7,5 @@ permalink: /pubs/dec/
Digital Equipment Corporation (DEC) Publications
------------------------------------------------
* [PDP-11](pdp11/)
* [VT100](vt100/)