Documentation updates to accommodate the PDP-10 work that's starting now

This commit is contained in:
Jeff Parsons 2017-02-23 15:14:51 -08:00 committed by Jeff Parsons
commit 8320f58d44
20 changed files with 172 additions and 69 deletions

View file

@ -5,10 +5,10 @@ Welcome to PCjs, home of [PCx86](/docs/pcx86/), the original IBM PC simulation t
one of several JavaScript Machines in the [PCjs Project](https://github.com/jeffpar/pcjs), an open-source project that
includes:
* [PCx86](/docs/pcx86/), an x86-based emulator of [IBM PC and PC-compatible Machines](/devices/pcx86/machine/)
* [PCx86](/docs/pcx86/), an x86-based emulator of [IBM PC and PC-compatible](/devices/pcx86/machine/) machines
* [PC8080](/modules/pc8080/), an 8080 machine emulator (e.g., [Space Invaders](/devices/pc8080/machine/invaders/) and the [VT100 Terminal](/devices/pc8080/machine/vt100/))
* [C1Pjs](/docs/c1pjs/), an emulation of the 6502-based [Ohio Scientific Challenger 1P](/devices/c1p/)
* [PDPjs](/modules/pdp11/), a [PDP-11 Machine](/devices/pdp11/machine/) emulator that supports the [PDP-11/20](/devices/pdp11/machine/1120/), [PDP-11/45](/devices/pdp11/machine/1145/), and [PDP-11/70](/devices/pdp11/machine/1170/)
* [PDPjs](/docs/pdpjs/) emulators, with support for [PDP-10](/devices/pdp10/machine/) and [PDP-11](/devices/pdp11/machine/) machines
All PCjs machine simulations are written entirely in [JavaScript](/modules/). No Flash, Java or other plugins are
required. Supported browsers include modern versions of Chrome, Safari, Firefox, Internet Explorer (v9.0 and up), Edge,

View file

@ -10,3 +10,5 @@ PDP-10 Machine Configurations
PDPjs supports the following PDP-10 machine configurations:
* [PDP-10 Model KA10](/devices/pdp10/machine/ka10/)
**WARNING**: PDP-10 emulation is still in development, so functionality will be limited until further notice.

View file

@ -10,3 +10,5 @@ PDP-10 (Model KA10) Machine Configurations
PDPjs supports the following PDP-10 Model KA10 machine configurations:
* [PDP-10 Model KA10 Test Machine](/devices/pdp10/machine/ka10/test/) (with [Debugger](/devices/pdp10/machine/ka10/test/debugger/))
**WARNING**: PDP-10 emulation is still in development, so functionality will be limited until further notice.

View file

@ -12,4 +12,6 @@ PDP-10 Test Machine
A PDP-10 (Model KA10) is simulated below.
**WARNING**: PDP-10 emulation is still in development, so functionality will be limited until further notice.
{% include machine.html id="ka10test" %}

View file

@ -13,4 +13,6 @@ PDP-10 Test Machine with Debugger
A PDP-10 (Model KA10) is simulated below.
**WARNING**: PDP-10 emulation is still in development, so functionality will be limited until further notice.
{% include machine.html id="ka10test" %}

27
docs/pdpjs/README.md Normal file
View file

@ -0,0 +1,27 @@
---
layout: page
title: PDPjs Overview
permalink: /docs/pdpjs/
---
PDPjs Overview
---
PDPjs is a collection of JavaScript modules used to simulate an assortment of classic DEC computers.
It currently includes the following hardware emulation modules:
* [PDP-10 Module](/modules/pdp10/)
* [PDP-11 Module](/modules/pdp11/)
Related hardware and software documentation has also been archived here:
* [PDP-10 Documentation](/pubs/dec/pdp10/)
* [PDP-11 Documentation](/pubs/dec/pdp11/)
Explore our collection of pre-configured machine simulations:
* [PDP-10 Machines](/devices/pdp10/machine/)
* [PDP-11 Machines](/devices/pdp11/machine/)
More information about creating custom PDP-10 and PDP-11 machine simulations will be provided at a later date.

View file

@ -15,7 +15,7 @@ The project currently includes these emulation modules:
* [C1Pjs](c1pjs/): 6502 emulation module for the [Challenger 1P](/devices/c1p/)
* [PCx86](pcx86/): x86 emulation module for [IBM PC machines](/devices/pcx86/)
* [PC8080](pc8080/): 8080 emulation module for [8080-based machines](/devices/pc8080/)
* [PDPjs](pdp11/): PDP-11 emulation module for [PDP-11 machines](/devices/pdp11/) (eg, PDP-11/20, PDP-11/70)
* [PDPjs](/docs/pdpjs/): emulation modules for [PDP-10](pdp10/) and [PDP-11](pdp11/) machines
along with variety of Node support modules, such as:

30
modules/pdp10/README.md Normal file
View file

@ -0,0 +1,30 @@
---
layout: page
title: PDPjs Support for PDP-10 Machines
permalink: /modules/pdp10/
---
PDPjs Support for PDP-10 Machines
=================================
Overview
---
This PDPjs module for [PDP-10 Machines](/devices/pdp10/machine/) was added to the PCjs Project in 2017.
The module is currently comprised of the following components, as listed in [package.json](../../package.json)
(see the *pdp10Files* property):
* [bus.js](/modules/pdp10/lib/bus.js)
* [computer.js](/modules/pdp10/lib/computer.js)
* [cpu.js](/modules/pdp10/lib/cpu.js)
* [cpustate.js](/modules/pdp10/lib/cpustate.js)
* [debugger.js](/modules/pdp10/lib/debugger.js)
* [defines.js](/modules/pdp10/lib/defines.js)
* [device.js](/modules/pdp10/lib/device.js)
* [memory.js](/modules/pdp10/lib/memory.js)
* [messages.js](/modules/pdp10/lib/messages.js)
* [panel.js](/modules/pdp10/lib/panel.js)
* [ram.js](/modules/pdp10/lib/ram.js)
* [rom.js](/modules/pdp10/lib/rom.js)
* [serial.js](/modules/pdp10/lib/serial.js)

View file

@ -119,6 +119,9 @@ class BusPDP10 extends Component {
this.nBlockMask = this.nBlockTotal - 1;
this.assert(this.nBlockMask <= BlockInfoPDP10.num.mask);
this.nDisableFaults = 0;
this.fFault = false;
/*
* Define all the properties to be initialized by initMemory()
*/
@ -524,7 +527,9 @@ class BusPDP10 extends Component {
var w;
var off = addr & this.nBlockLimit;
var block = this.getBlockDirect(addr);
this.nDisableFaults++;
w = block.readWordDirect(off, addr);
this.nDisableFaults--;
return w;
}
@ -541,7 +546,9 @@ class BusPDP10 extends Component {
{
var off = addr & this.nBlockLimit;
var block = this.getBlockDirect(addr);
this.nDisableFaults++;
block.writeWordDirect(off, w & 0xffff, addr);
this.nDisableFaults--;
}
/**
@ -683,6 +690,42 @@ class BusPDP10 extends Component {
return addr;
}
/**
* fault(addr, err, access)
*
* Bus interface for signaling alignment errors, invalid memory, etc.
*
* @this {BusPDP10}
* @param {number} addr
* @param {number} [err]
* @param {number} [access] (for diagnostic purposes only)
*/
fault(addr, err, access)
{
this.fFault = true;
if (!this.nDisableFaults) {
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP10.FAULT)) {
this.dbg.printMessage("memory fault on " + this.dbg.toStrBase(addr), true, true);
this.dbg.stopCPU();
}
}
}
/**
* checkFault()
*
* This also serves as a clearFault() function.
*
* @this {BusPDP10}
* @return {boolean}
*/
checkFault()
{
var f = this.fFault;
this.fFault = false;
return f;
}
/**
* reportError(errNum, addr, size, fQuiet)
*

View file

@ -757,7 +757,7 @@ class DebuggerPDP10 extends Debugger {
messageInit(sEnable)
{
this.dbg = this;
this.bitsMessage = this.bitsWarning = MessagesPDP10.WARN;
this.bitsMessage = this.bitsWarning = MessagesPDP10.FAULT | MessagesPDP10.WARN;
this.sMessagePrev = null;
this.aMessageBuffer = [];
/*
@ -1311,7 +1311,7 @@ class DebuggerPDP10 extends Debugger {
*/
if (!nState) {
opCode = this.cpu.readWord(addr);
if (opCode == PDP10.OPCODE.HALT && this.cpu.getLastPC() == addr) {
if ((opCode & PDP10.OPCODE.HALTMASK) == PDP10.OPCODE.HALT && this.cpu.getLastPC() == addr) {
addr = this.cpu.advancePC(1);
}
}

View file

@ -103,7 +103,10 @@ var PDP10 = {
* Assorted common opcodes
*/
OPCODE: {
HALT: 0o000000000000, // TODO: Resolve
INSMASK: 0o777000000000,
ACCMASK: 0o000740000000,
HALTMASK: 0o777740000000,
HALT: 0o254200000000,
INVALID: 0o777777777777 // TODO: Resolve
},
/*

View file

@ -84,9 +84,9 @@ class MemoryPDP10 {
this.fReadOnly = (type == MemoryPDP10.TYPE.ROM);
this.dbg = null;
this.readBits = this.readBitsDirect = this.readNone;
this.readWord = this.readWordDirect = this.readWordDefault;
this.readWord = this.readWordDirect = this.readNone;
this.writeBits = this.writeBitsDirect = this.writeNone;
this.writeWord = this.writeWordDirect = this.writeWordDefault;
this.writeWord = this.writeWordDirect = this.writeNone;
this.cReadBreakpoints = this.cWriteBreakpoints = 0;
this.copyBreakpoints(); // initialize the block's Debugger info; the caller will reinitialize
@ -261,11 +261,11 @@ class MemoryPDP10 {
{
if (!fDirect || !this.cReadBreakpoints) {
this.readBits = afn[0] || this.readNone;
this.readWord = afn[2] || this.readWordDefault;
this.readWord = afn[2] || this.readNone;
}
if (fDirect || fDirect === undefined) {
this.readBitsDirect = afn[0] || this.readNone;
this.readWordDirect = afn[2] || this.readWordDefault;
this.readWordDirect = afn[2] || this.readNone;
}
}
@ -280,11 +280,11 @@ class MemoryPDP10 {
{
if (!fDirect || !this.cWriteBreakpoints) {
this.writeBits = !this.fReadOnly && afn[1] || this.writeNone;
this.writeWord = !this.fReadOnly && afn[3] || this.writeWordDefault;
this.writeWord = !this.fReadOnly && afn[3] || this.writeNone;
}
if (fDirect || fDirect === undefined) {
this.writeBitsDirect = afn[1] || this.writeNone;
this.writeWordDirect = afn[3] || this.writeWordDefault;
this.writeWordDirect = afn[3] || this.writeNone;
}
}
@ -307,7 +307,7 @@ class MemoryPDP10 {
resetWriteAccess()
{
this.writeBits = this.fReadOnly? this.writeNone : this.writeBitsDirect;
this.writeWord = this.fReadOnly? this.writeWordDefault : this.writeWordDirect;
this.writeWord = this.fReadOnly? this.writeNone : this.writeWordDirect;
}
/**
@ -393,7 +393,7 @@ class MemoryPDP10 {
}
/**
* readNone(off)
* readNone(off, addr)
*
* @this {MemoryPDP10}
* @param {number} off
@ -405,6 +405,7 @@ class MemoryPDP10 {
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP10.MEMORY) /* && !off */) {
this.dbg.printMessage("attempt to read invalid address " + this.dbg.toStrBase(addr), true);
}
this.bus.fault(addr);
return 0;
}
@ -424,42 +425,16 @@ class MemoryPDP10 {
}
/**
* readWordDefault(off, addr)
* readBitsMemory(off, addr, offBits, lenBits)
*
* @this {MemoryPDP10}
* @param {number} off
* @param {number} addr
* @return {number}
*/
readWordDefault(off, addr)
{
return this.readWord(off, addr);
}
/**
* writeWordDefault(w, off, addr)
*
* @this {MemoryPDP10}
* @param {number} w
* @param {number} off
* @param {number} addr
*/
writeWordDefault(w, off, addr)
{
this.writeWord(w, off, addr);
}
/**
* readBitsMemory(offBits, lenBits, off, addr)
*
* @this {MemoryPDP10}
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
* @param {number} off
* @param {number} addr
* @return {number}
*/
readBitsMemory(offBits, lenBits, off, addr)
readBitsMemory(off, addr, offBits, lenBits)
{
var w = this.aw[off];
if (offBits + lenBits <= 32) {
@ -484,16 +459,16 @@ class MemoryPDP10 {
}
/**
* writeBitsMemory(offBits, lenBits, bits, off, addr)
* writeBitsMemory(bits, off, addr, offBits, lenBits)
*
* @this {MemoryPDP10}
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
* @param {number} bits (only the right-most lenBits of bits are used, so this value doesn't need to be pre-masked)
* @param {number} bits (only the right-most lenBits of bits are used, so it doesn't need to be pre-masked)
* @param {number} off
* @param {number} addr
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
*/
writeBitsMemory(offBits, lenBits, bits, off, addr)
writeBitsMemory(bits, off, addr, offBits, lenBits)
{
var w = this.aw[off];
var shiftBits = Math.pow(2, offBits);
@ -521,21 +496,21 @@ class MemoryPDP10 {
}
/**
* readBitsChecked(offBits, lenBits, off, addr)
* readBitsChecked(off, addr, offBits, lenBits)
*
* @this {MemoryPDP10}
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
* @param {number} off
* @param {number} addr
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
* @return {number}
*/
readBitsChecked(offBits, lenBits, off, addr)
readBitsChecked(off, addr, offBits, lenBits)
{
if (DEBUGGER && this.dbg && this.addr != null) {
this.dbg.checkMemoryRead(this.addr + off);
}
return this.readBitsDirect(offBits, lenBits, off, addr);
return this.readBitsDirect(off, addr, offBits, lenBits);
}
/**
@ -555,21 +530,21 @@ class MemoryPDP10 {
}
/**
* writeBitsChecked(offBits, lenBits, bits, off, addr)
* writeBitsChecked(bits, off, addr, offBits, lenBits)
*
* @this {MemoryPDP10}
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
* @param {number} bits
* @param {number} off
* @param {number} addr
* @param {number} offBits (the bit position of the right-most bit of the result, using modern bit numbering)
* @param {number} lenBits
*/
writeBitsChecked(offBits, lenBits, bits, off, addr)
writeBitsChecked(bits, off, addr, offBits, lenBits)
{
if (DEBUGGER && this.dbg && this.addr != null) {
this.dbg.checkMemoryWrite(this.addr + off);
}
if (this.fReadOnly) this.writeNone(bits, off, addr); else this.writeBitsDirect(offBits, lenBits, bits, off, addr);
if (this.fReadOnly) this.writeNone(bits, off, addr); else this.writeBitsDirect(bits, off, addr, offBits, lenBits);
}
/**
@ -617,8 +592,8 @@ MemoryPDP10.idBlock = 0;
MemoryPDP10.afnNone = [
MemoryPDP10.prototype.readNone,
MemoryPDP10.prototype.writeNone,
MemoryPDP10.prototype.readWordDefault,
MemoryPDP10.prototype.writeWordDefault
MemoryPDP10.prototype.readNone,
MemoryPDP10.prototype.writeNone
];
*/
MemoryPDP10.afnNone = [];

View file

@ -1,20 +1,21 @@
---
layout: page
title: PDP-11 Machine Emulation Module (PDPjs)
title: PDPjs Support for PDP-11 Machines
permalink: /modules/pdp11/
---
PDP-11 Machine Emulation Module (PDPjs)
=======================================
PDPjs Support for PDP-11 Machines
=================================
Overview
---
PDPjs, our [PDP-11 Machine](/devices/pdp11/machine/) emulation module, was added to the PCjs Project in 2016.
This PDPjs module for [PDP-11 Machines](/devices/pdp11/machine/) was added to the PCjs Project in 2016.
It was adapted from the [PDP-11/70 Emulator](http://skn.noip.me/pdp11/pdp11.html) written by Paul Nankervis,
with permission.
PDPjs is currently comprised of the following PDP-11 components, as listed in [package.json](../../package.json)
The module is currently comprised of the following components, as listed in [package.json](../../package.json)
(see the *pdp11Files* property):
* [bus.js](/modules/pdp11/lib/bus.js)

View file

@ -534,7 +534,7 @@ class MemoryPDP11 {
}
/**
* readNone(off)
* readNone(off, addr)
*
* Previously, this always returned 0x00, but the initial memory probe by the COMPAQ DeskPro 386 ROM BIOS
* writes 0x0000 to the first word of every 64Kb block in the nearly 16Mb address space it supports, and

View file

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

14
pubs/dec/pdp10/README.md Normal file
View file

@ -0,0 +1,14 @@
---
layout: page
title: DEC PDP-10 Publications and Papers
permalink: /pubs/dec/pdp10/
---
PDP-10 Hardware Publications
---
This page summarizes PDP-10 documentation that was useful in creating [PDPjs](/docs/pdpjs/). In most cases,
these documents came from the PDF Document Archive at [bitsavers.org](http://bitsavers.org), in the [/pdf/dec/pdp10/](http://bitsavers.org/pdf/dec/pdp10/)
directory. If a PDF was not searchable, it was "OCR'ed" before being archived below.
- [PDP-10 System Reference Manual (1968)](http://archive.pcjs.org/pubs/dec/pdp10/ka10/DEC-10-HGAA-D_PDP-10_System_Reference_Manual_May1968.pdf) [[Original PDF](http://bitsavers.trailing-edge.com/pdf/dec/pdp10/KA10/DEC-10-HGAA-D_PDP-10_System_Reference_Manual_May1968.pdf)]

View file

@ -7,4 +7,4 @@ permalink: /versions/c1pjs/
C1Pjs Emulator Releases
---
The current version of C1Pjs is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/c1p.js).
The current C1Pjs emulator version is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/c1p.js).

View file

@ -7,4 +7,4 @@ permalink: /versions/pc8080/
PC8080 Emulator Releases
---
The current version of PC8080 is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pc8080.js).
The current PC8080 emulator version is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pc8080.js).

View file

@ -7,4 +7,4 @@ permalink: /versions/pcx86/
PCx86 Emulator Releases
---
The current version of PCx86 is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pcx86.js).
The current PCx86 emulator version is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pcx86.js).

View file

@ -7,4 +7,5 @@ permalink: /versions/pdpjs/
PDPjs Emulator Releases
---
The current version of the PDPjs PDP-11 emulator is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pdp11.js).
* The current [PDP-10](/devices/pdp10/machine/) emulator version is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pdp10.js)
* The current [PDP-11](/devices/pdp11/machine/) emulator version is [{{ site.pcjs.version }}]({{ site.pcjs.version }}/pdp11.js)